Fix ServiceBooking ID prefix and notification messages
- change ServiceBooking ID prefix from `SRV` to `SBK` - add customer notification when technician is assigned to booking - fix typo in job completion exception message - remove unnecessary newline characters from completion notifications Fixes #1780
This commit is contained in:
+7
-4
@@ -833,6 +833,9 @@ void ServiceManagementService::createJobCard(const std::string& bookingID, const
|
||||
{
|
||||
throw std::runtime_error("Failed to create job card.");
|
||||
}
|
||||
title = "Technician assigned";
|
||||
message = "A technician has been assigned to your Service Booking with ID " + bookingID;
|
||||
sendNotification(currentBooking->getCustomer(), title, message);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1055,11 +1058,11 @@ void ServiceManagementService::completeJob(const std::string& jobID)
|
||||
}
|
||||
else
|
||||
{
|
||||
throw std::runtime_error("Failed to complete the job, some error occured or job already completed.");
|
||||
throw std::runtime_error("Failed to complete the job, some error occurred or job already completed.");
|
||||
}
|
||||
if (!jobStatusUpdated)
|
||||
{
|
||||
throw std::runtime_error("Failed to complete the job, some error occured or job already completed.");
|
||||
throw std::runtime_error("Failed to complete the job, some error occurred or job already completed.");
|
||||
}
|
||||
|
||||
serviceBookingCompleted = hasCompletedAllJobs(currentJob->getBookingId(), currentAssignedJobs);
|
||||
@@ -1067,8 +1070,8 @@ void ServiceManagementService::completeJob(const std::string& jobID)
|
||||
{
|
||||
currentJob->getBooking()->setStatus(util::ServiceJobStatus::COMPLETED);
|
||||
paymentManagementService.generateInvoice(currentJob->getBooking());
|
||||
std::string title = "Service Booking completed,Invoice Generated.\n";
|
||||
std::string message = "Services completed for the booking and invoice generated.\n";
|
||||
std::string title = "Service Booking completed,Invoice Generated.";
|
||||
std::string message = "Services completed for the booking and invoice generated.";
|
||||
sendNotification(currentJob->getBooking()->getCustomer(), title, message);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user