From 50a232d2eccb9e0cd1fdc34b4462413102c73c20 Mon Sep 17 00:00:00 2001 From: Sara Bianchi <43245702+SaraBianchi@users.noreply.github.com> Date: Thu, 15 Feb 2024 09:11:52 +0100 Subject: [PATCH] feat: added pre-filters in BandoSearch and updated user selection filters, added parameters in bando listing block (#537) --- locales/de/LC_MESSAGES/volto.po | 25 +++++++++ locales/en/LC_MESSAGES/volto.po | 25 +++++++++ locales/es/LC_MESSAGES/volto.po | 25 +++++++++ locales/fr/LC_MESSAGES/volto.po | 25 +++++++++ locales/it/LC_MESSAGES/volto.po | 25 +++++++++ locales/volto.pot | 27 +++++++++- src/actions/getSearchBandiFilters.js | 16 ++++-- .../ItaliaTheme/Blocks/BandiSearch/Body.jsx | 7 ++- .../Blocks/BandiSearch/DefaultFilters.js | 23 +++++--- .../Blocks/BandiSearch/FiltersConfig.js | 4 +- .../Blocks/BandiSearch/Sidebar.jsx | 54 ++++++++++++++----- .../Listing/BandiInEvidenceTemplate.jsx | 21 +++++++- .../ListingOptions/bandiInEvidenceTemplate.js | 18 ++++++- 13 files changed, 265 insertions(+), 30 deletions(-) diff --git a/locales/de/LC_MESSAGES/volto.po b/locales/de/LC_MESSAGES/volto.po index 386731d00..0b5fc0692 100644 --- a/locales/de/LC_MESSAGES/volto.po +++ b/locales/de/LC_MESSAGES/volto.po @@ -2898,6 +2898,16 @@ msgstr "" msgid "searchBlock_help" msgstr "" +#: components/ItaliaTheme/Blocks/BandiSearch/Sidebar +# defaultMessage: Questi filtri non verranno visualizzati dall'utente ma consentono di pre filtrare i bandi secondo alcuni criteri. +msgid "searchBlock_help_filters" +msgstr "" + +#: components/ItaliaTheme/Blocks/BandiSearch/Sidebar +# defaultMessage: Filtri pre-impostati +msgid "searchBlock_pre_filters" +msgstr "" + #: components/ItaliaTheme/Blocks/BandiSearch/Sidebar #: components/ItaliaTheme/Blocks/EventSearch/Sidebar #: components/ItaliaTheme/Blocks/UOSearch/Sidebar @@ -3218,6 +3228,11 @@ msgstr "" msgid "share" msgstr "" +#: config/Blocks/ListingOptions/bandiInEvidenceTemplate +# defaultMessage: Mostra la data di ultima modifica +msgid "show_data_ultima_modifica" +msgstr "" + #: components/ItaliaTheme/Blocks/HighlightedContent/Sidebar # defaultMessage: Mostra la data msgid "show_date" @@ -3269,6 +3284,11 @@ msgstr "" msgid "show_map_full_width" msgstr "" +#: config/Blocks/ListingOptions/bandiInEvidenceTemplate +# defaultMessage: Mostra le note anche per i bandi scaduti +msgid "show_note" +msgstr "" + #: config/Blocks/ListingOptions/ribbonCardTemplate # defaultMessage: Mostra il nastro solo sulla prima card msgid "show_only_first_ribbon" @@ -3591,6 +3611,11 @@ msgstr "" msgid "ulteriori_informazioni" msgstr "" +#: components/ItaliaTheme/Blocks/Listing/BandiInEvidenceTemplate +# defaultMessage: Data di ultima modifica +msgid "ultima_modifica_bando" +msgstr "" + #: helpers/amministrazioneTrasparenteHelper # defaultMessage: unità operativa msgid "unita_operativa" diff --git a/locales/en/LC_MESSAGES/volto.po b/locales/en/LC_MESSAGES/volto.po index fe07ef80f..f9f29c05e 100644 --- a/locales/en/LC_MESSAGES/volto.po +++ b/locales/en/LC_MESSAGES/volto.po @@ -2883,6 +2883,16 @@ msgstr "" msgid "searchBlock_help" msgstr "" +#: components/ItaliaTheme/Blocks/BandiSearch/Sidebar +# defaultMessage: Questi filtri non verranno visualizzati dall'utente ma consentono di pre filtrare i bandi secondo alcuni criteri. +msgid "searchBlock_help_filters" +msgstr "" + +#: components/ItaliaTheme/Blocks/BandiSearch/Sidebar +# defaultMessage: Filtri pre-impostati +msgid "searchBlock_pre_filters" +msgstr "" + #: components/ItaliaTheme/Blocks/BandiSearch/Sidebar #: components/ItaliaTheme/Blocks/EventSearch/Sidebar #: components/ItaliaTheme/Blocks/UOSearch/Sidebar @@ -3203,6 +3213,11 @@ msgstr "Arrange on 4 columns" msgid "share" msgstr "Share" +#: config/Blocks/ListingOptions/bandiInEvidenceTemplate +# defaultMessage: Mostra la data di ultima modifica +msgid "show_data_ultima_modifica" +msgstr "" + #: components/ItaliaTheme/Blocks/HighlightedContent/Sidebar # defaultMessage: Mostra la data msgid "show_date" @@ -3254,6 +3269,11 @@ msgstr "" msgid "show_map_full_width" msgstr "" +#: config/Blocks/ListingOptions/bandiInEvidenceTemplate +# defaultMessage: Mostra le note anche per i bandi scaduti +msgid "show_note" +msgstr "" + #: config/Blocks/ListingOptions/ribbonCardTemplate # defaultMessage: Mostra il nastro solo sulla prima card msgid "show_only_first_ribbon" @@ -3576,6 +3596,11 @@ msgstr "Responsible office" msgid "ulteriori_informazioni" msgstr "Further information" +#: components/ItaliaTheme/Blocks/Listing/BandiInEvidenceTemplate +# defaultMessage: Data di ultima modifica +msgid "ultima_modifica_bando" +msgstr "" + #: helpers/amministrazioneTrasparenteHelper # defaultMessage: unità operativa msgid "unita_operativa" diff --git a/locales/es/LC_MESSAGES/volto.po b/locales/es/LC_MESSAGES/volto.po index 53953e545..9fc2a4297 100644 --- a/locales/es/LC_MESSAGES/volto.po +++ b/locales/es/LC_MESSAGES/volto.po @@ -2892,6 +2892,16 @@ msgstr "Filtro 2" msgid "searchBlock_help" msgstr "Seleccionar filtros de búsqueda para mostrar en bloquear." +#: components/ItaliaTheme/Blocks/BandiSearch/Sidebar +# defaultMessage: Questi filtri non verranno visualizzati dall'utente ma consentono di pre filtrare i bandi secondo alcuni criteri. +msgid "searchBlock_help_filters" +msgstr "" + +#: components/ItaliaTheme/Blocks/BandiSearch/Sidebar +# defaultMessage: Filtri pre-impostati +msgid "searchBlock_pre_filters" +msgstr "" + #: components/ItaliaTheme/Blocks/BandiSearch/Sidebar #: components/ItaliaTheme/Blocks/EventSearch/Sidebar #: components/ItaliaTheme/Blocks/UOSearch/Sidebar @@ -3212,6 +3222,11 @@ msgstr "Organizar en 4 columnas" msgid "share" msgstr "Compartir" +#: config/Blocks/ListingOptions/bandiInEvidenceTemplate +# defaultMessage: Mostra la data di ultima modifica +msgid "show_data_ultima_modifica" +msgstr "" + #: components/ItaliaTheme/Blocks/HighlightedContent/Sidebar # defaultMessage: Mostra la data msgid "show_date" @@ -3263,6 +3278,11 @@ msgstr "Mostrar el título de la imagen." msgid "show_map_full_width" msgstr "Mostrar el mapa en ancho completo" +#: config/Blocks/ListingOptions/bandiInEvidenceTemplate +# defaultMessage: Mostra le note anche per i bandi scaduti +msgid "show_note" +msgstr "" + #: config/Blocks/ListingOptions/ribbonCardTemplate # defaultMessage: Mostra il nastro solo sulla prima card msgid "show_only_first_ribbon" @@ -3585,6 +3605,11 @@ msgstr "Oficina responsable" msgid "ulteriori_informazioni" msgstr "Más información" +#: components/ItaliaTheme/Blocks/Listing/BandiInEvidenceTemplate +# defaultMessage: Data di ultima modifica +msgid "ultima_modifica_bando" +msgstr "" + #: helpers/amministrazioneTrasparenteHelper # defaultMessage: unità operativa msgid "unita_operativa" diff --git a/locales/fr/LC_MESSAGES/volto.po b/locales/fr/LC_MESSAGES/volto.po index 93890a620..1296fb322 100644 --- a/locales/fr/LC_MESSAGES/volto.po +++ b/locales/fr/LC_MESSAGES/volto.po @@ -2900,6 +2900,16 @@ msgstr "" msgid "searchBlock_help" msgstr "" +#: components/ItaliaTheme/Blocks/BandiSearch/Sidebar +# defaultMessage: Questi filtri non verranno visualizzati dall'utente ma consentono di pre filtrare i bandi secondo alcuni criteri. +msgid "searchBlock_help_filters" +msgstr "" + +#: components/ItaliaTheme/Blocks/BandiSearch/Sidebar +# defaultMessage: Filtri pre-impostati +msgid "searchBlock_pre_filters" +msgstr "" + #: components/ItaliaTheme/Blocks/BandiSearch/Sidebar #: components/ItaliaTheme/Blocks/EventSearch/Sidebar #: components/ItaliaTheme/Blocks/UOSearch/Sidebar @@ -3220,6 +3230,11 @@ msgstr "Disposer sur 4 colonnes" msgid "share" msgstr "Partager" +#: config/Blocks/ListingOptions/bandiInEvidenceTemplate +# defaultMessage: Mostra la data di ultima modifica +msgid "show_data_ultima_modifica" +msgstr "" + #: components/ItaliaTheme/Blocks/HighlightedContent/Sidebar # defaultMessage: Mostra la data msgid "show_date" @@ -3271,6 +3286,11 @@ msgstr "" msgid "show_map_full_width" msgstr "" +#: config/Blocks/ListingOptions/bandiInEvidenceTemplate +# defaultMessage: Mostra le note anche per i bandi scaduti +msgid "show_note" +msgstr "" + #: config/Blocks/ListingOptions/ribbonCardTemplate # defaultMessage: Mostra il nastro solo sulla prima card msgid "show_only_first_ribbon" @@ -3593,6 +3613,11 @@ msgstr "Bureau responsable" msgid "ulteriori_informazioni" msgstr "Informations complémentaires" +#: components/ItaliaTheme/Blocks/Listing/BandiInEvidenceTemplate +# defaultMessage: Data di ultima modifica +msgid "ultima_modifica_bando" +msgstr "" + #: helpers/amministrazioneTrasparenteHelper # defaultMessage: unità operativa msgid "unita_operativa" diff --git a/locales/it/LC_MESSAGES/volto.po b/locales/it/LC_MESSAGES/volto.po index d9911e07f..cdfc239f6 100644 --- a/locales/it/LC_MESSAGES/volto.po +++ b/locales/it/LC_MESSAGES/volto.po @@ -2883,6 +2883,16 @@ msgstr "" msgid "searchBlock_help" msgstr "" +#: components/ItaliaTheme/Blocks/BandiSearch/Sidebar +# defaultMessage: Questi filtri non verranno visualizzati dall'utente ma consentono di pre filtrare i bandi secondo alcuni criteri. +msgid "searchBlock_help_filters" +msgstr "" + +#: components/ItaliaTheme/Blocks/BandiSearch/Sidebar +# defaultMessage: Filtri pre-impostati +msgid "searchBlock_pre_filters" +msgstr "" + #: components/ItaliaTheme/Blocks/BandiSearch/Sidebar #: components/ItaliaTheme/Blocks/EventSearch/Sidebar #: components/ItaliaTheme/Blocks/UOSearch/Sidebar @@ -3203,6 +3213,11 @@ msgstr "Disponi su 4 colonne" msgid "share" msgstr "Condividi" +#: config/Blocks/ListingOptions/bandiInEvidenceTemplate +# defaultMessage: Mostra la data di ultima modifica +msgid "show_data_ultima_modifica" +msgstr "" + #: components/ItaliaTheme/Blocks/HighlightedContent/Sidebar # defaultMessage: Mostra la data msgid "show_date" @@ -3254,6 +3269,11 @@ msgstr "" msgid "show_map_full_width" msgstr "Mostra la mappa a tutta larghezza" +#: config/Blocks/ListingOptions/bandiInEvidenceTemplate +# defaultMessage: Mostra le note anche per i bandi scaduti +msgid "show_note" +msgstr "" + #: config/Blocks/ListingOptions/ribbonCardTemplate # defaultMessage: Mostra il nastro solo sulla prima card msgid "show_only_first_ribbon" @@ -3576,6 +3596,11 @@ msgstr "Ufficio responsabile" msgid "ulteriori_informazioni" msgstr "Ulteriori informazioni" +#: components/ItaliaTheme/Blocks/Listing/BandiInEvidenceTemplate +# defaultMessage: Data di ultima modifica +msgid "ultima_modifica_bando" +msgstr "" + #: helpers/amministrazioneTrasparenteHelper # defaultMessage: unità operativa msgid "unita_operativa" diff --git a/locales/volto.pot b/locales/volto.pot index 8a7680207..ee3fbde89 100644 --- a/locales/volto.pot +++ b/locales/volto.pot @@ -1,7 +1,7 @@ msgid "" msgstr "" "Project-Id-Version: Plone\n" -"POT-Creation-Date: 2024-01-16T14:29:53.874Z\n" +"POT-Creation-Date: 2024-02-07T17:28:21.593Z\n" "Last-Translator: Plone i18n \n" "Language-Team: Plone i18n \n" "MIME-Version: 1.0\n" @@ -2885,6 +2885,16 @@ msgstr "" msgid "searchBlock_help" msgstr "" +#: components/ItaliaTheme/Blocks/BandiSearch/Sidebar +# defaultMessage: Questi filtri non verranno visualizzati dall'utente ma consentono di pre filtrare i bandi secondo alcuni criteri. +msgid "searchBlock_help_filters" +msgstr "" + +#: components/ItaliaTheme/Blocks/BandiSearch/Sidebar +# defaultMessage: Filtri pre-impostati +msgid "searchBlock_pre_filters" +msgstr "" + #: components/ItaliaTheme/Blocks/BandiSearch/Sidebar #: components/ItaliaTheme/Blocks/EventSearch/Sidebar #: components/ItaliaTheme/Blocks/UOSearch/Sidebar @@ -3205,6 +3215,11 @@ msgstr "" msgid "share" msgstr "" +#: config/Blocks/ListingOptions/bandiInEvidenceTemplate +# defaultMessage: Mostra la data di ultima modifica +msgid "show_data_ultima_modifica" +msgstr "" + #: components/ItaliaTheme/Blocks/HighlightedContent/Sidebar # defaultMessage: Mostra la data msgid "show_date" @@ -3256,6 +3271,11 @@ msgstr "" msgid "show_map_full_width" msgstr "" +#: config/Blocks/ListingOptions/bandiInEvidenceTemplate +# defaultMessage: Mostra le note anche per i bandi scaduti +msgid "show_note" +msgstr "" + #: config/Blocks/ListingOptions/ribbonCardTemplate # defaultMessage: Mostra il nastro solo sulla prima card msgid "show_only_first_ribbon" @@ -3578,6 +3598,11 @@ msgstr "" msgid "ulteriori_informazioni" msgstr "" +#: components/ItaliaTheme/Blocks/Listing/BandiInEvidenceTemplate +# defaultMessage: Data di ultima modifica +msgid "ultima_modifica_bando" +msgstr "" + #: helpers/amministrazioneTrasparenteHelper # defaultMessage: unità operativa msgid "unita_operativa" diff --git a/src/actions/getSearchBandiFilters.js b/src/actions/getSearchBandiFilters.js index 94355e6ec..581a254f8 100644 --- a/src/actions/getSearchBandiFilters.js +++ b/src/actions/getSearchBandiFilters.js @@ -1,17 +1,25 @@ export const GET_SEARCH_BANDI_FILTERS = 'GET_SEARCH_BANDI_FILTERS'; +import { expandToBackendURL } from '@plone/volto/helpers'; /** * Get search bandi filters. * @function getSearchBandiFilters - * @returns {Object} Get search bandi filters action. - */ + * @returns {Object} Get search bandi filters action: + * { + * offices: [], + * subjects: [], + * tipologie: [], + * } +*/ + export function getSearchBandiFilters(path = '') { - let p = path === '/' ? '' : path; + // let p = path === '/' ? '' : path; + const pathSearchFilters = `${path === '/' ? '' : expandToBackendURL(path)}/@bandi-search-filters`; return { type: GET_SEARCH_BANDI_FILTERS, request: { op: 'get', - path: p + '/@bandi-search-filters', + path: pathSearchFilters, }, }; } diff --git a/src/components/ItaliaTheme/Blocks/BandiSearch/Body.jsx b/src/components/ItaliaTheme/Blocks/BandiSearch/Body.jsx index d240c6a01..3a053b1f8 100644 --- a/src/components/ItaliaTheme/Blocks/BandiSearch/Body.jsx +++ b/src/components/ItaliaTheme/Blocks/BandiSearch/Body.jsx @@ -78,6 +78,10 @@ const Body = ({ data, inEditMode, path, onChangeBlock }) => { } }); + if (data.defaultQuerystring) { + query.push(...data.defaultQuerystring.filter(el => el.i !== 'portal_type')); + } + if (data.location && data.location[0]) { query.push({ i: 'path', @@ -125,7 +129,8 @@ const Body = ({ data, inEditMode, path, onChangeBlock }) => { return newState; }; - const filtersConfig = FiltersConfig(null); + const pathSearch = data?.location?.length > 0 ? data.location[0]['@id'] : '/'; + const filtersConfig = FiltersConfig(null, pathSearch); const getInitialState = () => { return { filterOne: filtersConfig[data?.filter_one], diff --git a/src/components/ItaliaTheme/Blocks/BandiSearch/DefaultFilters.js b/src/components/ItaliaTheme/Blocks/BandiSearch/DefaultFilters.js index 292eb1650..ca118a6de 100644 --- a/src/components/ItaliaTheme/Blocks/BandiSearch/DefaultFilters.js +++ b/src/components/ItaliaTheme/Blocks/BandiSearch/DefaultFilters.js @@ -65,7 +65,7 @@ const messages = defineMessages({ }, }); -const DefaultFilters = () => { +const DefaultFilters = (pathSearch) => { const intl = useIntl(); moment.locale(intl.locale); const subsite = useSelector((state) => state.subsite?.data); @@ -99,7 +99,14 @@ const DefaultFilters = () => { props: { value: null, options: { - vocabulary: 'redturtle.bandi.tipologia.vocabulary', + // vocabulary: 'redturtle.bandi.tipologia.vocabulary', + // placeholder: intl.formatMessage(messages.tipologia), + dispatch: { + action: getSearchBandiFilters, + path: subsite ? flattenToAppURL(subsite['@id']) : pathSearch || '/', + stateSelector: 'searchBandiFilters', + resultProp: 'tipologie', + }, placeholder: intl.formatMessage(messages.tipologia), }, }, @@ -147,7 +154,7 @@ const DefaultFilters = () => { options: { dispatch: { action: getSearchBandiFilters, - path: subsite ? flattenToAppURL(subsite['@id']) : '/', + path: subsite ? flattenToAppURL(subsite['@id']) : pathSearch || '/', stateSelector: 'searchBandiFilters', resultProp: 'offices', }, @@ -175,7 +182,7 @@ const DefaultFilters = () => { options: { dispatch: { action: getSearchBandiFilters, - path: subsite ? flattenToAppURL(subsite['@id']) : '/', + path: subsite ? flattenToAppURL(subsite['@id']) : pathSearch || '/', stateSelector: 'searchBandiFilters', resultProp: 'subjects', }, @@ -201,10 +208,10 @@ const DefaultFilters = () => { widget: { component: DateFilter, props: { - value: { - startDate: moment().startOf('day'), - endDate: moment().endOf('day'), - }, + // value: { + // startDate: moment().startOf('day'), + // endDate: moment().endOf('day'), + // }, showClearDates: true, // defaultStart: moment().startOf('day'), // defaultEnd: moment().endOf('day'), diff --git a/src/components/ItaliaTheme/Blocks/BandiSearch/FiltersConfig.js b/src/components/ItaliaTheme/Blocks/BandiSearch/FiltersConfig.js index 35511e58e..5c3811af0 100644 --- a/src/components/ItaliaTheme/Blocks/BandiSearch/FiltersConfig.js +++ b/src/components/ItaliaTheme/Blocks/BandiSearch/FiltersConfig.js @@ -6,9 +6,9 @@ import DefaultFilters from 'design-comuni-plone-theme/components/ItaliaTheme/Blo componente da customizzare nel proprio sito per modificare/aggiungere tipologie di Filtri *** */ -const FiltersConfig = (dispatchFilter) => { +const FiltersConfig = (dispatchFilter, path) => { // const subsite = useSelector((state) => state.subsite?.data); - const defaultFilters = DefaultFilters(); + const defaultFilters = DefaultFilters(path); return { ...defaultFilters, diff --git a/src/components/ItaliaTheme/Blocks/BandiSearch/Sidebar.jsx b/src/components/ItaliaTheme/Blocks/BandiSearch/Sidebar.jsx index 6bc786bf9..3ab0af3d0 100644 --- a/src/components/ItaliaTheme/Blocks/BandiSearch/Sidebar.jsx +++ b/src/components/ItaliaTheme/Blocks/BandiSearch/Sidebar.jsx @@ -8,6 +8,7 @@ import { ObjectBrowserWidget, CheckboxWidget, } from '@plone/volto/components'; +import QueryWidget from '@plone/volto/components/manage/Widgets/QueryWidget'; import upSVG from '@plone/volto/icons/up-key.svg'; import downSVG from '@plone/volto/icons/down-key.svg'; import FiltersConfig from 'design-comuni-plone-theme/components/ItaliaTheme/Blocks/BandiSearch/FiltersConfig'; @@ -57,6 +58,14 @@ const messages = defineMessages({ id: 'searchBlock_style', defaultMessage: 'Aspetto', }, + pre_filters: { + id: 'searchBlock_pre_filters', + defaultMessage: 'Filtri pre-impostati', + }, + help_filters: { + id: 'searchBlock_help_filters', + defaultMessage: "Questi filtri non verranno visualizzati dall'utente ma consentono di pre filtrare i bandi secondo alcuni criteri.", + }, text_filter: { id: 'searchBlock_text_filter', defaultMessage: 'Filtro di testo', @@ -101,16 +110,12 @@ const messages = defineMessages({ const Sidebar = ({ block, data, onChangeBlock, required }) => { const intl = useIntl(); - const [activeAccIndex, setActiveAccIndex] = useState(1); - - function handleAccClick(e, titleProps) { - const { index } = titleProps; - const newIndex = activeAccIndex === index ? -1 : index; - setActiveAccIndex(newIndex); - } + /* Accordions active */ + const [activeAccLayout, setActiveAccLayout] = useState(true); + const [activeAccFilters, setActiveAccFilters] = useState(true); - let filtersConfig = FiltersConfig(null); + let filtersConfig = FiltersConfig(null, null); const filters = Object.keys(filtersConfig).map((k) => [ k, @@ -219,18 +224,43 @@ const Sidebar = ({ block, data, onChangeBlock, required }) => { setActiveAccFilters(!activeAccFilters)} + > + {intl.formatMessage(messages.pre_filters)} + {activeAccFilters ? ( + + ) : ( + + )} + + + +

{intl.formatMessage(messages.help_filters)}

+ { + onChangeBlock(block, { + ...data, + [id]: value, + }); + }} id='defaultQuerystring' value={data.defaultQuerystring} /> +
+
+
+ + setActiveAccLayout(!activeAccLayout)} > {intl.formatMessage(messages.styles)} - {activeAccIndex === 1 ? ( + {activeAccLayout ? ( ) : ( )} - + )} + {/* Data di ultima modifica */} + {show_data_ultima_modifica && item.modified && ( + +
+ {intl.formatMessage(messages.ultima_modifica)}: +
+ + {viewDate(intl.locale, item.modified, 'DD-MM-YYYY')} + +
+ )} + {/* Pubblicazione */} {item.effective && ( @@ -218,7 +236,8 @@ const BandiInEvidenceTemplate = ({ {/* Note aggiornamenti */} {item.update_note && - (item.bando_state?.includes('open') || + ((show_note && item.bando_state?.includes('closed')) || + item.bando_state?.includes('open') || item.bando_state?.includes('inProgress')) && ( {item.update_note} diff --git a/src/config/Blocks/ListingOptions/bandiInEvidenceTemplate.js b/src/config/Blocks/ListingOptions/bandiInEvidenceTemplate.js index 897783e55..992f914fd 100644 --- a/src/config/Blocks/ListingOptions/bandiInEvidenceTemplate.js +++ b/src/config/Blocks/ListingOptions/bandiInEvidenceTemplate.js @@ -11,6 +11,14 @@ const messages = defineMessages({ id: 'show_tipologia', defaultMessage: 'Mostra la tipologia', }, + show_data_ultima_modifica: { + id: 'show_data_ultima_modifica', + defaultMessage: 'Mostra la data di ultima modifica', + }, + show_note: { + id: 'show_note', + defaultMessage: 'Mostra le note anche per i bandi scaduti', + }, }); export const addBandiInEvidenceTemplateOptions = ( @@ -25,7 +33,7 @@ export const addBandiInEvidenceTemplateOptions = ( schema, formData, intl, - ['show_description', 'show_ente', 'show_tipologia'], + ['show_description', 'show_ente', 'show_tipologia', 'show_data_ultima_modifica', 'show_note'], { show_ente: { default: false, @@ -35,6 +43,14 @@ export const addBandiInEvidenceTemplateOptions = ( default: false, label: intl.formatMessage(messages.show_tipologia), }, + show_data_ultima_modifica: { + default: false, + label: intl.formatMessage(messages.show_data_ultima_modifica), + }, + show_note: { + default: false, + label: intl.formatMessage(messages.show_note), + }, }, pos, );