UI Job
# style - UI Job di bagian user selesai # fix - Scroll data untuk beranda dan tampilan yang lain selesi ## No issue
This commit is contained in:
@@ -16,13 +16,23 @@ import ComponentJob_NotedBox from "../../component/detail/noted_box";
|
||||
import { MODEL_JOB } from "../../model/interface";
|
||||
import mqtt_client from "@/util/mqtt_client";
|
||||
import notifikasiToAdmin_funCreate from "@/app_modules/notifikasi/fun/create/create_notif_to_admin";
|
||||
import ComponentGlobal_BoxInformation from "@/app_modules/component_global/box_information";
|
||||
import {
|
||||
AccentColor,
|
||||
MainColor,
|
||||
} from "@/app_modules/component_global/color/color_pallet";
|
||||
import { useState } from "react";
|
||||
import ComponentGlobal_UI_Modal from "@/app_modules/component_global/ui/ui_modal";
|
||||
|
||||
export default function Job_DetailDraft({ dataJob }: { dataJob: MODEL_JOB }) {
|
||||
return (
|
||||
<>
|
||||
<Stack>
|
||||
{dataJob.catatan ? (
|
||||
<ComponentJob_NotedBox informasi={dataJob.catatan} />
|
||||
<ComponentGlobal_BoxInformation
|
||||
informasi={dataJob.catatan}
|
||||
isReport={true}
|
||||
/>
|
||||
) : (
|
||||
""
|
||||
)}
|
||||
@@ -37,8 +47,9 @@ function ButtonAction({ jobId }: { jobId: string }) {
|
||||
const router = useRouter();
|
||||
const [status, setStatus] = useAtom(gs_job_status);
|
||||
const [opened, { open, close }] = useDisclosure();
|
||||
const [isAjukan, setAjukan] = useState(false);
|
||||
|
||||
async function onAction() {
|
||||
async function onAjukan() {
|
||||
const update = await Job_funEditStatusByStatusId(jobId, "2");
|
||||
if (update.status === 200) {
|
||||
const dataNotif = {
|
||||
@@ -80,39 +91,148 @@ function ButtonAction({ jobId }: { jobId: string }) {
|
||||
|
||||
return (
|
||||
<>
|
||||
<Modal opened={opened} onClose={close} centered withCloseButton={false}>
|
||||
<Paper px={"lg"}>
|
||||
<Stack>
|
||||
<Title order={6}>Yakin ingin menghapus ini ?</Title>
|
||||
<Group grow>
|
||||
<Button
|
||||
radius={"xl"}
|
||||
onClick={() => {
|
||||
close();
|
||||
}}
|
||||
>
|
||||
Batal
|
||||
</Button>
|
||||
<Button
|
||||
radius={"xl"}
|
||||
color="red"
|
||||
onClick={() => {
|
||||
onDelete();
|
||||
}}
|
||||
>
|
||||
Hapus
|
||||
</Button>
|
||||
</Group>
|
||||
</Stack>
|
||||
</Paper>
|
||||
</Modal>
|
||||
{/* HAPUS */}
|
||||
{/* <Modal
|
||||
opened={opened}
|
||||
onClose={close}
|
||||
centered
|
||||
withCloseButton={false}
|
||||
styles={{
|
||||
content: {
|
||||
backgroundColor: MainColor.darkblue,
|
||||
border: `2px solid ${AccentColor.blue}`,
|
||||
},
|
||||
}}
|
||||
>
|
||||
<Stack>
|
||||
<Title order={6} c={"white"} align="center">
|
||||
Yakin ingin menghapus ini ?
|
||||
</Title>
|
||||
<Group position="center">
|
||||
<Button
|
||||
radius={"xl"}
|
||||
onClick={() => {
|
||||
close();
|
||||
}}
|
||||
>
|
||||
Batal
|
||||
</Button>
|
||||
<Button
|
||||
radius={"xl"}
|
||||
color="red"
|
||||
onClick={() => {
|
||||
onDelete();
|
||||
}}
|
||||
>
|
||||
Hapus
|
||||
</Button>
|
||||
</Group>
|
||||
</Stack>
|
||||
</Modal> */}
|
||||
|
||||
<Group grow mb={50}>
|
||||
{/* AJUKAN KEMBALI */}
|
||||
{/* <Modal
|
||||
opened={isAjukan}
|
||||
onClose={() => {
|
||||
setAjukan(false);
|
||||
}}
|
||||
centered
|
||||
withCloseButton={false}
|
||||
styles={{
|
||||
content: {
|
||||
backgroundColor: MainColor.darkblue,
|
||||
border: `2px solid ${AccentColor.blue}`,
|
||||
},
|
||||
}}
|
||||
>
|
||||
<Stack>
|
||||
<Title order={6} c={"white"} align="center">
|
||||
Anda yakin akan melakukan pengajuan review kembali ?
|
||||
</Title>
|
||||
<Group position="center">
|
||||
<Button
|
||||
radius={"xl"}
|
||||
onClick={() => {
|
||||
setAjukan(false);
|
||||
}}
|
||||
>
|
||||
Batal
|
||||
</Button>
|
||||
<Button
|
||||
radius={"xl"}
|
||||
color="yellow"
|
||||
onClick={() => {
|
||||
onAjukan();
|
||||
}}
|
||||
>
|
||||
Ajukan
|
||||
</Button>
|
||||
</Group>
|
||||
</Stack>
|
||||
</Modal> */}
|
||||
|
||||
{/* Ajukan */}
|
||||
<ComponentGlobal_UI_Modal
|
||||
opened={isAjukan}
|
||||
close={() => setAjukan(false)}
|
||||
title={" Anda sudah yakin akan melakukan pengajuan review kembali ?"}
|
||||
buttonKiri={
|
||||
<Button
|
||||
radius={"xl"}
|
||||
onClick={() => {
|
||||
setAjukan(false);
|
||||
}}
|
||||
>
|
||||
Batal
|
||||
</Button>
|
||||
}
|
||||
buttonKanan={
|
||||
<Button
|
||||
radius={"xl"}
|
||||
color="orange"
|
||||
onClick={() => {
|
||||
onAjukan();
|
||||
}}
|
||||
>
|
||||
Simpan
|
||||
</Button>
|
||||
}
|
||||
/>
|
||||
|
||||
{/* Hapus */}
|
||||
<ComponentGlobal_UI_Modal
|
||||
opened={opened}
|
||||
close={() => close()}
|
||||
title={"Anda yakin ingin menghapus ?"}
|
||||
buttonKiri={
|
||||
<Button
|
||||
radius={"xl"}
|
||||
onClick={() => {
|
||||
close();
|
||||
}}
|
||||
>
|
||||
Batal
|
||||
</Button>
|
||||
}
|
||||
buttonKanan={
|
||||
<Button
|
||||
radius={"xl"}
|
||||
color="red"
|
||||
onClick={() => {
|
||||
onDelete();
|
||||
}}
|
||||
>
|
||||
hapus
|
||||
</Button>
|
||||
}
|
||||
/>
|
||||
|
||||
<Group grow my={"lg"}>
|
||||
<Button
|
||||
radius={"xl"}
|
||||
color="yellow"
|
||||
onClick={() => {
|
||||
onAction();
|
||||
setAjukan(true);
|
||||
}}
|
||||
>
|
||||
Ajukan Review
|
||||
|
||||
Reference in New Issue
Block a user