mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-18 13:50:31 +00:00
feat: estimate status.
This commit is contained in:
31
client/src/containers/Sales/Estimate/components.js
Normal file
31
client/src/containers/Sales/Estimate/components.js
Normal file
@@ -0,0 +1,31 @@
|
||||
import React from 'react';
|
||||
import { Intent, Tag } from '@blueprintjs/core';
|
||||
import { Choose, If } from 'components';
|
||||
import { FormattedMessage as T, useIntl } from 'react-intl';
|
||||
|
||||
export const statusAccessor = (row) => (
|
||||
<Choose>
|
||||
<Choose.When condition={row.is_delivered && row.is_approved}>
|
||||
<Tag minimal={true} intent={Intent.SUCCESS}>
|
||||
<T id={'approved'} />
|
||||
</Tag>
|
||||
</Choose.When>
|
||||
<Choose.When condition={row.is_delivered && row.is_rejected}>
|
||||
<Tag minimal={true} intent={Intent.DANGER}>
|
||||
<T id={'rejected'} />
|
||||
</Tag>
|
||||
</Choose.When>
|
||||
<Choose.When
|
||||
condition={row.is_delivered && !row.is_rejected && !row.is_approved}
|
||||
>
|
||||
<Tag minimal={true} intent={Intent.SUCCESS}>
|
||||
<T id={'delivered'} />
|
||||
</Tag>
|
||||
</Choose.When>
|
||||
<Choose.Otherwise>
|
||||
<Tag minimal={true}>
|
||||
<T id={'draft'} />
|
||||
</Tag>
|
||||
</Choose.Otherwise>
|
||||
</Choose>
|
||||
);
|
||||
Reference in New Issue
Block a user