From 47da0d307fd21defba9577209e6fc82f87af78ec Mon Sep 17 00:00:00 2001 From: federico-tocci-dxc Date: Tue, 15 Oct 2024 11:11:33 +0200 Subject: [PATCH] fix(monitoraggio-caricamenti): fix impaginazione tabella e chips 20241015 --- fe-piattaforma/src/components/Table/view/tableDesktop.tsx | 3 +-- .../administrator/MonitoraggioCaricamenti/monitoring.scss | 5 +++-- .../administrator/MonitoraggioCaricamenti/monitoring.tsx | 8 ++++++-- .../MonitoraggioCaricamenti/monitoringSearchFilters.tsx | 4 ++-- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/fe-piattaforma/src/components/Table/view/tableDesktop.tsx b/fe-piattaforma/src/components/Table/view/tableDesktop.tsx index 58c8883e3..6b86d5334 100644 --- a/fe-piattaforma/src/components/Table/view/tableDesktop.tsx +++ b/fe-piattaforma/src/components/Table/view/tableDesktop.tsx @@ -91,8 +91,7 @@ const TableDesktop: React.FC = (props) => { 'table-container__intestazione' )} > - {/*
style={{ display: 'flex', alignItems: 'center' }}> */} -
+
{th.label.toUpperCase()} {canSort && onSort ? ( = ({ setTableValues(updateTableValues()); }, [caricamentiList]); - + const formatDate = (dateString: string) => { + const options: Intl.DateTimeFormatOptions = { day: '2-digit', month: '2-digit', year: 'numeric' }; + return new Date(dateString).toLocaleDateString('it-IT', options); + }; + const updateTableValues = () => { let table; if(caricamentiList.length > 0) { @@ -104,7 +108,7 @@ const Monitoring: React.FC = ({ caricamentiList.map((td: any) => { return { idProgetto: td.idProgetto, - data: {td.dataCaricamenti}, + data: {formatDate(td.dataCaricamenti)}, ente: {td.nomeEnte}, intervento: {td.intervento}, progetto: {td.nomeProgetto}, diff --git a/fe-piattaforma/src/pages/administrator/MonitoraggioCaricamenti/monitoringSearchFilters.tsx b/fe-piattaforma/src/pages/administrator/MonitoraggioCaricamenti/monitoringSearchFilters.tsx index 109fd9b1a..8313d12b5 100644 --- a/fe-piattaforma/src/pages/administrator/MonitoraggioCaricamenti/monitoringSearchFilters.tsx +++ b/fe-piattaforma/src/pages/administrator/MonitoraggioCaricamenti/monitoringSearchFilters.tsx @@ -179,7 +179,7 @@ const MonitoringSearchFilters: React.FC = ({ formValues const handleDateInputChange = (value: any, field: string) => { const formattedDate = typeof value === 'string' ? value : new Date(value).toISOString().split('T')[0]; - + setFormValues(() => { let newForm = { ...formValues }; let newDateValid = { ...isDateValid }; @@ -407,7 +407,7 @@ const MonitoringSearchFilters: React.FC = ({ formValues {chips.map((chip, index) => (