mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-19 14:20:31 +00:00
fix(webapp): use all drawers name from common enum object
This commit is contained in:
@@ -21,6 +21,7 @@ import withAlertsActions from '@/containers/Alert/withAlertActions';
|
||||
import withDrawerActions from '@/containers/Drawer/withDrawerActions';
|
||||
|
||||
import { compose } from '@/utils';
|
||||
import { DRAWERS } from '@/constants/drawers';
|
||||
|
||||
/**
|
||||
* Expense drawer action bar.
|
||||
@@ -40,7 +41,7 @@ function ExpenseDrawerActionBar({
|
||||
// Handle the expense edit action.
|
||||
const handleEditExpense = () => {
|
||||
history.push(`/expenses/${expense.id}/edit`);
|
||||
closeDrawer('expense-drawer');
|
||||
closeDrawer(DRAWERS.EXPENSE_DETAILS);
|
||||
};
|
||||
|
||||
// Handle the expense delete action.
|
||||
|
||||
@@ -5,6 +5,7 @@ import { useExpense } from '@/hooks/query';
|
||||
import { DrawerHeaderContent, DrawerLoading } from '@/components';
|
||||
import { Features } from '@/constants';
|
||||
import { useFeatureCan } from '@/hooks/state';
|
||||
import { DRAWERS } from '@/constants/drawers';
|
||||
|
||||
const ExpenseDrawerDrawerContext = React.createContext();
|
||||
|
||||
@@ -36,7 +37,7 @@ function ExpenseDrawerProvider({ expenseId, ...props }) {
|
||||
return (
|
||||
<DrawerLoading loading={isExpenseLoading}>
|
||||
<DrawerHeaderContent
|
||||
name="expense-drawer"
|
||||
name={DRAWERS.EXPENSE_DETAILS}
|
||||
title={intl.get('expense.drawer.title')}
|
||||
subTitle={
|
||||
featureCan(Features.Branches)
|
||||
|
||||
Reference in New Issue
Block a user