Fix View Service History and View Notification Issue

- Updated sendNotification in InventoryManagementService, PaymentManagementService, and ServiceManagementService to use only the provided title instead of prefixing with service name.
- Added "View Service History" header in CustomerMenu::viewServiceHistory for clarity.
- Adjusted column widths in service history table for better alignment:
  - Booking ID column widened to 15.
  - Vehicle Brand, Vehicle Number, Vehicle Model, Discount %, and Status columns widened to 20.
- Updated output formatting in CustomerMenu::viewServiceHistory to match new widths.
- Added "View and Delete Notification" header in MenuHelper::viewAndDeleteNotification for clarity.
- Moved empty notification validation from selectNotification to viewAndDeleteNotification:
  - Displays "No notifications available." message.
  - Added util::pressEnter() prompt before returning when no notifications exist.
- Increased Notification title column width from 30 to 35 in selectNotification for improved readability.

Fixes #1748
This commit is contained in:
Avinash Rajesh
2026-05-26 18:48:23 +05:30
committed by Joel Thomas
parent a87af89a8a
commit 80b91f3f1b
5 changed files with 24 additions and 21 deletions
@@ -323,7 +323,7 @@ void InventoryManagementService::sendNotification(User* user, const std::string&
Factory::getObject<Notification>(
user->getId(),
user,
"InventoryManagementService: " + title,
title,
message,
util::Timestamp()
);
@@ -86,7 +86,7 @@ void PaymentManagementService::sendNotification(User* user, const std::string& t
Factory::getObject<Notification>(
user->getId(),
user,
"PaymentManagementService: " + title,
title,
message,
util::Timestamp()
);
@@ -175,7 +175,7 @@ void ServiceManagementService::sendNotification(User* user, const std::string& t
Factory::getObject<Notification>(
user->getId(),
user,
"ServiceManagementService: " + title,
title,
message,
util::Timestamp()
);