Fix Assign Job to Technician issues and View invoices issues

- Assign Job to Technician:
  - Added heading for clearer user guidance.
  - Filtered only pending service bookings for assignment.
  - Improved technician listing and selection with clearer prompts.
  - Ensured booking status transitions correctly from PENDING to STARTED when job cards are created.
  - Enhanced feedback messages for technician availability and job card creation.

- View Invoices:
  - Added heading "View Invoices" for better UI consistency.
  - Updated displayInvoices to take map by reference for efficiency.
  - Improved formatting of invoice details with consistent spacing and line breaks.
  - Added handling for empty invoice parts list (shows "No inventory items used").
  - Enhanced error messages when encountering null invoices.

Fixes #1745
Fixes #1752
This commit is contained in:
Jissin Mathew
2026-05-26 19:06:52 +05:30
committed by Joel Thomas
parent 05499e4890
commit 7646ce6644
5 changed files with 138 additions and 101 deletions
@@ -358,6 +358,7 @@ Returns:
void CustomerMenu::viewInvoices()
{
util::clear();
std::cout << "View Invoices\n";
util::Map<std::string, const Invoice*> currentUserInvoices = m_controller.getInvoicesByUser();
displayInvoices(currentUserInvoices);
util::pressEnter();
@@ -393,4 +394,4 @@ void CustomerMenu::configureNotifications()
util::clear();
std::cout << "Notification preferences updated successfully.\n";
util::pressEnter();
}
}