-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor PhysicalListDetails
to Align with Reservation Change Handling
#574
Merged
kasperbirch1
merged 14 commits into
danskernesdigitalebibliotek:develop
from
reload:DDFLSBP-192-samlesag-ensretning-af-skift-af-interesseperiode-og-afhentningssted-pa-reserveringer
Oct 17, 2023
Merged
Conversation
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
kasperbirch1
force-pushed
the
DDFLSBP-192-samlesag-ensretning-af-skift-af-interesseperiode-og-afhentningssted-pa-reserveringer
branch
8 times, most recently
from
October 10, 2023 12:18
0e6f2f7
to
9db99ff
Compare
This commit entails a series of refactoring initiatives within the `PhysicalListDetails` component to align its functionality with the reservation flow. The refactoring focuses on utilizing modal components, managing state directly for the selected branch and interest periods, and adding a streamlined useEffect hook for updating reservations. - Implement `PickupModal` and `NoInterestAfterModal` to manage reservation changes, and replace inline dropdown logic. - Introduce logic to manage whitelist branching. - Clean up unused states and code. - Utilize a simplified useEffect hook to handle reservation mutations. - adding `subText` prop to the `ReservationFormListItem` - Adding translations
- The 'ReservationFormListItem' component is no longer used due to new logic in `PhysicalListDetails`. - `OptionsProps` has been moved to helpers, as its type is still required in other files.
Ensure translation texts are properly aligned across apps for consistency.
This component should no longer be needed because we have `ReservationFormListItem` and we no longer use `showSelect` logic inside `ListDetails`.
The useEffect that previously allowed for reservation mutation has now been replaced with a function saveChanges, which is called when the user presses the save button. This change was implemented to provide user feedback upon successful operation. Since booking and modifying reservations share components, some new props have been added to ModalReservationFormSelect: - `saveCallback` is called, if it exists. In this case, it is used for our change in reservation mutation. - `reservationStatus` / `setReservationStatus` is a state that indicates the status of the reservation change.
Modify selector in response to recent changes in the `Message` component.
kasperbirch1
force-pushed
the
DDFLSBP-192-samlesag-ensretning-af-skift-af-interesseperiode-og-afhentningssted-pa-reserveringer
branch
from
October 10, 2023 12:41
9db99ff
to
1b06b9e
Compare
Add check to ensure that `deletePhysicalReservation` is only called if there is a physical material to be removed
kasperg
approved these changes
Oct 13, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 LGTM.
I have some things for you to consider before you merge.
3 tasks
…the X button. This is the same way we handle it when the user clicks the close button.
kasperbirch1
merged commit Oct 17, 2023
b95da0b
into
danskernesdigitalebibliotek:develop
10 checks passed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Link to issue
https://reload.atlassian.net/browse/DDFLSBP-192
Description
This pull request introduces a thorough refactoring of the
PhysicalListDetails
component with the prime objective of ensuring its functional alignment with the reservation flow.Screenshot of the result
Skaermoptagelse.2023-10-03.kl.13.08.33.mov
Checklist
Additional comments or questions
If you have any further comments or questions for the reviewer them please add them here.