Skip to content

Commit

Permalink
use warning button for need sync status and fix tooltip
Browse files Browse the repository at this point in the history
  • Loading branch information
submarcos committed Feb 14, 2024
1 parent 5588afc commit d47cb3c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/modules/RA/DataSource/components/StatusChip/Tooltip.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ const Tooltip = ({
<List disablePadding dense>
<ListItem>
<ListItemIcon><FlashOnOutlinedIcon fontSize="small" /></ListItemIcon>
<ListItemText primary={translate(`datasource.refreshStatus.${reportStatus[status]}`)} />
<ListItemText primary={translate(`datasource.refreshStatus.${reportStatus[status] ? reportStatus[status] : 'syncNeeded'}`)} />
</ListItem>

<Divider variant="middle" />
Expand Down
3 changes: 3 additions & 0 deletions src/modules/RA/DataSource/components/StatusChip/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import STATUS, {
PENDING,
DONE,
NOT_NEEDED,
SYNC_NEEDED,
IN_PROGRESS,
sourceStatus,
} from '../DataSourceStatus';
Expand All @@ -43,6 +44,8 @@ const chipIconProps = (state, report, { success, warning, error }) => {
return { icon: <PendingIcon />, color: 'secondary' };
case NOT_NEEDED:
return { icon: <CheckCircleOutline />, color: '' };
case SYNC_NEEDED:
return { icon: <WarningIcon className={warning} />, className: warning };
case DONE: {
if (report?.status === 0) {
return { icon: <SuccessIcon className={success} />, className: success };
Expand Down

0 comments on commit d47cb3c

Please sign in to comment.