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 PostoAdmsProps {
|
||||
PostoAdms_id: number;
|
||||
@ -33,7 +34,7 @@ const API_URL = apiConfig.service_master_data;
|
||||
|
||||
const AddDialog = () => {
|
||||
const parentRef = useRef<any | null>(null);
|
||||
const { showAddDialog, handleAddDialog } = useManageSucosContext();
|
||||
const { showAddDialog, handleAddDialog, selectedSucos } = useManageSucosContext();
|
||||
const { reload } = useDataGrid();
|
||||
const { PostData, GetData } = useCallApi();
|
||||
const parsedUser = getAuth()?.user;
|
||||
@ -69,6 +70,13 @@ const AddDialog = () => {
|
||||
handleAddDialog(false);
|
||||
reload();
|
||||
toast.success('Sucos created successfully!');
|
||||
const createActivity = {
|
||||
module: 'Manage Sucos',
|
||||
description: `Create Sucos => ${selectedSucos}`,
|
||||
action: 'C'
|
||||
};
|
||||
|
||||
doSaveLogActivity(createActivity);
|
||||
} else {
|
||||
toast.error('Failed to create Sucos Please try again.');
|
||||
setAlert({ show: true, message: 'Failed to create Sucos Please try again.' });
|
||||
|
||||
Reference in New Issue
Block a user