Skip to content
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

self-checkout: use dedicated endpoints #1223

Merged

Conversation

ntarocco
Copy link
Contributor

@ntarocco ntarocco commented Oct 25, 2024

@ntarocco ntarocco force-pushed the fix/self-checkout-new-endpoint branch 4 times, most recently from 0634af9 to 44c640f Compare October 28, 2024 21:16
@@ -0,0 +1,19 @@
{% block title %}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be added to CDS-ILS too

@ntarocco ntarocco force-pushed the fix/self-checkout-new-endpoint branch from 44c640f to 4b1ba48 Compare October 28, 2024 21:22
@ntarocco ntarocco marked this pull request as ready for review October 28, 2024 21:22
@ntarocco ntarocco force-pushed the fix/self-checkout-new-endpoint branch from 4b1ba48 to 0a6c421 Compare October 29, 2024 12:51
@@ -162,7 +162,13 @@
dest="ITEM_ON_LOAN",
trigger="checkout",
transition=ILSToItemOnLoan,
permission_factory=loan_checkout_permission,
permission_factory=backoffice_permission,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

class LoanSelfCheckoutDocumentOverbooked(LoanSelfCheckoutItemUnavailable):
"""A patron cannot self-checkout an item for an overbooked document."""

supportCode = "SELF-CHECKOUT-002"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should share these codes with the librarians, since they will be the first point of contact

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that was the idea indeed ;)

Copy link
Contributor

@kpsherva kpsherva left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for this massive work!

@ntarocco ntarocco force-pushed the fix/self-checkout-new-endpoint branch 2 times, most recently from 16fdd3e to c5aa57d Compare October 30, 2024 11:05
Copy link
Contributor

@sakshamarora1 sakshamarora1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 🚀


try:
pid, item = self_checkout_get_item_by_barcode(barcode)
except ItemCannotCirculateError:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The msg Item not found is not very clear, as the user does not know what is an Item.
We should catch ItemNotFound here, and re-raise an exception with a different exc LoanSelfCheckoutItemNotFound, e.g. Literature not found. Please try again with another barcode or contact the library.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done ✅ and updated screeshots here: inveniosoftware/react-invenio-app-ils#649

* define new ad-hoc search and checkout endpoints, to be able to have
  better control on contraints and input and output payloads
* use delivery methods to store when the checkout is a self-checkout
* closes CERNDocumentServer/cds-ils#927
@anikachurilova anikachurilova force-pushed the fix/self-checkout-new-endpoint branch from 9897ceb to 840a2e1 Compare November 12, 2024 15:17
@ntarocco ntarocco merged commit e41fe2f into inveniosoftware:master Nov 15, 2024
5 checks passed
@ntarocco ntarocco deleted the fix/self-checkout-new-endpoint branch November 15, 2024 09:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

self-checkout: use dedicated endpoints
4 participants