![]()
[];
- if ((Number(roleId) == 3 || Number(roleId) == 14) && Number(levelNumber) == 1) {
+ if (
+ (Number(roleId) == 3 || Number(roleId) == 14) &&
+ Number(levelNumber) == 1
+ ) {
menusSelected = [
{
groupLabel: t("apps"),
@@ -1531,13 +1534,236 @@ export function getMenuList(pathname: string, t: any): Group[] {
icon: "heroicons:share",
children: [],
},
+ // {
+ // href: "/contributor/content/spit",
+ // label: "spit",
+ // active: pathname.includes("/content/spit"),
+ // icon: "heroicons:credit-card",
+ // children: [],
+ // },
+ // {
+ // href: "/contributor/content/nulis-ai",
+ // label: "nulis ai",
+ // active: pathname.includes("/content/nulisai"),
+ // icon: "heroicons:credit-card",
+ // children: [],
+ // },
+ ],
+ },
+ ],
+ },
+ {
+ 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: "planning",
+ menus: [
+ {
+ id: "planning",
+ href: "/contributor/planning",
+ label: t("planning"),
+ active: pathname.includes("/planning"),
+ icon: "pajamas:planning",
+ submenus: [
{
- href: "/contributor/content/spit",
- label: "spit",
- active: pathname.includes("/content/spit"),
- icon: "heroicons:credit-card",
+ 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",
+ menus: [
+ {
+ id: "task",
+ href: "/contributor/task",
+ label: t("task"),
+ active: pathname.includes("/task"),
+ icon: "fluent:clipboard-task-add-24-regular",
+ submenus: [],
+ },
+ ],
+ },
+ {
+ groupLabel: "",
+ id: "schedule",
+ menus: [
+ {
+ id: "schedule",
+ href: "/contributor/schedule",
+ label: t("schedule"),
+ active: pathname.includes("/schedule"),
+ icon: "uil:schedule",
+ submenus: [
+ {
+ 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: "curatedcontent",
+ menus: [
+ {
+ id: "curatedcontent",
+ href: "/shared/curated-content",
+ label: t("curated-content"),
+ active: pathname.includes("/curated-content"),
+ icon: "pixelarticons:calendar-text",
+ submenus: [],
+ },
+ ],
+ },
+ {
+ groupLabel: "",
+ id: "communication",
+ menus: [
+ {
+ id: "communication",
+ href: "/shared/communication",
+ label: t("communication"),
+ active: pathname.includes("/communication"),
+ icon: "token:chat",
+ submenus: [],
+ },
+ ],
+ },
+ {
+ groupLabel: "",
+ id: "contest",
+ menus: [
+ {
+ id: "contest",
+ href: "/shared/contest",
+ label: t("contest"),
+ active: pathname.includes("/contest"),
+ icon: "ic:outline-emoji-events",
+ submenus: [],
+ },
+ ],
+ },
+ ];
+ } else if (Number(roleId) == 4 && Number(levelNumber) == 2) {
+ menusSelected = [
+ {
+ groupLabel: t("apps"),
+ id: "dashboard",
+ menus: [
+ {
+ id: "dashboard",
+ href: "/dashboard",
+ label: t("dashboard"),
+ active: pathname.includes("/dashboard"),
+ icon: "material-symbols:dashboard",
+ submenus: [],
+ },
+ ],
+ },
+ {
+ groupLabel: "",
+ id: "content",
+ menus: [
+ {
+ id: "content",
+ href: "/contributor/content/image",
+ label: t("content"),
+ active: pathname.includes("/content"),
+ icon: "line-md:youtube",
+ submenus: [
+ {
+ href: "/contributor/content/image",
+ label: t("image"),
+ active: pathname.includes("/content/image"),
+ icon: "ic:outline-image",
+ children: [],
+ },
+ {
+ href: "/contributor/content/video",
+ label: t("video"),
+ active: pathname.includes("/content/video"),
+ icon: "line-md:youtube",
+ children: [],
+ },
+ {
+ href: "/contributor/content/teks",
+ label: t("text"),
+ active: pathname.includes("/content/teks"),
+ icon: "heroicons:document",
+ children: [],
+ },
+ {
+ href: "/contributor/content/audio",
+ label: t("audio"),
+ active: pathname.includes("/content/audio"),
+ icon: "heroicons:share",
+ children: [],
+ },
+ // {
+ // href: "/contributor/content/spit",
+ // label: "spit",
+ // active: pathname.includes("/content/spit"),
+ // icon: "heroicons:credit-card",
+ // children: [],
+ // },
// {
// href: "/contributor/content/nulis-ai",
// label: "nulis ai",
@@ -1700,7 +1926,7 @@ export function getMenuList(pathname: string, t: any): Group[] {
},
];
} else if (
- (Number(roleId) == 3 || Number(roleId) == 4 || Number(roleId) == 14 || Number(roleId) == 15) &&
+ (Number(roleId) == 3 || Number(roleId) == 14 || Number(roleId) == 15) &&
Number(levelNumber) == 2
) {
if (Number(userLevelId) != 761) {
@@ -2158,7 +2384,10 @@ export function getMenuList(pathname: string, t: any): Group[] {
];
}
} else if (
- (Number(roleId) == 3 || Number(roleId) == 4 || Number(roleId) == 14 || Number(roleId) == 15) &&
+ (Number(roleId) == 3 ||
+ Number(roleId) == 4 ||
+ Number(roleId) == 14 ||
+ Number(roleId) == 15) &&
Number(levelNumber) == 3
) {
if (Number(userParentLevelId) != 761) {
diff --git a/service/content/content.ts b/service/content/content.ts
index 21d94937..d200a906 100644
--- a/service/content/content.ts
+++ b/service/content/content.ts
@@ -173,10 +173,10 @@ export async function createMedia(data: any) {
export async function uploadThumbnail(id: any, data: any) {
const url = `media/upload?id=${id}&operation=thumbnail`;
- const headers = {
- "Content-Type": "multipart/form-data",
- };
- return httpPostInterceptor(url, data, headers);
+ // const headers = {
+ // "Content-Type": "multipart/form-data",
+ // };
+ return httpPostInterceptor(url, data);
}
export async function detailSPIT(id: any) {
@@ -234,4 +234,4 @@ export async function postActivityLog(data: any) {
"content-type": "application/json",
};
return httpPost(url, headers, data);
-}
\ No newline at end of file
+}