feat(EstimatesList): optimize status tags.

This commit is contained in:
a.bouhuolia
2021-12-16 12:49:11 +02:00
parent 2108666f3a
commit 9bd047917d

View File

@@ -25,24 +25,24 @@ import { safeCallback } from 'utils';
export const statusAccessor = (row) => (
<Choose>
<Choose.When condition={row.is_delivered && row.is_approved}>
<Tag minimal={true} intent={Intent.SUCCESS}>
<Tag minimal={true} intent={Intent.SUCCESS} round={true}>
<T id={'approved'} />
</Tag>
</Choose.When>
<Choose.When condition={row.is_delivered && row.is_rejected}>
<Tag minimal={true} intent={Intent.DANGER}>
<Tag minimal={true} intent={Intent.DANGER} round={true}>
<T id={'rejected'} />
</Tag>
</Choose.When>
<Choose.When
condition={row.is_delivered && !row.is_rejected && !row.is_approved}
>
<Tag minimal={true} intent={Intent.SUCCESS}>
<Tag minimal={true} intent={Intent.SUCCESS} round={true}>
<T id={'delivered'} />
</Tag>
</Choose.When>
<Choose.Otherwise>
<Tag minimal={true}>
<Tag minimal={true} round={true}>
<T id={'draft'} />
</Tag>
</Choose.Otherwise>