Closed Pineirin closed 2 years ago
Wrong push?
Explanation of the change. The bug was caused because the function used to order by start date was giving the results inverted. This caused undesired results like, for example, that the list were not properly ordered. https://github.com/CERNDocumentServer/cds-ils/issues/627 Also, like in the related issue, it can lead to a warning modal appearing were it shouldn't a not appearing where it should. This is due to the last loan being identified as the first, so if you try to checkout any other loan (like the first) it will tell you that there is a preceding one, and if you try to checkout this last loan it would not warn you, as the logic would detect it as the first. The change was implemented as part of the solution in https://github.com/inveniosoftware/react-invenio-app-ils/pull/507, but I wanted to create this PR to show what was the bug and how it was solved.
Loan already requested modal added to the rest of loans. closes: https://github.com/CERNDocumentServer/cds-ils/issues/664 implements https://github.com/inveniosoftware/react-invenio-app-ils/pull/507
Now the modal appears for the second loan (and not the first). Hovering in the link of the modal we can see it Links correctly to the first loan.
![Screenshot from 2021-11-16 11-12-35](https://user-images.githubusercontent.com/25476209/141966249-d935a11c-17a1-4928-b903-b8833e1bc458.png)