Merge pull request #127 from bipproduction/amalia/19-agustus-24
refactor: folder manager task
This commit is contained in:
@@ -1,15 +0,0 @@
|
|||||||
import { ViewUpdateProgressDivisionTask } from "@/module/division_new"
|
|
||||||
import { DetailCreateUserProject, DetailDateEndTask, FileUploadProgres } from "@/module/project";
|
|
||||||
|
|
||||||
function Page({ searchParams }: { searchParams: any }) {
|
|
||||||
if (searchParams.page == "upload-progres") return <FileUploadProgres kategori="task" />;
|
|
||||||
if (searchParams.page == "detail-create-user")
|
|
||||||
return <DetailCreateUserProject kategori="task" />;
|
|
||||||
if (searchParams.page == "detail-date-task") return <DetailDateEndTask kategori="task" />;
|
|
||||||
|
|
||||||
return (
|
|
||||||
<ViewUpdateProgressDivisionTask searchParams={searchParams} />
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
export default Page
|
|
||||||
@@ -1,273 +0,0 @@
|
|||||||
'use client'
|
|
||||||
import { LayoutNavbarNew, WARNA, LayoutDrawer } from "@/module/_global";
|
|
||||||
import { Box, Group, Grid, Center, Checkbox, SimpleGrid, Button, Flex, Text } from "@mantine/core";
|
|
||||||
import { useRouter } from "next/navigation";
|
|
||||||
import { useState } from "react";
|
|
||||||
import { AiOutlineFileSync } from "react-icons/ai";
|
|
||||||
import { BsFiletypeCsv } from "react-icons/bs";
|
|
||||||
import { IoIosArrowDropright } from "react-icons/io";
|
|
||||||
|
|
||||||
export default function ViewUpdateProgressDivisionTask({ searchParams }: { searchParams: any }) {
|
|
||||||
const router = useRouter();
|
|
||||||
const [openDrawer, setOpenDrawer] = useState(false);
|
|
||||||
return (
|
|
||||||
<Box>
|
|
||||||
<LayoutNavbarNew back="" title="Progres Tugas" menu />
|
|
||||||
<Box p={20}>
|
|
||||||
<Box mb={20}>
|
|
||||||
<Group
|
|
||||||
justify="space-between"
|
|
||||||
bg={"white"}
|
|
||||||
p={10}
|
|
||||||
style={{
|
|
||||||
border: `1px solid ${"#D6D8F6"}`,
|
|
||||||
borderRadius: 10,
|
|
||||||
}}
|
|
||||||
onClick={() => setOpenDrawer(true)}
|
|
||||||
>
|
|
||||||
<Text>Upload File</Text>
|
|
||||||
<IoIosArrowDropright size={25} />
|
|
||||||
</Group>
|
|
||||||
</Box>
|
|
||||||
<Box mb={20}>
|
|
||||||
<Group
|
|
||||||
justify="space-between"
|
|
||||||
bg={"white"}
|
|
||||||
p={10}
|
|
||||||
style={{
|
|
||||||
border: `1px solid ${"#D6D8F6"}`,
|
|
||||||
borderRadius: 10,
|
|
||||||
}}
|
|
||||||
onClick={() =>
|
|
||||||
router.push("/task/update/1?page=detail-date-task")
|
|
||||||
}
|
|
||||||
>
|
|
||||||
<Text>Tambah Tanggal & Tugas</Text>
|
|
||||||
<IoIosArrowDropright size={25} />
|
|
||||||
</Group>
|
|
||||||
</Box>
|
|
||||||
<Text fw={"bold"} c={WARNA.biruTua}>
|
|
||||||
Tanggal & Tugas
|
|
||||||
</Text>
|
|
||||||
<Box
|
|
||||||
bg={"white"}
|
|
||||||
style={{
|
|
||||||
borderRadius: 10,
|
|
||||||
border: `1px solid ${"#D6D8F6"}`,
|
|
||||||
padding: 20,
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<Grid>
|
|
||||||
<Grid.Col span={"auto"}>
|
|
||||||
<Center>
|
|
||||||
<Checkbox color="teal" size="md" />
|
|
||||||
</Center>
|
|
||||||
</Grid.Col>
|
|
||||||
<Grid.Col span={10}>
|
|
||||||
<Box
|
|
||||||
style={{
|
|
||||||
borderRadius: 10,
|
|
||||||
border: `1px solid ${"#D6D8F6"}`,
|
|
||||||
padding: 10,
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<Group>
|
|
||||||
<AiOutlineFileSync size={25} />
|
|
||||||
<Text>Laporan Permasyarakatan</Text>
|
|
||||||
</Group>
|
|
||||||
</Box>
|
|
||||||
<Box>
|
|
||||||
<SimpleGrid cols={{ base: 2, sm: 2, lg: 2 }} mt={20}>
|
|
||||||
<Box>
|
|
||||||
<Text>Tanggal Mulai</Text>
|
|
||||||
<Group
|
|
||||||
justify="center"
|
|
||||||
bg={"white"}
|
|
||||||
h={45}
|
|
||||||
style={{
|
|
||||||
borderRadius: 10,
|
|
||||||
border: `1px solid ${"#D6D8F6"}`,
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<Text>16 Juni 2024</Text>
|
|
||||||
</Group>
|
|
||||||
</Box>
|
|
||||||
<Box>
|
|
||||||
<Text c={WARNA.biruTua}>Tanggal Berakhir</Text>
|
|
||||||
<Group
|
|
||||||
justify="center"
|
|
||||||
bg={"white"}
|
|
||||||
h={45}
|
|
||||||
style={{
|
|
||||||
borderRadius: 10,
|
|
||||||
border: `1px solid ${"#D6D8F6"}`,
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<Text>20 Juni 2024</Text>
|
|
||||||
</Group>
|
|
||||||
</Box>
|
|
||||||
</SimpleGrid>
|
|
||||||
</Box>
|
|
||||||
</Grid.Col>
|
|
||||||
</Grid>
|
|
||||||
{searchParams.tugas == "yes" && (
|
|
||||||
<>
|
|
||||||
<Grid mt={20}>
|
|
||||||
<Grid.Col span={"auto"}>
|
|
||||||
<Center>
|
|
||||||
<Checkbox color="teal" size="md" />
|
|
||||||
</Center>
|
|
||||||
</Grid.Col>
|
|
||||||
<Grid.Col span={10}>
|
|
||||||
<Box
|
|
||||||
style={{
|
|
||||||
borderRadius: 10,
|
|
||||||
border: `1px solid ${"#D6D8F6"}`,
|
|
||||||
padding: 10,
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<Group>
|
|
||||||
<AiOutlineFileSync size={25} />
|
|
||||||
<Text>Laporan Dua</Text>
|
|
||||||
</Group>
|
|
||||||
</Box>
|
|
||||||
<Box>
|
|
||||||
<SimpleGrid cols={{ base: 2, sm: 2, lg: 2 }} mt={20}>
|
|
||||||
<Box>
|
|
||||||
<Text>Tanggal Mulai</Text>
|
|
||||||
<Group
|
|
||||||
justify="center"
|
|
||||||
bg={"white"}
|
|
||||||
h={45}
|
|
||||||
style={{
|
|
||||||
borderRadius: 10,
|
|
||||||
border: `1px solid ${"#D6D8F6"}`,
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<Text>21 Juni 2024</Text>
|
|
||||||
</Group>
|
|
||||||
</Box>
|
|
||||||
<Box>
|
|
||||||
<Text c={WARNA.biruTua}>Tanggal Berakhir</Text>
|
|
||||||
<Group
|
|
||||||
justify="center"
|
|
||||||
bg={"white"}
|
|
||||||
h={45}
|
|
||||||
style={{
|
|
||||||
borderRadius: 10,
|
|
||||||
border: `1px solid ${"#D6D8F6"}`,
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<Text>30 Juni 2024</Text>
|
|
||||||
</Group>
|
|
||||||
</Box>
|
|
||||||
</SimpleGrid>
|
|
||||||
</Box>
|
|
||||||
</Grid.Col>
|
|
||||||
</Grid>
|
|
||||||
</>
|
|
||||||
)}
|
|
||||||
</Box>
|
|
||||||
<Box pt={20}>
|
|
||||||
<Text fw={"bold"} c={WARNA.biruTua}>
|
|
||||||
File
|
|
||||||
</Text>
|
|
||||||
<Box
|
|
||||||
bg={"white"}
|
|
||||||
style={{
|
|
||||||
borderRadius: 10,
|
|
||||||
border: `1px solid ${"#D6D8F6"}`,
|
|
||||||
padding: 20,
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<Box
|
|
||||||
style={{
|
|
||||||
borderRadius: 10,
|
|
||||||
border: `1px solid ${"#D6D8F6"}`,
|
|
||||||
padding: 10,
|
|
||||||
}}
|
|
||||||
mb={10}
|
|
||||||
>
|
|
||||||
<Group>
|
|
||||||
<BsFiletypeCsv size={25} />
|
|
||||||
<Text>Proyek Laporan Permasyarakatan</Text>
|
|
||||||
</Group>
|
|
||||||
</Box>
|
|
||||||
<Box
|
|
||||||
style={{
|
|
||||||
borderRadius: 10,
|
|
||||||
border: `1px solid ${"#D6D8F6"}`,
|
|
||||||
padding: 10,
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<Group>
|
|
||||||
<BsFiletypeCsv size={25} />
|
|
||||||
<Text>Proyek Laporan Permasyarakatan</Text>
|
|
||||||
</Group>
|
|
||||||
</Box>
|
|
||||||
</Box>
|
|
||||||
</Box>
|
|
||||||
<Box mt="xl">
|
|
||||||
<Button
|
|
||||||
color="white"
|
|
||||||
bg={WARNA.biruTua}
|
|
||||||
size="lg"
|
|
||||||
radius={30}
|
|
||||||
fullWidth
|
|
||||||
onClick={() => router.push("/task/1")}
|
|
||||||
>
|
|
||||||
Simpan
|
|
||||||
</Button>
|
|
||||||
</Box>
|
|
||||||
</Box>
|
|
||||||
<LayoutDrawer
|
|
||||||
opened={openDrawer}
|
|
||||||
onClose={() => setOpenDrawer(false)}
|
|
||||||
title={"Pilih File"}
|
|
||||||
>
|
|
||||||
<Flex justify={"space-around"}>
|
|
||||||
<Box onClick={() => ""}>
|
|
||||||
<Box
|
|
||||||
bg={"#DCEED8"}
|
|
||||||
style={{
|
|
||||||
border: `1px solid ${"#D6D8F6"}`,
|
|
||||||
padding: 20,
|
|
||||||
borderRadius: 10,
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<Center>
|
|
||||||
<BsFiletypeCsv size={40} />
|
|
||||||
</Center>
|
|
||||||
</Box>
|
|
||||||
<Text mt={10} ta={"center"}>
|
|
||||||
Pilih file
|
|
||||||
</Text>
|
|
||||||
<Text ta={"center"}>diperangkat</Text>
|
|
||||||
</Box>
|
|
||||||
<Box
|
|
||||||
onClick={() =>
|
|
||||||
router.push("/task/update/1?page=upload-progres")
|
|
||||||
}
|
|
||||||
>
|
|
||||||
<Box
|
|
||||||
bg={"#DCEED8"}
|
|
||||||
style={{
|
|
||||||
border: `1px solid ${"#D6D8F6"}`,
|
|
||||||
padding: 20,
|
|
||||||
borderRadius: 10,
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<Center>
|
|
||||||
<BsFiletypeCsv size={40} />
|
|
||||||
</Center>
|
|
||||||
</Box>
|
|
||||||
<Text mt={10} ta={"center"}>
|
|
||||||
Pilih file yang
|
|
||||||
</Text>
|
|
||||||
<Text ta={"center"}>sudah ada</Text>
|
|
||||||
</Box>
|
|
||||||
</Flex>
|
|
||||||
</LayoutDrawer>
|
|
||||||
</Box>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
@@ -9,7 +9,6 @@ import ViewDivisionCalender from "./_division_fitur/calender/view/view_division_
|
|||||||
import ViewHistoryDivisionCalender from "./_division_fitur/calender/view/view_history_division_calender";
|
import ViewHistoryDivisionCalender from "./_division_fitur/calender/view/view_history_division_calender";
|
||||||
import ViewUpdateDivisionCalender from "./_division_fitur/calender/view/view_update_division_calender";
|
import ViewUpdateDivisionCalender from "./_division_fitur/calender/view/view_update_division_calender";
|
||||||
import ViewDocumentDivision from "./_division_fitur/document/view/view_document_division";
|
import ViewDocumentDivision from "./_division_fitur/document/view/view_document_division";
|
||||||
import ViewUpdateProgressDivisionTask from "./_division_fitur/task/view/view_update_progress_division_task";
|
|
||||||
import CreateAdminDivision from "./ui/create_admin_division";
|
import CreateAdminDivision from "./ui/create_admin_division";
|
||||||
import CreateUsers from "./ui/create_users";
|
import CreateUsers from "./ui/create_users";
|
||||||
import ListDivision from './ui/list_division';
|
import ListDivision from './ui/list_division';
|
||||||
@@ -29,7 +28,6 @@ import { funGetDivisionById } from './lib/api_division';
|
|||||||
|
|
||||||
export { CreateUsers };
|
export { CreateUsers };
|
||||||
export { CreateAdminDivision };
|
export { CreateAdminDivision };
|
||||||
export { ViewUpdateProgressDivisionTask };
|
|
||||||
export { ViewDivisionCalender };
|
export { ViewDivisionCalender };
|
||||||
export { ViewCreateDivisionCalender };
|
export { ViewCreateDivisionCalender };
|
||||||
export { UlangiEvent };
|
export { UlangiEvent };
|
||||||
|
|||||||
@@ -1,17 +1,20 @@
|
|||||||
'use client'
|
'use client'
|
||||||
import { LayoutNavbarNew, WARNA } from "@/module/_global";
|
import { LayoutDrawer, LayoutNavbarNew, WARNA } from "@/module/_global";
|
||||||
import { ActionIcon } from "@mantine/core";
|
import { ActionIcon, Box, Flex, SimpleGrid, Stack, Text } from "@mantine/core";
|
||||||
import { useParams, useRouter } from "next/navigation";
|
import { useParams, useRouter } from "next/navigation";
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import toast from "react-hot-toast";
|
import toast from "react-hot-toast";
|
||||||
import { LuClipboardEdit } from "react-icons/lu";
|
|
||||||
import { funGetTaskDivisionById } from "../lib/api_task";
|
import { funGetTaskDivisionById } from "../lib/api_task";
|
||||||
import { useShallowEffect } from "@mantine/hooks";
|
import { useShallowEffect } from "@mantine/hooks";
|
||||||
|
import { HiMenu } from "react-icons/hi";
|
||||||
|
import { IoAddCircle } from "react-icons/io5";
|
||||||
|
import { RiFilter2Line } from "react-icons/ri";
|
||||||
|
|
||||||
export default function NavbarDetailDivisionTask() {
|
export default function NavbarDetailDivisionTask() {
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const param = useParams<{ id: string, detail: string }>()
|
const param = useParams<{ id: string, detail: string }>()
|
||||||
const [name, setName] = useState('')
|
const [name, setName] = useState('')
|
||||||
|
const [isOpen, setOpen] = useState(false)
|
||||||
|
|
||||||
async function getOneData() {
|
async function getOneData() {
|
||||||
try {
|
try {
|
||||||
@@ -34,17 +37,62 @@ export default function NavbarDetailDivisionTask() {
|
|||||||
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<LayoutNavbarNew back="" title={name} menu={
|
<>
|
||||||
<ActionIcon
|
<LayoutNavbarNew back="" title={name} menu={
|
||||||
variant="light"
|
<ActionIcon
|
||||||
bg={WARNA.bgIcon}
|
variant="light"
|
||||||
size="lg"
|
bg={WARNA.bgIcon}
|
||||||
radius="lg"
|
size="lg"
|
||||||
aria-label="Settings"
|
radius="lg"
|
||||||
onClick={() => router.push("update/clzwclyjc00072sqq4sbr5iz4")}
|
aria-label="Settings"
|
||||||
>
|
onClick={() => { }}
|
||||||
<LuClipboardEdit size={20} color="white" />
|
>
|
||||||
</ActionIcon>
|
<HiMenu size={20} color="white" />
|
||||||
} />
|
</ActionIcon>
|
||||||
|
} />
|
||||||
|
|
||||||
|
|
||||||
|
<LayoutDrawer opened={isOpen} title={'Menu'} onClose={() => setOpen(false)}>
|
||||||
|
<Box>
|
||||||
|
<Stack pt={10}>
|
||||||
|
<SimpleGrid
|
||||||
|
cols={{ base: 3, sm: 3, lg: 3 }}
|
||||||
|
>
|
||||||
|
<Flex justify={'center'} align={'center'} direction={'column'}
|
||||||
|
style={{
|
||||||
|
cursor: 'pointer'
|
||||||
|
}}
|
||||||
|
onClick={() => {
|
||||||
|
router.push('/announcement/create')
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Box>
|
||||||
|
<IoAddCircle size={30} color={WARNA.biruTua} />
|
||||||
|
</Box>
|
||||||
|
<Box>
|
||||||
|
<Text c={WARNA.biruTua} ta='center'>Tambah Pengumuman</Text>
|
||||||
|
</Box>
|
||||||
|
</Flex>
|
||||||
|
|
||||||
|
<Flex justify={'center'} align={'center'} direction={'column'}
|
||||||
|
style={{
|
||||||
|
cursor: 'pointer'
|
||||||
|
}}
|
||||||
|
onClick={() => {
|
||||||
|
router.push('/announcement?page=filter')
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Box>
|
||||||
|
<RiFilter2Line size={30} color={WARNA.biruTua} />
|
||||||
|
</Box>
|
||||||
|
<Box>
|
||||||
|
<Text c={WARNA.biruTua} ta='center'>Filter</Text>
|
||||||
|
</Box>
|
||||||
|
</Flex>
|
||||||
|
</SimpleGrid>
|
||||||
|
</Stack>
|
||||||
|
</Box>
|
||||||
|
</LayoutDrawer>
|
||||||
|
</>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user