mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-20 14:50:32 +00:00
fix(webapp): use all drawers name from common enum object
This commit is contained in:
@@ -23,6 +23,7 @@ import { ReceiptMoreMenuItems } from './components';
|
||||
import { useReceiptDetailDrawerContext } from './ReceiptDetailDrawerProvider';
|
||||
import { SaleReceiptAction, AbilitySubject } from '@/constants/abilityOption';
|
||||
import { safeCallback, compose } from '@/utils';
|
||||
import { DRAWERS } from '@/constants/drawers';
|
||||
|
||||
/**
|
||||
* Receipt details actions bar.
|
||||
@@ -44,7 +45,7 @@ function ReceiptDetailActionBar({
|
||||
// Handle edit sale receipt.
|
||||
const onEditReceipt = () => {
|
||||
history.push(`/receipts/${receiptId}/edit`);
|
||||
closeDrawer('receipt-detail-drawer');
|
||||
closeDrawer(DRAWERS.RECEIPT_DETAILS);
|
||||
};
|
||||
|
||||
// Handle delete sale receipt.
|
||||
|
||||
@@ -5,6 +5,7 @@ import { DrawerHeaderContent, DrawerLoading } from '@/components';
|
||||
import { Features } from '@/constants';
|
||||
import { useFeatureCan } from '@/hooks/state';
|
||||
import { useReceipt } from '@/hooks/query';
|
||||
import { DRAWERS } from '@/constants/drawers';
|
||||
|
||||
// useTransactionsByReference
|
||||
const ReceiptDetailDrawerContext = React.createContext();
|
||||
@@ -33,7 +34,7 @@ function ReceiptDetailDrawerProvider({ receiptId, ...props }) {
|
||||
return (
|
||||
<DrawerLoading loading={isReceiptLoading}>
|
||||
<DrawerHeaderContent
|
||||
name="receipt-detail-drawer"
|
||||
name={DRAWERS.RECEIPT_DETAILS}
|
||||
title={intl.get('receipt.drawer.title', {
|
||||
number: receipt.receipt_number,
|
||||
})}
|
||||
|
||||
Reference in New Issue
Block a user