mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 12:50:38 +00:00
fix(webapp): use all drawers name from common enum object
This commit is contained in:
@@ -26,6 +26,7 @@ import { CreditNoteAction, AbilitySubject } from '@/constants/abilityOption';
|
||||
|
||||
import { compose } from '@/utils';
|
||||
import { CreditNoteMenuItem } from './utils';
|
||||
import { DRAWERS } from '@/constants/drawers';
|
||||
|
||||
/**
|
||||
* Credit note detail actions bar.
|
||||
@@ -47,7 +48,7 @@ function CreditNoteDetailActionsBar({
|
||||
// Handle edit credit note.
|
||||
const handleEditCreditNote = () => {
|
||||
history.push(`/credit-notes/${creditNoteId}/edit`);
|
||||
closeDrawer('credit-note-detail-drawer');
|
||||
closeDrawer(DRAWERS.CREDIT_NOTE_DETAILS);
|
||||
};
|
||||
|
||||
const handleRefundCreditNote = () => {
|
||||
|
||||
@@ -10,6 +10,7 @@ import {
|
||||
import { Features } from '@/constants';
|
||||
import { useFeatureCan } from '@/hooks/state';
|
||||
import { DrawerHeaderContent, DrawerLoading } from '@/components';
|
||||
import { DRAWERS } from '@/constants/drawers';
|
||||
|
||||
const CreditNoteDetailDrawerContext = React.createContext();
|
||||
|
||||
@@ -72,7 +73,7 @@ function CreditNoteDetailDrawerProvider({ creditNoteId, ...props }) {
|
||||
}
|
||||
>
|
||||
<DrawerHeaderContent
|
||||
name="credit-note-detail-drawer"
|
||||
name={DRAWERS.CREDIT_NOTE_DETAILS}
|
||||
title={intl.get('credit_note.drawer.title', {
|
||||
number: creditNote.credit_note_number,
|
||||
})}
|
||||
|
||||
Reference in New Issue
Block a user