fix(webapp): use all drawers name from common enum object

This commit is contained in:
Ahmed Bouhuolia
2023-06-14 19:51:14 +02:00
parent 01c27b56ef
commit d1a09e3b15
99 changed files with 286 additions and 186 deletions

View File

@@ -23,7 +23,7 @@ function CreditNoteUniversalSearchSelectComponent({
openDrawer,
}) {
if (resourceType === RESOURCES_TYPES.CREDIT_NOTE) {
openDrawer(DRAWERS.CREDIT_NOTE_DETAIL_DRAWER, { creditNoteId: resourceId });
openDrawer(DRAWERS.CREDIT_NOTE_DETAILS, { creditNoteId: resourceId });
onAction && onAction();
}
return null;

View File

@@ -24,6 +24,7 @@ import { useCreditNoteTableColumns, ActionsMenu } from './components';
import { useCreditNoteListContext } from './CreditNotesListProvider';
import { compose } from '@/utils';
import { DRAWERS } from '@/constants/drawers';
/**
* Credit note data table.
@@ -80,7 +81,7 @@ function CreditNotesDataTable({
}
const handleViewDetailCreditNote = ({ id }) => {
openDrawer('credit-note-detail-drawer', { creditNoteId: id });
openDrawer(DRAWERS.CREDIT_NOTE_DETAILS, { creditNoteId: id });
};
// Handle delete credit note.
@@ -95,7 +96,7 @@ function CreditNotesDataTable({
// Handle cell click.
const handleCellClick = (cell, event) => {
openDrawer('credit-note-detail-drawer', {
openDrawer(DRAWERS.CREDIT_NOTE_DETAILS, {
creditNoteId: cell.row.original.id,
});
};