mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-20 06:40:31 +00:00
feat: add quick create & sortable.
This commit is contained in:
@@ -10,6 +10,7 @@ import {
|
||||
} from '@blueprintjs/core';
|
||||
import DashboardActionsBar from 'components/Dashboard/DashboardActionsBar';
|
||||
import { useVendorCreditDetailDrawerContext } from './VendorCreditDetailDrawerProvider';
|
||||
import { VendorCreditMenuItem } from './utils';
|
||||
|
||||
import withDialogActions from 'containers/Dialog/withDialogActions';
|
||||
import withAlertsActions from 'containers/Alert/withAlertActions';
|
||||
@@ -51,6 +52,10 @@ function VendorCreditDetailActionsBar({
|
||||
openDialog('refund-vendor-credit', { vendorCreditId });
|
||||
};
|
||||
|
||||
const handleReconcileVendorCredit = () => {
|
||||
openDialog('reconcile-vendor-credit', { vendorCreditId });
|
||||
};
|
||||
|
||||
return (
|
||||
<DashboardActionsBar>
|
||||
<NavbarGroup>
|
||||
@@ -77,6 +82,20 @@ function VendorCreditDetailActionsBar({
|
||||
intent={Intent.DANGER}
|
||||
onClick={handleDeleteVendorCredit}
|
||||
/>
|
||||
<If
|
||||
condition={
|
||||
!vendorCredit.is_closed &&
|
||||
!vendorCredit.is_draft
|
||||
// vendorCredit.is_published
|
||||
}
|
||||
>
|
||||
<NavbarDivider />
|
||||
<VendorCreditMenuItem
|
||||
payload={{
|
||||
onReconcile: handleReconcileVendorCredit,
|
||||
}}
|
||||
/>
|
||||
</If>
|
||||
</NavbarGroup>
|
||||
</DashboardActionsBar>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user