Fix:
- UI: status, detail status, delete button, detail utama, tampilan utama
- Semua terintergrasi ke API mobile

### No Issue
This commit is contained in:
2025-09-12 14:14:37 +08:00
parent b6d4c0e6a6
commit 005b798688
9 changed files with 180 additions and 81 deletions

View File

@@ -80,7 +80,7 @@ export default function EventEdit() {
}
};
const validateDate = () => {
const validateDate = async () => {
if (
data?.title === "" ||
data?.lokasi === "" ||
@@ -92,7 +92,8 @@ export default function EventEdit() {
text1: "Info",
text2: "Lengkapi semua data",
});
return;
return false;
}
const startDate = new Date(selectedDate as any);
@@ -104,12 +105,17 @@ export default function EventEdit() {
text1: "Info",
text2: "Ubah tanggal berakhirnya event",
});
return;
return false;
}
return true;
};
const handlerSubmit = async () => {
validateDate();
const isValid = await validateDate();
if (!isValid) return;
try {
setIsLoading(true);
const newData = {