Skip to content

Commit

Permalink
feat(fe-piattaforma): icona info tabella caricamento massivo 20240925
Browse files Browse the repository at this point in the history
  • Loading branch information
federico-tocci-dxc authored and sgravinadxc committed Sep 25, 2024
1 parent 5e9c02b commit 969ff80
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 27 deletions.
33 changes: 21 additions & 12 deletions fe-piattaforma/src/components/AccordionRow/accordionRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ export interface AccordionRowI {
clickDeleteAction?: () => void;
clickDownloadAction?: () => void;
innerInfo?:
| {
[key: string]: string;
}
| undefined;
| {
[key: string]: string;
}
| undefined;
status?: string | undefined;
StatusElement?: ReactElement | undefined;
onTooltipInfo?: string;
Expand Down Expand Up @@ -151,31 +151,40 @@ const AccordionRow: React.FC<AccordionRowI> = ({
color='primary'
/>
</Button>
) : <Button
className='px-2'
aria-label='Informazioni'
title='Caricamento fallito'
) : <div className='mr-2'>
<Button
className='p-0'
aria-label='Informazioni'
id='icon-info'
>
<Icon
icon='it-info-circle'
color='primary'
aria-label='Info'
aria-hidden
/>
</Button>}
</Button>

<UncontrolledTooltip
placement='top'
target='icon-info'
>
Caricamento fallito
</UncontrolledTooltip>
</div>}
</div>
{((onTooltipInfo || innerInfo?.onTooltipInfo) &&
innerInfo?.isPresentInList) ||
innerInfo?.failedCSV ? (
innerInfo?.failedCSV ? (
<div
className='d-inline-flex position-relative'
id={`tooltip-${innerInfo.id}`}
>
<UncontrolledTooltip
placement='bottom'
target={`tooltip-${innerInfo.id}`}
/* isOpen={openOne}
toggle={() => toggleOne(!openOne)} */
/* isOpen={openOne}
toggle={() => toggleOne(!openOne)} */
>
{onTooltipInfo}
{innerInfo.onTooltipInfo}
Expand Down
37 changes: 23 additions & 14 deletions fe-piattaforma/src/components/Table/view/tableDesktop.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import {
Icon,
Label,
Table as TableKit,
Tooltip,
UncontrolledTooltip,
} from 'design-react-kit';
import clsx from 'clsx';
Expand Down Expand Up @@ -289,19 +288,29 @@ const TableDesktop: React.FC<TableI> = (props) => {
aria-hidden
/>
</Button>
) :
<Button
className='p-0'
aria-label='Informazioni'
title='Caricamento fallito'
>
<Icon
icon='it-info-circle'
color='primary'
aria-label='Info'
aria-hidden
/>
</Button>
) : td.jobStatus === "GENERIC_FAIL" || td.jobStatus === "FAIL_MONGO" || td.jobStatus === "FAIL_S3_API" ? (
<div>
<Button
className='p-0'
aria-label='Informazioni'
id='icon-info'
>
<Icon
icon='it-info-circle'
color='primary'
aria-label='Info'
aria-hidden
/>
</Button>

<UncontrolledTooltip
placement='top'
target='icon-info'
>
Caricamento fallito
</UncontrolledTooltip>
</div>
) : null
}
</div>
</td>
Expand Down
2 changes: 1 addition & 1 deletion fe-piattaforma/src/components/Table/view/tableMobile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ const TableMobile: React.FC<MobileTableI> = ({
clickDeleteAction: onActionClick?.[CRUDActionTypes.DELETE]
? () => onActionClick?.[CRUDActionTypes.DELETE](item)
: undefined,
clickDownloadAction: onActionClick?.[CRUDActionTypes.DOWNLOAD] && item.jobStatus === 'SUCCESS'
clickDownloadAction: onActionClick?.[CRUDActionTypes.DOWNLOAD] && item.jobStatus !== 'GENERIC_FAIL' && item.jobStatus !== 'FAIL_MONGO' && item.jobStatus !== 'FAIL_S3_API'
? () => {onActionClick?.[CRUDActionTypes.DOWNLOAD](item)}
: undefined,
innerInfo: isEmpty(rest) ? undefined : { id, ...rest },
Expand Down
1 change: 1 addition & 0 deletions fe-piattaforma/src/styles/common/_chips.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.chip {
border: none !important;
cursor: default;
pointer-events: none;
white-space: nowrap;
@media screen and (min-width: 320px) {
height: auto !important;
Expand Down

0 comments on commit 969ff80

Please sign in to comment.