-
Notifications
You must be signed in to change notification settings - Fork 242
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(fix) Standardize appointment component props and fix filter behaviour (
#1504) * (refactor) Standardize appointment component props and improve filter handling Relates to #1449. Makes the following refactors to the Appointments app: - Rename `appointmentServiceType` to `appointmentServiceTypes` in components that use it. Prior to #1449, this prop was a string, but is now an array of strings. The refactor also updates the components to handle the new prop type. - Rename the `filterCancelled` prop to `excludeCancelledAppointments` in components that use it. The latter is more descriptive of the purpose of the prop. - Fix `hasActiveFilters` logic to only consider service type filters. There's a tangential issue where the Today's appointments component shows an empty filter state when it shouldn't. It should show an empty state instead if there are no scheduled appointments for today. Cleaning up this logic allows me to isolate that issue so it can be fixed in a separate PR. * Clean up hooks * Remove initialSelectedItems from service type multi-select Makes it so that the multi-select is not pre-selected with the first service type. With this change, no options are pre-selected by default. This more accurately wires up the filter to default to a blank state where all available appointments are shown. Users will have to explicitly choose which service types they want to filter by, rather than having one pre-selected for them. * Review feedback * More review feedback
- Loading branch information
1 parent
11229ff
commit e62d4f9
Showing
13 changed files
with
113 additions
and
93 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 21 additions & 15 deletions
36
packages/esm-appointments-app/src/appointments/scheduled/appointments-list.component.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 5 additions & 5 deletions
10
packages/esm-appointments-app/src/appointments/scheduled/early-appointments.component.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.