Add state tracking for models and menu loop setup

<Changes>
    1. Added State enum with ACTIVE and INACTIVE values in Enums.h.
    2. Added state member, getter, and setter in User, Service, InventoryItem, and ComboPackage models.
    3. Updated constructors to initialize model objects with ACTIVE state by default.
    4. Added state string conversion helper functions in Enums.h.
    5. Added default return values in Controller getter methods to complete stub implementations.
    6. Added basic menu loop implementation in CustomerMenu and TechnicianMenu for handling user input.
</Changes>
This commit is contained in:
2026-05-19 16:21:56 +05:30
parent dd834ded44
commit d10cc91c40
12 changed files with 148 additions and 4 deletions
@@ -1,6 +1,7 @@
#pragma once
#include <string>
#include "Map.h"
#include "Enums.h"
class InventoryItem;
@@ -12,6 +13,7 @@ private:
std::string m_name;
util::Map<std::string, InventoryItem*> m_requiredInventoryItems;
double m_laborCost;
util::State m_status;
public:
Service();
Service(const std::string& name, const util::Map<std::string, InventoryItem*>& requiredInventoryItems, double laborCost);
@@ -19,8 +21,10 @@ public:
const std::string& getName() const;
const util::Map<std::string, InventoryItem*>& getRequiredInventoryItems() const;
double getLaborCost() const;
util::State getState() const;
void setId(const std::string& id);
void setName(const std::string& name);
void setRequiredInventoryItems(const util::Map<std::string, InventoryItem*>& requiredInventoryItems);
void setLaborCost(double laborCost);
void setState(util::State status);
};