<UserStory> CUS001:Login </UserStory>
<Changes>
1. Added login implementation in AuthenticationManagementService to validate username and password from stored user records.
2. Connected Controller::login() with AuthenticationManagementService login logic.
3. Added getAuthenticatedUser() integration in Controller for retrieving the logged-in user.
4. Implemented login flow in UserInterface to collect credentials and validate login.
5. Added role-based menu navigation for Admin, Technician, and Customer after successful login.
6. Added error handling to display "Invalid Username or Password" for failed login attempts.
7. Added required includes and controller member dependency for authentication support.
8. Added a check to create a default admin automatically if no admin exists in the system on startup
</Changes>
<Test>
Login functionality validation
Precondition:
1. System is running.
2. User records are available in the data store.
3. Valid username and password exist for a registered user.
Steps:
1. Launch the application.
2. Select the login option from the main menu.
3. Enter a valid username and password.
- Verify that the entered credentials are validated.
- Verify that access is granted and the correct menu is shown based on user type.
4. Enter an invalid username or password.
- Verify that the message "Invalid Username or Password" is displayed.
</Test>
<Review>
Sreeja Reghukumar, please review
</Review>
<UserStory> CUS003: Implement change password functionality </UserStory>
<Changes>
1. Connected Controller::changePassword() with AuthenticationManagementService password update logic.
2. Added password validation before updating the user password.
3. Added logged-in user check before allowing password changes.
4. Implemented password update logic in AuthenticationManagementService.
5. Added change password flow in CustomerMenu to collect new password input and trigger password update.
6. Added success message display after password is changed successfully.
</Changes>
<Test>
Change password functionality validation
Precondition:
1. System is running.
2. A registered user exists in the data store.
3. User is logged in and customer menu is active.
Steps:
1. Launch the application and log in with valid credentials.
2. Select the Change Password option from the customer menu.
3. Enter a new password.
- Verify that the entered password is validated.
4. If the password is valid, complete the password change.
- Verify that the new password is saved successfully.
- Verify that the message "Password changed successfully" is displayed.
</Test>
<Review>
Sreeja Reghukumar, please review
</Review>
<UserStory> CUS002: Logout</UserStory>
<Changes>
1. Connected Controller::logout() with AuthenticationManagementService logout logic.
2. Added logout implementation in AuthenticationManagementService to clear the authenticated user session.
3. Added logout handling in CustomerMenu to invoke controller logout when the user selects the logout option.
4. Added authentication service dependency in Controller for logout support.
</Changes>
<Test>
Logout functionality validation
Precondition:
1. System is running.
2. A registered user exists in the data store.
3. User is logged in and customer menu is active.
Steps:
1. Launch the application and log in with valid credentials.
- Verify that access is granted and customer menu is displayed.
2. Select the Logout option from the customer menu.
- Verify that the logout operation is triggered immediately.
3. Complete the logout operation.
- Verify that the authenticated user session is cleared.
4. After logout completes.
- Verify that the user is redirected to the login menu.
</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