@@ -1,10 +0,0 @@
|
|||||||
import { ViewFilterProject } from '@/module/project';
|
|
||||||
import React from 'react';
|
|
||||||
|
|
||||||
function Page() {
|
|
||||||
return (
|
|
||||||
<ViewFilterProject />
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
export default Page;
|
|
||||||
@@ -1,7 +1,10 @@
|
|||||||
|
import { ViewFilter } from '@/module/_global';
|
||||||
import { ViewProject } from '@/module/project';
|
import { ViewProject } from '@/module/project';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|
||||||
function Page() {
|
function Page({ searchParams }: { searchParams: { cat: string } }) {
|
||||||
|
if (searchParams.cat == 'filter')
|
||||||
|
return <ViewFilter />
|
||||||
return (
|
return (
|
||||||
<ViewProject />
|
<ViewProject />
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ export default function DrawerProject() {
|
|||||||
<Text c={WARNA.biruTua}>Tambah Proyek</Text>
|
<Text c={WARNA.biruTua}>Tambah Proyek</Text>
|
||||||
</Box>
|
</Box>
|
||||||
</Flex>
|
</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>
|
<Box>
|
||||||
<HiOutlineFilter size={30} color={WARNA.biruTua} />
|
<HiOutlineFilter size={30} color={WARNA.biruTua} />
|
||||||
</Box>
|
</Box>
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import ViewCreateProject from "./view/view_create_project";
|
import ViewCreateProject from "./view/view_create_project";
|
||||||
import ViewDateEndTask from "./components/create_date_end_task";
|
import ViewDateEndTask from "./components/create_date_end_task";
|
||||||
import ViewFilterProject from "./view/view_filter_project";
|
|
||||||
import ViewProject from "./view/view_project";
|
import ViewProject from "./view/view_project";
|
||||||
import CreateUsersProject from "./components/create_users_project";
|
import CreateUsersProject from "./components/create_users_project";
|
||||||
import ViewFileSave from "./view/view_file_save";
|
import ViewFileSave from "./view/view_file_save";
|
||||||
@@ -12,7 +11,6 @@ import DetailFileSave from "./components/detail_project/detail_file_save";
|
|||||||
|
|
||||||
export { ViewProject }
|
export { ViewProject }
|
||||||
export { ViewCreateProject }
|
export { ViewCreateProject }
|
||||||
export { ViewFilterProject }
|
|
||||||
export { ViewDateEndTask }
|
export { ViewDateEndTask }
|
||||||
export { CreateUsersProject }
|
export { CreateUsersProject }
|
||||||
export { ViewFileSave }
|
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