add create activity on 4 modules: Provider, Conversion, Menu, Currency
This commit is contained in:
@ -31,6 +31,7 @@ import {
|
||||
CommandItem,
|
||||
CommandList
|
||||
} from '@/components/ui/command';
|
||||
import { doSaveLogActivity } from '@/actions/GlobalActions';
|
||||
|
||||
export interface CustomerProps {
|
||||
id: string;
|
||||
@ -50,7 +51,7 @@ const API_URL_MASTERDATA = apiConfig.service_master_data;
|
||||
const API_URL_TRANSACTION = apiConfig.service_transaction;
|
||||
|
||||
const AddDialog = () => {
|
||||
const { showAddDialog, handleAddDialog } = useManageProviderContext();
|
||||
const { showAddDialog, handleAddDialog, selectedProvider } = useManageProviderContext();
|
||||
const { reload } = useDataGrid();
|
||||
const { PostData, GetData } = useCallApi();
|
||||
const parentRef = useRef<any | null>(null);
|
||||
@ -91,6 +92,13 @@ const AddDialog = () => {
|
||||
resetForm();
|
||||
handleAddDialog(false);
|
||||
toast.success('Success Create Provider');
|
||||
const createActivity = {
|
||||
module: 'Manage Provider',
|
||||
description: `Create Provider => ${selectedProvider}`,
|
||||
action: 'C'
|
||||
};
|
||||
|
||||
doSaveLogActivity(createActivity);
|
||||
reload();
|
||||
} else {
|
||||
toast.error('Failed Create Provider');
|
||||
|
||||
Reference in New Issue
Block a user