#style:
Deskripsi: - UI Voting bagian beranda dan status ## Noissue
This commit is contained in:
@@ -1,31 +1,15 @@
|
||||
"use client";
|
||||
|
||||
import {
|
||||
ActionIcon,
|
||||
AppShell,
|
||||
Box,
|
||||
Drawer,
|
||||
Group,
|
||||
Paper,
|
||||
SimpleGrid,
|
||||
Stack,
|
||||
Text,
|
||||
Title,
|
||||
} from "@mantine/core";
|
||||
import React from "react";
|
||||
import ComponentJob_HeaderTamplate from "../../component/header_tamplate";
|
||||
import { IconDots, IconDotsVertical, IconEdit, IconX } from "@tabler/icons-react";
|
||||
import { RouterJob } from "@/app/lib/router_hipmi/router_job";
|
||||
import AppComponentGlobal_LayoutTamplate from "@/app_modules/_global/component_layout_tamplate";
|
||||
import UIGlobal_LayoutTamplate from "@/app_modules/_global/ui/ui_layout_tamplate";
|
||||
import UIGlobal_LayoutHeaderTamplate from "@/app_modules/_global/ui/ui_header_tamplate";
|
||||
import { useRouter } from "next/navigation";
|
||||
import { useDisclosure } from "@mantine/hooks";
|
||||
import {
|
||||
AccentColor,
|
||||
MainColor,
|
||||
} from "@/app_modules/_global/color/color_pallet";
|
||||
import UIGlobal_Drawer from "@/app_modules/_global/ui/ui_drawer";
|
||||
import UIGlobal_LayoutHeaderTamplate from "@/app_modules/_global/ui/ui_header_tamplate";
|
||||
import UIGlobal_LayoutTamplate from "@/app_modules/_global/ui/ui_layout_tamplate";
|
||||
import {
|
||||
ActionIcon
|
||||
} from "@mantine/core";
|
||||
import { useDisclosure } from "@mantine/hooks";
|
||||
import { IconDotsVertical, IconEdit } from "@tabler/icons-react";
|
||||
import React from "react";
|
||||
|
||||
export default function LayoutJob_DetailDraft({
|
||||
children,
|
||||
@@ -34,7 +18,6 @@ export default function LayoutJob_DetailDraft({
|
||||
children: React.ReactNode;
|
||||
jobId: string;
|
||||
}) {
|
||||
const router = useRouter();
|
||||
const [opened, { open, close }] = useDisclosure();
|
||||
|
||||
const listComponent = [
|
||||
|
||||
@@ -1,55 +1,54 @@
|
||||
"use client"
|
||||
"use client";
|
||||
|
||||
import { useState } from "react"
|
||||
import { MODEL_JOB } from "../../model/interface"
|
||||
import _ from "lodash";
|
||||
import { RouterJob } from "@/app/lib/router_hipmi/router_job";
|
||||
import ComponentGlobal_IsEmptyData from "@/app_modules/_global/component/is_empty_data";
|
||||
import { Box, Center, Loader } from "@mantine/core";
|
||||
import _ from "lodash";
|
||||
import { ScrollOnly } from "next-scroll-loader";
|
||||
import { useState } from "react";
|
||||
import ComponentJob_CardStatus from "../../component/card/card_view";
|
||||
import job_getAllStatusPublish from "../../fun/get/status/get_list_publish";
|
||||
import { job_getAllArsipById } from "../../fun/get/get_all_arsip";
|
||||
import { MODEL_JOB } from "../../model/interface";
|
||||
|
||||
export function Job_UI_Arsip({listData}: {listData: MODEL_JOB[]}){
|
||||
const [data, setData] = useState(listData)
|
||||
const [activePage, setActivePage] = useState(1);
|
||||
export function Job_UI_Arsip({ listData }: { listData: MODEL_JOB[] }) {
|
||||
const [data, setData] = useState(listData);
|
||||
const [activePage, setActivePage] = useState(1);
|
||||
|
||||
return (
|
||||
<>
|
||||
{_.isEmpty(data) ? (
|
||||
<ComponentGlobal_IsEmptyData />
|
||||
) : (
|
||||
// --- Main component --- //
|
||||
<Box >
|
||||
<ScrollOnly
|
||||
height="85vh"
|
||||
renderLoading={() => (
|
||||
<Center mt={"lg"}>
|
||||
<Loader color={"yellow"} />
|
||||
</Center>
|
||||
)}
|
||||
data={data}
|
||||
setData={setData}
|
||||
moreData={async () => {
|
||||
const loadData = await job_getAllArsipById({
|
||||
page: activePage + 1,
|
||||
});
|
||||
return (
|
||||
<>
|
||||
{_.isEmpty(data) ? (
|
||||
<ComponentGlobal_IsEmptyData />
|
||||
) : (
|
||||
// --- Main component --- //
|
||||
<Box>
|
||||
<ScrollOnly
|
||||
height="85vh"
|
||||
renderLoading={() => (
|
||||
<Center mt={"lg"}>
|
||||
<Loader color={"yellow"} />
|
||||
</Center>
|
||||
)}
|
||||
data={data}
|
||||
setData={setData}
|
||||
moreData={async () => {
|
||||
const loadData = await job_getAllArsipById({
|
||||
page: activePage + 1,
|
||||
});
|
||||
|
||||
setActivePage((val) => val + 1);
|
||||
setActivePage((val) => val + 1);
|
||||
|
||||
return loadData;
|
||||
}}
|
||||
>
|
||||
{(item) => (
|
||||
<ComponentJob_CardStatus
|
||||
data={item}
|
||||
path={RouterJob.detail_arsip}
|
||||
/>
|
||||
)}
|
||||
</ScrollOnly>
|
||||
</Box>
|
||||
)}
|
||||
</>
|
||||
);
|
||||
}
|
||||
return loadData;
|
||||
}}
|
||||
>
|
||||
{(item) => (
|
||||
<ComponentJob_CardStatus
|
||||
data={item}
|
||||
path={RouterJob.detail_arsip}
|
||||
/>
|
||||
)}
|
||||
</ScrollOnly>
|
||||
</Box>
|
||||
)}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -79,42 +79,6 @@ export default function LayoutJob_Main({
|
||||
</Stack>
|
||||
))}
|
||||
</SimpleGrid>
|
||||
// <Stack justify="center" h={"100%"}>
|
||||
// <Grid>
|
||||
// {listFooter.map((e) => (
|
||||
// <Grid.Col
|
||||
// key={e.id}
|
||||
// span={"auto"}
|
||||
// pt={"md"}
|
||||
// onClick={() => {
|
||||
// // setLoading(true);
|
||||
// // setTimeout(() => router.replace(e.path), 3000);
|
||||
// router.replace(e.path);
|
||||
// setHotMenuId(e.id);
|
||||
// // setTimeout(() => setLoading(false), 1000);
|
||||
// }}
|
||||
// >
|
||||
// <Center>
|
||||
// <Stack align="center" spacing={0}>
|
||||
// <ActionIcon
|
||||
// radius={"xl"}
|
||||
// variant="transparent"
|
||||
// c={hotMenuId === e.id ? MainColor.yellow : "white"}
|
||||
// >
|
||||
// {e.icon}
|
||||
// </ActionIcon>
|
||||
// <Text
|
||||
// fz={10}
|
||||
// c={hotMenuId === e.id ? MainColor.yellow : "white"}
|
||||
// >
|
||||
// {e.name}
|
||||
// </Text>
|
||||
// </Stack>
|
||||
// </Center>
|
||||
// </Grid.Col>
|
||||
// ))}
|
||||
// </Grid>
|
||||
// </Stack>
|
||||
}
|
||||
>
|
||||
{children}
|
||||
|
||||
Reference in New Issue
Block a user