update title

This commit is contained in:
Wikzyy
2025-04-09 14:28:02 +07:00
parent 01a77f0067
commit c52db0a6e5
21 changed files with 120 additions and 142 deletions

View File

@ -72,17 +72,20 @@ const AddDialog = () => {
handleAddDialog(false);
resetForm();
reload();
toast.success('Posto Adm created successfully!');
toast.success('Postu Administrativo created successfully!');
const createActivity = {
module: 'Manage Posto Administrativo',
description: `Create PostoAdms => ${formField.name}`,
description: `Create Postu Administrativo => ${formField.name}`,
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.' });
toast.error('Failed to create Postu Administrativo. Please try again.');
setAlert({
show: true,
message: 'Failed to create Postu Administrativo. Please try again.'
});
}
},
[formField]
@ -102,7 +105,8 @@ const AddDialog = () => {
// console.log(response?.data);
setMunicipios(response?.data.list);
} catch (error) {
console.error('Error fetching municipios', error);
console.error('Error fetching Municipio', error);
setAlert({ show: true, message: 'Failed to get Municipio. Please try again.' });
}
};
@ -159,7 +163,7 @@ const AddDialog = () => {
<div className="w-full">
<div className="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label className="form-label flex items-center gap-1 max-w-56">
Name<span className="text-red-500">*</span>
Postu Administrativo Name<span className="text-red-500">*</span>
</label>
<Input
className="input"
@ -179,7 +183,7 @@ const AddDialog = () => {
<PopoverTrigger asChild>
<button type="button" className="input col-span-5 text-left">
{municipios.find((municipio) => municipio.id === formField.municipio_id)
?.name || 'Select Municipios'}
?.name || 'Select Municipio'}
</button>
</PopoverTrigger>
<PopoverContent
@ -187,7 +191,7 @@ const AddDialog = () => {
onWheel={(e) => e.stopPropagation()}
>
<Command>
<CommandInput placeholder="Search Municipios..." />
<CommandInput placeholder="Search Municipio..." />
<CommandList className="max-h-[300px] overflow-y-auto pointer-events-auto">
<CommandEmpty>No Municipio found.</CommandEmpty>
<CommandGroup>