upd: dashboard

Deskripsi:
- menu dashboard
- tampilan pengaduan list

No Issues
This commit is contained in:
2025-11-06 17:37:21 +08:00
parent df7f93c794
commit 89e83d806e
5 changed files with 253 additions and 32 deletions

View File

@@ -1,4 +1,8 @@
import { useEffect, useState } from "react";
import {
default as clientRoute,
default as clientRoutes,
} from "@/clientRoutes";
import apiFetch from "@/lib/apiFetch";
import {
ActionIcon,
AppShell,
@@ -22,17 +26,17 @@ import {
IconChevronLeft,
IconChevronRight,
IconDashboard,
IconFileCertificate,
IconKey,
IconLock,
IconMessageReport,
IconSettings,
IconUser,
IconUsersGroup,
} from "@tabler/icons-react";
import type { User } from "generated/prisma";
import { useEffect, useState } from "react";
import { Outlet, useLocation, useNavigate } from "react-router-dom";
import {
default as clientRoute,
default as clientRoutes,
} from "@/clientRoutes";
import apiFetch from "@/lib/apiFetch";
function Logout() {
return (
@@ -98,7 +102,7 @@ export default function DashboardLayout() {
size="lg"
style={{
backgroundColor: "rgba(255,255,255,0.05)",
boxShadow: "0 0 6px rgba(0,255,200,0.2)",
boxShadow: "0 0 6px hsla(167, 100%, 50%, 0.20), 0.20)",
}}
>
{opened ? <IconChevronLeft /> : <IconChevronRight />}
@@ -186,7 +190,7 @@ function HostView() {
{host.name}
</Text>
<Text size="sm" c="dimmed">
{host.email}
{host.roleId}
</Text>
</Stack>
</Flex>
@@ -219,6 +223,31 @@ function NavigationDashboard() {
label: "Dashboard Overview",
description: "Quick summary and insights",
},
{
path: "/scr/dashboard/pengaduan/list",
icon: <IconMessageReport size={20} />,
label: "Pengaduan Warga",
description: "Manage pengaduan warga",
},
{
path: "/scr/dashboard/pelayanan",
icon: <IconFileCertificate size={20} />,
label: "Pelayanan Surat",
description: "Manage pelayanan surat",
},
{
path: "/scr/dashboard/user",
icon: <IconUsersGroup size={20} />,
label: "User",
description: "Manage user",
},
{
path: "/scr/dashboard/setting",
icon: <IconSettings size={20} />,
label: "Setting",
description:
"Manage setting (category pengaduan dan pelayanan surat, desa, etc)",
},
{
path: "/scr/dashboard/apikey/apikey",
icon: <IconKey size={20} />,