From e671c313909aef8e5e231066500b0f4bff1e21e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johnny=20Marie=CC=81thoz?= Date: Wed, 18 Dec 2024 07:56:36 +0100 Subject: [PATCH] primeng: fix patron editor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Removes css class for the professional view. * Adapts the main search component to the new ui version. * Fixes several details in the patron editor. Co-Authored-by: Johnny Mariéthoz Co-Authored-by: Bertrand Zuchuat --- rero_ils/jsonschemas/common/cantons-v0.0.1.json | 4 +++- .../jsonschemas/common/countries-v0.0.1.json | 1 - .../document_genre_form_link-v0.0.1.json | 16 +++++++--------- .../document_subjects_entity_link-v0.0.1.json | 17 +++++++---------- .../jsonschemas/patrons/patron-v0.0.1.json | 11 +++++++++-- .../theme/templates/rero_ils/frontpage.html | 1 - rero_ils/theme/templates/rero_ils/header.html | 1 - .../theme/templates/rero_ils/professional.html | 2 +- 8 files changed, 27 insertions(+), 26 deletions(-) diff --git a/rero_ils/jsonschemas/common/cantons-v0.0.1.json b/rero_ils/jsonschemas/common/cantons-v0.0.1.json index 28230454ac..285f87872d 100644 --- a/rero_ils/jsonschemas/common/cantons-v0.0.1.json +++ b/rero_ils/jsonschemas/common/cantons-v0.0.1.json @@ -37,7 +37,9 @@ }, "props": { "sort": true, - "itemCssClass": "col-lg-4", + "placeholder": "Select an option…", + "sortOrder": "asc", + "filter": true, "options": [ { "label": "canton_ag", diff --git a/rero_ils/jsonschemas/common/countries-v0.0.1.json b/rero_ils/jsonschemas/common/countries-v0.0.1.json index ec62ae505d..0167a0c4e2 100644 --- a/rero_ils/jsonschemas/common/countries-v0.0.1.json +++ b/rero_ils/jsonschemas/common/countries-v0.0.1.json @@ -385,7 +385,6 @@ "placeholder": "Select an option…", "sortOrder": "asc", "filter": true, - "itemCssClass": "col-lg-4", "options": [ { "label": "country_aa", diff --git a/rero_ils/modules/documents/jsonschemas/documents/document_genre_form_link-v0.0.1.json b/rero_ils/modules/documents/jsonschemas/documents/document_genre_form_link-v0.0.1.json index bacc8b6e33..b225fe07ba 100644 --- a/rero_ils/modules/documents/jsonschemas/documents/document_genre_form_link-v0.0.1.json +++ b/rero_ils/modules/documents/jsonschemas/documents/document_genre_form_link-v0.0.1.json @@ -16,9 +16,12 @@ "pattern": "^(https://mef.rero.ch/api/concepts/(gnd|idref|rero)/.*|https://bib.rero.ch/api/local_entities/.*?)$", "widget": { "formlyConfig": { - "type": "entityTypeahead", + "type": "entity-autocomplete", "props": { + "scrollHeight": "600px", + "group": true, "filters": { + "selected": "concepts_genreForm", "options": [ { "label": "Genre, form", @@ -26,7 +29,9 @@ } ] }, - "itemCssClass": "col-12" + "queryOptions": { + "type": "mef" + } } } } @@ -36,12 +41,5 @@ "type": "string", "minLength": 1 } - }, - "widget": { - "formlyConfig": { - "props": { - "containerCssClass": "row" - } - } } } diff --git a/rero_ils/modules/documents/jsonschemas/documents/document_subjects_entity_link-v0.0.1.json b/rero_ils/modules/documents/jsonschemas/documents/document_subjects_entity_link-v0.0.1.json index f00ad2c554..3742113ee9 100644 --- a/rero_ils/modules/documents/jsonschemas/documents/document_subjects_entity_link-v0.0.1.json +++ b/rero_ils/modules/documents/jsonschemas/documents/document_subjects_entity_link-v0.0.1.json @@ -17,10 +17,12 @@ "pattern": "^(https://mef.rero.ch/api/(agents|concepts|places)/(gnd|idref|rero)/.*|https://bib.rero.ch/api/local_entities/.*?)$", "widget": { "formlyConfig": { - "type": "entityTypeahead", + "type": "entity-autocomplete", "props": { + "scrollHeight": "600px", + "group": true, "filters": { - "default": "bf:Topic", + "selected": "bf:Topic", "options": [ { "label": "Topic", @@ -48,7 +50,9 @@ } ] }, - "itemCssClass": "col-12" + "queryOptions": { + "type": "mef" + } } } } @@ -58,12 +62,5 @@ "type": "string", "minLength": 1 } - }, - "widget": { - "formlyConfig": { - "props": { - "containerCssClass": "row" - } - } } } diff --git a/rero_ils/modules/patrons/jsonschemas/patrons/patron-v0.0.1.json b/rero_ils/modules/patrons/jsonschemas/patrons/patron-v0.0.1.json index 023b229fae..30c91798a4 100644 --- a/rero_ils/modules/patrons/jsonschemas/patrons/patron-v0.0.1.json +++ b/rero_ils/modules/patrons/jsonschemas/patrons/patron-v0.0.1.json @@ -47,7 +47,14 @@ "items": { "title": "Local code", "type": "string", - "minLength": 1 + "minLength": 1, + "widget": { + "formlyConfig": { + "props": { + "hideLabel": true + } + } + } } }, "user_id": { @@ -57,7 +64,6 @@ "widget": { "formlyConfig": { "wrappers": [ - "form-field", "user-id" ] } @@ -200,6 +206,7 @@ "widget": { "formlyConfig": { "props": { + "hideLabel": true, "doNotSubmitOnEnter": true, "validation": { "validators": { diff --git a/rero_ils/theme/templates/rero_ils/frontpage.html b/rero_ils/theme/templates/rero_ils/frontpage.html index d54e0f4bd6..c9d23b39f7 100644 --- a/rero_ils/theme/templates/rero_ils/frontpage.html +++ b/rero_ils/theme/templates/rero_ils/frontpage.html @@ -43,7 +43,6 @@ language="{{ current_i18n.locale.language[:2] }}" inputstyleclass="md:text-xl w-full" class="rero-ils-ui" - admin="false" /> diff --git a/rero_ils/theme/templates/rero_ils/header.html b/rero_ils/theme/templates/rero_ils/header.html index 54cfed22e4..2e8333d64d 100644 --- a/rero_ils/theme/templates/rero_ils/header.html +++ b/rero_ils/theme/templates/rero_ils/header.html @@ -35,7 +35,6 @@ {%- block navbar_search %} - + {{ node_assets('@rero/rero-ils-ui/dist/admin', tags='type="module"') }}