From 80df579499b140d1ff608436df6640af34b32e7a Mon Sep 17 00:00:00 2001 From: amaliadwiy Date: Tue, 13 Jan 2026 15:10:08 +0800 Subject: [PATCH 1/3] qc: nomer 2 dan 4 Deskripsi: - button back - breadcrumb - active menu No Issues --- src/pages/scr/dashboard/dashboard_layout.tsx | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/src/pages/scr/dashboard/dashboard_layout.tsx b/src/pages/scr/dashboard/dashboard_layout.tsx index 6e90d54..046c5ce 100644 --- a/src/pages/scr/dashboard/dashboard_layout.tsx +++ b/src/pages/scr/dashboard/dashboard_layout.tsx @@ -73,7 +73,7 @@ export default function DashboardLayout() { ([]); - console.log(location) - useEffect(() => { async function fetchPermissions() { const { data } = await apiFetch.api.user.find.get(); @@ -292,14 +290,19 @@ function NavigationDashboard() { .map((item) => ( {item.label} - {(isActive(item.path as keyof typeof clientRoute) || + {( + isActive(item.path as keyof typeof clientRoute) || (location.pathname == "/scr/dashboard/pelayanan-surat/detail-pelayanan" && item.path == "/scr/dashboard/pelayanan-surat/list-pelayanan") || - (location.pathname == "/scr/dashboard/pengaduan/detail" && item.path == "/scr/dashboard/pengaduan/list") + (location.pathname == "/scr/dashboard/pengaduan/detail" && item.path == "/scr/dashboard/pengaduan/list") || + (location.pathname == "/scr/dashboard/warga/detail-warga" && item.path == "/scr/dashboard/warga/list-warga") ) && ( Date: Tue, 13 Jan 2026 15:38:29 +0800 Subject: [PATCH 2/3] fix: menu setting deskiripsi: - navigate - list length No Issues --- src/components/DesaSetting.tsx | 2 +- src/components/KategoriPelayananSurat.tsx | 8 +++----- src/pages/scr/dashboard/setting/detail_setting_page.tsx | 5 +++-- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/components/DesaSetting.tsx b/src/components/DesaSetting.tsx index b5361b1..39bf3f4 100644 --- a/src/components/DesaSetting.tsx +++ b/src/components/DesaSetting.tsx @@ -207,7 +207,7 @@ export default function DesaSetting({ - {list?.map((v: any) => ( + {list.length > 0 && list?.map((v: any) => ( {v.name} diff --git a/src/components/KategoriPelayananSurat.tsx b/src/components/KategoriPelayananSurat.tsx index f39ba3e..6c0b5a2 100644 --- a/src/components/KategoriPelayananSurat.tsx +++ b/src/components/KategoriPelayananSurat.tsx @@ -4,19 +4,17 @@ import { Button, Divider, Flex, - Grid, Group, - Input, List, Modal, Stack, Table, Text, Title, - Tooltip, + Tooltip } from "@mantine/core"; import { useDisclosure, useShallowEffect } from "@mantine/hooks"; -import { IconEdit, IconEye, IconPlus, IconTrash } from "@tabler/icons-react"; +import { IconEye, IconTrash } from "@tabler/icons-react"; import type { JsonValue } from "generated/prisma/runtime/library"; import { useState } from "react"; import useSWR from "swr"; @@ -625,7 +623,7 @@ export default function KategoriPelayananSurat({ - {list?.map((v: any) => ( + {list.length > 0 && list?.map((v: any) => ( {v.name} diff --git a/src/pages/scr/dashboard/setting/detail_setting_page.tsx b/src/pages/scr/dashboard/setting/detail_setting_page.tsx index b16fc8c..6434491 100644 --- a/src/pages/scr/dashboard/setting/detail_setting_page.tsx +++ b/src/pages/scr/dashboard/setting/detail_setting_page.tsx @@ -18,12 +18,13 @@ import { import type { JsonValue } from "generated/prisma/runtime/library"; import _ from "lodash"; import { useEffect, useState } from "react"; -import { useLocation } from "react-router-dom"; +import { useLocation, useNavigate } from "react-router-dom"; export default function DetailSettingPage() { const { search } = useLocation(); const query = new URLSearchParams(search); const type = query.get("type"); + const navigate = useNavigate(); const [permissions, setPermissions] = useState([]); const dataMenu = [ { title: "Dashboard", link: "/scr/dashboard/dashboard-home", active: false }, @@ -114,7 +115,7 @@ export default function DetailSettingPage() { .map((item) => ( {navigate("?type=" + item.path)}} label={item.label} leftSection={item.icon} active={ -- 2.49.1 From 9fed41cbe8c6372fbbddc765a03536e89f0a80ab Mon Sep 17 00:00:00 2001 From: amaliadwiy Date: Tue, 13 Jan 2026 17:10:59 +0800 Subject: [PATCH 3/3] fix: testing surat --- .../scr/dashboard/pelayanan-surat/detail_pelayanan_page.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/pages/scr/dashboard/pelayanan-surat/detail_pelayanan_page.tsx b/src/pages/scr/dashboard/pelayanan-surat/detail_pelayanan_page.tsx index 9970d37..c2a1e2d 100644 --- a/src/pages/scr/dashboard/pelayanan-surat/detail_pelayanan_page.tsx +++ b/src/pages/scr/dashboard/pelayanan-surat/detail_pelayanan_page.tsx @@ -275,6 +275,7 @@ function DetailDataPengajuan({ } useShallowEffect(() => { + console.log('jalan', viewImg) if (viewImg) { setOpenedPreviewFile(true); } @@ -374,6 +375,7 @@ function DetailDataPengajuan({ open={openedPreviewFile && !_.isEmpty(viewImg.file)} onClose={() => { setOpenedPreviewFile(false); + setViewImg({ file: "", folder: "" }) }} folder={viewImg.folder} fileName={viewImg.file} -- 2.49.1