Implement review fixes

Changes:

 - Strengthened UserManagementService::updateUserDetails by checking duplicates only when email/phone are changed, preventing false errors
 - Updated AdminMenu::viewStockLevels header text from "View Stock Level" to "View Stock Levels" for consistency
 - Cleaned up CustomerMenu::updateDetails by removing unused user list retrieval and improving header/message formatting
This commit is contained in:
2026-05-26 21:03:22 +05:30
parent 33cbb1dac3
commit febfa45e4a
3 changed files with 15 additions and 10 deletions
@@ -159,7 +159,7 @@ void AdminMenu::viewStockLevels()
util::clear();
auto inventoryItems = m_controller.getInventoryItems();
bool hasActiveItems = false;
std::cout << "View Stock Level" << std::endl;
std::cout << "View Stock Levels" << std::endl;
if (inventoryItems.isEmpty())
{
std::cout << "No items found in Inventory.\n";
@@ -143,7 +143,6 @@ Return type: void
void CustomerMenu::updateDetails()
{
std::string email, phone;
util::Map<std::string, const User*> userList = m_controller.getUsers();
util::clear();
std::cout << "Update Details\n";
std::cout << "Enter new email: ";