Skip to content

Commit

Permalink
feat: add finalizing status
Browse files Browse the repository at this point in the history
  • Loading branch information
stepan662 committed Jul 31, 2023
1 parent 8d9add5 commit bf6504c
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ export const BatchOperationDialog = ({
const statusColor = getStatusColor(data.status);
const statusLabel = useBatchOperationStatusTranslate()(data.status);
const typeLabel = useBatchOperationTypeTranslate()(data.type);
const isFinalizing =
data.status === 'RUNNING' && data.progress === data.totalItems;

const isFinished = END_STATUSES.includes(data.status);

Expand Down Expand Up @@ -81,12 +83,14 @@ export const BatchOperationDialog = ({
}}
/>
</Box>
{(isFinished || data.status === 'PENDING') && (
{(isFinished || data.status === 'PENDING' || isFinalizing) && (
<Box
data-cy="batch-operation-dialog-end-status"
color={statusColor}
color={isFinalizing ? undefined : statusColor}
>
{statusLabel}
{isFinalizing
? t('batch-operation-dialog-finalizing')
: statusLabel}
</Box>
)}
</Box>
Expand Down

0 comments on commit bf6504c

Please sign in to comment.