upd: dashboard admin
Deskripsi: - tampilan profile;2A - tampilan list category pengaduan - tampilan list category pelayanan surat - tampilan list configurasi desa No Issues
This commit is contained in:
@@ -25,6 +25,7 @@ import ListPage from "./pages/scr/dashboard/pengaduan/list_page";
|
|||||||
import DetailPage from "./pages/scr/dashboard/pengaduan/detail_page";
|
import DetailPage from "./pages/scr/dashboard/pengaduan/detail_page";
|
||||||
import ApikeyPage from "./pages/scr/dashboard/apikey/apikey_page";
|
import ApikeyPage from "./pages/scr/dashboard/apikey/apikey_page";
|
||||||
import DashboardLayout from "./pages/scr/dashboard/dashboard_layout";
|
import DashboardLayout from "./pages/scr/dashboard/dashboard_layout";
|
||||||
|
import DetailSettingPage from "./pages/scr/dashboard/setting/detail_setting_page";
|
||||||
import ScrLayout from "./pages/scr/scr_layout";
|
import ScrLayout from "./pages/scr/scr_layout";
|
||||||
import DirPage from "./pages/dir/dir_page";
|
import DirPage from "./pages/dir/dir_page";
|
||||||
import NotFound from "./pages/NotFound";
|
import NotFound from "./pages/NotFound";
|
||||||
@@ -126,6 +127,10 @@ export default function AppRoutes() {
|
|||||||
path="/scr/dashboard/apikey/apikey"
|
path="/scr/dashboard/apikey/apikey"
|
||||||
element={<ApikeyPage />}
|
element={<ApikeyPage />}
|
||||||
/>
|
/>
|
||||||
|
<Route
|
||||||
|
path="/scr/dashboard/setting/detail-setting"
|
||||||
|
element={<DetailSettingPage />}
|
||||||
|
/>
|
||||||
</Route>
|
</Route>
|
||||||
</Route>
|
</Route>
|
||||||
<Route path="/dir/dir" element={<DirPage />} />
|
<Route path="/dir/dir" element={<DirPage />} />
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ const clientRoutes = {
|
|||||||
"/scr/dashboard/pengaduan/list": "/scr/dashboard/pengaduan/list",
|
"/scr/dashboard/pengaduan/list": "/scr/dashboard/pengaduan/list",
|
||||||
"/scr/dashboard/pengaduan/detail": "/scr/dashboard/pengaduan/detail",
|
"/scr/dashboard/pengaduan/detail": "/scr/dashboard/pengaduan/detail",
|
||||||
"/scr/dashboard/apikey/apikey": "/scr/dashboard/apikey/apikey",
|
"/scr/dashboard/apikey/apikey": "/scr/dashboard/apikey/apikey",
|
||||||
|
"/scr/dashboard/setting/detail-setting": "/scr/dashboard/setting/detail-setting",
|
||||||
"/dir/dir": "/dir/dir",
|
"/dir/dir": "/dir/dir",
|
||||||
"/*": "/*"
|
"/*": "/*"
|
||||||
} as const;
|
} as const;
|
||||||
|
|||||||
@@ -242,7 +242,7 @@ function NavigationDashboard() {
|
|||||||
description: "Manage warga",
|
description: "Manage warga",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/scr/dashboard/setting",
|
path: "/scr/dashboard/setting/detail-setting",
|
||||||
icon: <IconSettings size={20} />,
|
icon: <IconSettings size={20} />,
|
||||||
label: "Setting",
|
label: "Setting",
|
||||||
description:
|
description:
|
||||||
|
|||||||
150
src/pages/scr/dashboard/setting/detail_setting_page.tsx
Normal file
150
src/pages/scr/dashboard/setting/detail_setting_page.tsx
Normal file
@@ -0,0 +1,150 @@
|
|||||||
|
import { Button, Card, Container, Divider, Flex, Grid, Group, Input, NavLink, Stack, Table, Title } from "@mantine/core";
|
||||||
|
import { IconCircleOff, IconGauge, IconHome2 } from "@tabler/icons-react";
|
||||||
|
import { useLocation } from "react-router-dom";
|
||||||
|
|
||||||
|
export default function DetailSettingPage() {
|
||||||
|
const { search } = useLocation();
|
||||||
|
const query = new URLSearchParams(search);
|
||||||
|
const type = query.get("type");
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Container size="xl" py="xl" w={"100%"}>
|
||||||
|
<Grid>
|
||||||
|
<Grid.Col span={3}>
|
||||||
|
<Card
|
||||||
|
radius="md"
|
||||||
|
p="lg"
|
||||||
|
withBorder
|
||||||
|
style={{
|
||||||
|
background:
|
||||||
|
"linear-gradient(145deg, rgba(25,25,25,0.95), rgba(45,45,45,0.85))",
|
||||||
|
borderColor: "rgba(100,100,100,0.2)",
|
||||||
|
boxShadow: "0 0 20px rgba(0,255,200,0.08)",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<NavLink
|
||||||
|
href={`?type=profile`}
|
||||||
|
label="Profile"
|
||||||
|
leftSection={<IconHome2 size={16} stroke={1.5} />}
|
||||||
|
active={type === "profile" || !type}
|
||||||
|
/>
|
||||||
|
<NavLink
|
||||||
|
href={`?type=cat-pengaduan`}
|
||||||
|
label="Kategori Pengaduan"
|
||||||
|
leftSection={<IconGauge size={16} stroke={1.5} />}
|
||||||
|
active={type === "cat-pengaduan"}
|
||||||
|
/>
|
||||||
|
<NavLink
|
||||||
|
href={`?type=cat-pelayanan`}
|
||||||
|
label="Kategori Pelayanan Surat"
|
||||||
|
leftSection={<IconCircleOff size={16} stroke={1.5} />}
|
||||||
|
active={type === "cat-pelayanan"}
|
||||||
|
/>
|
||||||
|
<NavLink
|
||||||
|
href={`?type=desa`}
|
||||||
|
label="Desa"
|
||||||
|
leftSection={<IconCircleOff size={16} stroke={1.5} />}
|
||||||
|
active={type === "desa"}
|
||||||
|
/>
|
||||||
|
</Card>
|
||||||
|
</Grid.Col>
|
||||||
|
<Grid.Col span={9}>
|
||||||
|
<Card
|
||||||
|
radius="md"
|
||||||
|
p="lg"
|
||||||
|
withBorder
|
||||||
|
style={{
|
||||||
|
background:
|
||||||
|
"linear-gradient(145deg, rgba(25,25,25,0.95), rgba(45,45,45,0.85))",
|
||||||
|
borderColor: "rgba(100,100,100,0.2)",
|
||||||
|
boxShadow: "0 0 20px rgba(0,255,200,0.08)",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{type === "cat-pengaduan"
|
||||||
|
? <KategoriPengaduanPage />
|
||||||
|
: type === "cat-pelayanan"
|
||||||
|
? <KategoriPengaduanPage />
|
||||||
|
: type === "desa"
|
||||||
|
? <KategoriPengaduanPage />
|
||||||
|
: <ProfilePage />}
|
||||||
|
</Card>
|
||||||
|
</Grid.Col>
|
||||||
|
</Grid>
|
||||||
|
</Container>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
function ProfilePage() {
|
||||||
|
return (
|
||||||
|
<Stack gap={"md"}>
|
||||||
|
<Flex align="center" justify="space-between">
|
||||||
|
<Title order={4} c="gray.2">
|
||||||
|
Profile Pengguna
|
||||||
|
</Title>
|
||||||
|
<Button variant="light">Edit</Button>
|
||||||
|
</Flex>
|
||||||
|
<Divider my={0} />
|
||||||
|
<Stack gap={"md"}>
|
||||||
|
<Group gap="xl" grow>
|
||||||
|
<Input.Wrapper label="Nama" description="" error="">
|
||||||
|
<Input value={"Amalia Dwi Yustiani"} readOnly />
|
||||||
|
</Input.Wrapper>
|
||||||
|
<Input.Wrapper label="Phone" description="" error="">
|
||||||
|
<Input value={"08123456789"} readOnly />
|
||||||
|
</Input.Wrapper>
|
||||||
|
</Group>
|
||||||
|
<Group gap="xl" grow>
|
||||||
|
<Input.Wrapper label="Email" description="" error="">
|
||||||
|
<Input value={"amaliadwiyustiani@gmail.com"} readOnly />
|
||||||
|
</Input.Wrapper>
|
||||||
|
<Input.Wrapper label="Role" description="" error="">
|
||||||
|
<Input value={"Admin"} readOnly />
|
||||||
|
</Input.Wrapper>
|
||||||
|
</Group>
|
||||||
|
</Stack>
|
||||||
|
</Stack>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
function KategoriPengaduanPage() {
|
||||||
|
const elements = [
|
||||||
|
{ position: 6, mass: 12.011, symbol: "C", name: "Carbon" },
|
||||||
|
{ position: 7, mass: 14.007, symbol: "N", name: "Nitrogen" },
|
||||||
|
{ position: 39, mass: 88.906, symbol: "Y", name: "Yttrium" },
|
||||||
|
{ position: 56, mass: 137.33, symbol: "Ba", name: "Barium" },
|
||||||
|
{ position: 58, mass: 140.12, symbol: "Ce", name: "Cerium" },
|
||||||
|
];
|
||||||
|
|
||||||
|
const rows = elements.map((element) => (
|
||||||
|
<Table.Tr key={element.name}>
|
||||||
|
<Table.Td>{element.position}</Table.Td>
|
||||||
|
<Table.Td>{element.name}</Table.Td>
|
||||||
|
<Table.Td>{element.symbol}</Table.Td>
|
||||||
|
<Table.Td>{element.mass}</Table.Td>
|
||||||
|
</Table.Tr>
|
||||||
|
));
|
||||||
|
return (
|
||||||
|
<Stack gap={"md"}>
|
||||||
|
<Flex align="center" justify="space-between">
|
||||||
|
<Title order={4} c="gray.2">
|
||||||
|
Kategori Pengaduan
|
||||||
|
</Title>
|
||||||
|
<Button variant="light">Tambah</Button>
|
||||||
|
</Flex>
|
||||||
|
<Divider my={0} />
|
||||||
|
<Stack gap={"md"}>
|
||||||
|
<Table>
|
||||||
|
<Table.Thead>
|
||||||
|
<Table.Tr>
|
||||||
|
<Table.Th>Tanggal</Table.Th>
|
||||||
|
<Table.Th>Deskripsi</Table.Th>
|
||||||
|
<Table.Th>Status</Table.Th>
|
||||||
|
<Table.Th>User</Table.Th>
|
||||||
|
</Table.Tr>
|
||||||
|
</Table.Thead>
|
||||||
|
<Table.Tbody>{rows}</Table.Tbody>
|
||||||
|
</Table>
|
||||||
|
</Stack>
|
||||||
|
</Stack>
|
||||||
|
)
|
||||||
|
}
|
||||||
@@ -11,14 +11,10 @@ import {
|
|||||||
Stack,
|
Stack,
|
||||||
Table,
|
Table,
|
||||||
Text,
|
Text,
|
||||||
Title
|
Title,
|
||||||
} from "@mantine/core";
|
} from "@mantine/core";
|
||||||
import { useShallowEffect } from "@mantine/hooks";
|
import { useShallowEffect } from "@mantine/hooks";
|
||||||
import {
|
import { IconMail, IconMapPin, IconPhone } from "@tabler/icons-react";
|
||||||
IconMail,
|
|
||||||
IconMapPin,
|
|
||||||
IconPhone
|
|
||||||
} from "@tabler/icons-react";
|
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import { useLocation } from "react-router-dom";
|
import { useLocation } from "react-router-dom";
|
||||||
import useSwr from "swr";
|
import useSwr from "swr";
|
||||||
@@ -163,12 +159,7 @@ function DetailWarga() {
|
|||||||
</Group>
|
</Group>
|
||||||
|
|
||||||
{/* Contact info */}
|
{/* Contact info */}
|
||||||
<Card
|
<Card radius="md" mt="md" p="md" withBorder={false}>
|
||||||
radius="md"
|
|
||||||
mt="md"
|
|
||||||
p="md"
|
|
||||||
withBorder={false}
|
|
||||||
>
|
|
||||||
<Stack gap="xs">
|
<Stack gap="xs">
|
||||||
<Group gap="xs">
|
<Group gap="xs">
|
||||||
<IconMail size={18} />
|
<IconMail size={18} />
|
||||||
|
|||||||
Reference in New Issue
Block a user