update title performance polda,polres, hide agenda setting, menu setting

This commit is contained in:
Anang Yusman 2025-11-28 20:01:58 +08:00
parent b151325bc0
commit 3910a12010
5 changed files with 76 additions and 58 deletions

View File

@ -5,7 +5,7 @@ export default function PerformancePolda() {
return ( return (
<div> <div>
<SiteBreadcrumb /> <SiteBreadcrumb />
<p className="font-semibold">PERFORMANCE KUMULATIF PER POLRES</p> {/* <p className="font-semibold">PERFORMANCE KUMULATIF PER POLRES</p> */}
<PerformancePolresViz /> <PerformancePolresViz />
</div> </div>
); );

View File

@ -73,7 +73,22 @@ const useTableColumns = ({
{ {
accessorKey: "status", accessorKey: "status",
header: t("status", { defaultValue: "Status" }), header: t("status", { defaultValue: "Status" }),
cell: ({ row }) => <span className="">{row.getValue("status")}</span>, cell: ({ row }) => {
const version = Number(row.original.version); // pastikan number
const isProcess = version === 0;
const status = isProcess ? "Proses" : "Selesai";
return (
<span
className={`px-2 py-1 rounded-full text-white text-xs font-semibold ${
isProcess ? "bg-yellow-500" : "bg-green-600"
}`}
>
{status}
</span>
);
},
}, },
{ {
@ -131,7 +146,9 @@ const useTableColumns = ({
const response = await downloadReport(id); const response = await downloadReport(id);
console.log(response?.data); 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"); const link = document.createElement("a");
link.href = url; link.href = url;
link.setAttribute("download", `report-${id}.pdf`); link.setAttribute("download", `report-${id}.pdf`);

View File

@ -81,7 +81,7 @@ export default function PerformancePoldaViz() {
<p className="text-lg"> <p className="text-lg">
<b> <b>
{levelName == "MABES POLRI" {levelName == "MABES POLRI"
? "PERFORMANCE PER POLDA" ? "PERFORMANCE PER POLDA/SATKER"
: "PERFORMANCE POLRES"} : "PERFORMANCE POLRES"}
</b> </b>
</p> </p>
@ -105,8 +105,8 @@ export default function PerformancePoldaViz() {
<p className="text-lg"> <p className="text-lg">
<b> <b>
{isInternational[0] {isInternational[0]
? "PUBLISH CONTENT PER POLDA" ? "PUBLISH CONTENT PER POLDA/SATKER"
: "PUBLISH KONTEN PER POLDA"} : "PUBLISH KONTEN PER POLDA/SATKER"}
</b> </b>
</p> </p>
<div className="my-5"> <div className="my-5">

View File

@ -59,7 +59,9 @@ export default function PerformancePolresViz() {
<div className="flex flex-col gap-2 bg-white rounded-lg p-3"> <div className="flex flex-col gap-2 bg-white rounded-lg p-3">
<p className="text-lg"> <p className="text-lg">
<b> <b>
{isInternational[0] ? "POLRES PERFORMANCE" : "POLFORMANCE POLRES"} {isInternational[0]
? "PUBLISH CONTENT PER POLICE REGENCY"
: "PUBLISH KONTEN PER POLRES"}
</b> </b>
</p> </p>
<div className="my-5"> <div className="my-5">

View File

@ -2649,8 +2649,7 @@ export function getMenuList(pathname: string, t: any): Group[] {
(Number(roleId) == 3 || Number(roleId) == 14 || Number(roleId) == 15) && (Number(roleId) == 3 || Number(roleId) == 14 || Number(roleId) == 15) &&
Number(levelNumber) == 3 Number(levelNumber) == 3
) { ) {
if (Number(userParentLevelId) != 761) if (Number(userParentLevelId) != 761) {
{
menusSelected = [ menusSelected = [
{ {
groupLabel: t("apps"), groupLabel: t("apps"),
@ -4009,20 +4008,20 @@ export function getMenuList(pathname: string, t: any): Group[] {
}, },
], ],
}, },
{ // {
groupLabel: "", // groupLabel: "",
id: "agenda-setting", // id: "agenda-setting",
menus: [ // menus: [
{ // {
id: "agenda-setting", // id: "agenda-setting",
href: "/contributor/agenda-setting", // href: "/contributor/agenda-setting",
label: t("agenda-setting"), // label: t("agenda-setting"),
active: pathname.includes("/agenda-setting"), // active: pathname.includes("/agenda-setting"),
icon: "iconoir:journal-page", // icon: "iconoir:journal-page",
submenus: [], // submenus: [],
}, // },
], // ],
}, // },
{ {
groupLabel: "", groupLabel: "",
id: "performance-polres", id: "performance-polres",
@ -4119,41 +4118,41 @@ export function getMenuList(pathname: string, t: any): Group[] {
icon: "heroicons:arrow-trending-up", icon: "heroicons:arrow-trending-up",
children: [], children: [],
}, },
{ // {
href: "/admin/settings/banner", // href: "/admin/settings/banner",
label: "Banner", // label: "Banner",
active: pathname === "/admin/settings/banner", // active: pathname === "/admin/settings/banner",
icon: "heroicons:arrow-trending-up", // icon: "heroicons:arrow-trending-up",
children: [], // children: [],
}, // },
{ // {
href: "/admin/settings/feedback", // href: "/admin/settings/feedback",
label: "Feedback", // label: "Feedback",
active: pathname === "/admin/settings/feedback", // active: pathname === "/admin/settings/feedback",
icon: "heroicons:arrow-trending-up", // icon: "heroicons:arrow-trending-up",
children: [], // children: [],
}, // },
{ // {
href: "/admin/settings/faq", // href: "/admin/settings/faq",
label: "FAQ", // label: "FAQ",
active: pathname === "/admin/settings/faq", // active: pathname === "/admin/settings/faq",
icon: "heroicons:arrow-trending-up", // icon: "heroicons:arrow-trending-up",
children: [], // children: [],
}, // },
{ // {
href: "https://nat-mediahub.polri.go.id/", // href: "https://nat-mediahub.polri.go.id/",
label: "Mediahub 2022", // label: "Mediahub 2022",
active: pathname === "/admin/settings/mediahub-2022", // active: pathname === "/admin/settings/mediahub-2022",
icon: "heroicons:arrow-trending-up", // icon: "heroicons:arrow-trending-up",
children: [], // children: [],
}, // },
{ // {
href: "/admin/settings/privacy", // href: "/admin/settings/privacy",
label: t("privacy"), // label: t("privacy"),
active: pathname === "/admin/settings/privacy", // active: pathname === "/admin/settings/privacy",
icon: "heroicons:arrow-trending-up", // icon: "heroicons:arrow-trending-up",
children: [], // children: [],
}, // },
], ],
}, },
], ],