Add View My Profile option

This commit is contained in:
Joel Thomas
2026-02-18 23:50:51 +05:30
parent bd60fd6884
commit c334a64a45
4 changed files with 16 additions and 3 deletions
@@ -21,7 +21,8 @@ void CustomerMenu::showMenu()
"1. View My Orders\n" "1. View My Orders\n"
"2. Place Order\n" "2. Place Order\n"
"3. Cancel Order\n" "3. Cancel Order\n"
"4. Logout\n" "4. View My Profile\n"
"5. Logout\n"
"Choice?: "; "Choice?: ";
util::readValue<char>(choice); util::readValue<char>(choice);
if (!handleOperation(choice)) if (!handleOperation(choice))
@@ -47,6 +48,9 @@ bool CustomerMenu::handleOperation(char choice)
m_foodDeliveryController.cancelOrder(); m_foodDeliveryController.cancelOrder();
break; break;
case '4': case '4':
m_foodDeliveryController.viewProfile();
break;
case '5':
m_foodDeliveryController.logout(); m_foodDeliveryController.logout();
isMenuActive = false; isMenuActive = false;
break; break;
@@ -21,7 +21,8 @@ void DeliveryPartnerMenu::showMenu()
"1. View My Delivery Jobs\n" "1. View My Delivery Jobs\n"
"2. Accept Delivery Job\n" "2. Accept Delivery Job\n"
"3. Confirm Delivery\n" "3. Confirm Delivery\n"
"4. Logout\n" "4. View My Profile\n"
"5. Logout\n"
"Choice?: "; "Choice?: ";
util::readValue<char>(choice); util::readValue<char>(choice);
if (!handleOperation(choice)) if (!handleOperation(choice))
@@ -47,6 +48,9 @@ bool DeliveryPartnerMenu::handleOperation(char choice)
m_foodDeliveryController.confirmDeliveryAssignment(); m_foodDeliveryController.confirmDeliveryAssignment();
break; break;
case '4': case '4':
m_foodDeliveryController.viewProfile();
break;
case '5':
m_foodDeliveryController.logout(); m_foodDeliveryController.logout();
isMenuActive = false; isMenuActive = false;
break; break;
@@ -23,6 +23,7 @@ public:
void listDeliveryAssignments(); void listDeliveryAssignments();
void acceptDeliveryAssignment(); void acceptDeliveryAssignment();
void confirmDeliveryAssignment(); void confirmDeliveryAssignment();
void viewProfile();
void logout(); void logout();
}; };
@@ -25,7 +25,8 @@ void RestaurantOwnerMenu::showMenu()
"5. List Menu Items\n" "5. List Menu Items\n"
"6. Add New Item to Menu\n" "6. Add New Item to Menu\n"
"7. Remove Item from Menu\n" "7. Remove Item from Menu\n"
"8. Logout\n" "8. View My Profile\n"
"9. Logout\n"
"Choice?: "; "Choice?: ";
util::readValue<char>(choice); util::readValue<char>(choice);
if (!handleOperation(choice)) if (!handleOperation(choice))
@@ -63,6 +64,9 @@ bool RestaurantOwnerMenu::handleOperation(char choice)
m_foodDeliveryController.removeMenuItem(); m_foodDeliveryController.removeMenuItem();
break; break;
case '8': case '8':
m_foodDeliveryController.viewProfile();
break;
case '9':
m_foodDeliveryController.logout(); m_foodDeliveryController.logout();
isMenuActive = false; isMenuActive = false;
break; break;