Merge branch 'dev-sabda-v2' of https://gitlab.com/hanifsalafi/mediahub_redesign
This commit is contained in:
commit
76c4ed9238
|
|
@ -22,7 +22,9 @@ import withReactContent from "sweetalert2-react-content";
|
|||
import Swal from "sweetalert2";
|
||||
import { useTranslations } from "next-intl";
|
||||
|
||||
const useTableColumns = (activeTab: "ta" | "daily" | "special" |"mabes-koor") => {
|
||||
const useTableColumns = (
|
||||
activeTab: "ta" | "daily" | "special" | "mabes-koor",
|
||||
) => {
|
||||
const t = useTranslations("Table");
|
||||
const columns: ColumnDef<any>[] = [
|
||||
{
|
||||
|
|
@ -190,7 +192,11 @@ const useTableColumns = (activeTab: "ta" | "daily" | "special" |"mabes-koor") =>
|
|||
</Button>
|
||||
</DropdownMenuTrigger>
|
||||
<DropdownMenuContent className="p-0" align="end">
|
||||
{(roleId == 11 || roleId == 12 || roleId == 19) && (
|
||||
{/* {(roleId == 11 || roleId == 12 || roleId == 19) && ( */}
|
||||
{(roleId == 11 ||
|
||||
roleId == 12 ||
|
||||
roleId == 19 ||
|
||||
roleId == 3) && (
|
||||
<Link href={`/contributor/task-ta/detail/${row.original.id}`}>
|
||||
<DropdownMenuItem className="p-2 border-b text-default-700 group focus:bg-default focus:text-primary-foreground rounded-none">
|
||||
<Eye className="w-4 h-4 me-1.5" />
|
||||
|
|
@ -198,14 +204,15 @@ const useTableColumns = (activeTab: "ta" | "daily" | "special" |"mabes-koor") =>
|
|||
</DropdownMenuItem>
|
||||
</Link>
|
||||
)}
|
||||
{roleId == 11 && (
|
||||
<Link href={`/contributor/task-ta/update/${row.original.id}`}>
|
||||
<DropdownMenuItem className="p-2 border-b text-default-700 group focus:bg-default focus:text-primary-foreground rounded-none">
|
||||
<SquarePen className="w-4 h-4 me-1.5" />
|
||||
Edit
|
||||
</DropdownMenuItem>
|
||||
</Link>
|
||||
)}
|
||||
{roleId == 11 ||
|
||||
(roleId == 3 && (
|
||||
<Link href={`/contributor/task-ta/update/${row.original.id}`}>
|
||||
<DropdownMenuItem className="p-2 border-b text-default-700 group focus:bg-default focus:text-primary-foreground rounded-none">
|
||||
<SquarePen className="w-4 h-4 me-1.5" />
|
||||
Edit
|
||||
</DropdownMenuItem>
|
||||
</Link>
|
||||
))}
|
||||
{(roleId == 12 || roleId == 19) && (
|
||||
<Link
|
||||
href={`/contributor/task-ta/upload-task/${row.original.id}`}
|
||||
|
|
@ -216,15 +223,16 @@ const useTableColumns = (activeTab: "ta" | "daily" | "special" |"mabes-koor") =>
|
|||
</DropdownMenuItem>
|
||||
</Link>
|
||||
)}
|
||||
{roleId == 11 && (
|
||||
<DropdownMenuItem
|
||||
onClick={() => TaskDelete(row.original.id)}
|
||||
className="p-2 border-b text-destructive bg-destructive/30 focus:bg-destructive focus:text-destructive-foreground rounded-none"
|
||||
>
|
||||
<Trash2 className="w-4 h-4 me-1.5" />
|
||||
Delete
|
||||
</DropdownMenuItem>
|
||||
)}
|
||||
{roleId == 11 ||
|
||||
(roleId == 3 && (
|
||||
<DropdownMenuItem
|
||||
onClick={() => TaskDelete(row.original.id)}
|
||||
className="p-2 border-b text-destructive bg-destructive/30 focus:bg-destructive focus:text-destructive-foreground rounded-none"
|
||||
>
|
||||
<Trash2 className="w-4 h-4 me-1.5" />
|
||||
Delete
|
||||
</DropdownMenuItem>
|
||||
))}
|
||||
</DropdownMenuContent>
|
||||
</DropdownMenu>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -91,7 +91,8 @@ export default function TaskTaTable() {
|
|||
const [page, setPage] = React.useState(1);
|
||||
const [totalPage, setTotalPage] = React.useState(1);
|
||||
|
||||
const KOOR_KURATOR_USER_ID = "464";
|
||||
// const KOOR_KURATOR_USER_ID = "464";
|
||||
const KOOR_KURATOR_USER_IDS = ["464", "8258"];
|
||||
|
||||
// ✅ columns based on tab
|
||||
const columns = useTableColumns(activeTab);
|
||||
|
|
@ -135,7 +136,8 @@ export default function TaskTaTable() {
|
|||
activeTab,
|
||||
]);
|
||||
|
||||
const isKoorKurator = String(userId) === KOOR_KURATOR_USER_ID;
|
||||
// const isKoorKurator = String(userId) === KOOR_KURATOR_USER_ID;
|
||||
const isKoorKurator = KOOR_KURATOR_USER_IDS.includes(String(userId));
|
||||
|
||||
async function fetchData() {
|
||||
const formattedStartDate = dateFilter
|
||||
|
|
@ -208,7 +210,10 @@ export default function TaskTaTable() {
|
|||
if (activeTab === "ta") {
|
||||
contentData = contentData.filter((item: any) => {
|
||||
const assignedUsers = String(item?.assignedToUsers || "");
|
||||
return !assignedUsers.split(",").includes(KOOR_KURATOR_USER_ID);
|
||||
// return !assignedUsers.split(",").includes(KOOR_KURATOR_USER_ID);
|
||||
return !assignedUsers
|
||||
.split(",")
|
||||
.some((id) => KOOR_KURATOR_USER_IDS.includes(id.trim()));
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -253,7 +258,10 @@ export default function TaskTaTable() {
|
|||
|
||||
return (
|
||||
/MABES/i.test(createdByLevel) &&
|
||||
assignedUsers.split(",").includes(KOOR_KURATOR_USER_ID)
|
||||
// assignedUsers.split(",").includes(KOOR_KURATOR_USER_ID)
|
||||
assignedUsers
|
||||
.split(",")
|
||||
.some((id) => KOOR_KURATOR_USER_IDS.includes(id.trim()))
|
||||
);
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,7 +5,11 @@ import { Button } from "@/components/ui/button";
|
|||
import { UploadIcon } from "lucide-react";
|
||||
import SiteBreadcrumb from "@/components/site-breadcrumb";
|
||||
import { Link } from "@/components/navigation";
|
||||
import { checkAuthorization, checkLoginSession } from "@/lib/utils";
|
||||
import {
|
||||
checkAuthorization,
|
||||
checkLoginSession,
|
||||
getCookiesDecrypt,
|
||||
} from "@/lib/utils";
|
||||
import React, { useEffect } from "react";
|
||||
import { useTranslations } from "next-intl";
|
||||
|
||||
|
|
@ -13,12 +17,13 @@ const TaskPage = () => {
|
|||
const t = useTranslations("AnalyticsDashboard");
|
||||
useEffect(() => {
|
||||
function initState() {
|
||||
checkAuthorization("admin");
|
||||
checkAuthorization("admin");
|
||||
checkLoginSession();
|
||||
}
|
||||
|
||||
initState();
|
||||
}, []);
|
||||
const levelNumber = getCookiesDecrypt("ulne");
|
||||
|
||||
return (
|
||||
<div>
|
||||
|
|
@ -29,16 +34,28 @@ const TaskPage = () => {
|
|||
<CardTitle>
|
||||
<div className="flex flex-col sm:flex-row lg:flex-row lg:items-center">
|
||||
<div className="flex-1 text-xl font-medium text-default-900">
|
||||
{t("tabel", { defaultValue: "Tabel" })} {t("task", { defaultValue: "Task" })}
|
||||
{t("tabel", { defaultValue: "Tabel" })}{" "}
|
||||
{t("task", { defaultValue: "Task" })}
|
||||
</div>
|
||||
<div className="flex-none">
|
||||
{Number(levelNumber) !== 3 && (
|
||||
<div className="flex-none">
|
||||
<Link href="/contributor/task/create">
|
||||
<Button color="primary" className="text-white">
|
||||
<UploadIcon size={18} className="mr-2" />
|
||||
{t("create-task", { defaultValue: "Create Task" })}
|
||||
</Button>
|
||||
</Link>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* <div className="flex-none">
|
||||
<Link href={"/contributor/task/create"}>
|
||||
<Button color="primary" className="text-white">
|
||||
<UploadIcon size={18} className="mr-2" />
|
||||
{t("create-task", { defaultValue: "Create Task" })}
|
||||
</Button>
|
||||
</Link>
|
||||
</div>
|
||||
</div> */}
|
||||
</div>
|
||||
</CardTitle>
|
||||
</CardHeader>
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ import ReportTable from "../contributor/report/components/report-table";
|
|||
const DashboardPage = () => {
|
||||
const t = useTranslations("AnalyticsDashboard");
|
||||
const roleId = getCookiesDecrypt("urie");
|
||||
const levelNumber = Number(getCookiesDecrypt("ulne"));
|
||||
|
||||
return Number(roleId) == 2 || Number(roleId) == 11 || Number(roleId) == 12 ? (
|
||||
<div>
|
||||
|
|
@ -54,18 +55,23 @@ const DashboardPage = () => {
|
|||
>
|
||||
{t("schedule", { defaultValue: "Schedule" })}
|
||||
</TabsTrigger>
|
||||
<TabsTrigger
|
||||
value="indeks"
|
||||
className="data-[state=active]:bg-primary data-[state=active]:text-primary-foreground rounded-md px-6"
|
||||
>
|
||||
{t("indeks", { defaultValue: "Indeks" })}
|
||||
</TabsTrigger>
|
||||
<TabsTrigger
|
||||
value="report"
|
||||
className="data-[state=active]:bg-primary data-[state=active]:text-primary-foreground rounded-md px-6"
|
||||
>
|
||||
{t("report", { defaultValue: "Report" })}
|
||||
</TabsTrigger>
|
||||
{levelNumber !== 3 && (
|
||||
<>
|
||||
<TabsTrigger
|
||||
value="indeks"
|
||||
className="data-[state=active]:bg-primary data-[state=active]:text-primary-foreground rounded-md px-6"
|
||||
>
|
||||
{t("indeks", { defaultValue: "Indeks" })}
|
||||
</TabsTrigger>
|
||||
|
||||
<TabsTrigger
|
||||
value="report"
|
||||
className="data-[state=active]:bg-primary data-[state=active]:text-primary-foreground rounded-md px-6"
|
||||
>
|
||||
{t("report", { defaultValue: "Report" })}
|
||||
</TabsTrigger>
|
||||
</>
|
||||
)}
|
||||
</TabsList>
|
||||
</Card>
|
||||
<TabsContent value="routine-task">
|
||||
|
|
@ -75,18 +81,24 @@ const DashboardPage = () => {
|
|||
<CardContent className="p-4">
|
||||
<div className="grid md:grid-cols-3 gap-4">
|
||||
<StatisticsBlock
|
||||
title={t("Hasil_unggah_disetujui_hari_ini", { defaultValue: "Hasil Unggah Disetujui Hari Ini" })}
|
||||
title={t("Hasil_unggah_disetujui_hari_ini", {
|
||||
defaultValue: "Hasil Unggah Disetujui Hari Ini",
|
||||
})}
|
||||
total="3,564"
|
||||
className="bg-info/10 border-none shadow-none"
|
||||
/>
|
||||
<StatisticsBlock
|
||||
title={t("Hasil_unggah_direvisi_hari_ini", { defaultValue: "Hasil Unggah Direvisi Hari Ini" })}
|
||||
title={t("Hasil_unggah_direvisi_hari_ini", {
|
||||
defaultValue: "Hasil Unggah Direvisi Hari Ini",
|
||||
})}
|
||||
total="564"
|
||||
className="bg-warning/10 border-none shadow-none"
|
||||
chartColor="#FB8F65"
|
||||
/>
|
||||
<StatisticsBlock
|
||||
title={t("Hasil_unggah_ditolak_hari_ini", { defaultValue: "Hasil Unggah Ditolak Hari Ini" })}
|
||||
title={t("Hasil_unggah_ditolak_hari_ini", {
|
||||
defaultValue: "Hasil Unggah Ditolak Hari Ini",
|
||||
})}
|
||||
total="+5.0%"
|
||||
className="bg-primary/10 border-none shadow-none"
|
||||
chartColor="#2563eb"
|
||||
|
|
@ -101,7 +113,9 @@ const DashboardPage = () => {
|
|||
<Card>
|
||||
<CardHeader className="flex flex-row items-center">
|
||||
<CardTitle className="flex-1 text-lg">
|
||||
{t("Total-Content-Production", { defaultValue: "Total Content Production" })}
|
||||
{t("Total-Content-Production", {
|
||||
defaultValue: "Total Content Production",
|
||||
})}
|
||||
</CardTitle>
|
||||
<DashboardDropdown />
|
||||
</CardHeader>
|
||||
|
|
@ -113,7 +127,9 @@ const DashboardPage = () => {
|
|||
<div className="lg:col-span-8 col-span-12">
|
||||
<Card>
|
||||
<CardHeader className="flex flex-row items-center">
|
||||
<CardTitle className="flex-1">{t("tabel", { defaultValue: "Tabel" })}</CardTitle>
|
||||
<CardTitle className="flex-1">
|
||||
{t("tabel", { defaultValue: "Tabel" })}
|
||||
</CardTitle>
|
||||
{/* <DashboardDropdown /> */}
|
||||
</CardHeader>
|
||||
<CardContent className="p-0">
|
||||
|
|
@ -132,14 +148,26 @@ const DashboardPage = () => {
|
|||
<div className="flex-1 text-xl font-medium text-default-900">
|
||||
Tabel Penugasan
|
||||
</div>
|
||||
<div>
|
||||
{Number(levelNumber) !== 3 && (
|
||||
<div className="flex-none">
|
||||
<Link href="/contributor/task/create">
|
||||
<Button color="primary" className="text-white">
|
||||
<UploadIcon size={18} className="mr-2" />
|
||||
{t("create-task", {
|
||||
defaultValue: "Create Task",
|
||||
})}
|
||||
</Button>
|
||||
</Link>
|
||||
</div>
|
||||
)}
|
||||
{/* <div>
|
||||
<Link href={"/contributor/task/create"}>
|
||||
<Button color="primary" className="text-white">
|
||||
<UploadIcon />
|
||||
Buat Penugasan
|
||||
</Button>
|
||||
</Link>
|
||||
</div>
|
||||
</div> */}
|
||||
</div>
|
||||
</Card>
|
||||
<CardContent className="p-0 mt-3">
|
||||
|
|
|
|||
|
|
@ -13,6 +13,8 @@ import { useTranslations } from "next-intl";
|
|||
const ContestPage = () => {
|
||||
const [userLevelId, setUserLevelId] = useState<any>(null);
|
||||
const t = useTranslations("Contest");
|
||||
const levelNumber = Number(getCookiesDecrypt("ulne"));
|
||||
|
||||
useEffect(() => {
|
||||
setUserLevelId(Number(getCookiesDecrypt("ulie")));
|
||||
}, []);
|
||||
|
|
@ -25,18 +27,36 @@ const ContestPage = () => {
|
|||
<CardTitle>
|
||||
<div className="flex items-center">
|
||||
<div className="flex-1 text-xl font-medium text-default-900">
|
||||
{t("table", { defaultValue: "Table" })} {t("contest", { defaultValue: "Contest" })}
|
||||
{t("table", { defaultValue: "Table" })}{" "}
|
||||
{t("contest", { defaultValue: "Contest" })}
|
||||
</div>
|
||||
{userLevelId !== 776 && userLevelId !== null && (
|
||||
{userLevelId !== 776 &&
|
||||
userLevelId !== null &&
|
||||
levelNumber !== 3 && (
|
||||
<div className="flex-none">
|
||||
<Link href={"/shared/contest/create"}>
|
||||
<Button color="primary" className="text-white">
|
||||
<UploadIcon size={18} className="mr-2" />
|
||||
{t("create-contest", {
|
||||
defaultValue: "Create Contest",
|
||||
})}
|
||||
</Button>
|
||||
</Link>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* {userLevelId !== 776 && userLevelId !== null && (
|
||||
<div className="flex-none">
|
||||
<Link href={"/shared/contest/create"}>
|
||||
<Button color="primary" className="text-white">
|
||||
<UploadIcon size={18} className="mr-2" />
|
||||
{t("create-contest", { defaultValue: "Create Contest" })}
|
||||
{t("create-contest", {
|
||||
defaultValue: "Create Contest",
|
||||
})}
|
||||
</Button>
|
||||
</Link>
|
||||
</div>
|
||||
)}
|
||||
)} */}
|
||||
</div>
|
||||
</CardTitle>
|
||||
</CardHeader>
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ const CustomEditor = dynamic(
|
|||
() => {
|
||||
return import("@/components/editor/custom-editor");
|
||||
},
|
||||
{ ssr: false }
|
||||
{ ssr: false },
|
||||
);
|
||||
|
||||
export default function FormTaskTa() {
|
||||
|
|
@ -136,7 +136,7 @@ export default function FormTaskTa() {
|
|||
const [userLevels, setUserLevels] = useState<any>();
|
||||
const [userCompetencies, setUserCompetencies] = useState<any[]>([]);
|
||||
const [selectedCompetencies, setSelectedCompetencies] = useState<Set<number>>(
|
||||
new Set()
|
||||
new Set(),
|
||||
);
|
||||
const [listExpert, setListExpert] = useState<any[]>([]);
|
||||
const [checkedLevels, setCheckedLevels] = useState<Set<number>>(new Set());
|
||||
|
|
@ -245,7 +245,7 @@ export default function FormTaskTa() {
|
|||
}
|
||||
|
||||
const uniqueExperts = Array.from(
|
||||
new Map(allExperts.map((e) => [e.id, e])).values()
|
||||
new Map(allExperts.map((e) => [e.id, e])).values(),
|
||||
);
|
||||
|
||||
setListExpert(uniqueExperts);
|
||||
|
|
@ -449,7 +449,7 @@ export default function FormTaskTa() {
|
|||
const requestData = {
|
||||
...data,
|
||||
// assignedToUsers: isMabesApprover ? "464" : handleExpertChange(),
|
||||
assignedToUsers: isMabesApprover ? "464" : handleExpertChange(),
|
||||
assignedToUsers: isMabesApprover ? "464,8258" : handleExpertChange(),
|
||||
assignmentType: taskType,
|
||||
assignmentTypeId: type,
|
||||
expertCompetencies: Array.from(selectedCompetencies).join(","),
|
||||
|
|
@ -467,19 +467,19 @@ export default function FormTaskTa() {
|
|||
const uploads: Promise<any>[] = [];
|
||||
|
||||
imageFiles.forEach((file, i) =>
|
||||
uploads.push(uploadResumableFile(i, assignmentId, file, "1", "0"))
|
||||
uploads.push(uploadResumableFile(i, assignmentId, file, "1", "0")),
|
||||
);
|
||||
|
||||
videoFiles.forEach((file, i) =>
|
||||
uploads.push(uploadResumableFile(i, assignmentId, file, "2", "0"))
|
||||
uploads.push(uploadResumableFile(i, assignmentId, file, "2", "0")),
|
||||
);
|
||||
|
||||
textFiles.forEach((file, i) =>
|
||||
uploads.push(uploadResumableFile(i, assignmentId, file, "3", "0"))
|
||||
uploads.push(uploadResumableFile(i, assignmentId, file, "3", "0")),
|
||||
);
|
||||
|
||||
audioFiles.forEach((file, i) =>
|
||||
uploads.push(uploadResumableFile(i, assignmentId, file, "4", "0"))
|
||||
uploads.push(uploadResumableFile(i, assignmentId, file, "4", "0")),
|
||||
);
|
||||
|
||||
await Promise.all(uploads);
|
||||
|
|
@ -557,7 +557,7 @@ export default function FormTaskTa() {
|
|||
// Convert Blob to File and add preview
|
||||
const fileWithPreview: FileWithPreview = Object.assign(
|
||||
new File([blob], "voiceNote.webm", { type: "audio/webm" }),
|
||||
{ preview: url }
|
||||
{ preview: url },
|
||||
);
|
||||
|
||||
// Add to state
|
||||
|
|
@ -687,7 +687,7 @@ export default function FormTaskTa() {
|
|||
id: string,
|
||||
file: File,
|
||||
fileTypeId: string,
|
||||
duration: string
|
||||
duration: string,
|
||||
) {
|
||||
return new Promise(async (resolve, reject) => {
|
||||
try {
|
||||
|
|
@ -829,7 +829,7 @@ export default function FormTaskTa() {
|
|||
variant={"outline"}
|
||||
className={cn(
|
||||
"w-[280px] lg:w-[250px] justify-start text-left font-normal border border-slate-300 px-0 md:px-0 lg:px-4",
|
||||
!date && "text-muted-foreground"
|
||||
!date && "text-muted-foreground",
|
||||
)}
|
||||
>
|
||||
<CalendarIcon size={15} className="mr-3" />
|
||||
|
|
@ -928,7 +928,7 @@ export default function FormTaskTa() {
|
|||
<div className="flex flex-wrap gap-2">
|
||||
{Array.from(checkedLevels).map((expertId) => {
|
||||
const expert = listExpert?.find(
|
||||
(exp: any) => exp.id === expertId
|
||||
(exp: any) => exp.id === expertId,
|
||||
);
|
||||
return expert ? (
|
||||
<div
|
||||
|
|
|
|||
213
lib/menus.ts
213
lib/menus.ts
|
|
@ -168,7 +168,7 @@ export function getMenuList(pathname: string, t: any): Group[] {
|
|||
icon: "heroicons:shopping-cart",
|
||||
children: [],
|
||||
},
|
||||
{
|
||||
{
|
||||
href: "/contributor/task-ta",
|
||||
label: "penugasan TA",
|
||||
active: pathname.includes("/contributor/task-ta"),
|
||||
|
|
@ -2429,7 +2429,10 @@ export function getMenuList(pathname: string, t: any): Group[] {
|
|||
},
|
||||
];
|
||||
}
|
||||
} else if (Number(roleId) == 4 && Number(levelNumber) == 3) {
|
||||
} else if (
|
||||
Number(roleId) == 4 ||
|
||||
(Number(roleId) == 3 && Number(levelNumber) == 3)
|
||||
) {
|
||||
menusSelected = [
|
||||
{
|
||||
groupLabel: t("apps"),
|
||||
|
|
@ -2516,35 +2519,35 @@ export function getMenuList(pathname: string, t: any): Group[] {
|
|||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
groupLabel: "",
|
||||
id: "planning",
|
||||
menus: [
|
||||
{
|
||||
id: "planning",
|
||||
href: "/contributor/planning",
|
||||
label: t("planning"),
|
||||
active: pathname.includes("/planning"),
|
||||
icon: "pajamas:planning",
|
||||
submenus: [
|
||||
{
|
||||
href: "/contributor/planning/mediahub",
|
||||
label: "mediaHub",
|
||||
active: pathname.includes("/planning/mediahub"),
|
||||
icon: "heroicons:arrow-trending-up",
|
||||
children: [],
|
||||
},
|
||||
{
|
||||
href: "/contributor/planning/medsos-mediahub",
|
||||
label: "medsos mediahub",
|
||||
active: pathname.includes("/planning/medsos-mediahub"),
|
||||
icon: "heroicons:shopping-cart",
|
||||
children: [],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
// {
|
||||
// groupLabel: "",
|
||||
// id: "planning",
|
||||
// menus: [
|
||||
// {
|
||||
// id: "planning",
|
||||
// href: "/contributor/planning",
|
||||
// label: t("planning"),
|
||||
// active: pathname.includes("/planning"),
|
||||
// icon: "pajamas:planning",
|
||||
// submenus: [
|
||||
// {
|
||||
// href: "/contributor/planning/mediahub",
|
||||
// label: "mediaHub",
|
||||
// active: pathname.includes("/planning/mediahub"),
|
||||
// icon: "heroicons:arrow-trending-up",
|
||||
// children: [],
|
||||
// },
|
||||
// {
|
||||
// href: "/contributor/planning/medsos-mediahub",
|
||||
// label: "medsos mediahub",
|
||||
// active: pathname.includes("/planning/medsos-mediahub"),
|
||||
// icon: "heroicons:shopping-cart",
|
||||
// children: [],
|
||||
// },
|
||||
// ],
|
||||
// },
|
||||
// ],
|
||||
// },
|
||||
{
|
||||
groupLabel: "",
|
||||
id: "task",
|
||||
|
|
@ -2571,44 +2574,51 @@ export function getMenuList(pathname: string, t: any): Group[] {
|
|||
icon: "uil:schedule",
|
||||
submenus: [
|
||||
{
|
||||
href: "/contributor/schedule/press-conference",
|
||||
label: t("press-conference"),
|
||||
active: pathname.includes("/schedule/press-conference"),
|
||||
href: "/contributor/schedule/live-report",
|
||||
label: t("live-report"),
|
||||
active: pathname.includes("/schedule/live-report"),
|
||||
icon: "heroicons:arrow-trending-up",
|
||||
children: [],
|
||||
},
|
||||
{
|
||||
href: "/contributor/schedule/event",
|
||||
label: t("event"),
|
||||
active: pathname.includes("/schedule/event"),
|
||||
icon: "heroicons:shopping-cart",
|
||||
children: [],
|
||||
},
|
||||
{
|
||||
href: "/contributor/schedule/press-release",
|
||||
label: t("press-release"),
|
||||
active: pathname.includes("/schedule/press-release"),
|
||||
icon: "heroicons:shopping-cart",
|
||||
children: [],
|
||||
},
|
||||
// {
|
||||
// href: "/contributor/schedule/press-conference",
|
||||
// label: t("press-conference"),
|
||||
// active: pathname.includes("/schedule/press-conference"),
|
||||
// icon: "heroicons:arrow-trending-up",
|
||||
// children: [],
|
||||
// },
|
||||
// {
|
||||
// href: "/contributor/schedule/event",
|
||||
// label: t("event"),
|
||||
// active: pathname.includes("/schedule/event"),
|
||||
// icon: "heroicons:shopping-cart",
|
||||
// children: [],
|
||||
// },
|
||||
// {
|
||||
// href: "/contributor/schedule/press-release",
|
||||
// label: t("press-release"),
|
||||
// active: pathname.includes("/schedule/press-release"),
|
||||
// icon: "heroicons:shopping-cart",
|
||||
// children: [],
|
||||
// },
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
groupLabel: "",
|
||||
id: "blog",
|
||||
menus: [
|
||||
{
|
||||
id: "blog",
|
||||
href: "/contributor/blog",
|
||||
label: t("blog"),
|
||||
active: pathname.includes("/blog"),
|
||||
icon: "fluent:clipboard-text-32-regular",
|
||||
submenus: [],
|
||||
},
|
||||
],
|
||||
},
|
||||
// {
|
||||
// groupLabel: "",
|
||||
// id: "blog",
|
||||
// menus: [
|
||||
// {
|
||||
// id: "blog",
|
||||
// href: "/contributor/blog",
|
||||
// label: t("blog"),
|
||||
// active: pathname.includes("/blog"),
|
||||
// icon: "fluent:clipboard-text-32-regular",
|
||||
// submenus: [],
|
||||
// },
|
||||
// ],
|
||||
// },
|
||||
{
|
||||
groupLabel: "",
|
||||
id: "curatedcontent",
|
||||
|
|
@ -2656,8 +2666,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"),
|
||||
|
|
@ -5216,7 +5225,7 @@ export function getHorizontalMenuList(pathname: string, t: any): Group[] {
|
|||
href: "/charts/appex-charts/charts-appex-area",
|
||||
label: t("areaCharts"),
|
||||
active: pathname.includes(
|
||||
"/charts/appex-charts/charts-appex-area"
|
||||
"/charts/appex-charts/charts-appex-area",
|
||||
),
|
||||
children: [],
|
||||
},
|
||||
|
|
@ -5224,7 +5233,7 @@ export function getHorizontalMenuList(pathname: string, t: any): Group[] {
|
|||
href: "/charts/appex-charts/charts-appex-bar",
|
||||
label: t("barCharts"),
|
||||
active: pathname.includes(
|
||||
"/charts/appex-charts/charts-appex-bar"
|
||||
"/charts/appex-charts/charts-appex-bar",
|
||||
),
|
||||
children: [],
|
||||
},
|
||||
|
|
@ -5232,7 +5241,7 @@ export function getHorizontalMenuList(pathname: string, t: any): Group[] {
|
|||
href: "/charts/appex-charts/charts-appex-boxplot",
|
||||
label: t("boxplotCharts"),
|
||||
active: pathname.includes(
|
||||
"/charts/appex-charts/charts-appex-boxplot"
|
||||
"/charts/appex-charts/charts-appex-boxplot",
|
||||
),
|
||||
children: [],
|
||||
},
|
||||
|
|
@ -5240,7 +5249,7 @@ export function getHorizontalMenuList(pathname: string, t: any): Group[] {
|
|||
href: "/charts/appex-charts/charts-appex-bubble",
|
||||
label: t("bubbleCharts"),
|
||||
active: pathname.includes(
|
||||
"/charts/appex-charts/charts-appex-bubble"
|
||||
"/charts/appex-charts/charts-appex-bubble",
|
||||
),
|
||||
children: [],
|
||||
},
|
||||
|
|
@ -5248,7 +5257,7 @@ export function getHorizontalMenuList(pathname: string, t: any): Group[] {
|
|||
href: "/charts/appex-charts/charts-appex-candlestick",
|
||||
label: t("candlestickCharts"),
|
||||
active: pathname.includes(
|
||||
"/charts/appex-charts/charts-appex-candlestick"
|
||||
"/charts/appex-charts/charts-appex-candlestick",
|
||||
),
|
||||
children: [],
|
||||
},
|
||||
|
|
@ -5256,7 +5265,7 @@ export function getHorizontalMenuList(pathname: string, t: any): Group[] {
|
|||
href: "/charts/appex-charts/charts-appex-column",
|
||||
label: t("columnCharts"),
|
||||
active: pathname.includes(
|
||||
"/charts/appex-charts/charts-appex-column"
|
||||
"/charts/appex-charts/charts-appex-column",
|
||||
),
|
||||
children: [],
|
||||
},
|
||||
|
|
@ -5264,7 +5273,7 @@ export function getHorizontalMenuList(pathname: string, t: any): Group[] {
|
|||
href: "/charts/appex-charts/charts-appex-combo",
|
||||
label: t("comboCharts"),
|
||||
active: pathname.includes(
|
||||
"/charts/appex-charts/charts-appex-combo"
|
||||
"/charts/appex-charts/charts-appex-combo",
|
||||
),
|
||||
children: [],
|
||||
},
|
||||
|
|
@ -5273,7 +5282,7 @@ export function getHorizontalMenuList(pathname: string, t: any): Group[] {
|
|||
href: "/charts/appex-charts/charts-appex-funnel",
|
||||
label: t("funnelCharts"),
|
||||
active: pathname.includes(
|
||||
"/charts/appex-charts/charts-appex-funnel"
|
||||
"/charts/appex-charts/charts-appex-funnel",
|
||||
),
|
||||
children: [],
|
||||
},
|
||||
|
|
@ -5281,7 +5290,7 @@ export function getHorizontalMenuList(pathname: string, t: any): Group[] {
|
|||
href: "/charts/appex-charts/charts-appex-heatmap",
|
||||
label: t("heatmapCharts"),
|
||||
active: pathname.includes(
|
||||
"/charts/appex-charts/charts-appex-heatmap"
|
||||
"/charts/appex-charts/charts-appex-heatmap",
|
||||
),
|
||||
children: [],
|
||||
},
|
||||
|
|
@ -5289,7 +5298,7 @@ export function getHorizontalMenuList(pathname: string, t: any): Group[] {
|
|||
href: "/charts/appex-charts/charts-appex-line",
|
||||
label: t("lineCharts"),
|
||||
active: pathname.includes(
|
||||
"/charts/appex-charts/charts-appex-line"
|
||||
"/charts/appex-charts/charts-appex-line",
|
||||
),
|
||||
children: [],
|
||||
},
|
||||
|
|
@ -5297,7 +5306,7 @@ export function getHorizontalMenuList(pathname: string, t: any): Group[] {
|
|||
href: "/charts/appex-charts/charts-appex-pie",
|
||||
label: t("pieCharts"),
|
||||
active: pathname.includes(
|
||||
"/charts/appex-charts/charts-appex-pie"
|
||||
"/charts/appex-charts/charts-appex-pie",
|
||||
),
|
||||
children: [],
|
||||
},
|
||||
|
|
@ -5305,7 +5314,7 @@ export function getHorizontalMenuList(pathname: string, t: any): Group[] {
|
|||
href: "/charts/appex-charts/charts-appex-polararea",
|
||||
label: t("ploarareaCharts"),
|
||||
active: pathname.includes(
|
||||
"/charts/appex-charts/charts-appex-polararea"
|
||||
"/charts/appex-charts/charts-appex-polararea",
|
||||
),
|
||||
children: [],
|
||||
},
|
||||
|
|
@ -5313,7 +5322,7 @@ export function getHorizontalMenuList(pathname: string, t: any): Group[] {
|
|||
href: "/charts/appex-charts/charts-appex-radar",
|
||||
label: t("radarCharts"),
|
||||
active: pathname.includes(
|
||||
"/charts/appex-charts/charts-appex-radar"
|
||||
"/charts/appex-charts/charts-appex-radar",
|
||||
),
|
||||
children: [],
|
||||
},
|
||||
|
|
@ -5321,7 +5330,7 @@ export function getHorizontalMenuList(pathname: string, t: any): Group[] {
|
|||
href: "/charts/appex-charts/charts-appex-radialbars",
|
||||
label: t("radialbarCharts"),
|
||||
active: pathname.includes(
|
||||
"/charts/appex-charts/charts-appex-radialbars"
|
||||
"/charts/appex-charts/charts-appex-radialbars",
|
||||
),
|
||||
children: [],
|
||||
},
|
||||
|
|
@ -5329,7 +5338,7 @@ export function getHorizontalMenuList(pathname: string, t: any): Group[] {
|
|||
href: "/charts/appex-charts/charts-appex-range",
|
||||
label: t("rangeCharts"),
|
||||
active: pathname.includes(
|
||||
"/charts/appex-charts/charts-appex-range"
|
||||
"/charts/appex-charts/charts-appex-range",
|
||||
),
|
||||
children: [],
|
||||
},
|
||||
|
|
@ -5337,7 +5346,7 @@ export function getHorizontalMenuList(pathname: string, t: any): Group[] {
|
|||
href: "/charts/appex-charts/charts-appex-scatter",
|
||||
label: t("scatterCharts"),
|
||||
active: pathname.includes(
|
||||
"/charts/appex-charts/charts-appex-scatter"
|
||||
"/charts/appex-charts/charts-appex-scatter",
|
||||
),
|
||||
children: [],
|
||||
},
|
||||
|
|
@ -5345,7 +5354,7 @@ export function getHorizontalMenuList(pathname: string, t: any): Group[] {
|
|||
href: "/charts/appex-charts/charts-appex-timeline",
|
||||
label: t("timelineCharts"),
|
||||
active: pathname.includes(
|
||||
"/charts/appex-charts/charts-appex-timeline"
|
||||
"/charts/appex-charts/charts-appex-timeline",
|
||||
),
|
||||
children: [],
|
||||
},
|
||||
|
|
@ -5353,7 +5362,7 @@ export function getHorizontalMenuList(pathname: string, t: any): Group[] {
|
|||
href: "/charts/appex-charts/charts-appex-treemap",
|
||||
label: t("treemapCharts"),
|
||||
active: pathname.includes(
|
||||
"/charts/appex-charts/charts-appex-treemap"
|
||||
"/charts/appex-charts/charts-appex-treemap",
|
||||
),
|
||||
children: [],
|
||||
},
|
||||
|
|
@ -5369,7 +5378,7 @@ export function getHorizontalMenuList(pathname: string, t: any): Group[] {
|
|||
href: "/charts/rechart/charts-rechart-area",
|
||||
label: t("areaCharts"),
|
||||
active: pathname.includes(
|
||||
"/charts/rechart/charts-rechart-area"
|
||||
"/charts/rechart/charts-rechart-area",
|
||||
),
|
||||
children: [],
|
||||
},
|
||||
|
|
@ -5377,7 +5386,7 @@ export function getHorizontalMenuList(pathname: string, t: any): Group[] {
|
|||
href: "/charts/rechart/charts-rechart-bar",
|
||||
label: t("barCharts"),
|
||||
active: pathname.includes(
|
||||
"/charts/rechart/charts-rechart-bar"
|
||||
"/charts/rechart/charts-rechart-bar",
|
||||
),
|
||||
children: [],
|
||||
},
|
||||
|
|
@ -5385,7 +5394,7 @@ export function getHorizontalMenuList(pathname: string, t: any): Group[] {
|
|||
href: "/charts/rechart/charts-rechart-composed",
|
||||
label: t("composedCharts"),
|
||||
active: pathname.includes(
|
||||
"/charts/rechart/charts-rechart-composed"
|
||||
"/charts/rechart/charts-rechart-composed",
|
||||
),
|
||||
children: [],
|
||||
},
|
||||
|
|
@ -5393,7 +5402,7 @@ export function getHorizontalMenuList(pathname: string, t: any): Group[] {
|
|||
href: "/charts/rechart/charts-rechart-line",
|
||||
label: t("lineCharts"),
|
||||
active: pathname.includes(
|
||||
"/charts/rechart/charts-rechart-line"
|
||||
"/charts/rechart/charts-rechart-line",
|
||||
),
|
||||
children: [],
|
||||
},
|
||||
|
|
@ -5401,7 +5410,7 @@ export function getHorizontalMenuList(pathname: string, t: any): Group[] {
|
|||
href: "/charts/rechart/charts-rechart-pie",
|
||||
label: t("pieCharts"),
|
||||
active: pathname.includes(
|
||||
"/charts/rechart/charts-rechart-pie"
|
||||
"/charts/rechart/charts-rechart-pie",
|
||||
),
|
||||
children: [],
|
||||
},
|
||||
|
|
@ -5409,7 +5418,7 @@ export function getHorizontalMenuList(pathname: string, t: any): Group[] {
|
|||
href: "/charts/rechart/charts-rechart-radar",
|
||||
label: t("radarCharts"),
|
||||
active: pathname.includes(
|
||||
"/charts/rechart/charts-rechart-radar"
|
||||
"/charts/rechart/charts-rechart-radar",
|
||||
),
|
||||
children: [],
|
||||
},
|
||||
|
|
@ -5417,7 +5426,7 @@ export function getHorizontalMenuList(pathname: string, t: any): Group[] {
|
|||
href: "/charts/rechart/charts-rechart-radialbar",
|
||||
label: t("radialbarCharts"),
|
||||
active: pathname.includes(
|
||||
"/charts/rechart/charts-rechart-radialbar"
|
||||
"/charts/rechart/charts-rechart-radialbar",
|
||||
),
|
||||
children: [],
|
||||
},
|
||||
|
|
@ -5425,7 +5434,7 @@ export function getHorizontalMenuList(pathname: string, t: any): Group[] {
|
|||
href: "/charts/rechart/charts-rechart-scatter",
|
||||
label: t("scatterCharts"),
|
||||
active: pathname.includes(
|
||||
"/charts/rechart/charts-rechart-scatter"
|
||||
"/charts/rechart/charts-rechart-scatter",
|
||||
),
|
||||
children: [],
|
||||
},
|
||||
|
|
@ -5433,7 +5442,7 @@ export function getHorizontalMenuList(pathname: string, t: any): Group[] {
|
|||
href: "/charts/rechart/charts-rechart-treemap",
|
||||
label: t("treemapCharts"),
|
||||
active: pathname.includes(
|
||||
"/charts/rechart/charts-rechart-treemap"
|
||||
"/charts/rechart/charts-rechart-treemap",
|
||||
),
|
||||
children: [],
|
||||
},
|
||||
|
|
@ -5449,7 +5458,7 @@ export function getHorizontalMenuList(pathname: string, t: any): Group[] {
|
|||
href: "/charts/chart-js/charts-chartjs-area",
|
||||
label: t("areaCharts"),
|
||||
active: pathname.includes(
|
||||
"/charts/chart-js/charts-chartjs-area"
|
||||
"/charts/chart-js/charts-chartjs-area",
|
||||
),
|
||||
children: [],
|
||||
},
|
||||
|
|
@ -5457,7 +5466,7 @@ export function getHorizontalMenuList(pathname: string, t: any): Group[] {
|
|||
href: "/charts/chart-js/charts-chartjs-bar",
|
||||
label: t("barCharts"),
|
||||
active: pathname.includes(
|
||||
"/charts/chart-js/charts-chartjs-bar"
|
||||
"/charts/chart-js/charts-chartjs-bar",
|
||||
),
|
||||
children: [],
|
||||
},
|
||||
|
|
@ -5465,7 +5474,7 @@ export function getHorizontalMenuList(pathname: string, t: any): Group[] {
|
|||
href: "/charts/chart-js/charts-chartjs-line",
|
||||
label: t("lineCharts"),
|
||||
active: pathname.includes(
|
||||
"/charts/chart-js/charts-chartjs-line"
|
||||
"/charts/chart-js/charts-chartjs-line",
|
||||
),
|
||||
children: [],
|
||||
},
|
||||
|
|
@ -5473,7 +5482,7 @@ export function getHorizontalMenuList(pathname: string, t: any): Group[] {
|
|||
href: "/charts/chart-js/charts-chartjs-animations",
|
||||
label: t("animationCharts"),
|
||||
active: pathname.includes(
|
||||
"/charts/chart-js/charts-chartjs-animations"
|
||||
"/charts/chart-js/charts-chartjs-animations",
|
||||
),
|
||||
children: [],
|
||||
},
|
||||
|
|
@ -5481,7 +5490,7 @@ export function getHorizontalMenuList(pathname: string, t: any): Group[] {
|
|||
href: "/charts/chart-js/charts-chartjs-legend",
|
||||
label: t("legendCharts"),
|
||||
active: pathname.includes(
|
||||
"/charts/chart-js/charts-chartjs-legend"
|
||||
"/charts/chart-js/charts-chartjs-legend",
|
||||
),
|
||||
children: [],
|
||||
},
|
||||
|
|
@ -5489,7 +5498,7 @@ export function getHorizontalMenuList(pathname: string, t: any): Group[] {
|
|||
href: "/charts/chart-js/charts-chartjs-scaleoptions",
|
||||
label: t("scaleOptionCharts"),
|
||||
active: pathname.includes(
|
||||
"/charts/chart-js/charts-chartjs-scaleoptions"
|
||||
"/charts/chart-js/charts-chartjs-scaleoptions",
|
||||
),
|
||||
children: [],
|
||||
},
|
||||
|
|
@ -5497,7 +5506,7 @@ export function getHorizontalMenuList(pathname: string, t: any): Group[] {
|
|||
href: "/charts/chart-js/charts-chartjs-scales",
|
||||
label: t("scaleCharts"),
|
||||
active: pathname.includes(
|
||||
"/charts/chart-js/charts-chartjs-scales"
|
||||
"/charts/chart-js/charts-chartjs-scales",
|
||||
),
|
||||
children: [],
|
||||
},
|
||||
|
|
@ -5505,7 +5514,7 @@ export function getHorizontalMenuList(pathname: string, t: any): Group[] {
|
|||
href: "/charts/chart-js/charts-chartjs-scriptable",
|
||||
label: t("scriptableCharts"),
|
||||
active: pathname.includes(
|
||||
"/charts/chart-js/charts-chartjs-scriptable"
|
||||
"/charts/chart-js/charts-chartjs-scriptable",
|
||||
),
|
||||
children: [],
|
||||
},
|
||||
|
|
@ -5513,7 +5522,7 @@ export function getHorizontalMenuList(pathname: string, t: any): Group[] {
|
|||
href: "/charts/chart-js/charts-chartjs-title",
|
||||
label: t("titleCharts"),
|
||||
active: pathname.includes(
|
||||
"/charts/chart-js/charts-chartjs-title"
|
||||
"/charts/chart-js/charts-chartjs-title",
|
||||
),
|
||||
children: [],
|
||||
},
|
||||
|
|
@ -5521,7 +5530,7 @@ export function getHorizontalMenuList(pathname: string, t: any): Group[] {
|
|||
href: "/charts/chart-js/charts-chartjs-tooltip",
|
||||
label: t("tooltipChart"),
|
||||
active: pathname.includes(
|
||||
"/charts/chart-js/charts-chartjs-tooltip"
|
||||
"/charts/chart-js/charts-chartjs-tooltip",
|
||||
),
|
||||
children: [],
|
||||
},
|
||||
|
|
@ -5529,7 +5538,7 @@ export function getHorizontalMenuList(pathname: string, t: any): Group[] {
|
|||
href: "/charts/chart-js/charts-chartjs-other",
|
||||
label: t("otherCharts"),
|
||||
active: pathname.includes(
|
||||
"/charts/chart-js/charts-chartjs-other"
|
||||
"/charts/chart-js/charts-chartjs-other",
|
||||
),
|
||||
children: [],
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in New Issue