Skip to content

Commit

Permalink
primeng: acquistion
Browse files Browse the repository at this point in the history
* Fixes poetry shell plugins.
* Removes is_canceled, send_now, exange_rate, receipt_date useless acquistions fields.
* Moves order_date from order lines to orders.
* Removes order type as it is useless.
* Uses primeng css class in the JSONSchemas.
* Adds the number of children in the acquisition acounts serializer.
* Adjusts acquistion permissions.
* Removes toggle-switch type in JSONSchemas.
* Fixes the multi-select type in JSONSchemas.
* Fixes invalid user name regular expression.
* Uniformizes placeholders.

Co-Authored-by: Johnny Mariéthoz <[email protected]>
Co-Authored-by: Pascal Repond <[email protected]>
  • Loading branch information
jma and PascalRepond committed Feb 13, 2025
1 parent b116a0c commit 9afcfbd
Show file tree
Hide file tree
Showing 118 changed files with 820 additions and 2,362 deletions.
2 changes: 1 addition & 1 deletion Dockerfile.base
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ FROM python:3.9-slim-bullseye
# require debian packages
RUN apt-get update -y && apt-get upgrade -y
RUN apt-get install --no-install-recommends -y git vim-tiny curl gcc gnupg libc6-dev procps imagemagick && rm -rf /var/lib/apt/lists/*
RUN pip install --upgrade setuptools wheel pip poetry
RUN pip install --upgrade setuptools wheel pip poetry && poetry self add poetry-plugin-shell

# # uwsgi uwsgitop uwsgi-tools

Expand Down
5 changes: 4 additions & 1 deletion INSTALL.rst
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,10 @@ among other things.
$ pyenv install 3.9.7
$ cd rero-ils
$ pyenv local 3.9.7
$ sudo pip install poetry
$ curl -sSL https://install.python-poetry.org | python3 -
$ optional: poetry self add poetry-plugin-shell
See: https://python-poetry.org/docs#installation for more detail.

Next, ``cd`` into the project directory and bootstrap the instance (this will install
all Python dependencies and build all static assets):
Expand Down
34 changes: 0 additions & 34 deletions data/acq_invoices.json

This file was deleted.

37 changes: 9 additions & 28 deletions data/acq_order_lines.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"priority": 0,
"quantity": 3,
"amount": 25,
"exchange_rate": 1,
"notes": [
{
"type": "staff_note",
Expand All @@ -23,15 +22,13 @@
"library": {
"$ref": "https://bib.rero.ch/api/libraries/1"
},
"is_cancelled": false,
"send_now": true
"is_cancelled": false
},
{
"pid": "2",
"priority": 0,
"quantity": 15,
"amount": 5,
"exchange_rate": 1,
"notes": [
{
"type": "staff_note",
Expand All @@ -50,15 +47,13 @@
"library": {
"$ref": "https://bib.rero.ch/api/libraries/1"
},
"is_cancelled": false,
"send_now": true
"is_cancelled": false
},
{
"pid": "3",
"priority": 0,
"quantity": 2,
"amount": 100,
"exchange_rate": 1,
"notes": [
{
"type": "staff_note",
Expand All @@ -77,15 +72,13 @@
"library": {
"$ref": "https://bib.rero.ch/api/libraries/1"
},
"is_cancelled": false,
"send_now": true
"is_cancelled": false
},
{
"pid": "4",
"priority": 0,
"quantity": 5,
"amount": 10,
"exchange_rate": 1,
"acq_account": {
"$ref": "https://bib.rero.ch/api/acq_accounts/7"
},
Expand All @@ -98,15 +91,13 @@
"library": {
"$ref": "https://bib.rero.ch/api/libraries/2"
},
"is_cancelled": false,
"send_now": true
"is_cancelled": false
},
{
"pid": "5",
"priority": 5,
"quantity": 1,
"amount": 100,
"exchange_rate": 1,
"notes": [
{
"type": "staff_note",
Expand All @@ -125,15 +116,13 @@
"library": {
"$ref": "https://bib.rero.ch/api/libraries/2"
},
"is_cancelled": false,
"send_now": true
"is_cancelled": false
},
{
"pid": "6",
"priority": 1,
"quantity": 5,
"amount": 7,
"exchange_rate": 1,
"acq_account": {
"$ref": "https://bib.rero.ch/api/acq_accounts/14"
},
Expand All @@ -146,15 +135,13 @@
"library": {
"$ref": "https://bib.rero.ch/api/libraries/3"
},
"is_cancelled": false,
"send_now": true
"is_cancelled": false
},
{
"pid": "7",
"priority": 1,
"quantity": 15,
"amount": 12,
"exchange_rate": 1,
"acq_account": {
"$ref": "https://bib.rero.ch/api/acq_accounts/20"
},
Expand All @@ -167,15 +154,13 @@
"library": {
"$ref": "https://bib.rero.ch/api/libraries/4"
},
"is_cancelled": false,
"send_now": true
"is_cancelled": false
},
{
"pid": "8",
"priority": 1,
"quantity": 10,
"amount": 20,
"exchange_rate": 1,
"acq_account": {
"$ref": "https://bib.rero.ch/api/acq_accounts/4"
},
Expand All @@ -188,15 +173,13 @@
"library": {
"$ref": "https://bib.rero.ch/api/libraries/1"
},
"is_cancelled": false,
"send_now": true
"is_cancelled": false
},
{
"pid": "9",
"priority": 0,
"quantity": 3,
"amount": 22,
"exchange_rate": 1,
"acq_account": {
"$ref": "https://bib.rero.ch/api/acq_accounts/2"
},
Expand All @@ -216,7 +199,6 @@
"priority": 0,
"quantity": 3,
"amount": 25,
"exchange_rate": 1,
"notes": [
{
"type": "staff_note",
Expand All @@ -235,7 +217,6 @@
"library": {
"$ref": "https://bib.rero.ch/api/libraries/1"
},
"is_cancelled": false,
"order_date": "2021-07-20"
"is_cancelled": false
}
]
16 changes: 6 additions & 10 deletions data/acq_orders.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
{
"pid": "1",
"reference": "AOSTE-CANT1-POL-1",
"type": "monograph",
"currency": "EUR",
"notes": [
{
Expand All @@ -18,12 +17,12 @@
},
"organisation": {
"$ref": "https://bib.rero.ch/api/organisations/1"
}
},
"send_now": true
},
{
"pid": "2",
"reference": "AOSTE-CANT1-POL-2",
"type": "monograph",
"currency": "EUR",
"notes": [
{
Expand All @@ -39,12 +38,12 @@
},
"organisation": {
"$ref": "https://bib.rero.ch/api/organisations/1"
}
},
"send_now": true
},
{
"pid": "3",
"reference": "AOSTE-CANT2-POL-1",
"type": "monograph",
"currency": "EUR",
"notes": [
{
Expand All @@ -65,7 +64,6 @@
{
"pid": "4",
"reference": "AOSTE-AVISE-POL-1",
"type": "monograph",
"currency": "EUR",
"notes": [
{
Expand All @@ -86,7 +84,6 @@
{
"pid": "5",
"reference": "AOSTE-LYCEE-POL-1",
"type": "monograph",
"currency": "EUR",
"notes": [
{
Expand All @@ -107,7 +104,6 @@
{
"pid": "6",
"reference": "AOSTE-CANT1-POL-6",
"type": "monograph",
"currency": "EUR",
"library": {
"$ref": "https://bib.rero.ch/api/libraries/1"
Expand All @@ -122,7 +118,6 @@
{
"pid": "7",
"reference": "AOSTE-CANT1-POL-2021-1",
"type": "monograph",
"currency": "EUR",
"notes": [
{
Expand All @@ -138,6 +133,7 @@
},
"organisation": {
"$ref": "https://bib.rero.ch/api/organisations/1"
}
},
"send_now": true
}
]
2 changes: 0 additions & 2 deletions data/acq_receipts.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"$ref": "https://bib.rero.ch/api/acq_orders/1"
},
"reference": "AOSTE-CANT1-POL-1",
"exchange_rate": 1,
"notes": [
{
"type": "staff_note",
Expand All @@ -25,7 +24,6 @@
"$ref": "https://bib.rero.ch/api/acq_orders/7"
},
"reference": "AOSTE-CANT1-POL-2021-1",
"exchange_rate": 1,
"notes": [
{
"type": "staff_note",
Expand Down
32 changes: 0 additions & 32 deletions data/role_policies.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,38 +36,6 @@
"pro_acquisition_manager",
"pro_library_administrator"
],
"acin-access": [
"pro_full_permissions",
"pro_acquisition_manager",
"pro_library_administrator"
],
"acin-search": [
"pro_full_permissions",
"pro_read_only",
"pro_acquisition_manager",
"pro_library_administrator"
],
"acin-read": [
"pro_full_permissions",
"pro_read_only",
"pro_acquisition_manager",
"pro_library_administrator"
],
"acin-create": [
"pro_full_permissions",
"pro_acquisition_manager",
"pro_library_administrator"
],
"acin-update": [
"pro_full_permissions",
"pro_acquisition_manager",
"pro_library_administrator"
],
"acin-delete": [
"pro_full_permissions",
"pro_acquisition_manager",
"pro_library_administrator"
],
"acol-access": [
"pro_full_permissions",
"pro_acquisition_manager",
Expand Down
6 changes: 0 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,6 @@ rero_ils = "rero_ils:alembic"

[project.entry-points."invenio_db.models"]
acq_accounts = "rero_ils.modules.acquisition.acq_accounts.models"
acq_invoices = "rero_ils.modules.acquisition.acq_invoices.models"
acq_order_lines = "rero_ils.modules.acquisition.acq_order_lines.models"
acq_orders = "rero_ils.modules.acquisition.acq_orders.models"
acq_receipt_lines = "rero_ils.modules.acquisition.acq_receipt_lines.models"
Expand Down Expand Up @@ -289,7 +288,6 @@ messages_wiki = "flask_wiki"

[project.entry-points."invenio_jsonschemas.schemas"]
acq_accounts = "rero_ils.modules.acquisition.acq_accounts.jsonschemas"
acq_invoices = "rero_ils.modules.acquisition.acq_invoices.jsonschemas"
acq_order_lines = "rero_ils.modules.acquisition.acq_order_lines.jsonschemas"
acq_orders = "rero_ils.modules.acquisition.acq_orders.jsonschemas"
acq_receipt_lines = "rero_ils.modules.acquisition.acq_receipt_lines.jsonschemas"
Expand Down Expand Up @@ -334,7 +332,6 @@ patron_types = "rero_ils.oauth.scopes:patron_types"

[project.entry-points."invenio_pidstore.fetchers"]
acq_account_id = "rero_ils.modules.acquisition.acq_accounts.api:acq_account_id_fetcher"
acq_invoice_id = "rero_ils.modules.acquisition.acq_invoices.api:acq_invoice_id_fetcher"
acq_order_id = "rero_ils.modules.acquisition.acq_orders.api:acq_order_id_fetcher"
acq_order_line_id = "rero_ils.modules.acquisition.acq_order_lines.api:acq_order_line_id_fetcher"
acq_receipt_id = "rero_ils.modules.acquisition.acq_receipts.api:acq_receipt_id_fetcher"
Expand Down Expand Up @@ -367,7 +364,6 @@ vendor_id = "rero_ils.modules.vendors.api:vendor_id_fetcher"

[project.entry-points."invenio_pidstore.minters"]
acq_account_id = "rero_ils.modules.acquisition.acq_accounts.api:acq_account_id_minter"
acq_invoice_id = "rero_ils.modules.acquisition.acq_invoices.api:acq_invoice_id_minter"
acq_order_id = "rero_ils.modules.acquisition.acq_orders.api:acq_order_id_minter"
acq_order_line_id = "rero_ils.modules.acquisition.acq_order_lines.api:acq_order_line_id_minter"
acq_receipt_id = "rero_ils.modules.acquisition.acq_receipts.api:acq_receipt_id_minter"
Expand Down Expand Up @@ -399,7 +395,6 @@ vendor_id = "rero_ils.modules.vendors.api:vendor_id_minter"

[project.entry-points."invenio_records.jsonresolver"]
acq_accounts = "rero_ils.modules.acquisition.acq_accounts.jsonresolver"
acq_invoices = "rero_ils.modules.acquisition.acq_invoices.jsonresolver"
acq_order_lines = "rero_ils.modules.acquisition.acq_order_lines.jsonresolver"
acq_orders = "rero_ils.modules.acquisition.acq_orders.jsonresolver"
acq_receipt_lines = "rero_ils.modules.acquisition.acq_receipt_lines.jsonresolver"
Expand Down Expand Up @@ -428,7 +423,6 @@ vendors = "rero_ils.modules.vendors.jsonresolver"

[project.entry-points."invenio_search.mappings"]
acq_accounts = "rero_ils.modules.acquisition.acq_accounts.mappings"
acq_invoices = "rero_ils.modules.acquisition.acq_invoices.mappings"
acq_order_lines = "rero_ils.modules.acquisition.acq_order_lines.mappings"
acq_orders = "rero_ils.modules.acquisition.acq_orders.mappings"
acq_receipt_lines = "rero_ils.modules.acquisition.acq_receipt_lines.mappings"
Expand Down
Loading

0 comments on commit 9afcfbd

Please sign in to comment.