This commit is contained in:
Raja Oktafrianto
2025-04-08 11:19:17 +07:00
59 changed files with 1622 additions and 221 deletions

View File

@ -34,6 +34,7 @@ import {
} from '@/components/ui/select';
import { useManageCurrencyContext } from '../hooks/useManageCurrencyContext';
import { prefix } from 'stylis';
import { doSaveLogActivity } from '@/actions/GlobalActions';
interface CurrencyProps {
ID: string;
name: string;
@ -80,6 +81,13 @@ const AddDialog = () => {
resetForm();
handleAddDialog(false);
toast.success('Success Create Currency');
const createActivity = {
module: 'Manage Currency',
description: `Create Currency=> ${formField.name}`,
action: 'C'
};
doSaveLogActivity(createActivity);
reload();
} else {
toast.error('Error Create Currency');

View File

@ -13,6 +13,7 @@ import {
} from '@/components/ui/dialog';
import { Button } from '@/components/ui/button';
import { DialogDescription } from '@radix-ui/react-dialog';
import { doSaveLogActivity } from '@/actions/GlobalActions';
const API_URL = apiConfig.service_wallet;
@ -39,6 +40,13 @@ const DeleteDialog = () => {
setAlert({ show: false, message: '' });
handleDeleteDialog(false, null);
toast.success('Success Delete Currency');
const createActivity = {
module: 'Manage Currency',
description: `Delete Currency=> ${selectedCurrency}`,
action: 'D'
};
doSaveLogActivity(createActivity);
reload();
} else {
setAlert({ show: true, message: response?.message });

View File

@ -33,6 +33,7 @@ import {
SelectValue
} from '@/components/ui/select';
import { useManageCurrencyContext } from '../hooks/useManageCurrencyContext';
import { doSaveLogActivity } from '@/actions/GlobalActions';
interface CurrencyProps {
ID: string;
name: string;
@ -81,6 +82,13 @@ const EditDialog = () => {
resetForm();
handleEditDialog(false, null);
toast.success('Success Update Currency');
const createActivity = {
module: 'Manage Currency',
description: `Update Currency=> ${selectedCurrency}`,
action: 'U'
};
doSaveLogActivity(createActivity);
reload();
} else {
toast.error('Error Create Currency');