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:
@@ -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: ";
|
||||
|
||||
Reference in New Issue
Block a user