<UserStory> SER003: Remove Combo Package </UserStory>
<Changes>
Added integration between Controller and ServiceManagementService to support combo package removal.
Implemented ServiceManagementService::removeComboPackage with validation for package ID and marking state as INACTIVE.
Enhanced AdminMenu with displayComboPackagesWithIndex helper to show packages in tabular format with index.
Updated AdminMenu::selectComboPackage to allow selection of active packages only and return selected package ID.
Updated AdminMenu::removeComboPackage to prompt for selection, confirm removal, and provide success/failure feedback.
</Changes>
<Test>
Acceptance Criteria:
Admin selects package ID.
System confirms deletion.
Package removed from customer menu.
Precondition:
Admin is logged into the system.
At least one active combo package exists.
Datastore is available for storing combo packages.
Steps:
Navigate to Admin menu and choose "Remove Combo Package".
Verify that the system displays available active packages in tabular format with index.
Select a package ID from the list.
Verify that inactive packages are skipped and only active ones are selectable.
Confirm removal.
Verify that the package is marked INACTIVE and removed from customer menu.
Check customer view.
Verify that the removed package is no longer visible to customers.
</Test>
<Review>
Sreeja Reghukumar, please review
</Review>
- Removed observer map from Subject base class
- Removed notify() from Subject interface
- Made NotificationManagementService abstract with pure virtual methods
- Added static observer maps to notification service implementations
- Added attach() and detach() overrides in inventory, payment, and service management services
- Added update() override in User model for observer pattern support
- Updated notification method declarations with override specifiers
<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>
Changes:
- Added stub implementations for Controller.cpp methods
- Fixed const issue in UserInterface methods (run, login, registerCustomer, handleOperation)
- Changed return types to use const pointers for read-only objects
- Updated maps and vectors to return const object pointers
- Fixed some function parameter names and signatures for consistency