style : add group
Deskripsi: -update list group - update edit drawer group - navbar group - view group No Issue
This commit is contained in:
@@ -1,9 +1,11 @@
|
|||||||
import { isDrawer, LayoutDrawer, WARNA } from '@/module/_global';
|
import { isDrawer, LayoutDrawer, WARNA } from '@/module/_global';
|
||||||
import { ActionIcon, Box, Group, Text, TextInput } from '@mantine/core';
|
import { ActionIcon, Box, Group, Text, TextInput } from '@mantine/core';
|
||||||
import React from 'react';
|
import React, { useState } from 'react';
|
||||||
import { HiOutlineOfficeBuilding } from 'react-icons/hi';
|
import { HiOutlineOfficeBuilding } from 'react-icons/hi';
|
||||||
import { HiMagnifyingGlass } from 'react-icons/hi2';
|
import { HiMagnifyingGlass } from 'react-icons/hi2';
|
||||||
import EditDrawerGroup from './ui/edit_drawer_group';
|
import EditDrawerGroup from './ui/edit_drawer_group';
|
||||||
|
import { useHookstate } from '@hookstate/core';
|
||||||
|
import { useRouter } from 'next/navigation';
|
||||||
|
|
||||||
const dataGroup = [
|
const dataGroup = [
|
||||||
{
|
{
|
||||||
@@ -40,9 +42,11 @@ const dataGroup = [
|
|||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
export default function ListGroup() {
|
export default function ListGroupActive() {
|
||||||
|
// const openDrawerEdit = useHookstate(isDrawer)
|
||||||
|
const [openDrawer, setOpenDrawer] = useState(false)
|
||||||
return (
|
return (
|
||||||
<Box p={20}>
|
<Box pt={20}>
|
||||||
<TextInput
|
<TextInput
|
||||||
styles={{
|
styles={{
|
||||||
input: {
|
input: {
|
||||||
@@ -63,7 +67,7 @@ export default function ListGroup() {
|
|||||||
border: `1px solid ${"#DCEED8"}`,
|
border: `1px solid ${"#DCEED8"}`,
|
||||||
padding: 10,
|
padding: 10,
|
||||||
borderRadius: 10
|
borderRadius: 10
|
||||||
}} >
|
}} onClick={() => setOpenDrawer(true)} >
|
||||||
<Box>
|
<Box>
|
||||||
<ActionIcon variant="light" bg={'#DCEED8'} size={50} radius={100} aria-label="icon">
|
<ActionIcon variant="light" bg={'#DCEED8'} size={50} radius={100} aria-label="icon">
|
||||||
<HiOutlineOfficeBuilding color={WARNA.biruTua} size={25} />
|
<HiOutlineOfficeBuilding color={WARNA.biruTua} size={25} />
|
||||||
@@ -76,9 +80,9 @@ export default function ListGroup() {
|
|||||||
</Box>
|
</Box>
|
||||||
)
|
)
|
||||||
})}
|
})}
|
||||||
{/* <LayoutDrawer opened={openDrawer} onClose={() => setOpenDrawer(false)} title="LEMBAGA PENGKREDITAN DESA">
|
<LayoutDrawer opened={openDrawer} onClose={() => setOpenDrawer(false)} title="LEMBAGA PENGKREDITAN DESA">
|
||||||
<EditDrawerGroup />
|
<EditDrawerGroup />
|
||||||
</LayoutDrawer> */}
|
</LayoutDrawer>
|
||||||
</Box>
|
</Box>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
85
src/module/group/components/list_group_non_active.tsx
Normal file
85
src/module/group/components/list_group_non_active.tsx
Normal file
@@ -0,0 +1,85 @@
|
|||||||
|
import { isDrawer, LayoutDrawer, WARNA } from '@/module/_global';
|
||||||
|
import { ActionIcon, Box, Group, Text, TextInput } from '@mantine/core';
|
||||||
|
import React, { useState } from 'react';
|
||||||
|
import { HiOutlineOfficeBuilding } from 'react-icons/hi';
|
||||||
|
import { HiMagnifyingGlass } from 'react-icons/hi2';
|
||||||
|
import EditDrawerGroup from './ui/edit_drawer_group';
|
||||||
|
|
||||||
|
const dataGroup = [
|
||||||
|
{
|
||||||
|
id: 1,
|
||||||
|
name: 'No Active Desa'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 2,
|
||||||
|
name: 'No Active Desa'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 3,
|
||||||
|
name: 'No Active Desa'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 4,
|
||||||
|
name: 'No Active Desa'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 5,
|
||||||
|
name: 'No Active Desa'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 6,
|
||||||
|
name: 'No Active Desa'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 7,
|
||||||
|
name: 'No Active Desa'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 8,
|
||||||
|
name: 'No Active Desa'
|
||||||
|
},
|
||||||
|
]
|
||||||
|
|
||||||
|
export default function ListGroupNonActive() {
|
||||||
|
const [openDrawer, setOpenDrawer] = useState(false)
|
||||||
|
return (
|
||||||
|
<Box pt={20}>
|
||||||
|
<TextInput
|
||||||
|
styles={{
|
||||||
|
input: {
|
||||||
|
color: WARNA.biruTua,
|
||||||
|
borderRadius: WARNA.biruTua,
|
||||||
|
borderColor: WARNA.biruTua,
|
||||||
|
},
|
||||||
|
}}
|
||||||
|
size="md"
|
||||||
|
radius={30}
|
||||||
|
leftSection={<HiMagnifyingGlass size={20} />}
|
||||||
|
placeholder="Pencarian"
|
||||||
|
/>
|
||||||
|
{dataGroup.map((v, i) => {
|
||||||
|
return (
|
||||||
|
<Box pt={20} key={i}>
|
||||||
|
<Group align='center' style={{
|
||||||
|
border: `1px solid ${"#DCEED8"}`,
|
||||||
|
padding: 10,
|
||||||
|
borderRadius: 10
|
||||||
|
}} onClick={() => setOpenDrawer(true)}>
|
||||||
|
<Box>
|
||||||
|
<ActionIcon variant="light" bg={'#DCEED8'} size={50} radius={100} aria-label="icon">
|
||||||
|
<HiOutlineOfficeBuilding color={WARNA.biruTua} size={25} />
|
||||||
|
</ActionIcon>
|
||||||
|
</Box>
|
||||||
|
<Box>
|
||||||
|
<Text fw={'bold'} c={WARNA.biruTua}>{v.name}</Text>
|
||||||
|
</Box>
|
||||||
|
</Group>
|
||||||
|
</Box>
|
||||||
|
)
|
||||||
|
})}
|
||||||
|
<LayoutDrawer opened={openDrawer} onClose={() => setOpenDrawer(false)} title="LEMBAGA PENGKREDITAN DESA">
|
||||||
|
<EditDrawerGroup />
|
||||||
|
</LayoutDrawer>
|
||||||
|
</Box>
|
||||||
|
);
|
||||||
|
}
|
||||||
38
src/module/group/components/tab_list_group.tsx
Normal file
38
src/module/group/components/tab_list_group.tsx
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
'use client'
|
||||||
|
import { Box, Tabs, rem } from '@mantine/core';
|
||||||
|
import { IoCloseCircleOutline } from "react-icons/io5"
|
||||||
|
import { IoMdCheckmarkCircleOutline } from "react-icons/io"
|
||||||
|
import ListGroupActive from './list_group_active';
|
||||||
|
import ListGroupNonActive from './list_group_non_active';
|
||||||
|
|
||||||
|
export default function TabListGroup() {
|
||||||
|
const iconStyle = { width: rem(20), height: rem(20) };
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Box p={20}>
|
||||||
|
<Tabs variant="pills" color='#FF9861' radius="xl" defaultValue="aktif">
|
||||||
|
<Tabs.List bg={"white"} style={{
|
||||||
|
border: `1px solid ${"#EDEDED"}`,
|
||||||
|
padding: 5,
|
||||||
|
borderRadius: 100
|
||||||
|
}}>
|
||||||
|
<Tabs.Tab value="aktif" w={"45%"} leftSection={<IoMdCheckmarkCircleOutline style={iconStyle} />}>
|
||||||
|
Aktif
|
||||||
|
</Tabs.Tab>
|
||||||
|
<Tabs.Tab value="tidak-aktif" w={"53%"} leftSection={<IoCloseCircleOutline style={iconStyle} />}>
|
||||||
|
Tidak Aktif
|
||||||
|
</Tabs.Tab>
|
||||||
|
</Tabs.List>
|
||||||
|
|
||||||
|
<Tabs.Panel value="aktif">
|
||||||
|
<ListGroupActive />
|
||||||
|
</Tabs.Panel>
|
||||||
|
|
||||||
|
<Tabs.Panel value="tidak-aktif">
|
||||||
|
<ListGroupNonActive />
|
||||||
|
</Tabs.Panel>
|
||||||
|
</Tabs>
|
||||||
|
</Box>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
@@ -1,33 +1,34 @@
|
|||||||
'use client'
|
'use client'
|
||||||
import { isDrawer, LayoutDrawer, WARNA } from '@/module/_global';
|
import { isDrawer, LayoutDrawer, WARNA } from '@/module/_global';
|
||||||
|
import { useHookstate } from '@hookstate/core';
|
||||||
import { Box, Button, Center, Flex, Group, SimpleGrid, Stack, Text, TextInput } from '@mantine/core';
|
import { Box, Button, Center, Flex, Group, SimpleGrid, Stack, Text, TextInput } from '@mantine/core';
|
||||||
import React, { useState } from 'react';
|
import React, { useState } from 'react';
|
||||||
import { IoAddCircle } from "react-icons/io5";
|
import { IoAddCircle, IoCloseCircleOutline } from "react-icons/io5";
|
||||||
|
|
||||||
export default function EditDrawerGroup() {
|
export default function EditDrawerGroup() {
|
||||||
// const [openDrawerGroup, setOpenDrawerGroup] = useState(false)
|
const [openDrawerGroup, setOpenDrawerGroup] = useState(false)
|
||||||
// const [openDrawer, setOpenDrawer] = useAtom(isDrawer)
|
const openDrawerEdit = useHookstate(isDrawer)
|
||||||
|
|
||||||
// function onCLose() {
|
function onCLose() {
|
||||||
// setOpenDrawerGroup(false)
|
setOpenDrawerGroup(false)
|
||||||
// setOpenDrawer(false)
|
openDrawerEdit.set(false)
|
||||||
// }
|
}
|
||||||
return (
|
return (
|
||||||
<Box>
|
<Box>
|
||||||
{/* <Stack pt={10}>
|
<Stack pt={10}>
|
||||||
<SimpleGrid
|
<SimpleGrid
|
||||||
cols={{ base: 3, sm: 3, lg: 3 }}
|
cols={{ base: 3, sm: 3, lg: 3 }}
|
||||||
onClick={() => setOpenDrawerGroup(true)}
|
|
||||||
>
|
>
|
||||||
<Flex justify={'center'} align={'center'} direction={'column'} >
|
<Flex justify={'center'} align={'center'} direction={'column'} >
|
||||||
<Box>
|
<Box>
|
||||||
<IoAddCircle size={30} color={WARNA.biruTua} />
|
<IoCloseCircleOutline size={30} color={WARNA.biruTua} />
|
||||||
</Box>
|
</Box>
|
||||||
<Box>
|
<Box>
|
||||||
<Text c={WARNA.biruTua}>Tidak Aktif</Text>
|
<Text c={WARNA.biruTua}>Tidak Aktif</Text>
|
||||||
</Box>
|
</Box>
|
||||||
</Flex>
|
</Flex>
|
||||||
<Flex justify={'center'} align={'center'} direction={'column'} >
|
<Flex justify={'center'} align={'center'} direction={'column'} onClick={() => setOpenDrawerGroup(true)}>
|
||||||
<Box>
|
<Box>
|
||||||
<IoAddCircle size={30} color={WARNA.biruTua} />
|
<IoAddCircle size={30} color={WARNA.biruTua} />
|
||||||
</Box>
|
</Box>
|
||||||
@@ -64,7 +65,7 @@ export default function EditDrawerGroup() {
|
|||||||
</Button>
|
</Button>
|
||||||
</Box>
|
</Box>
|
||||||
</Box>
|
</Box>
|
||||||
</LayoutDrawer> */}
|
</LayoutDrawer>
|
||||||
</Box>
|
</Box>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import DrawerGroup from './drawer_group';
|
|||||||
import { useHookstate } from '@hookstate/core';
|
import { useHookstate } from '@hookstate/core';
|
||||||
|
|
||||||
export default function NavbarGroup() {
|
export default function NavbarGroup() {
|
||||||
const openDrawer = useHookstate(isDrawer)
|
const openDrawerMenu = useHookstate(isDrawer)
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
@@ -22,14 +22,14 @@ export default function NavbarGroup() {
|
|||||||
</Grid.Col>
|
</Grid.Col>
|
||||||
<Grid.Col span="auto">
|
<Grid.Col span="auto">
|
||||||
<Group justify='flex-end'>
|
<Group justify='flex-end'>
|
||||||
<ActionIcon onClick={() => openDrawer.set(true)} variant="light" bg={WARNA.bgIcon} size="lg" radius="lg" aria-label="Settings">
|
<ActionIcon onClick={() => openDrawerMenu.set(true)} variant="light" bg={WARNA.bgIcon} size="lg" radius="lg" aria-label="Settings">
|
||||||
<HiMenu size={20} color='white' />
|
<HiMenu size={20} color='white' />
|
||||||
</ActionIcon>
|
</ActionIcon>
|
||||||
</Group>
|
</Group>
|
||||||
</Grid.Col>
|
</Grid.Col>
|
||||||
</Grid>
|
</Grid>
|
||||||
</LayoutNavbarHome>
|
</LayoutNavbarHome>
|
||||||
<LayoutDrawer opened={openDrawer.get()} title={'MENU'} onClose={() => openDrawer.set(false)}>
|
<LayoutDrawer opened={openDrawerMenu.get()} title={'MENU'} onClose={() => openDrawerMenu.set(false)}>
|
||||||
<DrawerGroup />
|
<DrawerGroup />
|
||||||
</LayoutDrawer>
|
</LayoutDrawer>
|
||||||
</>
|
</>
|
||||||
|
|||||||
@@ -1,13 +1,14 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import NavbarGroup from '../components/ui/navbar_group';
|
import NavbarGroup from '../components/ui/navbar_group';
|
||||||
import { Box } from '@mantine/core';
|
import { Box } from '@mantine/core';
|
||||||
import ListGroup from '../components/list_group';
|
import ListGroupActive from '../components/list_group_active';
|
||||||
|
import TabListGroup from '../components/tab_list_group';
|
||||||
|
|
||||||
export default function ViewGroup() {
|
export default function ViewGroup() {
|
||||||
return (
|
return (
|
||||||
<Box>
|
<Box>
|
||||||
<NavbarGroup />
|
<NavbarGroup />
|
||||||
<ListGroup />
|
<TabListGroup/>
|
||||||
</Box>
|
</Box>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user