<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> CUS004: Register Customer Account </UserStory>
<Changes>
1. Added customer registration flow in UserInterface to collect username, name, email, password, and phone inputs.
2. Added validation for email, password, and phone number before proceeding with registration.
3. Updated Controller::createCustomer() and UserManagementService::createUser() to support customer registration with full user details including name.
4. Added duplicate username validation in UserManagementService using map predicate search.
5. Added user creation and insertion logic in UserManagementService to store newly registered customer records in DataStore.
6. Added observer attachment for newly registered users to inventory(only for admins), payment, and service notification services.
7. Added registration confirmation message display after successful customer creation.
</Changes>
<Test>
Precondition:
1. Application is running and user is on the main login/register menu.
2. DataStore is initialized and available for storing user records.
3. Existing customer records may already be present in the system.
Steps:
1. Select the Register Customer option.
2. Enter valid username, name, email, password, and phone number.
3. Submit the registration request.
- Verify that the system accepts valid inputs and creates the customer account.
4. Attempt registration using an already existing username.
- Verify that the duplicate registration is rejected.
5. Register again with valid unique details.
- Verify that the registration confirmation message is displayed.
6. Re-access application data after registration.
- Verify that the customer data is stored persistently.
</Test>
<Review>
Sreeja Reghukumar, please review
</Review>
<UserStory> CUS005: Update Customer Profile Details </UserStory>
<Changes>
1. Added update profile flow in CustomerMenu to collect new email and phone number inputs.
2. Added validation for updated email and phone number before saving changes.
3. Updated Controller::updateUserDetails() to fetch the authenticated user and delegate profile update to UserManagementService.
4. Added user existence validation in UserManagementService before updating profile details.
5. Added logic in UserManagementService to update stored email and phone details for the selected user.
6. Added profile update confirmation message after successful save.
</Changes>
<Test>
Update Customer Profile Details
Precondition:
1. Application is running and a customer is logged into the system.
2. Customer record exists in DataStore.
3. Customer has existing profile details stored in the system.
Steps:
1. Select the Update Profile Details option.
2. Verify that the current profile details are displayed.
- Verify that the system shows the customer’s existing details.
3. Enter a new valid email address and phone number.
4. Save the updated details.
- Verify that the system accepts the changes and displays a success message.
5. Create or view a future booking using the same customer account.
- Verify that the updated profile details are reflected in future bookings.
</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