add create activity on 4 modules: Provider, Conversion, Menu, Currency
This commit is contained in:
@ -32,6 +32,7 @@ import {
|
||||
CommandItem,
|
||||
CommandList
|
||||
} from '@/components/ui/command';
|
||||
import { doSaveLogActivity } from '@/actions/GlobalActions';
|
||||
|
||||
const API_URL_CUSTOMER = apiConfig.service_customer;
|
||||
const API_URL_MASTERDATA = apiConfig.service_master_data;
|
||||
@ -82,6 +83,13 @@ const EditDialog = () => {
|
||||
resetForm();
|
||||
handleEditDialog(false, null);
|
||||
toast.success('Provider updated successfully.');
|
||||
const createActivity = {
|
||||
module: 'Manage Provider',
|
||||
description: `Update Provider => ${selectedProvider}`,
|
||||
action: 'U'
|
||||
};
|
||||
|
||||
doSaveLogActivity(createActivity);
|
||||
reload();
|
||||
} else {
|
||||
toast.error('Failed to update provider.');
|
||||
@ -308,11 +316,11 @@ const EditDialog = () => {
|
||||
</label>
|
||||
<Popover open={open} onOpenChange={setOpen}>
|
||||
<PopoverTrigger asChild>
|
||||
<button
|
||||
type="button"
|
||||
className="input col-span-5 text-left"
|
||||
style={{ color: 'inherit' }}
|
||||
>
|
||||
<button
|
||||
type="button"
|
||||
className="input col-span-5 text-left"
|
||||
style={{ color: 'inherit' }}
|
||||
>
|
||||
{customers.find((customer) => customer.id === formField.agent)
|
||||
?.fullname || 'Select Agent'}
|
||||
</button>
|
||||
|
||||
Reference in New Issue
Block a user