Skip to content

Commit

Permalink
fix(monitoraggio-caricamenti): fix impaginazione tabella e chips 2024…
Browse files Browse the repository at this point in the history
…1015
  • Loading branch information
federico-tocci-dxc authored and sgravinadxc committed Oct 15, 2024
1 parent 81ffc51 commit 47da0d3
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
3 changes: 1 addition & 2 deletions fe-piattaforma/src/components/Table/view/tableDesktop.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,7 @@ const TableDesktop: React.FC<TableI> = (props) => {
'table-container__intestazione'
)}
>
{/* <div > style={{ display: 'flex', alignItems: 'center' }}> */}
<div>
<div style={{ display: 'flex', alignItems: 'center' }}>
<span>{th.label.toUpperCase()}</span>
{canSort && onSort ? (
<Icon
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,12 @@

.table-compact {
font-family: Titillium Web;
font-size: 18px;
font-size: 17px;
font-weight: 400;
line-height: 28px;

td {
padding: 20px 15px;
padding: 20px 10px;
}

span#enteColumn,
Expand Down Expand Up @@ -132,6 +132,7 @@ input#dateInputDataFine {
position: relative;
pointer-events: none;
display: inline-block;
padding: 0px 0px;
}

.chipRemove .clickable-area {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,11 @@ const Monitoring: React.FC<MonitoringI> = ({
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) {
Expand All @@ -104,7 +108,7 @@ const Monitoring: React.FC<MonitoringI> = ({
caricamentiList.map((td: any) => {
return {
idProgetto: td.idProgetto,
data: <span id='dataColumn'><b>{td.dataCaricamenti}</b></span>,
data: <span id='dataColumn'><b>{formatDate(td.dataCaricamenti)}</b></span>,
ente: <span id='enteColumn'>{td.nomeEnte}</span>,
intervento: <span id='interventoColumn'>{td.intervento}</span>,
progetto: <span id='progettoColumn'>{td.nomeProgetto}</span>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ const MonitoringSearchFilters: React.FC<MonitoringSearchFilterI> = ({ 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 };
Expand Down Expand Up @@ -407,7 +407,7 @@ const MonitoringSearchFilters: React.FC<MonitoringSearchFilterI> = ({ formValues
<Form.Row className='justify-content-start mt-5 chipsRow'>
{chips.map((chip, index) => (
<Button className='chipRemove' onClick={() => removeChip(chip)}>
<Chip key={index} className='mr-2 rounded-pill'>
<Chip key={index} className='mr-1 ml-0 rounded-pill'>
<ChipLabel className='mx-1 my-1'>
{chip}
</ChipLabel>
Expand Down

0 comments on commit 47da0d3

Please sign in to comment.