From 3910a120107dc5af979afd08a38f84db98e19d19 Mon Sep 17 00:00:00 2001 From: Anang Yusman Date: Fri, 28 Nov 2025 20:01:58 +0800 Subject: [PATCH 01/14] update title performance polda,polres, hide agenda setting, menu setting --- .../admin/performance-polres/page.tsx | 2 +- .../contributor/report/components/columns.tsx | 21 +++- .../visualization/performance-polda.tsx | 6 +- .../visualization/performance-polres.tsx | 4 +- lib/menus.ts | 101 +++++++++--------- 5 files changed, 76 insertions(+), 58 deletions(-) diff --git a/app/[locale]/(protected)/admin/performance-polres/page.tsx b/app/[locale]/(protected)/admin/performance-polres/page.tsx index 79f22bce..350d81c3 100644 --- a/app/[locale]/(protected)/admin/performance-polres/page.tsx +++ b/app/[locale]/(protected)/admin/performance-polres/page.tsx @@ -5,7 +5,7 @@ export default function PerformancePolda() { return (
-

PERFORMANCE KUMULATIF PER POLRES

+ {/*

PERFORMANCE KUMULATIF PER POLRES

*/}
); diff --git a/app/[locale]/(protected)/contributor/report/components/columns.tsx b/app/[locale]/(protected)/contributor/report/components/columns.tsx index e8eea1f5..f205483a 100644 --- a/app/[locale]/(protected)/contributor/report/components/columns.tsx +++ b/app/[locale]/(protected)/contributor/report/components/columns.tsx @@ -73,7 +73,22 @@ const useTableColumns = ({ { accessorKey: "status", header: t("status", { defaultValue: "Status" }), - cell: ({ row }) => {row.getValue("status")}, + cell: ({ row }) => { + const version = Number(row.original.version); // pastikan number + + const isProcess = version === 0; + const status = isProcess ? "Proses" : "Selesai"; + + return ( + + {status} + + ); + }, }, { @@ -131,7 +146,9 @@ const useTableColumns = ({ const response = await downloadReport(id); console.log(response?.data); - const url = window.URL.createObjectURL(new Blob([response?.data], { type : "application/pdf"})); + const url = window.URL.createObjectURL( + new Blob([response?.data], { type: "application/pdf" }) + ); const link = document.createElement("a"); link.href = url; link.setAttribute("download", `report-${id}.pdf`); diff --git a/components/visualization/performance-polda.tsx b/components/visualization/performance-polda.tsx index a088360e..7e1dba5a 100644 --- a/components/visualization/performance-polda.tsx +++ b/components/visualization/performance-polda.tsx @@ -81,7 +81,7 @@ export default function PerformancePoldaViz() {

{levelName == "MABES POLRI" - ? "PERFORMANCE PER POLDA" + ? "PERFORMANCE PER POLDA/SATKER" : "PERFORMANCE POLRES"}

@@ -105,8 +105,8 @@ export default function PerformancePoldaViz() {

{isInternational[0] - ? "PUBLISH CONTENT PER POLDA" - : "PUBLISH KONTEN PER POLDA"} + ? "PUBLISH CONTENT PER POLDA/SATKER" + : "PUBLISH KONTEN PER POLDA/SATKER"}

diff --git a/components/visualization/performance-polres.tsx b/components/visualization/performance-polres.tsx index 523bb92c..15f9a135 100644 --- a/components/visualization/performance-polres.tsx +++ b/components/visualization/performance-polres.tsx @@ -59,7 +59,9 @@ export default function PerformancePolresViz() {

- {isInternational[0] ? "POLRES PERFORMANCE" : "POLFORMANCE POLRES"} + {isInternational[0] + ? "PUBLISH CONTENT PER POLICE REGENCY" + : "PUBLISH KONTEN PER POLRES"}

diff --git a/lib/menus.ts b/lib/menus.ts index 25b24f01..9c98c75e 100644 --- a/lib/menus.ts +++ b/lib/menus.ts @@ -2649,8 +2649,7 @@ export function getMenuList(pathname: string, t: any): Group[] { (Number(roleId) == 3 || Number(roleId) == 14 || Number(roleId) == 15) && Number(levelNumber) == 3 ) { - if (Number(userParentLevelId) != 761) - { + if (Number(userParentLevelId) != 761) { menusSelected = [ { groupLabel: t("apps"), @@ -4009,20 +4008,20 @@ export function getMenuList(pathname: string, t: any): Group[] { }, ], }, - { - groupLabel: "", - id: "agenda-setting", - menus: [ - { - id: "agenda-setting", - href: "/contributor/agenda-setting", - label: t("agenda-setting"), - active: pathname.includes("/agenda-setting"), - icon: "iconoir:journal-page", - submenus: [], - }, - ], - }, + // { + // groupLabel: "", + // id: "agenda-setting", + // menus: [ + // { + // id: "agenda-setting", + // href: "/contributor/agenda-setting", + // label: t("agenda-setting"), + // active: pathname.includes("/agenda-setting"), + // icon: "iconoir:journal-page", + // submenus: [], + // }, + // ], + // }, { groupLabel: "", id: "performance-polres", @@ -4119,41 +4118,41 @@ export function getMenuList(pathname: string, t: any): Group[] { icon: "heroicons:arrow-trending-up", children: [], }, - { - href: "/admin/settings/banner", - label: "Banner", - active: pathname === "/admin/settings/banner", - icon: "heroicons:arrow-trending-up", - children: [], - }, - { - href: "/admin/settings/feedback", - label: "Feedback", - active: pathname === "/admin/settings/feedback", - icon: "heroicons:arrow-trending-up", - children: [], - }, - { - href: "/admin/settings/faq", - label: "FAQ", - active: pathname === "/admin/settings/faq", - icon: "heroicons:arrow-trending-up", - children: [], - }, - { - href: "https://nat-mediahub.polri.go.id/", - label: "Mediahub 2022", - active: pathname === "/admin/settings/mediahub-2022", - icon: "heroicons:arrow-trending-up", - children: [], - }, - { - href: "/admin/settings/privacy", - label: t("privacy"), - active: pathname === "/admin/settings/privacy", - icon: "heroicons:arrow-trending-up", - children: [], - }, + // { + // href: "/admin/settings/banner", + // label: "Banner", + // active: pathname === "/admin/settings/banner", + // icon: "heroicons:arrow-trending-up", + // children: [], + // }, + // { + // href: "/admin/settings/feedback", + // label: "Feedback", + // active: pathname === "/admin/settings/feedback", + // icon: "heroicons:arrow-trending-up", + // children: [], + // }, + // { + // href: "/admin/settings/faq", + // label: "FAQ", + // active: pathname === "/admin/settings/faq", + // icon: "heroicons:arrow-trending-up", + // children: [], + // }, + // { + // href: "https://nat-mediahub.polri.go.id/", + // label: "Mediahub 2022", + // active: pathname === "/admin/settings/mediahub-2022", + // icon: "heroicons:arrow-trending-up", + // children: [], + // }, + // { + // href: "/admin/settings/privacy", + // label: t("privacy"), + // active: pathname === "/admin/settings/privacy", + // icon: "heroicons:arrow-trending-up", + // children: [], + // }, ], }, ], From 464e55484ec63ccb8069a0cfa3554fb0c4029665 Mon Sep 17 00:00:00 2001 From: hanif salafi Date: Sat, 29 Nov 2025 02:58:18 +0700 Subject: [PATCH 02/14] fix: update link and fixing some dashboard --- .../(protected)/dashboard/executive-data/page.tsx | 8 ++++---- .../(protected)/dashboard/executive/page.tsx | 12 ++++++------ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/app/[locale]/(protected)/dashboard/executive-data/page.tsx b/app/[locale]/(protected)/dashboard/executive-data/page.tsx index 53f6672c..50471119 100644 --- a/app/[locale]/(protected)/dashboard/executive-data/page.tsx +++ b/app/[locale]/(protected)/dashboard/executive-data/page.tsx @@ -53,7 +53,7 @@ export default function ExecutiveDataDashboard() { : levelNumber === "2" ? `views/2025_10_MediaHUB-Viz-POLDA_Rev200/db-by-polda-publish-konten?provinsi-polda=${provState}&` : levelNumber === "3" - ? `views/2025_10_MediaHUB-Viz-POLDA_Rev200/db-satker?provinsi-polda=${provState}&` + ? `views/2025_10_MediaHUB-Viz-POLDA_Rev200/db-satker?satker-selected=${state}&` : ""; const view2 = @@ -83,7 +83,7 @@ export default function ExecutiveDataDashboard() { : levelNumber === "2" ? `views/2025_10_MediaHUB-Viz-POLDA_Rev200/db-by-polda-cat?provinsi-polda=${provState}&` : levelNumber === "3" - ? `views/2025_10_MediaHUB-Viz-POLDA_Rev200/db-satker-kategori?provinsi-polda=${provState}&` + ? `views/2025_10_MediaHUB-Viz-POLDA_Rev200/db-satker-kategori?satker-selected=${state}&` : ""; const view4 = @@ -110,7 +110,7 @@ export default function ExecutiveDataDashboard() { : levelNumber === "2" ? `views/2025_10_MediaHUB-Viz-POLDA_Rev200/db-published-produksi-executive?provinsi-polda=${provState}&` : levelNumber === "3" - ? `views/2025_10_MediaHUB-Viz-POLDA_Rev200/db-top-satker?provinsi-polda=${provState}&` + ? `views/2025_10_MediaHUB-Viz-POLDA_Rev200/db-top-satker?satker-selected=${state}&` : ""; // const view6 = @@ -128,7 +128,7 @@ export default function ExecutiveDataDashboard() { : levelNumber === "2" ? `views/2025_10_MediaHUB-Viz-POLDA_Rev200/db-heatmap-polda?provinsi-polda=${provState}&` : levelNumber === "3" - ? `views/2025_10_MediaHUB-Viz-POLDA_Rev200/db-hm-satker?provinsi-polda=${provState}&` + ? `views/2025_10_MediaHUB-Viz-POLDA_Rev200/db-hm-satker?satker-selected=${state}&` : ""; // const view7 = diff --git a/app/[locale]/(protected)/dashboard/executive/page.tsx b/app/[locale]/(protected)/dashboard/executive/page.tsx index 98a01de4..e3dd5d38 100644 --- a/app/[locale]/(protected)/dashboard/executive/page.tsx +++ b/app/[locale]/(protected)/dashboard/executive/page.tsx @@ -62,7 +62,7 @@ export default function ExecutiveDashboard() { ? // `views/2023_04_MediaHUB-Viz-POLDA_Rev200/db-published-produksi-polda-executive?polda-selected=${state}&` `views/2025_10_MediaHUB-Viz-POLDA_Rev200/db-published-produksi-executive?provinsi-polda=${provState}&` : // `views/2023_04_MediaHUB-Viz-POLDA_Rev200/db-published-produksi-polda-executive?polda-selected=${state}&`; - `views/2025_10_MediaHUB-Viz-POLDA_Rev200/db-published-produksi-executive?provinsi-polda=${provState}&`; + `views/2025_10_MediaHUB-Viz-POLDA_Rev200/db-top-satker?satker-selected=${state}&`; const view3 = levelName == "MABES POLRI" @@ -75,7 +75,7 @@ export default function ExecutiveDashboard() { ? // `views/2023_04_MediaHUB-Viz-POLDA_Rev200/db-waktu-akses-pengguna-polda-executive?polda-selected=${state}&` `views/2025_10_MediaHUB-Viz-POLDA_Rev200/db-waktu-akses-pengguna-executive?provinsi-polda=${provState}` : // `views/2023_04_MediaHUB-Viz-POLDA_Rev200/db-waktu-akses-pengguna-polda-executive?polda-selected=${state}&`; - `views/2025_10_MediaHUB-Viz-POLDA_Rev200/db-waktu-akses-pengguna-executive?provinsi-polda=${provState}`; + `views/2025_10_MediaHUB-Viz-POLDA_Rev200/db-hm-satker?satker-selected=${state}`; const view4 = levelName == "MABES POLRI" @@ -86,9 +86,9 @@ export default function ExecutiveDashboard() { "views/2025_10_MediaHUB-Viz-POLDA_Rev200/db-konten-header?" : safeLevelName.includes("POLDA") ? // `views/2023_04_MediaHUB-Viz-POLDA_Rev200/db-content-interaction-polda?polda-selected=${state}&` - `/views/2025_10_MediaHUB-Viz-POLDA_Rev200/db-konten-header?provinsi-polda=${provState}&` + `views/2025_10_MediaHUB-Viz-POLDA_Rev200/db-konten-header?provinsi-polda=${provState}&` : // `views/2023_04_MediaHUB-Viz-POLDA_Rev200/db-content-interaction-polda?polda-selected=${state}&`; - `/views/2025_10_MediaHUB-Viz-POLDA_Rev200/db-konten-header?provinsi-polda=${provState}&`; + `views/2025_10_MediaHUB-Viz-POLDA_Rev200/db-satker?satker-selected=${state}&`; const view5 = levelName == "MABES POLRI" @@ -160,10 +160,10 @@ export default function ExecutiveDashboard() {
{/* ===================== POLDA ===================== */} - {(levelNumber === "1" || levelNumber === "2") && ( + {(levelNumber === "1" || levelNumber === "2" || levelNumber === "3") && (

- Publish Konten Polda + Publish Konten

{ticket1 == "" ? ( From 097e726cb8fdb2b56f5360fa329dffe7d73373d4 Mon Sep 17 00:00:00 2001 From: hanif salafi Date: Mon, 1 Dec 2025 02:04:36 +0700 Subject: [PATCH 03/14] fix : update dashboard url --- app/[locale]/(protected)/dashboard/executive-data/page.tsx | 2 +- app/[locale]/(protected)/dashboard/executive/page.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/[locale]/(protected)/dashboard/executive-data/page.tsx b/app/[locale]/(protected)/dashboard/executive-data/page.tsx index 50471119..a226f5f6 100644 --- a/app/[locale]/(protected)/dashboard/executive-data/page.tsx +++ b/app/[locale]/(protected)/dashboard/executive-data/page.tsx @@ -32,7 +32,7 @@ export default function ExecutiveDataDashboard() { const baseUrl = "https://db-mediahub.polri.go.id/"; const url = "https://db-mediahub.polri.go.id/trusted/"; - const safeLevelName = levelNumber ?? ""; + const safeLevelName = levelName ?? ""; // const view1 = // levelName == "MABES POLRI" diff --git a/app/[locale]/(protected)/dashboard/executive/page.tsx b/app/[locale]/(protected)/dashboard/executive/page.tsx index e3dd5d38..b5b30240 100644 --- a/app/[locale]/(protected)/dashboard/executive/page.tsx +++ b/app/[locale]/(protected)/dashboard/executive/page.tsx @@ -40,7 +40,7 @@ export default function ExecutiveDashboard() { const baseUrl = "https://db-mediahub.polri.go.id/"; const url = "https://db-mediahub.polri.go.id/trusted/"; - const safeLevelName = levelNumber ?? ""; + const safeLevelName = levelName ?? ""; const view1 = levelName == "MABES POLRI" From 60e9017ac1886418b7750836170ba9a1d613199b Mon Sep 17 00:00:00 2001 From: Anang Yusman Date: Mon, 1 Dec 2025 12:21:37 +0800 Subject: [PATCH 04/14] update --- messages/en.json | 2 +- messages/in.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/messages/en.json b/messages/en.json index 5926772d..d5536714 100644 --- a/messages/en.json +++ b/messages/en.json @@ -327,7 +327,7 @@ "sellers": "Sellers", "typography": "Typography", "colors": "Colors", - "performance-polda": "Performance Polda", + "performance-polda": "Performance Polda/Satker", "performance-polres": "Performance Polres", "performance-satker": "Performance Satker", "analysis": "Analysis", diff --git a/messages/in.json b/messages/in.json index 9caf08c1..ec7a6481 100644 --- a/messages/in.json +++ b/messages/in.json @@ -328,7 +328,7 @@ "sellers": "Sellers", "typography": "Typography", "colors": "Colors", - "performance-polda": "Performa Polda", + "performance-polda": "Performa Polda/Satker", "performance-polres": "Performa Polres", "performance-satker": "Performa Satker", "analysis": "Analisa", From 3f04cf66981546c296c2eb3ac92895643e6ee1a1 Mon Sep 17 00:00:00 2001 From: hanif salafi Date: Mon, 1 Dec 2025 11:49:58 +0700 Subject: [PATCH 05/14] feat: update fixing bugs dashboard --- .../admin/performance-satker/page.tsx | 1 - .../visualization/performance-polres.tsx | 50 ++++++++++++------- .../visualization/performance-satker.tsx | 16 ++---- lib/menus.ts | 4 +- 4 files changed, 37 insertions(+), 34 deletions(-) diff --git a/app/[locale]/(protected)/admin/performance-satker/page.tsx b/app/[locale]/(protected)/admin/performance-satker/page.tsx index 1296113c..fe4deddf 100644 --- a/app/[locale]/(protected)/admin/performance-satker/page.tsx +++ b/app/[locale]/(protected)/admin/performance-satker/page.tsx @@ -6,7 +6,6 @@ export default function PerformanceSatker() { return (
-

PERFORMANCE KUMULATIF PER SATKER

); diff --git a/components/visualization/performance-polres.tsx b/components/visualization/performance-polres.tsx index 15f9a135..7cb69b64 100644 --- a/components/visualization/performance-polres.tsx +++ b/components/visualization/performance-polres.tsx @@ -22,19 +22,17 @@ export default function PerformancePolresViz() { const baseUrl = "https://db-mediahub.polri.go.id/"; const url = "https://db-mediahub.polri.go.id/trusted/"; - const view1 = - levelName == "MABES POLRI" - ? isInternational[0] - ? "views/2023_04_MediaHUB-Viz_INTL_Rev202/db-konten-top10?" - : "views/2023_09_db-ranking-polda_rev100/db-ranking-13-polda?" - : `/views/2023_09_db-ranking-polres-by-polda_rev100/db-ranking-by-polda?polda-selected=${poldaState}&`; - + const view1 = `views/2025_10_MediaHUB-Viz-POLDA_Rev203/db-ranking-polda-satker?polda-selected=${poldaState}&`; + const view2 = `views/2023_09_db-ranking-polres-by-polda_rev100/db-ranking-by-polda?polda-selected=${poldaState}&`; const param = ":embed=yes&:toolbar=yes&:iframeSizedToWindow=true"; useEffect(() => { async function initState() { const response1 = await generateTicket(); setTicket1(response1?.data?.data); + + const response2 = await generateTicket(); + setTicket2(response2?.data?.data); } initState(); @@ -48,21 +46,10 @@ export default function PerformancePolresViz() { // Render if (!hasMounted) return null; - const handleInternational = (index: number, val: boolean) => { - const updatedIsInternational = [...isInternational]; - - updatedIsInternational[index] = val; - setIsInternational(updatedIsInternational); - }; - return (

- - {isInternational[0] - ? "PUBLISH CONTENT PER POLICE REGENCY" - : "PUBLISH KONTEN PER POLRES"} - + PERFORMANCE POLRES

{ticket1 == "" ? ( @@ -81,6 +68,31 @@ export default function PerformancePolresViz() { /> )}
+ +

+ + {isInternational[0] + ? "PUBLISH CONTENT PER POLICE REGENCY" + : "PUBLISH KONTEN PER POLRES"} + +

+
+ {ticket2 == "" ? ( +