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

@ -71,19 +71,22 @@ const EditDialog = () => {
if (response?.status) {
handleEditDialog(false, null);
resetForm();
toast.success('Success Update Posto Adm');
toast.success('Success Update Postu Administrativo');
reload();
const createActivity = {
module: 'Manage Posto Administrativo',
description: `Edit PostoAdms => ${selectedPostoAdms}`,
module: 'Manage Postu Administrativo',
description: `Edit Postu Administrativo => ${selectedPostoAdms}`,
action: 'U'
};
doSaveLogActivity(createActivity);
} else {
toast.error('Error Update Posto Adm');
setAlert({ show: true, message: 'Failed to update posto adm. Please try again.' });
toast.error('Error Update Postu Administrativo');
setAlert({
show: true,
message: 'Failed to update Postu Administrativo Please try again.'
});
}
},
[selectedPostoAdms, formField]
@ -103,7 +106,8 @@ const EditDialog = () => {
// console.log('MUNICIPIOS: ', 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.' });
}
}, []);
@ -169,7 +173,7 @@ const EditDialog = () => {
<Dialog open={showEditDialog} onOpenChange={(open) => handleEditDialog(open, null)}>
<DialogContent className="container-fixed max-w-[768px] flex flex-col p-5 overflow-hidden">
<DialogHeader>
<DialogTitle>Posto Adm - Update</DialogTitle>
<DialogTitle>Postu Administrativo - Update</DialogTitle>
<DialogDescription></DialogDescription>
</DialogHeader>
<DialogBody>
@ -185,7 +189,7 @@ const EditDialog = () => {
<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"
@ -205,12 +209,12 @@ const EditDialog = () => {
<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 className="w-[400px] p-0">
<Command>
<CommandInput placeholder="Search Municipios..." />
<CommandInput placeholder="Search Municipio..." />
<CommandList>
<CommandEmpty>No Municipio found.</CommandEmpty>
<CommandGroup>