tambah aduan sampah
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import "@mantine/core/styles.css";
|
||||
import "@mantine/notifications/styles.css";
|
||||
import '@mantine/dates/styles.css'
|
||||
import "@mantine/dates/styles.css";
|
||||
import { Notifications } from "@mantine/notifications";
|
||||
|
||||
import { MantineProvider } from "@mantine/core";
|
||||
|
||||
@@ -20,6 +20,7 @@ import DashboardHome from "./pages/scr/dashboard/dashboard_home";
|
||||
import ApikeyPage from "./pages/scr/dashboard/apikey/apikey_page";
|
||||
import DashboardLayout from "./pages/scr/dashboard/dashboard_layout";
|
||||
import ScrLayout from "./pages/scr/scr_layout";
|
||||
import DirPage from "./pages/dir/dir_page";
|
||||
import NotFound from "./pages/NotFound";
|
||||
|
||||
export default function AppRoutes() {
|
||||
@@ -97,6 +98,7 @@ export default function AppRoutes() {
|
||||
/>
|
||||
</Route>
|
||||
</Route>
|
||||
<Route path="/dir/dir" element={<DirPage />} />
|
||||
<Route path="/*" element={<NotFound />} />
|
||||
</Routes>
|
||||
</BrowserRouter>
|
||||
|
||||
@@ -20,6 +20,7 @@ const clientRoutes = {
|
||||
"/scr/dashboard/credential/credential": "/scr/dashboard/credential/credential",
|
||||
"/scr/dashboard/dashboard-home": "/scr/dashboard/dashboard-home",
|
||||
"/scr/dashboard/apikey/apikey": "/scr/dashboard/apikey/apikey",
|
||||
"/dir/dir": "/dir/dir",
|
||||
"/*": "/*"
|
||||
} as const;
|
||||
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
import { Link } from "react-router-dom";
|
||||
import { Button, Container, Stack, Title, Text, Group, Card, Divider } from "@mantine/core";
|
||||
import {
|
||||
Button,
|
||||
Container,
|
||||
Stack,
|
||||
Title,
|
||||
Text,
|
||||
Group,
|
||||
Card,
|
||||
Divider,
|
||||
} from "@mantine/core";
|
||||
import { IconArrowRight, IconRocket, IconTerminal2 } from "@tabler/icons-react";
|
||||
import clientRoutes from "@/clientRoutes";
|
||||
|
||||
@@ -14,7 +23,8 @@ export default function Home() {
|
||||
display: "flex",
|
||||
alignItems: "center",
|
||||
justifyContent: "center",
|
||||
background: "radial-gradient(circle at top left, rgba(0,255,200,0.08), transparent 70%)",
|
||||
background:
|
||||
"radial-gradient(circle at top left, rgba(0,255,200,0.08), transparent 70%)",
|
||||
}}
|
||||
>
|
||||
<Card
|
||||
@@ -38,8 +48,9 @@ export default function Home() {
|
||||
</Title>
|
||||
</Group>
|
||||
<Text c="dimmed" size="md" maw={500}>
|
||||
A futuristic dashboard experience built with Mantine and Bun — designed for speed,
|
||||
precision, and modern elegance. Navigate to your dashboard and start exploring.
|
||||
A futuristic dashboard experience built with Mantine and Bun —
|
||||
designed for speed, precision, and modern elegance. Navigate to your
|
||||
dashboard and start exploring.
|
||||
</Text>
|
||||
<Divider w="40%" mx="auto" />
|
||||
<Button
|
||||
|
||||
@@ -23,7 +23,9 @@ export default function DarmasabaPage() {
|
||||
</Button>
|
||||
<Button
|
||||
variant="outline"
|
||||
onClick={() => navigate(clientRoutes["/darmasaba/kartu-tanda-penduduk"])}
|
||||
onClick={() =>
|
||||
navigate(clientRoutes["/darmasaba/kartu-tanda-penduduk"])
|
||||
}
|
||||
>
|
||||
Form KTP
|
||||
</Button>
|
||||
@@ -35,43 +37,61 @@ export default function DarmasabaPage() {
|
||||
</Button>
|
||||
<Button
|
||||
variant="outline"
|
||||
onClick={() => navigate(clientRoutes["/darmasaba/surat-keterangan-domisili-organisasi"])}
|
||||
onClick={() =>
|
||||
navigate(
|
||||
clientRoutes["/darmasaba/surat-keterangan-domisili-organisasi"],
|
||||
)
|
||||
}
|
||||
>
|
||||
Form SKDO
|
||||
</Button>
|
||||
<Button
|
||||
variant="outline"
|
||||
onClick={() => navigate(clientRoutes["/darmasaba/surat-keterangan-penghasilan"])}
|
||||
onClick={() =>
|
||||
navigate(clientRoutes["/darmasaba/surat-keterangan-penghasilan"])
|
||||
}
|
||||
>
|
||||
Form SKP
|
||||
</Button>
|
||||
<Button
|
||||
variant="outline"
|
||||
onClick={() => navigate(clientRoutes["/darmasaba/surat-keterangan-tidak-mampu"])}
|
||||
onClick={() =>
|
||||
navigate(clientRoutes["/darmasaba/surat-keterangan-tidak-mampu"])
|
||||
}
|
||||
>
|
||||
Form SKTM
|
||||
</Button>
|
||||
<Button
|
||||
variant="outline"
|
||||
onClick={() => navigate(clientRoutes["/darmasaba/surat-keterangan-kelakuan-baik"])}
|
||||
onClick={() =>
|
||||
navigate(
|
||||
clientRoutes["/darmasaba/surat-keterangan-kelakuan-baik"],
|
||||
)
|
||||
}
|
||||
>
|
||||
Form SKK
|
||||
</Button>
|
||||
<Button
|
||||
variant="outline"
|
||||
onClick={() => navigate(clientRoutes["/darmasaba/surat-keterangan-usaha"])}
|
||||
onClick={() =>
|
||||
navigate(clientRoutes["/darmasaba/surat-keterangan-usaha"])
|
||||
}
|
||||
>
|
||||
Form SKU
|
||||
</Button>
|
||||
<Button
|
||||
variant="outline"
|
||||
onClick={() => navigate(clientRoutes["/darmasaba/surat-keterangan-tempat-usaha"])}
|
||||
onClick={() =>
|
||||
navigate(clientRoutes["/darmasaba/surat-keterangan-tempat-usaha"])
|
||||
}
|
||||
>
|
||||
Form SKTU
|
||||
</Button>
|
||||
<Button
|
||||
variant="outline"
|
||||
onClick={() => navigate(clientRoutes["/darmasaba/surat-keterangan-belum-kawin"])}
|
||||
onClick={() =>
|
||||
navigate(clientRoutes["/darmasaba/surat-keterangan-belum-kawin"])
|
||||
}
|
||||
>
|
||||
Form Belum Kawin
|
||||
</Button>
|
||||
|
||||
23
src/pages/dir/dir_page.tsx
Normal file
23
src/pages/dir/dir_page.tsx
Normal file
@@ -0,0 +1,23 @@
|
||||
import { Tree } from "@mantine/core";
|
||||
|
||||
// ✅ Valid data, all values are unique
|
||||
const data = [
|
||||
{
|
||||
value: 'src',
|
||||
label: 'src',
|
||||
children: [
|
||||
{ value: 'src/components', label: 'components' },
|
||||
{ value: 'src/hooks', label: 'hooks' },
|
||||
],
|
||||
},
|
||||
{ value: 'package.json', label: 'package.json' },
|
||||
];
|
||||
|
||||
export default function DirPage() {
|
||||
return (
|
||||
<div>
|
||||
<h1>Dir Page</h1>
|
||||
<Tree data={data} />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -329,8 +329,12 @@ function ListApiKey() {
|
||||
{new Date(apiKey.expiredAt).toLocaleDateString()}
|
||||
</Badge>
|
||||
</Table.Td>
|
||||
<Table.Td>{new Date(apiKey.createdAt).toLocaleDateString()}</Table.Td>
|
||||
<Table.Td>{new Date(apiKey.updatedAt).toLocaleDateString()}</Table.Td>
|
||||
<Table.Td>
|
||||
{new Date(apiKey.createdAt).toLocaleDateString()}
|
||||
</Table.Td>
|
||||
<Table.Td>
|
||||
{new Date(apiKey.updatedAt).toLocaleDateString()}
|
||||
</Table.Td>
|
||||
<Table.Td>
|
||||
<Group gap="xs" justify="center">
|
||||
<Tooltip label="Copy API Key">
|
||||
|
||||
@@ -69,7 +69,8 @@ function CredentialCreate() {
|
||||
showNotification({
|
||||
color: "teal",
|
||||
title: "Credential Saved",
|
||||
message: data?.message || "Your credential has been successfully added.",
|
||||
message:
|
||||
data?.message || "Your credential has been successfully added.",
|
||||
});
|
||||
reloadState();
|
||||
} catch {
|
||||
@@ -164,7 +165,7 @@ function CredentialCreate() {
|
||||
|
||||
function CredentialList() {
|
||||
const { data, mutate, isLoading } = useSwr("/", () =>
|
||||
apiFetch.api.credential.list.get()
|
||||
apiFetch.api.credential.list.get(),
|
||||
);
|
||||
|
||||
useShallowEffect(() => {
|
||||
@@ -263,9 +264,7 @@ function CredentialList() {
|
||||
(e.currentTarget.style.boxShadow =
|
||||
"0 0 10px rgba(0,255,200,0.2)")
|
||||
}
|
||||
onMouseLeave={(e) =>
|
||||
(e.currentTarget.style.boxShadow = "none")
|
||||
}
|
||||
onMouseLeave={(e) => (e.currentTarget.style.boxShadow = "none")}
|
||||
>
|
||||
<Flex align="center" justify="space-between">
|
||||
<Stack gap={2}>
|
||||
|
||||
@@ -28,7 +28,10 @@ import {
|
||||
} from "@tabler/icons-react";
|
||||
import type { User } from "generated/prisma";
|
||||
import { Outlet, useLocation, useNavigate } from "react-router-dom";
|
||||
import { default as clientRoute, default as clientRoutes } from "@/clientRoutes";
|
||||
import {
|
||||
default as clientRoute,
|
||||
default as clientRoutes,
|
||||
} from "@/clientRoutes";
|
||||
import apiFetch from "@/lib/apiFetch";
|
||||
|
||||
function Logout() {
|
||||
@@ -254,7 +257,9 @@ function NavigationDashboard() {
|
||||
</Flex>
|
||||
}
|
||||
description={item.description}
|
||||
onClick={() => navigate(clientRoutes[item.path as keyof typeof clientRoute])}
|
||||
onClick={() =>
|
||||
navigate(clientRoutes[item.path as keyof typeof clientRoute])
|
||||
}
|
||||
style={{
|
||||
backgroundColor: isActive(item.path as keyof typeof clientRoute)
|
||||
? "rgba(0,255,200,0.1)"
|
||||
|
||||
@@ -20,5 +20,20 @@ const AduanRoute = new Elysia({
|
||||
description: "create aduan",
|
||||
}
|
||||
})
|
||||
.post("/aduan-sampah", () => {
|
||||
return {
|
||||
success: true,
|
||||
data: ""
|
||||
}
|
||||
}, {
|
||||
body: t.Object({
|
||||
title: t.String(),
|
||||
description: t.String(),
|
||||
}),
|
||||
detail: {
|
||||
summary: "aduan sampah",
|
||||
description: "tool untuk membuat aduan sampah liar",
|
||||
}
|
||||
})
|
||||
|
||||
export default AduanRoute
|
||||
|
||||
Reference in New Issue
Block a user