This commit is contained in:
Raja Oktafrianto
2025-03-18 11:27:23 +07:00
parent 8026d6910a
commit 1445fc8ecf
28 changed files with 446 additions and 316 deletions

View File

@ -61,7 +61,7 @@ const AddDialog = () => {
const handleSubmit = (e: React.FormEvent<HTMLFormElement>) => {
e.preventDefault();
if (formField.name === '') {
if (formField.name.trim() === '') {
setAlert({ show: true, message: 'Please fill name field.' });
return;
}

View File

@ -65,7 +65,7 @@ const EditDialog = () => {
const handleUpdate = (e: React.FormEvent<HTMLFormElement>) => {
e.preventDefault();
if (formField.name === '') {
if (formField.name.trim() === '') {
setAlert({ show: true, message: 'Please fill name field.' });
return;
}