Skip to content

Commit

Permalink
chore(schema): update schemas
Browse files Browse the repository at this point in the history
Co-Authored-by: Bertrand Zuchuat <[email protected]>
  • Loading branch information
Garfield-fr authored and jma committed Oct 29, 2024
1 parent 9b617ec commit 1a20c24
Show file tree
Hide file tree
Showing 16 changed files with 72 additions and 43 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,12 @@
"pattern": "^https://bib.rero.ch/api/acq_accounts/.*?$",
"widget": {
"formlyConfig": {
"hideLabel": true,
"wrappers": [
"form-field"
],
"type": "account-select",
"props": {
"hideLabel": true,
"placeholder": "Choose a parent account"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@
"pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$",
"widget": {
"formlyConfig": {
"type": "datepicker",
"type": "datePicker",
"props": {
"validation": {
"messages": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@
"pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$",
"widget": {
"formlyConfig": {
"type": "datepicker",
"type": "datePicker",
"expressions": {
"props.required": "field?.parent?.model?.status === 'ordered' || field?.parent?.model?.status === 'received'",
"hide": "field?.parent?.model?.status !== 'ordered' && field?.parent?.model?.status !== 'received'"
Expand All @@ -215,7 +215,7 @@
"pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$",
"widget": {
"formlyConfig": {
"type": "datepicker",
"type": "datePicker",
"expressions": {
"props.required": "field?.parent?.model?.status === 'received'",
"hide": "field?.parent?.model?.status !== 'received'"
Expand Down Expand Up @@ -244,10 +244,13 @@
"pattern": "^https://bib.rero.ch/api/acq_accounts/.*?$",
"widget": {
"formlyConfig": {
"hideLabel": true,
"type": "account-select",
"wrappers": [
"form-field"
],
"focus": true,
"props": {
"hideLabel": true,
"placeholder": "Select an account"
}
}
Expand Down Expand Up @@ -279,13 +282,14 @@
"pattern": "^https://bib.rero.ch/api/documents/.+?$",
"widget": {
"formlyConfig": {
"type": "remoteAutoComplete",
"props": {
"validation": {
"messages": {
"patternMessage": "Should be in the following format: https://bib.rero.ch/api/documents/<PID>."
}
},
"remoteTypeahead": {
"queryOptions": {
"type": "documents",
"filter": "NOT harvested:true"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@
"pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$",
"widget": {
"formlyConfig": {
"type": "datepicker",
"type": "datePicker",
"props": {
"validation": {
"messages": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,12 @@
"widget": {
"formlyConfig": {
"type": "account-select",
"hideLabel": true,
"wrappers": [
"form-field"
],
"focus": true,
"props": {
"hideLabel": true,
"placeholder": "Select an account"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$",
"widget": {
"formlyConfig": {
"type": "datepicker",
"type": "datePicker",
"props": {
"validation": {
"messages": {
Expand All @@ -77,7 +77,7 @@
"pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$",
"widget": {
"formlyConfig": {
"type": "datepicker",
"type": "datePicker",
"props": {
"validation": {
"messages": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,17 +159,17 @@
"pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$",
"widget": {
"formlyConfig": {
"type": "datepicker",
"type": "datePicker",
"props": {
"validation": {
"messages": {
"patternMessage": "Should be in the following format: 2022-12-31 (YYYY-MM-DD).",
"dateMustBeLessThan": "The start date must be less than the end date."
"datesGreaterThan": "The start date must be less than the end date."
},
"validators": {
"dateMustBeLessThan": {
"startDate": "start_date",
"endDate": "end_date",
"datesGreaterThan": {
"dateFirst": "start_date",
"dateLast": "end_date",
"strict": true
}
}
Expand All @@ -185,17 +185,17 @@
"pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$",
"widget": {
"formlyConfig": {
"type": "datepicker",
"type": "datePicker",
"props": {
"validation": {
"messages": {
"patternMessage": "Should be in the following format: 2022-12-31 (YYYY-MM-DD).",
"datesMustBeGreaterThan": "The end date must be greater than the start date."
"datesGreaterThan": "The end date must be greater than the start date."
},
"validators": {
"dateMustBeGreaterThan": {
"startDate": "start_date",
"endDate": "end_date",
"datesGreaterThan": {
"dateFirst": "start_date",
"dateLast": "end_date",
"strict": true
}
}
Expand Down Expand Up @@ -255,8 +255,9 @@
"pattern": "^https://bib.rero.ch/api/items/.*?$",
"widget": {
"formlyConfig": {
"type": "remoteAutoComplete",
"props": {
"remoteTypeahead": {
"queryOptions": {
"type": "items"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,12 @@
"pattern": "^(https://mef.rero.ch/api/agents/(gnd|idref|rero)/.*|https://bib.rero.ch/api/local_entities/.*?)$",
"widget": {
"formlyConfig": {
"type": "entityTypeahead",
"type": "entity-autocomplete",
"props": {
"scrollHeight": "600px",
"group": true,
"filters": {
"selected": "bf:Person",
"options": [
{
"label": "Person",
Expand All @@ -31,7 +34,9 @@
}
]
},
"itemCssClass": "col-12"
"queryOptions": {
"type": "mef"
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -266,13 +266,15 @@
"pattern": "^https://bib.rero.ch/api/documents/.*?$",
"widget": {
"formlyConfig": {
"type": "remoteAutoComplete",
"props": {
"scrollHeight": "400px",
"validation": {
"messages": {
"patternMessage": "Should be in the following format: https://bib.rero.ch/api/documents/<PID>."
}
},
"remoteTypeahead": {
"queryOptions": {
"type": "documents",
"filter": "NOT harvested:true"
},
Expand Down Expand Up @@ -305,4 +307,4 @@
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,22 @@
"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",
"value": "concepts-genreForm"
}
]
},
"itemCssClass": "col-12"
"queryOptions": {
"type": "mef"
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,14 @@
"pattern": "^https://bib.rero.ch/api/documents/.*?$",
"widget": {
"formlyConfig": {
"type": "remoteAutoComplete",
"props": {
"validation": {
"messages": {
"patternMessage": "Should be in the following format: https://bib.rero.ch/api/documents/<PID>."
}
},
"remoteTypeahead": {
"queryOptions": {
"type": "documents",
"filter": "NOT harvested:true"
}
Expand Down Expand Up @@ -147,4 +148,4 @@
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -48,7 +50,9 @@
}
]
},
"itemCssClass": "col-12"
"queryOptions": {
"type": "mef"
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@
"validationMessage": "Should be in the following format: 2022-12-31 (YYYY-MM-DD).",
"widget": {
"formlyConfig": {
"type": "datepicker",
"type": "datePicker",
"props": {
"validation": {
"messages": {
Expand Down Expand Up @@ -944,7 +944,7 @@
"pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$",
"widget": {
"formlyConfig": {
"type": "datepicker",
"type": "datePicker",
"wrappers": [
"form-field"
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,14 +92,15 @@
"pattern": "^https://bib.rero.ch/api/patrons/.*?$",
"widget": {
"formlyConfig": {
"type": "remoteAutoComplete",
"props": {
"hideLabel": true,
"validation": {
"messages": {
"patternMessage": "Should be in the following format: https://bib.rero.ch/api/patrons/<PID>."
}
},
"remoteTypeahead": {
"queryOptions": {
"type": "patrons"
}
}
Expand Down
12 changes: 6 additions & 6 deletions rero_ils/modules/items/jsonschemas/items/item-v0.0.1.json
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@
"pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$",
"widget": {
"formlyConfig": {
"type": "datepicker",
"type": "datePicker",
"expressions": {
"hide": "false"
},
Expand Down Expand Up @@ -292,7 +292,7 @@
"pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$",
"widget": {
"formlyConfig": {
"type": "datepicker",
"type": "datePicker",
"props": {
"validation": {
"messages": {
Expand Down Expand Up @@ -400,7 +400,7 @@
"validationMessage": "Should be in the following format: 2022-12-31 (YYYY-MM-DD).",
"widget": {
"formlyConfig": {
"type": "datepicker",
"type": "datePicker",
"expressions": {
"props.required": "field?.parent?.model?.status === 'received'",
"hide": "field?.parent?.model?.status !== 'received'"
Expand All @@ -426,7 +426,7 @@
"validationMessage": "Should be in the following format: 2022-12-31 (YYYY-MM-DD).",
"widget": {
"formlyConfig": {
"type": "datepicker",
"type": "datePicker",
"props": {
"validation": {
"messages": {
Expand All @@ -446,7 +446,7 @@
"validationMessage": "Should be in the following format: 2022-12-31 (YYYY-MM-DD).",
"widget": {
"formlyConfig": {
"type": "datepicker",
"type": "datePicker",
"props": {
"validation": {
"messages": {
Expand Down Expand Up @@ -693,7 +693,7 @@
"validationMessage": "Should be in the following format: 2022-12-31 (YYYY-MM-DD).",
"widget": {
"formlyConfig": {
"type": "datepicker",
"type": "datePicker",
"props": {
"hideLabel": true,
"defaultValueExpression": "new Date().toISOString().split('T')[0]",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@
"pattern": "\\d{4}-((0[1-9])|(1[0-2]))-(((0[1-9])|[1-2][0-9])|(3[0-1]))$",
"widget": {
"formlyConfig": {
"type": "datepicker",
"type": "datePicker",
"props": {
"validation": {
"messages": {
Expand Down Expand Up @@ -492,7 +492,7 @@
},
"widget": {
"formlyConfig": {
"type": "multicheckbox",
"type": "multi-checkbox",
"wrappers": [
"card"
],
Expand Down

0 comments on commit 1a20c24

Please sign in to comment.