-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
self-checkout: provide ad-hoc endpoints
* 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
- Loading branch information
Showing
14 changed files
with
611 additions
and
142 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
invenio_app_ils/circulation/loaders/schemas/json/loan_self_checkout.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# -*- coding: utf-8 -*- | ||
# | ||
# Copyright (C) 2019 CERN. | ||
# | ||
# invenio-app-ils is free software; you can redistribute it and/or modify | ||
# it under the terms of the MIT License; see LICENSE file for more details. | ||
|
||
"""Invenio App ILS circulation Loan Checkout loader JSON schema.""" | ||
|
||
from invenio_circulation.records.loaders.schemas.json import LoanItemPIDSchemaV1 | ||
from marshmallow import fields | ||
|
||
from .base import LoanBaseSchemaV1 | ||
|
||
|
||
class LoanSelfCheckoutSchemaV1(LoanBaseSchemaV1): | ||
"""Loan self-checkout schema.""" | ||
|
||
item_pid = fields.Nested(LoanItemPIDSchemaV1, required=True) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
...pp_ils/circulation/templates/invenio_app_ils_circulation/notifications/self_checkout.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{% block title %} | ||
InvenioILS: loan started for "{{ document.title|safe }}" | ||
{% endblock %} | ||
|
||
{% block body_plain %} | ||
Dear {{ patron.name }}, | ||
|
||
your self-checkout loan for "{{ document.full_title }}" <{{ spa_routes.HOST }}{{ spa_routes.PATHS['literature']|format(pid=document.pid) }}> has started. | ||
|
||
The due date is {{ loan.end_date }}. | ||
{% endblock %} | ||
|
||
{% block body_html %} | ||
Dear {{ patron.name }}, <br/><br/> | ||
|
||
your self-checkout loan for <a href="{{ spa_routes.HOST }}{{ spa_routes.PATHS['literature']|format(pid=document.pid) }}">"{{ document.full_title }}"</a> has <b>started</b>. <br/><br/> | ||
|
||
<b>The due date is {{ loan.end_date }}</b>.<br/> | ||
{% endblock %} |
Oops, something went wrong.