add create activity on 4 modules: Provider, Conversion, Menu, Currency

This commit is contained in:
bagusajisaputroo
2025-04-07 16:17:00 +07:00
parent 5e719eefa2
commit 10937bceeb
12 changed files with 114 additions and 11 deletions

View File

@ -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');