add crud manage menus
This commit is contained in:
@ -31,7 +31,6 @@ const EditDialog = () => {
|
||||
id_parent: '',
|
||||
order_number: 0,
|
||||
icon: '',
|
||||
application: '',
|
||||
status: ''
|
||||
};
|
||||
const [formField, setFormField] = useState(initialState);
|
||||
@ -60,14 +59,13 @@ const EditDialog = () => {
|
||||
formField.name === '' ||
|
||||
formField.link === '' ||
|
||||
formField.order_number === 0 ||
|
||||
formField.application === '' ||
|
||||
formField.status === ''
|
||||
) {
|
||||
setAlert({ show: true, message: 'Please fill in all required fields.' });
|
||||
return;
|
||||
}
|
||||
|
||||
// doUpdateMenu(e);
|
||||
doUpdateMenu(e);
|
||||
console.log(formField);
|
||||
setAlert({ show: false, message: '' });
|
||||
};
|
||||
@ -178,20 +176,6 @@ const EditDialog = () => {
|
||||
</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">
|
||||
|
||||
Reference in New Issue
Block a user