Implement Review Fixes

This commit is contained in:
Avinash Rajesh
2026-05-27 17:30:38 +05:30
committed by Joel Thomas
parent b25b3d59cf
commit b7bc1f574d
2 changed files with 9 additions and 13 deletions
@@ -600,7 +600,6 @@ Return type: void
*/
void ServiceManagementService::cancelCustomerServiceBookings(const std::string& customerID)
{
const int INCREMENT_VALUE = 1;
auto& users = m_dataStore.getUsers();
int userIndex = users.find(customerID);
if (userIndex == -1)
@@ -621,7 +620,6 @@ void ServiceManagementService::cancelCustomerServiceBookings(const std::string&
{
continue;
}
std::string bookingID = booking->getId();
if (booking->getCustomerId() != customerID)
{
continue;
@@ -634,7 +632,7 @@ void ServiceManagementService::cancelCustomerServiceBookings(const std::string&
std::string titleToTechnician = "Customer Service Cancelled";
std::string messageToTechnician = "The customer has cancelled their service booking. Your assigned job card has been cancelled and the inventory has been restocked.";
std::string jobTitle = "Job Cancelled";
std::string jobMessage = "The Job has cancelled. Your job card has been cancelled and the inventory has been restocked.";
std::string jobMessage = "The job has been cancelled. Your job card has been cancelled and the inventory has been restocked.";
processBookingCancellation(booking,
util::ServiceJobStatus::CANCELLED,
titleToTechnician, messageToTechnician, assignedTechnician,
@@ -653,7 +651,6 @@ Return type: void
*/
void ServiceManagementService::cancelTechnicianJobs(const std::string& technicianID)
{
const int INCREMENT_VALUE = 1;
auto& users = m_dataStore.getUsers();
int userIndex = users.find(technicianID);
if (userIndex == -1)
@@ -679,7 +676,6 @@ void ServiceManagementService::cancelTechnicianJobs(const std::string& technicia
{
continue;
}
std::string bookingID = booking->getId();
if (booking->getStatus() != util::ServiceJobStatus::PENDING && booking->getStatus() != util::ServiceJobStatus::STARTED)
{
continue;