mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-20 23:00:34 +00:00
fix(webapp): use all drawers name from common enum object
This commit is contained in:
@@ -4,10 +4,14 @@ import intl from 'react-intl-universal';
|
||||
import { MenuItem } from '@blueprintjs/core';
|
||||
|
||||
import { RESOURCES_TYPES } from '@/constants/resourcesTypes';
|
||||
import { AbilitySubject, PaymentReceiveAction } from '@/constants/abilityOption';
|
||||
import {
|
||||
AbilitySubject,
|
||||
PaymentReceiveAction,
|
||||
} from '@/constants/abilityOption';
|
||||
import { highlightText } from '@/utils';
|
||||
import { Icon } from '@/components';
|
||||
import withDrawerActions from '@/containers/Drawer/withDrawerActions';
|
||||
import { DRAWERS } from '@/constants/drawers';
|
||||
|
||||
/**
|
||||
* Payment receive universal search item select action.
|
||||
@@ -21,7 +25,7 @@ function PaymentReceiveUniversalSearchSelectComponent({
|
||||
openDrawer,
|
||||
}) {
|
||||
if (resourceType === RESOURCES_TYPES.PAYMENT_RECEIVE) {
|
||||
openDrawer('payment-receive-detail-drawer', {
|
||||
openDrawer(DRAWERS.PAYMENT_RECEIVE_DETAILS, {
|
||||
paymentReceiveId: resourceId,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -22,6 +22,7 @@ import withSettings from '@/containers/Settings/withSettings';
|
||||
import { usePaymentReceivesColumns, ActionsMenu } from './components';
|
||||
import { usePaymentReceivesListContext } from './PaymentReceiptsListProvider';
|
||||
import { useMemorizedColumnsWidths } from '@/hooks';
|
||||
import { DRAWERS } from '@/constants/drawers';
|
||||
|
||||
/**
|
||||
* Payment receives datatable.
|
||||
@@ -69,12 +70,12 @@ function PaymentReceivesDataTable({
|
||||
|
||||
// Handle view detail payment receive..
|
||||
const handleViewDetailPaymentReceive = ({ id }) => {
|
||||
openDrawer('payment-receive-detail-drawer', { paymentReceiveId: id });
|
||||
openDrawer(DRAWERS.PAYMENT_RECEIVE_DETAILS, { paymentReceiveId: id });
|
||||
};
|
||||
|
||||
// Handle cell click.
|
||||
const handleCellClick = (cell, event) => {
|
||||
openDrawer('payment-receive-detail-drawer', {
|
||||
openDrawer(DRAWERS.PAYMENT_RECEIVE_DETAILS, {
|
||||
paymentReceiveId: cell.row.original.id,
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user