diff --git a/Trenser.VehicleServiceSystem/Trenser.VehicleServiceSystem/services/ServiceManagementService.cpp b/Trenser.VehicleServiceSystem/Trenser.VehicleServiceSystem/services/ServiceManagementService.cpp index e12d9a3..1a9f753 100644 --- a/Trenser.VehicleServiceSystem/Trenser.VehicleServiceSystem/services/ServiceManagementService.cpp +++ b/Trenser.VehicleServiceSystem/Trenser.VehicleServiceSystem/services/ServiceManagementService.cpp @@ -541,6 +541,18 @@ static void restoreInventory(ServiceBooking* booking) } } +/* +Function: processBookingCancellation +Description: Handles cancellation or reassignment of a service booking based on user type. + Cancels associated job cards, updates booking status, clears technician assignments, + restores inventory, and sends appropriate notifications. +Parameters: + ServiceBooking* booking - The booking to cancel or reset + util::Map& jobs - Collection of job cards to update + ServiceManagementService& currentService - Service layer for notifications + util::UserType userType - Type of user initiating cancellation (CUSTOMER or TECHNICIAN) +Return type: void +*/ static void processBookingCancellation(ServiceBooking* booking, util::Map& jobs, ServiceManagementService& currentService,