add crud manage menus

This commit is contained in:
Wikzyy
2025-03-06 09:15:17 +07:00
parent f84bf7dde1
commit eb338915da
4 changed files with 6 additions and 37 deletions

View File

@ -32,7 +32,6 @@ const AddDialog = () => {
id_parent: '',
order_number: 0,
icon: '',
application: '',
status: ''
};
const [formField, setFormField] = useState(initialState);
@ -64,14 +63,13 @@ const AddDialog = () => {
formField.name === '' ||
formField.link === '' ||
formField.order_number === 0 ||
formField.application === '' ||
formField.status === ''
) {
setAlert({ show: true, message: 'Please fill in all required fields.' });
return;
}
// doCreateMenu(e);
doCreateMenu(e);
console.log(formField);
setAlert({ show: false, message: '' });
};
@ -182,20 +180,6 @@ const AddDialog = () => {
</div>
</div>
<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">
Application<span className="text-red-500">*</span>
</label>
<Input
className="input"
type="text"
value={formField.application}
onChange={(e) => setFormField({ ...formField, application: e.target.value })}
/>
</div>
</div>
<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">