feat: add ability credit & vendor & item transactions.

This commit is contained in:
elforjani13
2021-12-23 17:27:28 +02:00
parent 789c8db693
commit d719ac60bd
26 changed files with 519 additions and 290 deletions

View File

@@ -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 {
VendorCreditAction,
AbilitySubject,
} from '../../../../common/abilityOption';
export default function VendorsCreditNoteEmptyStatus() {
const history = useHistory();
@@ -16,17 +20,19 @@ export default function VendorsCreditNoteEmptyStatus() {
}
action={
<>
<Button
intent={Intent.PRIMARY}
large={true}
onClick={() => history.push('/vendor-credits/new')}
>
<T id={'vendor_credits.action.new_vendor_credit'} />
</Button>
<Can I={VendorCreditAction.Create} a={AbilitySubject.VendorCredit}>
<Button
intent={Intent.PRIMARY}
large={true}
onClick={() => history.push('/vendor-credits/new')}
>
<T id={'vendor_credits.action.new_vendor_credit'} />
</Button>
<Button intent={Intent.NONE} large={true}>
<T id={'learn_more'} />
</Button>
<Button intent={Intent.NONE} large={true}>
<T id={'learn_more'} />
</Button>
</Can>
</>
}
/>