Skip to content

Commit

Permalink
Product filters backend response filters.
Browse files Browse the repository at this point in the history
  • Loading branch information
vonpoland committed Nov 21, 2023
1 parent 58d9f87 commit c395650
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 44 deletions.
47 changes: 22 additions & 25 deletions maas-schemas/schemas/maas-backend/products/provider.json
Original file line number Diff line number Diff line change
Expand Up @@ -368,35 +368,32 @@
"stationsList": true,
"stationsRetrieve": true
},
"filters": {
"filters": [
{
"name": "ticketType",
"label": "ticketTypeLabel",
"selectionOptions": [
{
"value": null,
"label": "PLEASE_CHOOSE"
},
{
"value": "ordinary",
"label": "TYPE_ORDINARY"
}
],
"default": {
"filters": [
{
"name": "ticketType",
"label": "ticketTypeLabel",
"selectionOptions": [
{
"value": null,
"label": "PLEASE_CHOOSE"
},
{
"value": "ordinary",
"label": "TYPE_ORDINARY"
}
},
{
"name": "ticketZone",
"label": "ticketZoneLabel",
"selectionOptions": [
],
"default": null
],
"default": {
"value": null,
"label": "PLEASE_CHOOSE"
}
]
},
},
{
"name": "ticketZone",
"label": "ticketZoneLabel",
"selectionOptions": [],
"default": null
}
],
"personalDataOptionsAllow": [],
"personalDataCreateAllow": [],
"optionalParameters": [
Expand Down
36 changes: 17 additions & 19 deletions maas-schemas/src/io-ts/_types/maas-backend/products/provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -934,25 +934,23 @@ export const examplesProvider: NonEmptyArray<Provider> = [
hidden: false,
branding: {},
features: { ticket: true, stationsList: true, stationsRetrieve: true },
filters: {
filters: [
{
name: 'ticketType',
label: 'ticketTypeLabel',
selectionOptions: [
{ value: null, label: 'PLEASE_CHOOSE' },
{ value: 'ordinary', label: 'TYPE_ORDINARY' },
],
default: { value: null, label: 'PLEASE_CHOOSE' },
},
{
name: 'ticketZone',
label: 'ticketZoneLabel',
selectionOptions: [],
default: null,
},
],
},
filters: [
{
name: 'ticketType',
label: 'ticketTypeLabel',
selectionOptions: [
{ value: null, label: 'PLEASE_CHOOSE' },
{ value: 'ordinary', label: 'TYPE_ORDINARY' },
],
default: { value: null, label: 'PLEASE_CHOOSE' },
},
{
name: 'ticketZone',
label: 'ticketZoneLabel',
selectionOptions: [],
default: null,
},
],
personalDataOptionsAllow: [],
personalDataCreateAllow: [],
optionalParameters: [
Expand Down

0 comments on commit c395650

Please sign in to comment.