-
Notifications
You must be signed in to change notification settings - Fork 50
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
self-checkout: use dedicated endpoints #1223
Conversation
0634af9
to
44c640f
Compare
@@ -0,0 +1,19 @@ | |||
{% block title %} |
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.
To be added to CDS-ILS too
44c640f
to
4b1ba48
Compare
4b1ba48
to
0a6c421
Compare
@@ -162,7 +162,13 @@ | |||
dest="ITEM_ON_LOAN", | |||
trigger="checkout", | |||
transition=ILSToItemOnLoan, | |||
permission_factory=loan_checkout_permission, | |||
permission_factory=backoffice_permission, |
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.
class LoanSelfCheckoutDocumentOverbooked(LoanSelfCheckoutItemUnavailable): | ||
"""A patron cannot self-checkout an item for an overbooked document.""" | ||
|
||
supportCode = "SELF-CHECKOUT-002" |
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.
I think we should share these codes with the librarians, since they will be the first point of contact
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.
Yes, that was the idea indeed ;)
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.
Thank you for this massive work!
16fdd3e
to
c5aa57d
Compare
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! 🚀
c5aa57d
to
b7018c3
Compare
62575d0
to
9897ceb
Compare
|
||
try: | ||
pid, item = self_checkout_get_item_by_barcode(barcode) | ||
except ItemCannotCirculateError: |
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.
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.
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.
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
9897ceb
to
840a2e1
Compare
better control on contraints and input and output payloads