<UserStory> PAY003: View Invoices </UserStory>
<Changes>
1. Added CustomerMenu::viewInvoices to fetch invoices via Controller and display them to the customer.
2. Implemented displayInvoices helper to show invoice details including booking, vehicle, technician, discount, total amount, invoice date, and payment status.
3. Enhanced invoice display to include a tabular breakdown of inventory items (ItemName, Quantity, Price) used in the service.
4. Updated ServiceBooking to store assigned technician as a const User* for richer technician details in invoice output.
</Changes>
<Test>
Acceptance Criteria:
1. Invoice details should show total cost and discounts.
2. Invoice details should show list of parts used.
Precondition:
1. Customer is logged into the system.
2. At least one invoice exists for the customer in the datastore.
3. Inventory items are linked to the invoice.
Steps:
1. Navigate to Customer menu and choose "View Invoices".
- Verify that the system lists invoice details including booking ID, vehicle info, technician, discount, total amount, invoice date, and payment status.
2. Check the parts list under each invoice.
- Verify that inventory items are displayed in tabular form with ItemName, Quantity, and Price.
3. Confirm that discounts and total cost are shown correctly.
</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