Merge branch 'feature-customer-management-menu' into feature-customer-management

This commit is contained in:
2026-05-21 13:22:08 +05:30
@@ -13,18 +13,28 @@
void CustomerMenu::showMenu() void CustomerMenu::showMenu()
{ {
bool isMenuActive = true; while (true)
while (isMenuActive)
{ {
try try
{ {
int choice; int choice;
util::clear(); util::clear();
std::cout << "" << std::endl; std::cout << "Customer Menu"
<< "\n1. Select a service"
<< "\n2. Select a combo package"
<< "\n3. Update Profile"
<< "\n4. Change Password"
<< "\n5. View Service History"
<< "\n6. Complete Payments"
<< "\n7. View Invoices"
<< "\n8. View Notifications"
<< "\n9. Configure Notifications"
<< "\n10. Logout"
<< "\nEnter a choice: ";
util::read(choice); util::read(choice);
if (!handleOperation(choice)) if (!handleOperation(choice))
{ {
isMenuActive = false; break;
} }
} }
catch (const std::exception& e) catch (const std::exception& e)
@@ -37,7 +47,43 @@ void CustomerMenu::showMenu()
bool CustomerMenu::handleOperation(int choice) bool CustomerMenu::handleOperation(int choice)
{ {
switch (choice)
{
case 1:
selectService();
break;
case 2:
selectComboPackage();
break;
case 3:
updateDetails();
break;
case 4:
changePassword();
break;
case 5:
viewServiceHistory();
break;
case 6:
completePayments();
break;
case 7:
viewInvoices();
break;
case 8:
viewNotifications();
break;
case 9:
configureNotifications();
break;
case 10:
logout();
return false; return false;
default:
std::cout << "Enter a valid choice!" << std::endl;
util::pressEnter();
}
return true;
} }
void CustomerMenu::logout() void CustomerMenu::logout()