Fix PR review comments and refactor menu helper logic
Changes: - Added name parameter to createTechnician for consistency - Added function headers for notification-related methods in InventoryManagementService - Used variables for notification title and message instead of passing strings directly - Fixed payment reminder notification message formatting - Moved common helper functions to MenuHelper.h - Updated CustomerMenu to use shared helper functions instead of duplicate code - Added missing includes in MenuHelper.h - Removed redundant helper code from CustomerMenu.cpp - Minor formatting and comment cleanup
This commit is contained in:
+6
-6
@@ -60,9 +60,9 @@ void ServiceManagementService::purchaseService(const util::Vector<std::string>&
|
||||
throw std::runtime_error("Failed to create service booking");
|
||||
}
|
||||
serviceBookingMap[serviceBooking->getId()] = serviceBooking;
|
||||
sendNotification(authenticatedUser,
|
||||
"Service Booking succeeded",
|
||||
"Your service booking has been successfully placed with ID " + serviceBooking->getId());
|
||||
std::string title = "Service Booking succeeded";
|
||||
std::string message = "Your service booking has been successfully placed with ID " + serviceBooking->getId();
|
||||
sendNotification(authenticatedUser, title, message);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -99,9 +99,9 @@ void ServiceManagementService::purchaseComboPackage(const std::string& comboPack
|
||||
throw std::runtime_error("Failed to create combo package service booking");
|
||||
}
|
||||
serviceBookingMap[serviceBooking->getId()] = serviceBooking;
|
||||
sendNotification(authenticatedUser,
|
||||
"Combo Package Service Booking succeeded",
|
||||
"Your service booking for the combo package has been successfully placed with ID " + serviceBooking->getId());
|
||||
std::string title = "Combo Package Service Booking succeeded";
|
||||
std::string message = "Your service booking for the combo package has been successfully placed with ID " + serviceBooking->getId();
|
||||
sendNotification(authenticatedUser, title, message);
|
||||
}
|
||||
|
||||
util::Map<std::string, User*> ServiceManagementService::m_observers{};
|
||||
|
||||
Reference in New Issue
Block a user