mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-18 13:50:31 +00:00
fix(webapp): use all drawers name from common enum object
This commit is contained in:
@@ -22,6 +22,7 @@ import { useManualJournalDrawerContext } from './ManualJournalDrawerProvider';
|
||||
import { ManualJournalAction, AbilitySubject } from '@/constants/abilityOption';
|
||||
|
||||
import { compose } from '@/utils';
|
||||
import { DRAWERS } from '@/constants/drawers';
|
||||
|
||||
/**
|
||||
* Manual journal action bar.
|
||||
@@ -39,7 +40,7 @@ function ManualJournalDrawerActionBar({
|
||||
// Handle edit manual journal action.
|
||||
const handleEditManualJournal = () => {
|
||||
history.push(`/manual-journals/${manualJournalId}/edit`);
|
||||
closeDrawer('journal-drawer');
|
||||
closeDrawer(DRAWERS.JOURNAL_DETAILS);
|
||||
};
|
||||
|
||||
// Handle manual journal delete action.
|
||||
|
||||
@@ -3,6 +3,7 @@ import React from 'react';
|
||||
import intl from 'react-intl-universal';
|
||||
import { useJournal } from '@/hooks/query';
|
||||
import { DrawerLoading, DrawerHeaderContent } from '@/components';
|
||||
import { DRAWERS } from '@/constants/drawers';
|
||||
|
||||
const ManualJournalDrawerContext = React.createContext();
|
||||
|
||||
@@ -31,7 +32,7 @@ function ManualJournalDrawerProvider({ manualJournalId, ...props }) {
|
||||
return (
|
||||
<DrawerLoading loading={isJournalLoading}>
|
||||
<DrawerHeaderContent
|
||||
name={'journal-drawer'}
|
||||
name={DRAWERS.JOURNAL_DETAILS}
|
||||
title={intl.get('manual_journal.drawer.title', {
|
||||
number: manualJournal?.journal_number,
|
||||
})}
|
||||
|
||||
Reference in New Issue
Block a user