-
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
DDFBRA-236 - Logged in user can go from digital loans to material #1565
DDFBRA-236 - Logged in user can go from digital loans to material #1565
Conversation
7a2cc4d
to
a23e109
Compare
The translation key 'material-details-go-to-ereolen' has been updated to 'material-details-go-to-material' following changes made in: danskernesdigitalebibliotek/dpl-react#1565. Additionally, the 'ereolen-my-page-url' has been removed, as it no longer links to eReolen from the loans page.
The translation key 'material-details-go-to-ereolen' has been updated to 'material-details-go-to-material' following changes made in: danskernesdigitalebibliotek/dpl-react#1565. Additionally, the 'ereolen-my-page-url' has been removed, as it no longer links to eReolen from the loans page.
665996b
to
e8a38e8
Compare
a23e109
to
a25ae80
Compare
The translation key 'material-details-go-to-ereolen' has been updated to 'material-details-go-to-material' following changes made in: danskernesdigitalebibliotek/dpl-react#1565. Additionally, the 'ereolen-my-page-url' has been removed, as it no longer links to eReolen from the loans page.
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.
Beautiful job. We clap and cheer.
I have 2 little comments for you to consider 🙏 but otherwise approved 😉
@@ -33,6 +34,7 @@ const MaterialDetailsModal: FC<MaterialDetailsModalProps> = ({ | |||
children | |||
}) => { | |||
const t = useText(); | |||
// console.log("Rendering MaterialDetailsModal:"); |
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.
Maybe we should remove this line?
@@ -1,3 +1,4 @@ | |||
// Todo: Fix infinite loop in MaterialDetailsModal |
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.
Bahahaha. How fun.
Try to describe it better what needs to be fixed so that people who don't know about the bug at all would be able to reproduce it 😉
The translation key 'material-details-go-to-ereolen' has been updated to 'material-details-go-to-material' following changes made in: danskernesdigitalebibliotek/dpl-react#1565. Additionally, the 'ereolen-my-page-url' has been removed, as it no longer links to eReolen from the loans page.
a25ae80
to
c02d269
Compare
While investigating https://reload.atlassian.net/browse/DDFBRA-236, I identified an infinite loop in `MaterialDetailsModal`. This issue appears when the modal is opened via "user/loans" and potentially all places it is used
Since all data from loans comes from Publizon, we don’t have a `workId`, which is required to link to the material. Therefore, I use the `useComplexSearchWithPaginationQuery` to find the work using the ISBN (identifier) and construct the `workId` into a URL, e.g., `/work/work-of:870970-basis:62986115`. Additionally, if it finds the material type, it adds that as a parameter.
d01a598
to
bd60ac0
Compare
c02d269
to
94c6cd2
Compare
The translation key 'material-details-go-to-ereolen' has been updated to 'material-details-go-to-material' following changes made in: danskernesdigitalebibliotek/dpl-react#1565. Additionally, the 'ereolen-my-page-url' has been removed, as it no longer links to eReolen from the loans page.
…logged-in-user-can-go-from-digital-loans-to-material-to-listen-read DDFBRA-236 - Logged in user can go from digital loans to material
…logged-in-user-can-go-from-digital-loans-to-material-to-listen-read DDFBRA-236 - Logged in user can go from digital loans to material
Link to issue
https://reload.atlassian.net/browse/DDFBRA-236
danskernesdigitalebibliotek/dpl-cms#1814
Description
This pull request replaces the link from the digital loan list to point to the material page instead of eReolen.
Unfortunately, I also found a bug in our code that causes an infinite re-render. This issue is also present on the develop branch, and I didn't find an easy solution to fix it. Therefore, this should be fixed in a separate ticket.
Test
If you have an online loan, you can view it under the “Digital Loans” section. The button, which was previously labeled “Go to eReolen” and linked to eReolen, has been updated to now correctly link to the work with the appropriate type selected.
https://varnish.pr-1814.dpl-cms.dplplat01.dpl.reload.dk/user/me/loans
Min.film.1.mp4