From c64f3cff72afc47b5fc0486e98888eb619d85d6f Mon Sep 17 00:00:00 2001 From: Avinash Rajesh Date: Mon, 1 Jun 2026 18:13:11 +0530 Subject: [PATCH] Implemented Review Fixes --- .../services/ServiceManagementService.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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,