Admin Job
Add: - admin/job/[id]/reject-input Fix: - admin/job/[id]/[status]/index Admin Event Fix: - admin/event/[id]/[status]/index ### No Issue
This commit is contained in:
@@ -166,8 +166,8 @@ export default function AdminEventDetail() {
|
|||||||
AlertDefaultSystem({
|
AlertDefaultSystem({
|
||||||
title: "Publish",
|
title: "Publish",
|
||||||
message: "Apakah anda yakin ingin mempublikasikan data ini?",
|
message: "Apakah anda yakin ingin mempublikasikan data ini?",
|
||||||
textLeft: "Cancel",
|
textLeft: "Batal",
|
||||||
textRight: "Publish",
|
textRight: "Ya",
|
||||||
onPressLeft: () => {
|
onPressLeft: () => {
|
||||||
router.back();
|
router.back();
|
||||||
},
|
},
|
||||||
@@ -191,7 +191,6 @@ export default function AdminEventDetail() {
|
|||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
<Spacing />
|
<Spacing />
|
||||||
<Spacing />
|
|
||||||
</ViewWrapper>
|
</ViewWrapper>
|
||||||
|
|
||||||
<DrawerCustom
|
<DrawerCustom
|
||||||
|
|||||||
@@ -1,16 +1,19 @@
|
|||||||
import {
|
import {
|
||||||
|
AlertDefaultSystem,
|
||||||
BadgeCustom,
|
BadgeCustom,
|
||||||
BaseBox,
|
BaseBox,
|
||||||
ButtonCustom,
|
|
||||||
DummyLandscapeImage,
|
DummyLandscapeImage,
|
||||||
Grid,
|
Grid,
|
||||||
|
Spacing,
|
||||||
StackCustom,
|
StackCustom,
|
||||||
TextCustom,
|
TextCustom,
|
||||||
ViewWrapper,
|
ViewWrapper
|
||||||
} from "@/components";
|
} from "@/components";
|
||||||
import AdminBackButtonAntTitle from "@/components/_ShareComponent/Admin/BackButtonAntTitle";
|
import AdminBackButtonAntTitle from "@/components/_ShareComponent/Admin/BackButtonAntTitle";
|
||||||
|
import AdminButtonReject from "@/components/_ShareComponent/Admin/ButtonReject";
|
||||||
|
import AdminButtonReview from "@/components/_ShareComponent/Admin/ButtonReview";
|
||||||
import { MainColor } from "@/constants/color-palet";
|
import { MainColor } from "@/constants/color-palet";
|
||||||
import { useLocalSearchParams } from "expo-router";
|
import { router, useLocalSearchParams } from "expo-router";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
|
|
||||||
export default function AdminJobDetailStatus() {
|
export default function AdminJobDetailStatus() {
|
||||||
@@ -91,19 +94,35 @@ export default function AdminJobDetailStatus() {
|
|||||||
</BaseBox>
|
</BaseBox>
|
||||||
|
|
||||||
{status === "review" && (
|
{status === "review" && (
|
||||||
<Grid>
|
<AdminButtonReview
|
||||||
<Grid.Col span={6} style={{ paddingRight: 10 }}>
|
onPublish={() => {
|
||||||
<ButtonCustom backgroundColor={MainColor.green} textColor="white">
|
AlertDefaultSystem({
|
||||||
Publish
|
title: "Publish",
|
||||||
</ButtonCustom>
|
message: "Apakah anda yakin ingin mempublikasikan data ini?",
|
||||||
</Grid.Col>
|
textLeft: "Batal",
|
||||||
<Grid.Col span={6} style={{ paddingLeft: 10 }}>
|
textRight: "Ya",
|
||||||
<ButtonCustom backgroundColor={MainColor.red} textColor="white">
|
onPressLeft: () => {
|
||||||
Reject
|
router.back();
|
||||||
</ButtonCustom>
|
},
|
||||||
</Grid.Col>
|
onPressRight: () => {
|
||||||
</Grid>
|
router.back();
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}}
|
||||||
|
onReject={() => {
|
||||||
|
router.push(`/admin/job/${id}/reject-input`);
|
||||||
|
}}
|
||||||
|
/>
|
||||||
)}
|
)}
|
||||||
|
{status === "reject" && (
|
||||||
|
<AdminButtonReject
|
||||||
|
title="Tambah Catatan"
|
||||||
|
onReject={() => {
|
||||||
|
router.push(`/admin/job/${id}/reject-input`);
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
<Spacing />
|
||||||
</ViewWrapper>
|
</ViewWrapper>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|||||||
55
app/(application)/admin/job/[id]/reject-input.tsx
Normal file
55
app/(application)/admin/job/[id]/reject-input.tsx
Normal file
@@ -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 = (
|
||||||
|
<BoxButtonOnFooter>
|
||||||
|
<AdminButtonReject
|
||||||
|
title="Reject"
|
||||||
|
onReject={() =>
|
||||||
|
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`);
|
||||||
|
},
|
||||||
|
})
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
</BoxButtonOnFooter>
|
||||||
|
);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<ViewWrapper
|
||||||
|
footerComponent={buttonSubmit}
|
||||||
|
headerComponent={<AdminBackButtonAntTitle title="Masukan Alasan" />}
|
||||||
|
>
|
||||||
|
<TextAreaCustom
|
||||||
|
value={value}
|
||||||
|
onChangeText={setValue}
|
||||||
|
placeholder="Masukan alasan"
|
||||||
|
required
|
||||||
|
showCount
|
||||||
|
maxLength={1000}
|
||||||
|
/>
|
||||||
|
</ViewWrapper>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user