mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-24 00:29:49 +00:00
feat: empty status ability.
This commit is contained in:
@@ -2,7 +2,11 @@ import React from 'react';
|
||||
import { Button, Intent } from '@blueprintjs/core';
|
||||
import { useHistory } from 'react-router-dom';
|
||||
import { EmptyStatus } from 'components';
|
||||
import { FormattedMessage as T } from 'components';
|
||||
import { Can, FormattedMessage as T } from 'components';
|
||||
import {
|
||||
AbilitySubject,
|
||||
Manual_Journal_Abilities,
|
||||
} from '../../../common/abilityOption';
|
||||
|
||||
export default function ManualJournalsEmptyStatus() {
|
||||
const history = useHistory();
|
||||
@@ -17,6 +21,10 @@ export default function ManualJournalsEmptyStatus() {
|
||||
}
|
||||
action={
|
||||
<>
|
||||
<Can
|
||||
I={Manual_Journal_Abilities.Create}
|
||||
a={AbilitySubject.ManualJournal}
|
||||
>
|
||||
<Button
|
||||
intent={Intent.PRIMARY}
|
||||
large={true}
|
||||
@@ -30,6 +38,7 @@ export default function ManualJournalsEmptyStatus() {
|
||||
<Button intent={Intent.NONE} large={true}>
|
||||
<T id={'learn_more'} />
|
||||
</Button>
|
||||
</Can>
|
||||
</>
|
||||
}
|
||||
/>
|
||||
|
||||
@@ -2,7 +2,11 @@ import React from 'react';
|
||||
import { Button, Intent } from '@blueprintjs/core';
|
||||
import { useHistory } from 'react-router-dom';
|
||||
import { EmptyStatus } from 'components';
|
||||
import { FormattedMessage as T } from 'components';
|
||||
import { Can, FormattedMessage as T } from 'components';
|
||||
import {
|
||||
AbilitySubject,
|
||||
Customer_Abilities,
|
||||
} from '../../../common/abilityOption';
|
||||
|
||||
export default function CustomersEmptyStatus() {
|
||||
const history = useHistory();
|
||||
@@ -17,6 +21,7 @@ export default function CustomersEmptyStatus() {
|
||||
}
|
||||
action={
|
||||
<>
|
||||
<Can I={Customer_Abilities.Create} a={AbilitySubject.Customer}>
|
||||
<Button
|
||||
intent={Intent.PRIMARY}
|
||||
large={true}
|
||||
@@ -30,6 +35,7 @@ export default function CustomersEmptyStatus() {
|
||||
<Button intent={Intent.NONE} large={true}>
|
||||
<T id={'learn_more'} />
|
||||
</Button>
|
||||
</Can>
|
||||
</>
|
||||
}
|
||||
/>
|
||||
|
||||
@@ -2,7 +2,11 @@ import React from 'react';
|
||||
import { Button, Intent } from '@blueprintjs/core';
|
||||
import { useHistory } from 'react-router-dom';
|
||||
import { EmptyStatus } from 'components';
|
||||
import { FormattedMessage as T } from 'components';
|
||||
import { Can, FormattedMessage as T } from 'components';
|
||||
import {
|
||||
AbilitySubject,
|
||||
Expense_Abilities,
|
||||
} from '../../../common/abilityOption';
|
||||
|
||||
export default function InvoicesEmptyStatus() {
|
||||
const history = useHistory();
|
||||
@@ -17,6 +21,7 @@ export default function InvoicesEmptyStatus() {
|
||||
}
|
||||
action={
|
||||
<>
|
||||
<Can I={Expense_Abilities.Create} a={AbilitySubject.Expense}>
|
||||
<Button
|
||||
intent={Intent.PRIMARY}
|
||||
large={true}
|
||||
@@ -30,6 +35,7 @@ export default function InvoicesEmptyStatus() {
|
||||
<Button intent={Intent.NONE} large={true}>
|
||||
<T id={'learn_more'} />
|
||||
</Button>
|
||||
</Can>
|
||||
</>
|
||||
}
|
||||
/>
|
||||
|
||||
@@ -2,7 +2,8 @@ import React from 'react';
|
||||
import { Button, Intent } from '@blueprintjs/core';
|
||||
import { useHistory } from 'react-router-dom';
|
||||
import { EmptyStatus } from 'components';
|
||||
import { FormattedMessage as T } from 'components';
|
||||
import { Can, FormattedMessage as T } from 'components';
|
||||
import { Item_Abilities, AbilitySubject } from '../../common/abilityOption';
|
||||
|
||||
export default function ItemsEmptyStatus() {
|
||||
const history = useHistory();
|
||||
@@ -17,6 +18,7 @@ export default function ItemsEmptyStatus() {
|
||||
}
|
||||
action={
|
||||
<>
|
||||
<Can I={Item_Abilities.Create} a={AbilitySubject.Item}>
|
||||
<Button
|
||||
intent={Intent.PRIMARY}
|
||||
large={true}
|
||||
@@ -30,6 +32,7 @@ export default function ItemsEmptyStatus() {
|
||||
<Button intent={Intent.NONE} large={true}>
|
||||
<T id={'learn_more'} />
|
||||
</Button>
|
||||
</Can>
|
||||
</>
|
||||
}
|
||||
/>
|
||||
|
||||
@@ -2,7 +2,11 @@ import React from 'react';
|
||||
import { Button, Intent } from '@blueprintjs/core';
|
||||
import { useHistory } from 'react-router-dom';
|
||||
import { EmptyStatus } from 'components';
|
||||
import { FormattedMessage as T } from 'components';
|
||||
import { Can, FormattedMessage as T } from 'components';
|
||||
import {
|
||||
Bill_Abilities,
|
||||
AbilitySubject,
|
||||
} from '../../../../common/abilityOption';
|
||||
|
||||
export default function BillsEmptyStatus() {
|
||||
const history = useHistory();
|
||||
@@ -17,6 +21,7 @@ export default function BillsEmptyStatus() {
|
||||
}
|
||||
action={
|
||||
<>
|
||||
<Can I={Bill_Abilities.Create} a={AbilitySubject.Bill}>
|
||||
<Button
|
||||
intent={Intent.PRIMARY}
|
||||
large={true}
|
||||
@@ -30,6 +35,7 @@ export default function BillsEmptyStatus() {
|
||||
<Button intent={Intent.NONE} large={true}>
|
||||
<T id={'learn_more'} />
|
||||
</Button>
|
||||
</Can>
|
||||
</>
|
||||
}
|
||||
/>
|
||||
|
||||
@@ -2,7 +2,11 @@ import React from 'react';
|
||||
import { Button, Intent } from '@blueprintjs/core';
|
||||
import { useHistory } from 'react-router-dom';
|
||||
import { EmptyStatus } from 'components';
|
||||
import { FormattedMessage as T } from 'components';
|
||||
import { Can, FormattedMessage as T } from 'components';
|
||||
import {
|
||||
Payment_Made_Abilities,
|
||||
AbilitySubject,
|
||||
} from '../../../../common/abilityOption';
|
||||
|
||||
export default function PaymentMadesEmptyStatus() {
|
||||
const history = useHistory();
|
||||
@@ -17,6 +21,7 @@ export default function PaymentMadesEmptyStatus() {
|
||||
}
|
||||
action={
|
||||
<>
|
||||
<Can I={Payment_Made_Abilities.Create} a={AbilitySubject.PaymentMade}>
|
||||
<Button
|
||||
intent={Intent.PRIMARY}
|
||||
large={true}
|
||||
@@ -30,6 +35,7 @@ export default function PaymentMadesEmptyStatus() {
|
||||
<Button intent={Intent.NONE} large={true}>
|
||||
<T id={'learn_more'} />
|
||||
</Button>
|
||||
</Can>
|
||||
</>
|
||||
}
|
||||
/>
|
||||
|
||||
@@ -2,7 +2,11 @@ import React from 'react';
|
||||
import { Button, Intent } from '@blueprintjs/core';
|
||||
import { useHistory } from 'react-router-dom';
|
||||
import { EmptyStatus } from 'components';
|
||||
import { FormattedMessage as T } from 'components';
|
||||
import { Can, FormattedMessage as T } from 'components';
|
||||
import {
|
||||
Estimate_Abilities,
|
||||
AbilitySubject,
|
||||
} from '../../../../common/abilityOption';
|
||||
|
||||
export default function EstimatesEmptyStatus() {
|
||||
const history = useHistory();
|
||||
@@ -16,6 +20,7 @@ export default function EstimatesEmptyStatus() {
|
||||
}
|
||||
action={
|
||||
<>
|
||||
<Can I={Estimate_Abilities.Create} a={AbilitySubject.Estimate}>
|
||||
<Button
|
||||
intent={Intent.PRIMARY}
|
||||
large={true}
|
||||
@@ -28,6 +33,7 @@ export default function EstimatesEmptyStatus() {
|
||||
<Button intent={Intent.NONE} large={true}>
|
||||
<T id={'learn_more'} />
|
||||
</Button>
|
||||
</Can>
|
||||
</>
|
||||
}
|
||||
/>
|
||||
|
||||
@@ -2,7 +2,11 @@ import React from 'react';
|
||||
import { Button, Intent } from '@blueprintjs/core';
|
||||
import { useHistory } from 'react-router-dom';
|
||||
import { EmptyStatus } from 'components';
|
||||
import { FormattedMessage as T } from 'components';
|
||||
import { Can, FormattedMessage as T } from 'components';
|
||||
import {
|
||||
Invoice_Abilities,
|
||||
AbilitySubject,
|
||||
} from '../../../../common/abilityOption';
|
||||
|
||||
export default function EstimatesEmptyStatus() {
|
||||
const history = useHistory();
|
||||
@@ -17,6 +21,7 @@ export default function EstimatesEmptyStatus() {
|
||||
}
|
||||
action={
|
||||
<>
|
||||
<Can I={Invoice_Abilities.Create} a={AbilitySubject.Invoice}>
|
||||
<Button
|
||||
intent={Intent.PRIMARY}
|
||||
large={true}
|
||||
@@ -26,10 +31,10 @@ export default function EstimatesEmptyStatus() {
|
||||
>
|
||||
<T id={'new_sale_invoice'} />
|
||||
</Button>
|
||||
|
||||
<Button intent={Intent.NONE} large={true}>
|
||||
<T id={'learn_more'} />
|
||||
</Button>
|
||||
</Can>
|
||||
</>
|
||||
}
|
||||
/>
|
||||
|
||||
@@ -2,7 +2,11 @@ import React from 'react';
|
||||
import { Button, Intent } from '@blueprintjs/core';
|
||||
import { useHistory } from 'react-router-dom';
|
||||
import { EmptyStatus } from 'components';
|
||||
import { FormattedMessage as T } from 'components';
|
||||
import { Can, FormattedMessage as T } from 'components';
|
||||
import {
|
||||
Payment_Receive_Abilities,
|
||||
AbilitySubject,
|
||||
} from '../../../../common/abilityOption';
|
||||
|
||||
export default function PaymentReceivesEmptyStatus() {
|
||||
const history = useHistory();
|
||||
@@ -12,11 +16,17 @@ export default function PaymentReceivesEmptyStatus() {
|
||||
title={<T id={'the_organization_doesn_t_receive_money_yet'} />}
|
||||
description={
|
||||
<p>
|
||||
<T id={'receiving_customer_payments_is_one_pleasant_accounting_tasks'} />
|
||||
<T
|
||||
id={'receiving_customer_payments_is_one_pleasant_accounting_tasks'}
|
||||
/>
|
||||
</p>
|
||||
}
|
||||
action={
|
||||
<>
|
||||
<Can
|
||||
I={Payment_Receive_Abilities.Create}
|
||||
a={AbilitySubject.PaymentReceive}
|
||||
>
|
||||
<Button
|
||||
intent={Intent.PRIMARY}
|
||||
large={true}
|
||||
@@ -30,6 +40,7 @@ export default function PaymentReceivesEmptyStatus() {
|
||||
<Button intent={Intent.NONE} large={true}>
|
||||
<T id={'learn_more'} />
|
||||
</Button>
|
||||
</Can>
|
||||
</>
|
||||
}
|
||||
/>
|
||||
|
||||
@@ -2,7 +2,11 @@ import React from 'react';
|
||||
import { Button, Intent } from '@blueprintjs/core';
|
||||
import { useHistory } from 'react-router-dom';
|
||||
import { EmptyStatus } from 'components';
|
||||
import { FormattedMessage as T } from 'components';
|
||||
import { Can, FormattedMessage as T } from 'components';
|
||||
import {
|
||||
Receipt_Abilities,
|
||||
AbilitySubject,
|
||||
} from '../../../../common/abilityOption';
|
||||
|
||||
export default function ReceiptsEmptyStatus() {
|
||||
const history = useHistory();
|
||||
@@ -17,6 +21,7 @@ export default function ReceiptsEmptyStatus() {
|
||||
}
|
||||
action={
|
||||
<>
|
||||
<Can I={Receipt_Abilities.Create} a={AbilitySubject.Receipt}>
|
||||
<Button
|
||||
intent={Intent.PRIMARY}
|
||||
large={true}
|
||||
@@ -28,8 +33,9 @@ export default function ReceiptsEmptyStatus() {
|
||||
</Button>
|
||||
|
||||
<Button intent={Intent.NONE} large={true}>
|
||||
<T id={'learn_more'}/>
|
||||
<T id={'learn_more'} />
|
||||
</Button>
|
||||
</Can>
|
||||
</>
|
||||
}
|
||||
/>
|
||||
|
||||
@@ -2,7 +2,11 @@ import React from 'react';
|
||||
import { Button, Intent } from '@blueprintjs/core';
|
||||
import { useHistory } from 'react-router-dom';
|
||||
import { EmptyStatus } from 'components';
|
||||
import { FormattedMessage as T } from 'components';
|
||||
import { Can, FormattedMessage as T } from 'components';
|
||||
import {
|
||||
Vendor_Abilities,
|
||||
AbilitySubject,
|
||||
} from '../../../common/abilityOption';
|
||||
|
||||
export default function VendorsEmptyStatus() {
|
||||
const history = useHistory();
|
||||
@@ -17,6 +21,7 @@ export default function VendorsEmptyStatus() {
|
||||
}
|
||||
action={
|
||||
<>
|
||||
<Can I={Vendor_Abilities.Create} a={AbilitySubject.Vendor}>
|
||||
<Button
|
||||
intent={Intent.PRIMARY}
|
||||
large={true}
|
||||
@@ -30,6 +35,7 @@ export default function VendorsEmptyStatus() {
|
||||
<Button intent={Intent.NONE} large={true}>
|
||||
<T id={'learn_more'} />
|
||||
</Button>
|
||||
</Can>
|
||||
</>
|
||||
}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user