inveniosoftware / react-invenio-app-ils

Single Page App built with React for InvenioILS.
https://react-invenio-app-ils.readthedocs.io
MIT License
5 stars 19 forks source link

backoffice: check-out: App crashes when physical copy is scanned before scanning the patron ID #581

Closed sakshamarora1 closed 4 months ago

sakshamarora1 commented 7 months ago

Package version: v1.0.0-alpha.77

Describe the bug

When checking out a physical copy by scanning the physical copy first and then scanning the patron ID, the application creates multiple loans for the same physical copy and then gives an internal server error, crashing the app.

Steps to Reproduce

  1. Go to 'Check-out' tab
  2. Scan the Physical Copy's barcode first
  3. Scan the patron ID on the 'You are about to checkout the physical copy with barcode' popup dialog box

Expected behaviour

Backend: It should only create a single loan. Frontend: It should only send 1 checkout request to backend.

Screenshots (if applicable)

https://github.com/inveniosoftware/react-invenio-app-ils/assets/50872172/a666ce9d-2e71-4672-bdcc-eccab7b04f1a