mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 12:50:38 +00:00
feat: optimize expense and manual journal details status.
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
import intl from 'react-intl-universal';
|
||||
import React from 'react';
|
||||
import { Classes, Tooltip, Position } from '@blueprintjs/core';
|
||||
import { Tag, Intent, Classes, Tooltip, Position } from '@blueprintjs/core';
|
||||
|
||||
import { FormatNumberCell, If, Icon } from '../../../components';
|
||||
import { T, Choose, FormatNumberCell, If, Icon } from '../../../components';
|
||||
|
||||
/**
|
||||
* Note column accessor.
|
||||
@@ -22,6 +22,27 @@ export function NoteAccessor(row) {
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Publish column accessor.
|
||||
*/
|
||||
export function ManualJournalDetailsStatus({ manualJournal }) {
|
||||
return (
|
||||
<Choose>
|
||||
<Choose.When condition={!!manualJournal.is_published}>
|
||||
<Tag minimal={true} round={true}>
|
||||
<T id={'published'} />
|
||||
</Tag>
|
||||
</Choose.When>
|
||||
|
||||
<Choose.Otherwise>
|
||||
<Tag intent={Intent.WARNING} round={true}>
|
||||
<T id={'draft'} />
|
||||
</Tag>
|
||||
</Choose.Otherwise>
|
||||
</Choose>
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve read-only manual journal entries columns.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user