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 (
<div>
<SiteBreadcrumb />
<p className="font-semibold">PERFORMANCE KUMULATIF PER POLRES</p>
{/* <p className="font-semibold">PERFORMANCE KUMULATIF PER POLRES</p> */}
<PerformancePolresViz />
</div>
);

View File

@ -73,7 +73,22 @@ const useTableColumns = ({
{
accessorKey: "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);
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`);

View File

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