From 240105f657fa8378d4574a4e33057e1ddabf32bd Mon Sep 17 00:00:00 2001 From: lukman Date: Wed, 17 Jul 2024 11:11:01 +0800 Subject: [PATCH] style : add documets Deskripsi: - add copy data - acut data - more No Issue --- .../components/ui/drawer_copy_documents.tsx | 110 ++++++++++++++++++ .../components/ui/drawer_cut_documents.tsx | 110 ++++++++++++++++++ .../document/components/ui/drawer_more.tsx | 43 +++++++ .../ui/navbar_document_division.tsx | 93 ++++++++++++++- 4 files changed, 354 insertions(+), 2 deletions(-) create mode 100644 src/module/division_new/_division_fitur/document/components/ui/drawer_copy_documents.tsx create mode 100644 src/module/division_new/_division_fitur/document/components/ui/drawer_cut_documents.tsx create mode 100644 src/module/division_new/_division_fitur/document/components/ui/drawer_more.tsx diff --git a/src/module/division_new/_division_fitur/document/components/ui/drawer_copy_documents.tsx b/src/module/division_new/_division_fitur/document/components/ui/drawer_copy_documents.tsx new file mode 100644 index 0000000..0eea0a8 --- /dev/null +++ b/src/module/division_new/_division_fitur/document/components/ui/drawer_copy_documents.tsx @@ -0,0 +1,110 @@ +import { WARNA } from '@/module/_global'; +import { Box, Button, Divider, Flex, Grid, Group, Modal, Text, TextInput } from '@mantine/core'; +import React, { useState } from 'react'; +import toast from 'react-hot-toast'; +import { FcFolder } from 'react-icons/fc'; +const dataDocuments = [ + { + id: 1, + name: 'Administrasi', + date: '18/06/2024 14.00 PM', + icon: + }, + { + id: 2, + name: 'Administrasi', + date: '18/06/2024 14.00 PM', + icon: + }, + { + id: 3, + name: 'Administrasi', + date: '18/06/2024 14.00 PM', + icon: + }, +] + +export default function DrawerCopyDocuments() { + const [opened, setOpened] = useState(false); + function onCreate(val: boolean) { + if (val) { + toast.success("Sukses! Membuat Folder"); + } + setOpened(false) + } + return ( + + + + + + + + + + + + + {dataDocuments.map((v, i) => { + return ( + + + + + + + {v.icon} + + + {v.name} + {v.date} + + + + + + + + ) + })} + + setOpened(false)} centered withCloseButton={false}> + + Buat Folder + + + + + + + + + + + + + + + ); +} diff --git a/src/module/division_new/_division_fitur/document/components/ui/drawer_cut_documents.tsx b/src/module/division_new/_division_fitur/document/components/ui/drawer_cut_documents.tsx new file mode 100644 index 0000000..96c0728 --- /dev/null +++ b/src/module/division_new/_division_fitur/document/components/ui/drawer_cut_documents.tsx @@ -0,0 +1,110 @@ +import { WARNA } from '@/module/_global'; +import { Box, Button, Divider, Flex, Grid, Group, Modal, Text, TextInput } from '@mantine/core'; +import React, { useState } from 'react'; +import toast from 'react-hot-toast'; +import { FcFolder } from 'react-icons/fc'; +const dataDocuments = [ + { + id: 1, + name: 'Administrasi', + date: '18/06/2024 14.00 PM', + icon: + }, + { + id: 2, + name: 'Administrasi', + date: '18/06/2024 14.00 PM', + icon: + }, + { + id: 3, + name: 'Administrasi', + date: '18/06/2024 14.00 PM', + icon: + }, +] + +export default function DrawerCutDocuments() { + const [opened, setOpened] = useState(false); + function onCreate(val: boolean) { + if (val) { + toast.success("Sukses! Membuat Folder"); + } + setOpened(false) + } + return ( + + + + + + + + + + + + + {dataDocuments.map((v, i) => { + return ( + + + + + + + {v.icon} + + + {v.name} + {v.date} + + + + + + + + ) + })} + + setOpened(false)} centered withCloseButton={false}> + + Buat Folder + + + + + + + + + + + + + + + ); +} diff --git a/src/module/division_new/_division_fitur/document/components/ui/drawer_more.tsx b/src/module/division_new/_division_fitur/document/components/ui/drawer_more.tsx new file mode 100644 index 0000000..67a02e5 --- /dev/null +++ b/src/module/division_new/_division_fitur/document/components/ui/drawer_more.tsx @@ -0,0 +1,43 @@ +import { LayoutDrawer, WARNA } from "@/module/_global"; +import { Box, Flex, Group, SimpleGrid, Stack, Text } from "@mantine/core"; +import React, { useState } from "react"; +import { LuFolders, LuFolderSymlink } from "react-icons/lu"; +import DrawerCutDocuments from "./drawer_cut_documents"; +import DrawerCopyDocuments from "./drawer_copy_documents"; + +export default function DrawerMore() { + const [isCut, setIsCut] = useState(false) + const [isCopy, setIsCopy] = useState(false) + return ( + + + + setIsCut(true)} justify={'center'} align={'center'} direction={'column'} > + + + + + Pindah + + + setIsCopy(true)} justify={'center'} align={'center'} direction={'column'} > + + + + + Salin + + + + + setIsCut(false)} title={'Pilih Lokasi Pemindahan'} size="lg"> + + + setIsCopy(false)} title={'Pilih Lokasi Salin'} size="lg"> + + + + ); +} diff --git a/src/module/division_new/_division_fitur/document/components/ui/navbar_document_division.tsx b/src/module/division_new/_division_fitur/document/components/ui/navbar_document_division.tsx index 859f7c8..7592898 100644 --- a/src/module/division_new/_division_fitur/document/components/ui/navbar_document_division.tsx +++ b/src/module/division_new/_division_fitur/document/components/ui/navbar_document_division.tsx @@ -1,6 +1,6 @@ 'use client' import { LayoutDrawer, LayoutNavbarNew, WARNA } from '@/module/_global'; -import { ActionIcon, Box, Checkbox, Divider, Flex, Grid, Group, SimpleGrid, Text } from '@mantine/core'; +import { ActionIcon, Box, Button, Checkbox, Divider, Flex, Grid, Group, Modal, Select, SimpleGrid, Text, TextInput } from '@mantine/core'; import React, { useState } from 'react'; import { HiMenu } from 'react-icons/hi'; import DrawerMenuDocumentDivision from './drawer_menu_document_division'; @@ -11,6 +11,9 @@ import { AiOutlineDelete } from 'react-icons/ai'; import { CgRename } from "react-icons/cg"; import { LuShare2 } from 'react-icons/lu'; import { MdOutlineMoreHoriz } from 'react-icons/md'; +import LayoutModal from '@/module/_global/layout/layout_modal'; +import toast from 'react-hot-toast'; +import DrawerMore from './drawer_more'; const dataDocuments = [ { @@ -76,6 +79,19 @@ export default function NavbarDocumentDivision() { const [share, setShare] = useState(false) const [more, setMore] = useState(false) + function onTrue(val: boolean) { + if (val) { + toast.success("Sukses! Data dihapus"); + } + setIsDelete(false) + } + function onEdit(val: boolean) { + if (val) { + toast.success("Sukses! Edit Data"); + } + setRename(false) + } + return ( {isChecked && ( @@ -109,7 +125,7 @@ export default function NavbarDocumentDivision() { Bagikan - setMore(false)} justify={'center'} align={'center'} direction={'column'}> + setMore(true)} justify={'center'} align={'center'} direction={'column'}> Lainnya @@ -165,6 +181,79 @@ export default function NavbarDocumentDivision() { setOpen(false)}> + setIsDelete(false)} + description="Apakah Anda yakin ingin menghapus data?" + onYes={(val) => { onTrue(val) }} /> + setRename(false)} centered withCloseButton={false}> + + Edit Folder + + + + + + + + + + + + + + setShare(false)} size='lg'> + +