add activity dialog on municipios, postoadm, sucos, and aldeias
This commit is contained in:
@ -24,6 +24,7 @@ import {
|
||||
CommandItem,
|
||||
CommandList
|
||||
} from '@/components/ui/command';
|
||||
import { doSaveLogActivity } from '@/actions/GlobalActions';
|
||||
|
||||
interface MunicipioProps {
|
||||
id: number;
|
||||
@ -34,7 +35,7 @@ const API_URL = apiConfig.service_master_data;
|
||||
|
||||
const AddDialog = () => {
|
||||
const parentRef = useRef<any | null>(null);
|
||||
const { showAddDialog, handleAddDialog } = useManagePostoAdmsContext();
|
||||
const { showAddDialog, handleAddDialog, selectedPostoAdms } = useManagePostoAdmsContext();
|
||||
const { reload } = useDataGrid();
|
||||
const { PostData, GetData } = useCallApi();
|
||||
const parsedUser = getAuth()?.user;
|
||||
@ -72,6 +73,13 @@ const AddDialog = () => {
|
||||
resetForm();
|
||||
reload();
|
||||
toast.success('Posto Adm created successfully!');
|
||||
const createActivity = {
|
||||
module: 'Manage Posto Administrativo',
|
||||
description: `Create PostoAdms => ${selectedPostoAdms}`,
|
||||
action: 'C'
|
||||
};
|
||||
|
||||
doSaveLogActivity(createActivity);
|
||||
} else {
|
||||
toast.error('Failed to create Posto Adm. Please try again.');
|
||||
setAlert({ show: true, message: 'Failed to create Posto Adm. Please try again.' });
|
||||
|
||||
Reference in New Issue
Block a user