From 3f04cf66981546c296c2eb3ac92895643e6ee1a1 Mon Sep 17 00:00:00 2001 From: hanif salafi Date: Mon, 1 Dec 2025 11:49:58 +0700 Subject: [PATCH] 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 == "" ? ( +