From c2f18948bf2bcee6b5707f14d8762e260e0e1950 Mon Sep 17 00:00:00 2001 From: Bagasbanuna02 Date: Tue, 12 Aug 2025 16:42:47 +0800 Subject: [PATCH] Admin Job Add: - admin/job/[id]/reject-input Fix: - admin/job/[id]/[status]/index Admin Event Fix: - admin/event/[id]/[status]/index ### No Issue --- .../admin/event/[id]/[status]/index.tsx | 5 +- .../admin/job/[id]/[status]/index.tsx | 49 ++++++++++++----- .../admin/job/[id]/reject-input.tsx | 55 +++++++++++++++++++ 3 files changed, 91 insertions(+), 18 deletions(-) create mode 100644 app/(application)/admin/job/[id]/reject-input.tsx diff --git a/app/(application)/admin/event/[id]/[status]/index.tsx b/app/(application)/admin/event/[id]/[status]/index.tsx index 07c753b..cfd44aa 100644 --- a/app/(application)/admin/event/[id]/[status]/index.tsx +++ b/app/(application)/admin/event/[id]/[status]/index.tsx @@ -166,8 +166,8 @@ export default function AdminEventDetail() { AlertDefaultSystem({ title: "Publish", message: "Apakah anda yakin ingin mempublikasikan data ini?", - textLeft: "Cancel", - textRight: "Publish", + textLeft: "Batal", + textRight: "Ya", onPressLeft: () => { router.back(); }, @@ -191,7 +191,6 @@ export default function AdminEventDetail() { /> )} - {status === "review" && ( - - - - Publish - - - - - Reject - - - + { + AlertDefaultSystem({ + title: "Publish", + message: "Apakah anda yakin ingin mempublikasikan data ini?", + textLeft: "Batal", + textRight: "Ya", + onPressLeft: () => { + router.back(); + }, + onPressRight: () => { + router.back(); + }, + }); + }} + onReject={() => { + router.push(`/admin/job/${id}/reject-input`); + }} + /> )} + {status === "reject" && ( + { + router.push(`/admin/job/${id}/reject-input`); + }} + /> + )} + ); diff --git a/app/(application)/admin/job/[id]/reject-input.tsx b/app/(application)/admin/job/[id]/reject-input.tsx new file mode 100644 index 0000000..aca878e --- /dev/null +++ b/app/(application)/admin/job/[id]/reject-input.tsx @@ -0,0 +1,55 @@ +import { + AlertDefaultSystem, + BoxButtonOnFooter, + TextAreaCustom, + ViewWrapper, +} from "@/components"; +import AdminBackButtonAntTitle from "@/components/_ShareComponent/Admin/BackButtonAntTitle"; +import AdminButtonReject from "@/components/_ShareComponent/Admin/ButtonReject"; +import { router, useLocalSearchParams } from "expo-router"; +import { useState } from "react"; + +export default function AdminJobRejectInput() { + const { id } = useLocalSearchParams(); + const [value, setValue] = useState(id as string); + const buttonSubmit = ( + + + AlertDefaultSystem({ + title: "Reject", + message: "Apakah anda yakin ingin menolak data ini?", + textLeft: "Batal", + textRight: "Ya", + onPressLeft: () => { + router.back(); + }, + onPressRight: () => { + console.log("value:", value); + router.replace(`/admin/job/reject/status`); + }, + }) + } + /> + + ); + + return ( + <> + } + > + + + + ); +}