fc7bb2569b
<UserStory> SER004: View Service History </UserStory>
<Changes>
1. Added integration between Controller and ServiceManagementService to fetch service bookings by customer ID.
2. Enhanced ServiceBooking model to store technician as a User* instead of a string for richer details.
3. Implemented Controller::getServiceBookingsByUser to return a read-only map of bookings for safe access.
4. Updated CustomerMenu::viewServiceHistory to display bookings in tabular format with aligned columns.
5. Added condition check to show technician name if assigned, otherwise display "Not Assigned".
6. Included booking status and discount percentage in the service history output.
</Changes>
<Test>
Acceptance Criteria:
1. System should fetch real-time status.
2. Status should update automatically when technician changes it.
3. Customer should be able to view history.
Precondition:
1. Customer is logged into the console application.
2. At least one active service booking exists for the customer.
3. Technician has permission to update booking status.
Steps:
1. Navigate to Customer menu and choose "View Service History".
- Verify that the console displays current booking status along with technician assignment.
2. Technician updates the status of a booking.
- Verify that the console view reflects the updated status automatically.
3. Customer views service history again.
- Verify that the history shows the latest status changes.
</Test>
<Review>
Sreeja Reghukumar, please review
</Review>