io-sanita-theme 2.31.3 → 2.33.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,6 +4,8 @@ on:
4
4
  release:
5
5
  types: [released]
6
6
 
7
+ permissions: {}
8
+
7
9
  jobs:
8
10
  update:
9
11
  name: Update themes
package/CHANGELOG.md CHANGED
@@ -1,5 +1,31 @@
1
1
  # Changelog
2
2
 
3
+ ## [2.33.0](https://github.com/RedTurtle/io-sanita-theme/compare/2.32.0...2.33.0) (2026-06-17)
4
+
5
+ ### Features
6
+
7
+ * filtri configurabili (ente territoriale, comune, località) nel blocco Ricerca farmacie ([#154](https://github.com/RedTurtle/io-sanita-theme/issues/154)) ([338eba6](https://github.com/RedTurtle/io-sanita-theme/commit/338eba67fc8760bfdc3191a2474a8497cee8b23c))
8
+ * Search strutture - widget for type filter and description text for searchable text ([#156](https://github.com/RedTurtle/io-sanita-theme/issues/156)) ([625925a](https://github.com/RedTurtle/io-sanita-theme/commit/625925a3fa40299add2dfaa1f31e976ddbe83208))
9
+
10
+ ### Maintenance
11
+
12
+ * cleanup unesed locales ([#155](https://github.com/RedTurtle/io-sanita-theme/issues/155)) ([c92e281](https://github.com/RedTurtle/io-sanita-theme/commit/c92e28158b5552dabcbfa20a44e8370dcc69dfbc))
13
+
14
+ ## [2.32.0](https://github.com/RedTurtle/io-sanita-theme/compare/2.31.3...2.32.0) (2026-06-12)
15
+
16
+ ### Features
17
+
18
+ * aggiunta ricertca per comune/distretto su blocco searchmap ([#152](https://github.com/RedTurtle/io-sanita-theme/issues/152)) ([1aff10f](https://github.com/RedTurtle/io-sanita-theme/commit/1aff10f00963987a00a4acd6aafb754e50d72108))
19
+
20
+ ### Bug Fixes
21
+
22
+ * bottoni categorie searchmap ([#151](https://github.com/RedTurtle/io-sanita-theme/issues/151)) ([058aa59](https://github.com/RedTurtle/io-sanita-theme/commit/058aa59acb0f5d721d653458e38be43f0adf0653))
23
+ * prevent the submit of the form when adding a row o column from the toolbar ([#153](https://github.com/RedTurtle/io-sanita-theme/issues/153)) ([cf723b2](https://github.com/RedTurtle/io-sanita-theme/commit/cf723b2dfd0974d470b40ab54ce3f683f7a558a0))
24
+
25
+ ### Maintenance
26
+
27
+ * prettier ([11b8f22](https://github.com/RedTurtle/io-sanita-theme/commit/11b8f222e8c6d4eb5f93d52069ec3ff2517970b7))
28
+
3
29
  ## [2.31.3](https://github.com/RedTurtle/io-sanita-theme/compare/2.31.2...2.31.3) (2026-06-11)
4
30
 
5
31
  ### Bug Fixes
package/RELEASE.md CHANGED
@@ -41,6 +41,24 @@
41
41
  - ...
42
42
  -->
43
43
 
44
+ ## Versione 2.33.0 (17/06/2026)
45
+
46
+ ### Migliorie
47
+
48
+ - Nel blocco "Cerca strutture" è ora possibile personalizzare il testo descrittivo del campo di ricerca libero e se visualizzare il filtro per tipologia come pulsanti (comportamento di default) oppure come menu a tendina.
49
+
50
+ - Nel blocco "Ricerca farmacie" ora è possibile scegliere dalle impostazioni del blocco quali filtri mostrare: ente territoriale, comune e località, sia per la ricerca dei turni che delle ferie. I blocchi esistenti mantengono il comportamento attuale.
51
+
52
+ ### Fix
53
+
54
+ - Blocco Listing con template a tabella. Corretta la visualizzazione dei campi con valori multipli (es. "Destinatari") che causavano un errore di rendering. I valori vengono ora mostrati correttamente come etichette separate da virgola.
55
+
56
+ ## Versione 2.32.0 (12/06/2026)
57
+
58
+ ### Migliorie
59
+
60
+ - Aggiunta filtri di ricerca per comune e distretto nel blocco "Cerca strutture".
61
+
44
62
  ## Versione 2.31.3 (11/06/2026)
45
63
 
46
64
  ### Fix
@@ -3067,6 +3067,21 @@ msgstr "Enter the name of the pharmacy"
3067
3067
  msgid "search_farmacia_searchable_text_label"
3068
3068
  msgstr "Pharmacy"
3069
3069
 
3070
+ #. Default: "Mostra il filtro per ente territoriale"
3071
+ #: components/Blocks/SearchFarmacia/schema
3072
+ msgid "search_farmacia_show_area_territoriale"
3073
+ msgstr "Show the territorial area filter"
3074
+
3075
+ #. Default: "Mostra il filtro per comune"
3076
+ #: components/Blocks/SearchFarmacia/schema
3077
+ msgid "search_farmacia_show_comune"
3078
+ msgstr "Show the municipality filter"
3079
+
3080
+ #. Default: "Mostra il filtro per località"
3081
+ #: components/Blocks/SearchFarmacia/schema
3082
+ msgid "search_farmacia_show_localita"
3083
+ msgstr "Show the location filter"
3084
+
3070
3085
  #. Default: "Comune"
3071
3086
  #: components/Blocks/SearchFarmacia/Body
3072
3087
  msgid "search_farmacia_sort_comune"
@@ -3197,7 +3212,17 @@ msgstr "Users"
3197
3212
  msgid "search_map_Search path"
3198
3213
  msgstr ""
3199
3214
 
3200
- #. Default: "Mostra la barra di ricerca"
3215
+ #. Default: "Mostra il filtro per comune"
3216
+ #: components/Blocks/SearchMap/schema
3217
+ msgid "search_map_Show city"
3218
+ msgstr ""
3219
+
3220
+ #. Default: "Mostra il filtro per distretto"
3221
+ #: components/Blocks/SearchMap/schema
3222
+ msgid "search_map_Show distretto"
3223
+ msgstr ""
3224
+
3225
+ #. Default: "Mostra la ricerca libera"
3201
3226
  #: components/Blocks/SearchMap/schema
3202
3227
  msgid "search_map_Show search bar"
3203
3228
  msgstr ""
@@ -3207,6 +3232,11 @@ msgstr ""
3207
3232
  msgid "search_map_Show types"
3208
3233
  msgstr ""
3209
3234
 
3235
+ #. Default: "Tutte le tipologie"
3236
+ #: components/Blocks/SearchMap/Body
3237
+ msgid "search_map_all_tipologie"
3238
+ msgstr ""
3239
+
3210
3240
  #. Default: "Ricerca con mappa"
3211
3241
  #: components/Blocks/SearchMap/schema
3212
3242
  msgid "search_map_block_title"
@@ -3217,6 +3247,21 @@ msgstr ""
3217
3247
  msgid "search_map_ct"
3218
3248
  msgstr ""
3219
3249
 
3250
+ #. Default: "Comune"
3251
+ #: components/Blocks/SearchMap/Body
3252
+ msgid "search_map_label_city"
3253
+ msgstr "Municipality"
3254
+
3255
+ #. Default: "Distretto"
3256
+ #: components/Blocks/SearchMap/Body
3257
+ msgid "search_map_label_distretto"
3258
+ msgstr "District"
3259
+
3260
+ #. Default: "Tipologia"
3261
+ #: components/Blocks/SearchMap/Body
3262
+ msgid "search_map_label_tipologia"
3263
+ msgstr ""
3264
+
3220
3265
  #. Default: "Cerca"
3221
3266
  #: components/Widgets/SearchBar/SearchBar
3222
3267
  msgid "search_map_searchable_text_button"
@@ -3237,11 +3282,31 @@ msgstr "Search for GPs and pediatricians near you"
3237
3282
  msgid "search_map_searchable_text_default_label_strutture"
3238
3283
  msgstr "Search for facilities near you"
3239
3284
 
3285
+ #. Default: "Testo descrittivo della barra di ricerca"
3286
+ #: components/Blocks/SearchMap/schema
3287
+ msgid "search_map_text_description"
3288
+ msgstr ""
3289
+
3240
3290
  #. Default: "Titolo"
3241
3291
  #: components/Blocks/SearchMap/schema
3242
3292
  msgid "search_map_title"
3243
3293
  msgstr ""
3244
3294
 
3295
+ #. Default: "Filtra tipologia con menu a tendina"
3296
+ #: components/Blocks/SearchMap/schema
3297
+ msgid "search_map_types_as_select"
3298
+ msgstr ""
3299
+
3300
+ #. Default: "Tutti i comuni"
3301
+ #: components/Blocks/SearchMap/Body
3302
+ msgid "search_mapall_cities"
3303
+ msgstr "All municipalities"
3304
+
3305
+ #. Default: "Tutti i distretti"
3306
+ #: components/Blocks/SearchMap/Body
3307
+ msgid "search_mapall_distretti"
3308
+ msgstr "All districts"
3309
+
3245
3310
  #. Default: "Tutti"
3246
3311
  #: components/Blocks/SearchMap/Body
3247
3312
  msgid "search_mapall_subjects"
@@ -3067,6 +3067,21 @@ msgstr ""
3067
3067
  msgid "search_farmacia_searchable_text_label"
3068
3068
  msgstr ""
3069
3069
 
3070
+ #. Default: "Mostra il filtro per ente territoriale"
3071
+ #: components/Blocks/SearchFarmacia/schema
3072
+ msgid "search_farmacia_show_area_territoriale"
3073
+ msgstr ""
3074
+
3075
+ #. Default: "Mostra il filtro per comune"
3076
+ #: components/Blocks/SearchFarmacia/schema
3077
+ msgid "search_farmacia_show_comune"
3078
+ msgstr ""
3079
+
3080
+ #. Default: "Mostra il filtro per località"
3081
+ #: components/Blocks/SearchFarmacia/schema
3082
+ msgid "search_farmacia_show_localita"
3083
+ msgstr ""
3084
+
3070
3085
  #. Default: "Comune"
3071
3086
  #: components/Blocks/SearchFarmacia/Body
3072
3087
  msgid "search_farmacia_sort_comune"
@@ -3197,7 +3212,17 @@ msgstr ""
3197
3212
  msgid "search_map_Search path"
3198
3213
  msgstr ""
3199
3214
 
3200
- #. Default: "Mostra la barra di ricerca"
3215
+ #. Default: "Mostra il filtro per comune"
3216
+ #: components/Blocks/SearchMap/schema
3217
+ msgid "search_map_Show city"
3218
+ msgstr ""
3219
+
3220
+ #. Default: "Mostra il filtro per distretto"
3221
+ #: components/Blocks/SearchMap/schema
3222
+ msgid "search_map_Show distretto"
3223
+ msgstr ""
3224
+
3225
+ #. Default: "Mostra la ricerca libera"
3201
3226
  #: components/Blocks/SearchMap/schema
3202
3227
  msgid "search_map_Show search bar"
3203
3228
  msgstr ""
@@ -3207,6 +3232,11 @@ msgstr ""
3207
3232
  msgid "search_map_Show types"
3208
3233
  msgstr ""
3209
3234
 
3235
+ #. Default: "Tutte le tipologie"
3236
+ #: components/Blocks/SearchMap/Body
3237
+ msgid "search_map_all_tipologie"
3238
+ msgstr ""
3239
+
3210
3240
  #. Default: "Ricerca con mappa"
3211
3241
  #: components/Blocks/SearchMap/schema
3212
3242
  msgid "search_map_block_title"
@@ -3217,6 +3247,21 @@ msgstr ""
3217
3247
  msgid "search_map_ct"
3218
3248
  msgstr ""
3219
3249
 
3250
+ #. Default: "Comune"
3251
+ #: components/Blocks/SearchMap/Body
3252
+ msgid "search_map_label_city"
3253
+ msgstr ""
3254
+
3255
+ #. Default: "Distretto"
3256
+ #: components/Blocks/SearchMap/Body
3257
+ msgid "search_map_label_distretto"
3258
+ msgstr ""
3259
+
3260
+ #. Default: "Tipologia"
3261
+ #: components/Blocks/SearchMap/Body
3262
+ msgid "search_map_label_tipologia"
3263
+ msgstr ""
3264
+
3220
3265
  #. Default: "Cerca"
3221
3266
  #: components/Widgets/SearchBar/SearchBar
3222
3267
  msgid "search_map_searchable_text_button"
@@ -3237,11 +3282,31 @@ msgstr ""
3237
3282
  msgid "search_map_searchable_text_default_label_strutture"
3238
3283
  msgstr ""
3239
3284
 
3285
+ #. Default: "Testo descrittivo della barra di ricerca"
3286
+ #: components/Blocks/SearchMap/schema
3287
+ msgid "search_map_text_description"
3288
+ msgstr ""
3289
+
3240
3290
  #. Default: "Titolo"
3241
3291
  #: components/Blocks/SearchMap/schema
3242
3292
  msgid "search_map_title"
3243
3293
  msgstr ""
3244
3294
 
3295
+ #. Default: "Filtra tipologia con menu a tendina"
3296
+ #: components/Blocks/SearchMap/schema
3297
+ msgid "search_map_types_as_select"
3298
+ msgstr ""
3299
+
3300
+ #. Default: "Tutti i comuni"
3301
+ #: components/Blocks/SearchMap/Body
3302
+ msgid "search_mapall_cities"
3303
+ msgstr ""
3304
+
3305
+ #. Default: "Tutti i distretti"
3306
+ #: components/Blocks/SearchMap/Body
3307
+ msgid "search_mapall_distretti"
3308
+ msgstr ""
3309
+
3245
3310
  #. Default: "Tutti"
3246
3311
  #: components/Blocks/SearchMap/Body
3247
3312
  msgid "search_mapall_subjects"
package/locales/volto.pot CHANGED
@@ -1,7 +1,7 @@
1
1
  msgid ""
2
2
  msgstr ""
3
3
  "Project-Id-Version: Plone\n"
4
- "POT-Creation-Date: 2026-06-11T07:39:40.656Z\n"
4
+ "POT-Creation-Date: 2026-06-17T13:05:19.697Z\n"
5
5
  "Last-Translator: Plone i18n <plone-i18n@lists.sourceforge.net>\n"
6
6
  "Language-Team: Plone i18n <plone-i18n@lists.sourceforge.net>\n"
7
7
  "Content-Type: text/plain; charset=utf-8\n"
@@ -3069,6 +3069,21 @@ msgstr ""
3069
3069
  msgid "search_farmacia_searchable_text_label"
3070
3070
  msgstr ""
3071
3071
 
3072
+ #. Default: "Mostra il filtro per ente territoriale"
3073
+ #: components/Blocks/SearchFarmacia/schema
3074
+ msgid "search_farmacia_show_area_territoriale"
3075
+ msgstr ""
3076
+
3077
+ #. Default: "Mostra il filtro per comune"
3078
+ #: components/Blocks/SearchFarmacia/schema
3079
+ msgid "search_farmacia_show_comune"
3080
+ msgstr ""
3081
+
3082
+ #. Default: "Mostra il filtro per località"
3083
+ #: components/Blocks/SearchFarmacia/schema
3084
+ msgid "search_farmacia_show_localita"
3085
+ msgstr ""
3086
+
3072
3087
  #. Default: "Comune"
3073
3088
  #: components/Blocks/SearchFarmacia/Body
3074
3089
  msgid "search_farmacia_sort_comune"
@@ -3199,7 +3214,17 @@ msgstr ""
3199
3214
  msgid "search_map_Search path"
3200
3215
  msgstr ""
3201
3216
 
3202
- #. Default: "Mostra la barra di ricerca"
3217
+ #. Default: "Mostra il filtro per comune"
3218
+ #: components/Blocks/SearchMap/schema
3219
+ msgid "search_map_Show city"
3220
+ msgstr ""
3221
+
3222
+ #. Default: "Mostra il filtro per distretto"
3223
+ #: components/Blocks/SearchMap/schema
3224
+ msgid "search_map_Show distretto"
3225
+ msgstr ""
3226
+
3227
+ #. Default: "Mostra la ricerca libera"
3203
3228
  #: components/Blocks/SearchMap/schema
3204
3229
  msgid "search_map_Show search bar"
3205
3230
  msgstr ""
@@ -3209,6 +3234,11 @@ msgstr ""
3209
3234
  msgid "search_map_Show types"
3210
3235
  msgstr ""
3211
3236
 
3237
+ #. Default: "Tutte le tipologie"
3238
+ #: components/Blocks/SearchMap/Body
3239
+ msgid "search_map_all_tipologie"
3240
+ msgstr ""
3241
+
3212
3242
  #. Default: "Ricerca con mappa"
3213
3243
  #: components/Blocks/SearchMap/schema
3214
3244
  msgid "search_map_block_title"
@@ -3219,6 +3249,21 @@ msgstr ""
3219
3249
  msgid "search_map_ct"
3220
3250
  msgstr ""
3221
3251
 
3252
+ #. Default: "Comune"
3253
+ #: components/Blocks/SearchMap/Body
3254
+ msgid "search_map_label_city"
3255
+ msgstr ""
3256
+
3257
+ #. Default: "Distretto"
3258
+ #: components/Blocks/SearchMap/Body
3259
+ msgid "search_map_label_distretto"
3260
+ msgstr ""
3261
+
3262
+ #. Default: "Tipologia"
3263
+ #: components/Blocks/SearchMap/Body
3264
+ msgid "search_map_label_tipologia"
3265
+ msgstr ""
3266
+
3222
3267
  #. Default: "Cerca"
3223
3268
  #: components/Widgets/SearchBar/SearchBar
3224
3269
  msgid "search_map_searchable_text_button"
@@ -3239,11 +3284,31 @@ msgstr ""
3239
3284
  msgid "search_map_searchable_text_default_label_strutture"
3240
3285
  msgstr ""
3241
3286
 
3287
+ #. Default: "Testo descrittivo della barra di ricerca"
3288
+ #: components/Blocks/SearchMap/schema
3289
+ msgid "search_map_text_description"
3290
+ msgstr ""
3291
+
3242
3292
  #. Default: "Titolo"
3243
3293
  #: components/Blocks/SearchMap/schema
3244
3294
  msgid "search_map_title"
3245
3295
  msgstr ""
3246
3296
 
3297
+ #. Default: "Filtra tipologia con menu a tendina"
3298
+ #: components/Blocks/SearchMap/schema
3299
+ msgid "search_map_types_as_select"
3300
+ msgstr ""
3301
+
3302
+ #. Default: "Tutti i comuni"
3303
+ #: components/Blocks/SearchMap/Body
3304
+ msgid "search_mapall_cities"
3305
+ msgstr ""
3306
+
3307
+ #. Default: "Tutti i distretti"
3308
+ #: components/Blocks/SearchMap/Body
3309
+ msgid "search_mapall_distretti"
3310
+ msgstr ""
3311
+
3247
3312
  #. Default: "Tutti"
3248
3313
  #: components/Blocks/SearchMap/Body
3249
3314
  msgid "search_mapall_subjects"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "io-sanita-theme",
3
- "version": "2.31.3",
3
+ "version": "2.33.0",
4
4
  "description": "io-sanita-theme: Volto add-on",
5
5
  "main": "src/index.js",
6
6
  "license": "MIT",
@@ -86,7 +86,10 @@ const TableTemplate = (props) => {
86
86
  c.field_properties ??
87
87
  ct_schema?.[c.ct]?.result?.properties?.[c.field] ??
88
88
  {};
89
- let render_value = JSON.stringify(item[c.field]);
89
+ const raw = item[c.field];
90
+ let render_value = Array.isArray(raw)
91
+ ? raw.map((v) => v?.title ?? v).join(', ')
92
+ : raw?.title ?? JSON.stringify(raw);
90
93
 
91
94
  if (field_properties) {
92
95
  const field = {
@@ -48,6 +48,12 @@ const Body = ({ isEditMode, data, id }) => {
48
48
  const intl = useIntl();
49
49
  const resultsRef = createRef();
50
50
  const searchType = data?.search_type; // type of search, Ferie o Turni ('shifts' or 'vacations')
51
+ // fallback dinamico per i blocchi salvati prima dell'introduzione dei flag:
52
+ // Turni mostrava solo l'ente territoriale, Ferie solo comune e località
53
+ const showAreaTerritoriale =
54
+ data.show_area_territoriale ?? searchType !== 'vacations';
55
+ const showComune = data.show_comune ?? searchType === 'vacations';
56
+ const showLocalita = data.show_localita ?? searchType === 'vacations';
51
57
  const b_size = 10; // number of page results to show
52
58
  const [currentPage, setCurrentPage] = useState(0);
53
59
  const [filters, setFilters] = useState({
@@ -251,6 +257,9 @@ const Body = ({ isEditMode, data, id }) => {
251
257
  block_id={id}
252
258
  setFilters={setFilters}
253
259
  searchType={searchType}
260
+ showAreaTerritoriale={showAreaTerritoriale}
261
+ showComune={showComune}
262
+ showLocalita={showLocalita}
254
263
  filters={filters}
255
264
  options={filtersOptions}
256
265
  ariaControls={resultsWrapperId}
@@ -36,6 +36,9 @@ const messages = defineMessages({
36
36
 
37
37
  const SearchFilters = ({
38
38
  searchType,
39
+ showAreaTerritoriale,
40
+ showComune,
41
+ showLocalita,
39
42
  filters,
40
43
  setFilters,
41
44
  options,
@@ -63,81 +66,81 @@ const SearchFilters = ({
63
66
  </Col>
64
67
 
65
68
  {searchType === 'shifts' && (
66
- <>
67
- <Col lg="3" className="d-flex flex-column">
68
- <DatetimeWidget
69
- id="date_farmacie"
70
- dateOnly={true}
71
- resettable={false}
72
- value={filters['date']}
73
- onChange={(opt, value) => {
74
- setFilters({
75
- ...filters,
76
- date: new Date(value).toISOString(),
77
- });
78
- }}
79
- title=""
80
- />
81
- <small className="ps-2">{intl.formatMessage(messages.date)}</small>{' '}
82
- </Col>
69
+ <Col lg="3" className="d-flex flex-column">
70
+ <DatetimeWidget
71
+ id="date_farmacie"
72
+ dateOnly={true}
73
+ resettable={false}
74
+ value={filters['date']}
75
+ onChange={(opt, value) => {
76
+ setFilters({
77
+ ...filters,
78
+ date: new Date(value).toISOString(),
79
+ });
80
+ }}
81
+ title=""
82
+ />
83
+ <small className="ps-2">{intl.formatMessage(messages.date)}</small>{' '}
84
+ </Col>
85
+ )}
83
86
 
84
- <Col lg="3">
85
- <SelectInput
86
- id="area_territoriale"
87
- value={filters.area_territoriale ?? ''}
88
- placeholder={intl.formatMessage(messages.area_territoriale)}
89
- onChange={(opt) => {
90
- setFilters({ ...filters, area_territoriale: opt });
91
- }}
92
- options={options.aree_territoriali ?? []}
93
- isClearable={true}
94
- isSearchable={true}
95
- />
96
- </Col>
97
- </>
87
+ {showAreaTerritoriale && (
88
+ <Col lg="3">
89
+ <SelectInput
90
+ id="area_territoriale"
91
+ value={filters.area_territoriale ?? ''}
92
+ placeholder={intl.formatMessage(messages.area_territoriale)}
93
+ onChange={(opt) => {
94
+ setFilters({ ...filters, area_territoriale: opt });
95
+ }}
96
+ options={options.aree_territoriali ?? []}
97
+ isClearable={true}
98
+ isSearchable={true}
99
+ />
100
+ </Col>
98
101
  )}
99
102
 
100
- {searchType === 'vacations' && (
101
- <>
102
- <Col lg="3" className="d-flex align-center">
103
- <SelectInput
104
- id="comune"
105
- value={
106
- filters['comune'] && {
107
- value: filters['comune'],
108
- label: filters['comune'],
109
- }
103
+ {showComune && (
104
+ <Col lg="3" className="d-flex align-center">
105
+ <SelectInput
106
+ id="comune"
107
+ value={
108
+ filters['comune'] && {
109
+ value: filters['comune'],
110
+ label: filters['comune'],
110
111
  }
111
- placeholder={intl.formatMessage(messages.comune)}
112
- onChange={(opt) => {
113
- setFilters({ ...filters, comune: opt?.value });
114
- // checkClearComune(opt);
115
- }}
116
- options={options.comuni ?? []}
117
- isClearable={true}
118
- isSearchable={true}
119
- />
120
- </Col>
112
+ }
113
+ placeholder={intl.formatMessage(messages.comune)}
114
+ onChange={(opt) => {
115
+ setFilters({ ...filters, comune: opt?.value });
116
+ // checkClearComune(opt);
117
+ }}
118
+ options={options.comuni ?? []}
119
+ isClearable={true}
120
+ isSearchable={true}
121
+ />
122
+ </Col>
123
+ )}
121
124
 
122
- <Col lg="3" className="d-flex align-center">
123
- <SelectInput
124
- id="localita"
125
- value={
126
- filters.localita && {
127
- value: filters['localita'],
128
- label: filters['localita'],
129
- }
125
+ {showLocalita && (
126
+ <Col lg="3" className="d-flex align-center">
127
+ <SelectInput
128
+ id="localita"
129
+ value={
130
+ filters.localita && {
131
+ value: filters['localita'],
132
+ label: filters['localita'],
130
133
  }
131
- placeholder={intl.formatMessage(messages.localita)}
132
- onChange={(opt) => {
133
- setFilters({ ...filters, localita: opt?.value });
134
- }}
135
- options={options.localita ?? []}
136
- isClearable={true}
137
- isSearchable={true}
138
- />
139
- </Col>
140
- </>
134
+ }
135
+ placeholder={intl.formatMessage(messages.localita)}
136
+ onChange={(opt) => {
137
+ setFilters({ ...filters, localita: opt?.value });
138
+ }}
139
+ options={options.localita ?? []}
140
+ isClearable={true}
141
+ isSearchable={true}
142
+ />
143
+ </Col>
141
144
  )}
142
145
  </Row>
143
146
  );
@@ -13,6 +13,18 @@ const messages = defineMessages({
13
13
  id: 'search_farmacie_block_title',
14
14
  defaultMessage: 'Ricerca Farmacie',
15
15
  },
16
+ show_area_territoriale: {
17
+ id: 'search_farmacia_show_area_territoriale',
18
+ defaultMessage: 'Mostra il filtro per ente territoriale',
19
+ },
20
+ show_comune: {
21
+ id: 'search_farmacia_show_comune',
22
+ defaultMessage: 'Mostra il filtro per comune',
23
+ },
24
+ show_localita: {
25
+ id: 'search_farmacia_show_localita',
26
+ defaultMessage: 'Mostra il filtro per località',
27
+ },
16
28
  });
17
29
 
18
30
  export function SearchFarmaciaSchema({ formData, intl }) {
@@ -22,7 +34,13 @@ export function SearchFarmaciaSchema({ formData, intl }) {
22
34
  {
23
35
  id: 'default',
24
36
  title: 'Default',
25
- fields: ['title', 'search_type'],
37
+ fields: [
38
+ 'title',
39
+ 'search_type',
40
+ 'show_area_territoriale',
41
+ 'show_comune',
42
+ 'show_localita',
43
+ ],
26
44
  },
27
45
  ],
28
46
  properties: {
@@ -37,6 +55,21 @@ export function SearchFarmaciaSchema({ formData, intl }) {
37
55
  title: {
38
56
  title: intl.formatMessage(messages.title),
39
57
  },
58
+ show_area_territoriale: {
59
+ title: intl.formatMessage(messages.show_area_territoriale),
60
+ type: 'boolean',
61
+ default: formData?.search_type !== 'vacations',
62
+ },
63
+ show_comune: {
64
+ title: intl.formatMessage(messages.show_comune),
65
+ type: 'boolean',
66
+ default: formData?.search_type === 'vacations',
67
+ },
68
+ show_localita: {
69
+ title: intl.formatMessage(messages.show_localita),
70
+ type: 'boolean',
71
+ default: formData?.search_type === 'vacations',
72
+ },
40
73
  },
41
74
  required: [],
42
75
  };