<UserStory> ADM005: Change Password </UserStory>
<Changes>
1. Added AuthenticationManagementService::changePassword to update the authenticated user’s password with validation.
2. Integrated Controller::changePassword to delegate password update requests to AuthenticationManagementService.
3. Enhanced AdminMenu::changePassword to prompt for new password, validate strength using Validator, and confirm update.
4. Added error handling to prevent password change when no user is logged in.
5. Provided user feedback messages for invalid password attempts and successful updates.
</Changes>
<Test>
Precondition:
1. Admin is logged into the system.
2. AuthenticationManagementService maintains active session.
3. Validator is available for password strength checks.
Steps:
1. Navigate to Admin Menu and select "Change Password".
2. Enter old password incorrectly.
- Verify that system rejects the attempt and displays error.
3. Enter new password that fails validation (length/complexity).
- Verify that system rejects with "Error: Password is not strong enough!".
4. Enter valid old password and strong new password.
- Verify that system confirms "Password changed successfully" and updates the user’s password.
</Test>
<Review>
Sreeja Reghukumar
</Review>
<UserStory> ADM003: Login </UserStory>
<Changes>
1. Added credential input handling in UserInterface::login with username and password prompts.
2. Integrated Controller::login to validate credentials and retrieve authenticated user.
3. Implemented role-based menu navigation: Admin → AdminMenu, Technician → TechnicianMenu, Customer → CustomerMenu.
4. Added error handling for invalid credentials and unknown user types with clear feedback messages.
5. Included util::clear for screen refresh and structured output formatting during login.
</Changes>
<Test>
Precondition:
1. Valid user accounts exist in the system (Admin, Technician, Customer).
2. Controller is connected to UserManagementService for authentication.
3. UserInterface is initialized with role-specific menus.
Steps:
1. Launch UserInterface and select "Login".
2. Enter incorrect username or password.
- Verify that system displays "Error: Invalid Username or Password".
3. Enter valid admin credentials.
- Verify that AdminMenu is displayed successfully.
4. Enter valid technician or customer credentials.
- Verify that TechnicianMenu or CustomerMenu is displayed accordingly.
</Test>
<Review>
Sreeja Reghukumar
</Review>
<UserStory> ADM002: Remove Technician or Customer </UserStory>
<Changes>
1. Integrated UserManagementService and ServiceManagementService into Controller for user removal operations.
2. Added Controller::removeUser to validate user existence, cancel related service bookings and technician jobs, and mark user inactive.
3. Updated JobCard and ServiceBooking models to use util::ServiceJobStatus consistently and store technician references as User* instead of strings.
4. Extended util::ServiceJobStatus enum with PENDING and CANCELLED states, including string conversion support.
5. Implemented ServiceManagementService methods to cancel customer service bookings and technician jobs, with inventory restocking and notifications.
6. Enhanced AdminMenu::removeUser to list active users, validate index input, confirm deletion, and invoke Controller::removeUser.
7. Added helper functions in AdminMenu to filter active users and display them with formatted output including user type.
</Changes>
<Test>
Precondition:
1. Admin is logged into the system.
2. Technician accounts exist in the system.
3. Technician has active job assignments.
Steps:
1. Navigate to Admin Menu and select "Remove User".
2. System displays list of active users with IDs, usernames, and user types.
- Verify that inactive users are excluded from the list.
3. Admin selects technician ID for removal.
- Verify that system confirms deletion before proceeding.
4. Technician is removed from job assignment list.
- Verify that associated jobs are cancelled, inventory is restocked, and notifications are sent.
</Test>
<Review>
Sreeja Reghukumar
</Review>
<UserStory> ADM001: Add Technician </UserStory>
<Changes>
1. Added UserManagementService integration in Controller to support technician account creation.
2. Updated Controller::createTechnician method to call createUser with util::UserType::TECHNICIAN.
3. Renamed parameter from 'phone' to 'phoneNumber' for clarity and consistency.
4. Enhanced AdminMenu::addTechnician with input validation for password, email, and phone number.
5. Added success and error handling messages in AdminMenu for technician creation workflow.
</Changes>
<Test>
Precondition:
1. Admin is logged into the system.
2. UserManagementService is available and connected.
3. No existing technician account with the same username/email.
Steps:
1. Navigate to Admin Menu and select "Add Technician".
2. Enter technician details (username, password, email, phone number).
- Verify that invalid password/email/phone inputs are rejected with error messages.
3. Enter valid technician details.
- Verify that uniqueness is checked and duplicate accounts are not created.
4. Submit valid details.
- Verify that technician account is created successfully and confirmation message is displayed.
</Test>
<Review>
Sreeja Reghukumar
</Review>
<UserStory> ADM006:Create Combo Package </UserStory>
<Changes>
1. Added ServiceManagementService::createComboPackage to validate package name, included services, and discount percentage before creation.
2. Integrated Controller::createComboPackage to delegate combo package creation to ServiceManagementService.
3. Enhanced AdminMenu::createComboPackages to allow admin input for package name, service selection, and discount percentage.
4. Implemented service validation to ensure only active services are selectable and that duplicate combos are prevented.
5. Added formatted output for service listing with cost calculation and confirmation messages upon successful package creation.
</Changes>
<Test>
Precondition:
1. Admin is logged into the system.
2. At least two active services exist in the system.
3. ServiceManagementService is connected to DataStore for services and combo packages.
Steps:
1. Navigate to Admin Menu and select "Create Combo Package".
2. Enter package name, select two active services, and provide discount percentage.
- Verify that system validates service IDs and ensures discount is between 0 and 100.
3. Attempt to create a package with invalid service IDs or duplicate services.
- Verify that system rejects with appropriate error messages.
4. Enter valid package details.
- Verify that combo package is saved successfully and visible to customers.
</Test>
<Review>
Sreeja Reghukumar
</Review>
<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>
Changes:
- Added Admin Menu display with menu options
- Added Technician Menu display with menu options
- Added menu choice handling using switch case
- Connected menu options to corresponding functions
- Added invalid choice message
- Added logout handling
- Added missing function declarations in TechnicianMenu header
<UserStory> ADM004: Logout </UserStory>
<Changes>
1. Added AuthenticationManagementService::logout to clear authenticated user session.
2. Integrated logout handling in Controller::logout to delegate session termination.
3. Updated AdminMenu::logout and TechnicianMenu::logout to call Controller::logout for consistent session management.
4. Extended TechnicianMenu.h with logout method declaration.
5. Ensured session termination returns control to main menu after logout.
</Changes>
<Test>
Precondition:
1. User is logged into the system (Admin or Technician).
2. AuthenticationManagementService maintains active session.
3. Controller is connected to AuthenticationManagementService.
Steps:
1. Navigate to Admin or Technician Menu.
2. Select "Logout" option.
- Verify that AuthenticationManagementService::logout clears authenticated user.
3. Session is terminated.
- Verify that system confirms logout and invalidates session.
4. Console returns to main menu.
- Verify that user is redirected to main menu and must log in again to continue.
</Test>
<Review>
Sreeja Reghukumar
</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