Description: Customer place booking: When user selects a hairdresser that does not provide any services, the system still allows users to select booking date, but after selected the booking date, the program does not response anymore. Step to Reproduce: 1. Customer login 2. Select “My Bookings” 3. Select “Add” 4. Choose a hairdresser that does not provide any services, for example “Sam” 5. Press the Date dropdown to select date 6. The program freeze Actual Result: The program allows users to select a hairdresser that does not provide any services. Expected Result: The program should not allow users to select a hairdresser that does not provide any services.
The bug was caused by the SQL statement that only retrieve all hairdressers for user to select, without filtering those does not provide any services. Since users do not select any services, the system cannot calculate relevant duration, thus cannot pass duration parameters to calculate the available booking date and time. To solve the bug, the SQL statement within component “buildDropdownHairdresser()” has been updated to only retrieve hairdressers with at least one services provided, also added conditional statements before calculating the booking date and time.