add activity dialog on master data module
This commit is contained in:
@ -73,7 +73,7 @@ const AddDialog = () => {
|
||||
reload();
|
||||
const createActivity = {
|
||||
module: 'Manage Aldeias',
|
||||
description: `Create Aldeias => ${selectedAldeias}`,
|
||||
description: `Create Aldeia => ${selectedAldeias}`,
|
||||
action: 'C'
|
||||
};
|
||||
|
||||
|
||||
@ -6,6 +6,7 @@ import { useCallback, useState } from 'react';
|
||||
import { toast } from 'sonner';
|
||||
import { Dialog, DialogContent, DialogFooter, DialogHeader } from '@/components/ui/dialog';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { doSaveLogActivity } from '@/actions/GlobalActions';
|
||||
|
||||
const API_URL = apiConfig.service_master_data;
|
||||
|
||||
@ -33,6 +34,14 @@ const DeleteDialog = () => {
|
||||
handleDeleteDialog(false, null);
|
||||
toast.success('Success Delete Aldeias');
|
||||
reload();
|
||||
|
||||
const createActivity = {
|
||||
module: 'Manage Aldeias',
|
||||
description: `Edit Aldeia => ${selectedAldeias}`,
|
||||
action: 'D'
|
||||
};
|
||||
|
||||
doSaveLogActivity(createActivity);
|
||||
} else {
|
||||
setAlert({ show: true, message: response?.message });
|
||||
toast.error('Failed Delete Aldeias');
|
||||
|
||||
@ -72,7 +72,7 @@ const EditDialog = () => {
|
||||
reload();
|
||||
const createActivity = {
|
||||
module: 'Manage Aldeias',
|
||||
description: `Edit Aldeias => ${selectedAldeias}`,
|
||||
description: `Edit Aldeia => ${selectedAldeias}`,
|
||||
action: 'U'
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user