fix event draft ajukan kembali

This commit is contained in:
2025-03-03 15:37:23 +08:00
parent 0d2d39ccc4
commit ceab376a62
2 changed files with 25 additions and 23 deletions

View File

@@ -49,7 +49,10 @@ export default function Event_DetailDraft() {
<> <>
<Stack spacing={"lg"}> <Stack spacing={"lg"}>
<ComponentEvent_DetailData isReport data={data} /> <ComponentEvent_DetailData isReport data={data} />
<ButtonAction eventId={eventId} endDate={data?.tanggalSelesai} /> <ButtonAction
eventId={eventId}
endDate={data?.tanggalSelesai}
/>
</Stack> </Stack>
</> </>
); );
@@ -62,7 +65,6 @@ function ButtonAction({ eventId, endDate }: { eventId: string; endDate: any }) {
const [openModal1, setOpenModal1] = useState(false); const [openModal1, setOpenModal1] = useState(false);
const [openModal2, setOpenModal2] = useState(false); const [openModal2, setOpenModal2] = useState(false);
async function onDelete() { async function onDelete() {
try { try {
const res = await Event_funDeleteById(eventId); const res = await Event_funDeleteById(eventId);
@@ -86,7 +88,9 @@ function ButtonAction({ eventId, endDate }: { eventId: string; endDate: any }) {
} }
async function onAjukan() { async function onAjukan() {
if (moment(endDate.toISOString().toString()).diff(moment(), "minutes") < 0) // console.log("end Date", endDate)
if (moment(endDate).diff(moment(), "minutes") < 0)
return ComponentGlobal_NotifikasiPeringatan("Waktu acara telah lewat"); return ComponentGlobal_NotifikasiPeringatan("Waktu acara telah lewat");
try { try {

View File

@@ -77,8 +77,6 @@ export default function HomeViewNew() {
} }
} }
console.log("count >", countNtf);
console.log("user >", dataUser);
return ( return (
<> <>