add module
Deskripsi: - add notification - add search - project No issue
This commit is contained in:
94
src/module/notification/components/list_notification.tsx
Normal file
94
src/module/notification/components/list_notification.tsx
Normal file
@@ -0,0 +1,94 @@
|
||||
"use client"
|
||||
import { WARNA } from '@/module/_global';
|
||||
import { ActionIcon, Box, Center, Grid, Group, ScrollArea, Text } from '@mantine/core';
|
||||
import { useRouter } from 'next/navigation';
|
||||
import React from 'react';
|
||||
import { HiUser } from 'react-icons/hi2';
|
||||
|
||||
const dataNotification = [
|
||||
{
|
||||
id: 1,
|
||||
title: 'Rapat Kamis',
|
||||
description: 'Dipta menambahkan berkas di document dan file.',
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
title: 'Rapat Jumat',
|
||||
description: 'Dipta menambahkan berkas di document dan file.',
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
title: 'Rapat Senin',
|
||||
description: 'Dipta menambahkan berkas di document dan file.',
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
title: 'Rapat Selasa',
|
||||
description: 'Dipta menambahkan berkas di document dan file.',
|
||||
},
|
||||
{
|
||||
id: 5,
|
||||
title: 'Rapat Rabu',
|
||||
description: 'Dipta menambahkan berkas di document dan file.',
|
||||
},
|
||||
{
|
||||
id: 5,
|
||||
title: 'Rapat Rabu',
|
||||
description: 'Dipta menambahkan berkas di document dan file.',
|
||||
},
|
||||
{
|
||||
id: 5,
|
||||
title: 'Rapat Rabu',
|
||||
description: 'Dipta menambahkan berkas di document dan file.',
|
||||
},
|
||||
{
|
||||
id: 5,
|
||||
title: 'Rapat Rabu',
|
||||
description: 'Dipta menambahkan berkas di document dan file.',
|
||||
},
|
||||
{
|
||||
id: 5,
|
||||
title: 'Rapat Rabu',
|
||||
description: 'Dipta menambahkan berkas di document dan file.',
|
||||
},
|
||||
{
|
||||
id: 5,
|
||||
title: 'Rapat Rabu',
|
||||
description: 'Dipta menambahkan berkas di document dan file.',
|
||||
},
|
||||
{
|
||||
id: 5,
|
||||
title: 'Rapat Rabu',
|
||||
description: 'Dipta menambahkan berkas di document dan file.',
|
||||
},
|
||||
]
|
||||
|
||||
export default function ListNotification() {
|
||||
const router = useRouter()
|
||||
return (
|
||||
<Box>
|
||||
{dataNotification.map((v, i) => {
|
||||
return (
|
||||
<Grid style={{
|
||||
border: `1px solid ${WARNA.borderOrange}`,
|
||||
padding: 15,
|
||||
borderRadius: 15
|
||||
}} gutter={1} key={i} mb={"sm"}>
|
||||
<Grid.Col span={3} pl={'xs'}>
|
||||
<ActionIcon variant="light" bg={WARNA.biruTua} size={50} radius={100} aria-label="icon">
|
||||
<HiUser size={30} color='white' />
|
||||
</ActionIcon>
|
||||
</Grid.Col>
|
||||
<Grid.Col span={9}>
|
||||
<Box>
|
||||
<Text fw={'bold'} fz={18}>{v.title}</Text>
|
||||
<Text fz={15}>{v.description}</Text>
|
||||
</Box>
|
||||
</Grid.Col>
|
||||
</Grid>
|
||||
)
|
||||
})}
|
||||
</Box>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
"use client"
|
||||
import { LayoutIconBack, LayoutNavbarHome } from '@/module/_global';
|
||||
import { Box, Grid, Text } from '@mantine/core';
|
||||
import { useRouter } from 'next/navigation';
|
||||
import React from 'react';
|
||||
|
||||
export default function NavbarNotification() {
|
||||
const router = useRouter()
|
||||
return (
|
||||
<Box>
|
||||
<LayoutNavbarHome>
|
||||
<Grid justify='center' align='center'>
|
||||
<Grid.Col span="auto">
|
||||
<LayoutIconBack back='/home' />
|
||||
</Grid.Col>
|
||||
<Grid.Col span={6}>
|
||||
<Text ta={'center'} fw={'bold'} c={'white'} >NOTIFIKASI</Text>
|
||||
</Grid.Col>
|
||||
<Grid.Col span="auto"></Grid.Col>
|
||||
</Grid>
|
||||
</LayoutNavbarHome>
|
||||
</Box>
|
||||
);
|
||||
}
|
||||
|
||||
3
src/module/notification/index.ts
Normal file
3
src/module/notification/index.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
import ViewNotification from "./view/view_notification";
|
||||
|
||||
export {ViewNotification}
|
||||
18
src/module/notification/view/view_notification.tsx
Normal file
18
src/module/notification/view/view_notification.tsx
Normal file
@@ -0,0 +1,18 @@
|
||||
import { LayoutIconBack, LayoutNavbarHome } from '@/module/_global'
|
||||
import { Box, Grid, ScrollArea, Text } from '@mantine/core'
|
||||
import React from 'react'
|
||||
import NavbarNotification from '../components/ui/navbar_notification'
|
||||
import ListNotification from '../components/list_notification'
|
||||
|
||||
export default function ViewNotification() {
|
||||
return (
|
||||
<Box>
|
||||
<NavbarNotification />
|
||||
<ScrollArea h={'87vh'}>
|
||||
<Box p={20}>
|
||||
<ListNotification />
|
||||
</Box>
|
||||
</ScrollArea>
|
||||
</Box>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user