@@ -19,7 +19,7 @@ export default function DrawerProject() {
|
||||
<Text c={WARNA.biruTua}>Tambah Proyek</Text>
|
||||
</Box>
|
||||
</Flex>
|
||||
<Flex onClick={() => window.location.href = "/project/filter"} justify={'center'} align={'center'} direction={'column'} >
|
||||
<Flex onClick={() => window.location.href = "/project?cat=filter"} justify={'center'} align={'center'} direction={'column'} >
|
||||
<Box>
|
||||
<HiOutlineFilter size={30} color={WARNA.biruTua} />
|
||||
</Box>
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import ViewCreateProject from "./view/view_create_project";
|
||||
import ViewDateEndTask from "./components/create_date_end_task";
|
||||
import ViewFilterProject from "./view/view_filter_project";
|
||||
import ViewProject from "./view/view_project";
|
||||
import CreateUsersProject from "./components/create_users_project";
|
||||
import ViewFileSave from "./view/view_file_save";
|
||||
@@ -12,7 +11,6 @@ import DetailFileSave from "./components/detail_project/detail_file_save";
|
||||
|
||||
export { ViewProject }
|
||||
export { ViewCreateProject }
|
||||
export { ViewFilterProject }
|
||||
export { ViewDateEndTask }
|
||||
export { CreateUsersProject }
|
||||
export { ViewFileSave }
|
||||
|
||||
@@ -1,73 +0,0 @@
|
||||
'use client'
|
||||
import { LayoutNavbarNew, WARNA } from '@/module/_global';
|
||||
import { Box, Button, Divider, Group, Text } from '@mantine/core';
|
||||
import React, { useState } from 'react';
|
||||
import { FaCheck } from "react-icons/fa6";
|
||||
|
||||
const dataFilter = [
|
||||
{
|
||||
id: 1,
|
||||
name: 'Semua Proyek'
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
name: 'Proyek Dinas'
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
name: 'Proyek Lpd'
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
name: 'Proyek Lembaga 1'
|
||||
},
|
||||
{
|
||||
id: 5,
|
||||
name: 'Proyek Lembaga 2'
|
||||
},
|
||||
{
|
||||
id: 6,
|
||||
name: 'Proyek Lembaga 3'
|
||||
},
|
||||
]
|
||||
|
||||
|
||||
export default function ProjectFilter() {
|
||||
const [selectedFilter, setSelectedFilter] = useState<string | null>(null);
|
||||
|
||||
const handleFilterClick = (filterName: string) => {
|
||||
setSelectedFilter(filterName);
|
||||
};
|
||||
|
||||
return (
|
||||
<Box>
|
||||
<LayoutNavbarNew back='/project' title='Filter' menu />
|
||||
<Box p={20}>
|
||||
{dataFilter.map((filter) => (
|
||||
<Box key={filter.id}>
|
||||
<Group
|
||||
justify="space-between"
|
||||
align="center"
|
||||
mb={10}
|
||||
onClick={() => handleFilterClick(filter.name)}
|
||||
>
|
||||
<Text fw={selectedFilter === filter.name ? 'bold' : 'normal'}>
|
||||
{filter.name}
|
||||
</Text>
|
||||
{selectedFilter === filter.name && <FaCheck size={25} />}
|
||||
</Group>
|
||||
<Divider my={"sm"} />
|
||||
</Box>
|
||||
))}
|
||||
<Button
|
||||
fullWidth
|
||||
radius={100}
|
||||
size="lg"
|
||||
color={WARNA.biruTua}
|
||||
>
|
||||
Terapkan
|
||||
</Button>
|
||||
</Box>
|
||||
</Box>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user