diff --git a/app/[locale]/(protected)/contributor/agenda-setting/page.tsx b/app/[locale]/(protected)/contributor/agenda-setting/page.tsx index 9bbbcd75..a45040bb 100644 --- a/app/[locale]/(protected)/contributor/agenda-setting/page.tsx +++ b/app/[locale]/(protected)/contributor/agenda-setting/page.tsx @@ -22,14 +22,14 @@ const CalenderPage = () => { let valueShowed: string[] = []; if (userLevelNumber == 1) { valueShowed = ["0", "1", "2", "3", "4", "5"]; - } else if (userLevelNumber == 2 && userLevelId != 761) { + } else if (userLevelNumber == 2 && userLevelId != 771) { valueShowed = ["2", "3"]; } else if ( - (userLevelNumber == 2 && userLevelId == 761) || - (userLevelNumber == 3 && userParentLevelId == 761) + (userLevelNumber == 2 && userLevelId == 771) || + (userLevelNumber == 3 && userParentLevelId == 771) ) { valueShowed = ["4"]; - } else if (userLevelNumber == 3 && userParentLevelId != 761) { + } else if (userLevelNumber == 3 && userParentLevelId != 771) { valueShowed = ["3"]; } diff --git a/app/[locale]/(protected)/contributor/content/audio/components/columns.tsx b/app/[locale]/(protected)/contributor/content/audio/components/columns.tsx index 7a6f8170..f06c0ee4 100644 --- a/app/[locale]/(protected)/contributor/content/audio/components/columns.tsx +++ b/app/[locale]/(protected)/contributor/content/audio/components/columns.tsx @@ -104,13 +104,13 @@ const useTableColumns = () => { if (isPublish && !isPublishOnPolda) { displayText = "Mabes"; } else if (isPublish && isPublishOnPolda) { - if (Number(creatorGroupParentLevelId) == 761) { + if (Number(creatorGroupParentLevelId) == 771) { displayText = "Mabes & Satker"; } else { displayText = "Mabes & Polda"; } } else if (!isPublish && isPublishOnPolda) { - if (Number(creatorGroupParentLevelId) == 761) { + if (Number(creatorGroupParentLevelId) == 771) { displayText = "Satker"; } else { displayText = "Polda"; diff --git a/app/[locale]/(protected)/contributor/content/image/components/columns.tsx b/app/[locale]/(protected)/contributor/content/image/components/columns.tsx index 296424d7..aed71a8f 100644 --- a/app/[locale]/(protected)/contributor/content/image/components/columns.tsx +++ b/app/[locale]/(protected)/contributor/content/image/components/columns.tsx @@ -107,13 +107,13 @@ const useTableColumns = () => { if (isPublish && !isPublishOnPolda) { displayText = "Mabes"; } else if (isPublish && isPublishOnPolda) { - if (Number(creatorGroupParentLevelId) == 761) { + if (Number(creatorGroupParentLevelId) == 771) { displayText = "Mabes & Satker"; } else { displayText = "Mabes & Polda"; } } else if (!isPublish && isPublishOnPolda) { - if (Number(creatorGroupParentLevelId) == 761) { + if (Number(creatorGroupParentLevelId) == 771) { displayText = "Satker"; } else { displayText = "Polda"; diff --git a/app/[locale]/(protected)/contributor/content/teks/components/columns.tsx b/app/[locale]/(protected)/contributor/content/teks/components/columns.tsx index 398c1f29..4b3e14e5 100644 --- a/app/[locale]/(protected)/contributor/content/teks/components/columns.tsx +++ b/app/[locale]/(protected)/contributor/content/teks/components/columns.tsx @@ -104,13 +104,13 @@ const useTableColumns = () => { if (isPublish && !isPublishOnPolda) { displayText = "Mabes"; } else if (isPublish && isPublishOnPolda) { - if (Number(creatorGroupParentLevelId) == 761) { + if (Number(creatorGroupParentLevelId) == 771) { displayText = "Mabes & Satker"; } else { displayText = "Mabes & Polda"; } } else if (!isPublish && isPublishOnPolda) { - if (Number(creatorGroupParentLevelId) == 761) { + if (Number(creatorGroupParentLevelId) == 771) { displayText = "Satker"; } else { displayText = "Polda"; diff --git a/app/[locale]/(protected)/contributor/content/video/components/columns.tsx b/app/[locale]/(protected)/contributor/content/video/components/columns.tsx index 3cc325c2..44736d6a 100644 --- a/app/[locale]/(protected)/contributor/content/video/components/columns.tsx +++ b/app/[locale]/(protected)/contributor/content/video/components/columns.tsx @@ -104,13 +104,13 @@ const useTableColumns = () => { if (isPublish && !isPublishOnPolda) { displayText = "Mabes"; } else if (isPublish && isPublishOnPolda) { - if (Number(creatorGroupParentLevelId) == 761) { + if (Number(creatorGroupParentLevelId) == 771) { displayText = "Mabes & Satker"; } else { displayText = "Mabes & Polda"; } } else if (!isPublish && isPublishOnPolda) { - if (Number(creatorGroupParentLevelId) == 761) { + if (Number(creatorGroupParentLevelId) == 771) { displayText = "Satker"; } else { displayText = "Polda"; diff --git a/app/[locale]/(public)/(polda)/polda/[polda_name]/all/filter/page.tsx b/app/[locale]/(public)/(polda)/polda/[polda_name]/all/filter/page.tsx index 55f2d76d..ad875375 100644 --- a/app/[locale]/(public)/(polda)/polda/[polda_name]/all/filter/page.tsx +++ b/app/[locale]/(public)/(polda)/polda/[polda_name]/all/filter/page.tsx @@ -388,7 +388,7 @@ export default function FilterPage() { }; async function getUserLevels() { - const res = await getUserLevelListByParent(761); + const res = await getUserLevelListByParent(771); const userLevelList = res?.data?.data; if (userLevelList !== null) { diff --git a/app/[locale]/(public)/(polda)/polda/[polda_name]/audio/filter/page.tsx b/app/[locale]/(public)/(polda)/polda/[polda_name]/audio/filter/page.tsx index 9e7912b7..3831ae56 100644 --- a/app/[locale]/(public)/(polda)/polda/[polda_name]/audio/filter/page.tsx +++ b/app/[locale]/(public)/(polda)/polda/[polda_name]/audio/filter/page.tsx @@ -442,7 +442,7 @@ const FilterPage = () => { }; async function getUserLevels() { - const res = await getUserLevelListByParent(761); + const res = await getUserLevelListByParent(771); const userLevelList = res?.data?.data; if (userLevelList !== null) { diff --git a/app/[locale]/(public)/(polda)/polda/[polda_name]/document/filter/page.tsx b/app/[locale]/(public)/(polda)/polda/[polda_name]/document/filter/page.tsx index 677c79a6..44b0acee 100644 --- a/app/[locale]/(public)/(polda)/polda/[polda_name]/document/filter/page.tsx +++ b/app/[locale]/(public)/(polda)/polda/[polda_name]/document/filter/page.tsx @@ -458,7 +458,7 @@ const FilterPage = () => { }; async function getUserLevels() { - const res = await getUserLevelListByParent(761); + const res = await getUserLevelListByParent(771); const userLevelList = res?.data?.data; if (userLevelList !== null) { diff --git a/app/[locale]/(public)/(polda)/polda/[polda_name]/image/filter/page.tsx b/app/[locale]/(public)/(polda)/polda/[polda_name]/image/filter/page.tsx index b6b6d11c..8732e7a4 100644 --- a/app/[locale]/(public)/(polda)/polda/[polda_name]/image/filter/page.tsx +++ b/app/[locale]/(public)/(polda)/polda/[polda_name]/image/filter/page.tsx @@ -439,7 +439,7 @@ const FilterPage = () => { }; async function getUserLevels() { - const res = await getUserLevelListByParent(761); + const res = await getUserLevelListByParent(771); const userLevelList = res?.data?.data; if (userLevelList !== null) { diff --git a/app/[locale]/(public)/(polda)/polda/[polda_name]/video/filter/page.tsx b/app/[locale]/(public)/(polda)/polda/[polda_name]/video/filter/page.tsx index 91aa8c5b..6bd1299e 100644 --- a/app/[locale]/(public)/(polda)/polda/[polda_name]/video/filter/page.tsx +++ b/app/[locale]/(public)/(polda)/polda/[polda_name]/video/filter/page.tsx @@ -452,7 +452,7 @@ const FilterPage = () => { }; async function getUserLevels() { - const res = await getUserLevelListByParent(761); + const res = await getUserLevelListByParent(771); const userLevelList = res?.data?.data; if (userLevelList !== null) { diff --git a/app/[locale]/(public)/(satker)/satker/[satker_name]/all/filter/page.tsx b/app/[locale]/(public)/(satker)/satker/[satker_name]/all/filter/page.tsx index 55f2d76d..ad875375 100644 --- a/app/[locale]/(public)/(satker)/satker/[satker_name]/all/filter/page.tsx +++ b/app/[locale]/(public)/(satker)/satker/[satker_name]/all/filter/page.tsx @@ -388,7 +388,7 @@ export default function FilterPage() { }; async function getUserLevels() { - const res = await getUserLevelListByParent(761); + const res = await getUserLevelListByParent(771); const userLevelList = res?.data?.data; if (userLevelList !== null) { diff --git a/app/[locale]/(public)/(satker)/satker/[satker_name]/audio/filter/page.tsx b/app/[locale]/(public)/(satker)/satker/[satker_name]/audio/filter/page.tsx index 68420eca..9f864ffd 100644 --- a/app/[locale]/(public)/(satker)/satker/[satker_name]/audio/filter/page.tsx +++ b/app/[locale]/(public)/(satker)/satker/[satker_name]/audio/filter/page.tsx @@ -442,7 +442,7 @@ const FilterPage = () => { }; async function getUserLevels() { - const res = await getUserLevelListByParent(761); + const res = await getUserLevelListByParent(771); const userLevelList = res?.data?.data; if (userLevelList !== null) { diff --git a/app/[locale]/(public)/(satker)/satker/[satker_name]/document/filter/page.tsx b/app/[locale]/(public)/(satker)/satker/[satker_name]/document/filter/page.tsx index a49d7d23..8fa55255 100644 --- a/app/[locale]/(public)/(satker)/satker/[satker_name]/document/filter/page.tsx +++ b/app/[locale]/(public)/(satker)/satker/[satker_name]/document/filter/page.tsx @@ -449,7 +449,7 @@ const FilterPage = () => { }; async function getUserLevels() { - const res = await getUserLevelListByParent(761); + const res = await getUserLevelListByParent(771); const userLevelList = res?.data?.data; if (userLevelList !== null) { diff --git a/app/[locale]/(public)/(satker)/satker/[satker_name]/image/filter/page.tsx b/app/[locale]/(public)/(satker)/satker/[satker_name]/image/filter/page.tsx index b76aec48..39ce5096 100644 --- a/app/[locale]/(public)/(satker)/satker/[satker_name]/image/filter/page.tsx +++ b/app/[locale]/(public)/(satker)/satker/[satker_name]/image/filter/page.tsx @@ -426,7 +426,7 @@ const FilterPage = () => { }; async function getUserLevels() { - const res = await getUserLevelListByParent(761); + const res = await getUserLevelListByParent(771); const userLevelList = res?.data?.data; if (userLevelList !== null) { diff --git a/app/[locale]/(public)/(satker)/satker/[satker_name]/video/filter/page.tsx b/app/[locale]/(public)/(satker)/satker/[satker_name]/video/filter/page.tsx index ca5a093d..89f97e63 100644 --- a/app/[locale]/(public)/(satker)/satker/[satker_name]/video/filter/page.tsx +++ b/app/[locale]/(public)/(satker)/satker/[satker_name]/video/filter/page.tsx @@ -441,7 +441,7 @@ const FilterPage = () => { }; async function getUserLevels() { - const res = await getUserLevelListByParent(761); + const res = await getUserLevelListByParent(771); const userLevelList = res?.data?.data; if (userLevelList !== null) { diff --git a/app/[locale]/(public)/all/filter/page.tsx b/app/[locale]/(public)/all/filter/page.tsx index 550e29bb..73c99a26 100644 --- a/app/[locale]/(public)/all/filter/page.tsx +++ b/app/[locale]/(public)/all/filter/page.tsx @@ -389,7 +389,7 @@ export default function FilterPage() { }; async function getUserLevels() { - const res = await getUserLevelListByParent(761); + const res = await getUserLevelListByParent(771); const userLevelList = res?.data?.data; if (userLevelList !== null) { diff --git a/app/[locale]/(public)/audio/filter/page.tsx b/app/[locale]/(public)/audio/filter/page.tsx index b5efaee0..a0e9c84c 100644 --- a/app/[locale]/(public)/audio/filter/page.tsx +++ b/app/[locale]/(public)/audio/filter/page.tsx @@ -444,7 +444,7 @@ const FilterPage = () => { }; async function getUserLevels() { - const res = await getUserLevelListByParent(761); + const res = await getUserLevelListByParent(771); const userLevelList = res?.data?.data; if (userLevelList !== null) { diff --git a/app/[locale]/(public)/document/filter/page.tsx b/app/[locale]/(public)/document/filter/page.tsx index 6c9b933d..5136e0ca 100644 --- a/app/[locale]/(public)/document/filter/page.tsx +++ b/app/[locale]/(public)/document/filter/page.tsx @@ -460,7 +460,7 @@ const FilterPage = () => { }; async function getUserLevels() { - const res = await getUserLevelListByParent(761); + const res = await getUserLevelListByParent(771); const userLevelList = res?.data?.data; if (userLevelList !== null) { diff --git a/app/[locale]/(public)/image/filter/page.tsx b/app/[locale]/(public)/image/filter/page.tsx index ba3e4917..8ee85397 100644 --- a/app/[locale]/(public)/image/filter/page.tsx +++ b/app/[locale]/(public)/image/filter/page.tsx @@ -448,7 +448,7 @@ const FilterPage = () => { }; async function getUserLevels() { - const res = await getUserLevelListByParent(761); + const res = await getUserLevelListByParent(771); const userLevelList = res?.data?.data; if (userLevelList !== null) { diff --git a/app/[locale]/(public)/regional/filter/page.tsx b/app/[locale]/(public)/regional/filter/page.tsx index df96578f..546df9ff 100644 --- a/app/[locale]/(public)/regional/filter/page.tsx +++ b/app/[locale]/(public)/regional/filter/page.tsx @@ -377,7 +377,7 @@ export default function FilterPage() { }; async function getUserLevels() { - const res = await getUserLevelListByParent(761); + const res = await getUserLevelListByParent(771); const userLevelList = res?.data?.data; if (userLevelList !== null) { diff --git a/app/[locale]/(public)/video/filter/page.tsx b/app/[locale]/(public)/video/filter/page.tsx index 05365bb6..76be45c6 100644 --- a/app/[locale]/(public)/video/filter/page.tsx +++ b/app/[locale]/(public)/video/filter/page.tsx @@ -458,7 +458,7 @@ const FilterPage = () => { }; async function getUserLevels() { - const res = await getUserLevelListByParent(761); + const res = await getUserLevelListByParent(771); const userLevelList = res?.data?.data; if (userLevelList !== null) { diff --git a/components/partials/auth/login-form.tsx b/components/partials/auth/login-form.tsx index ec9e36e8..1285f3ad 100644 --- a/components/partials/auth/login-form.tsx +++ b/components/partials/auth/login-form.tsx @@ -228,7 +228,7 @@ const LoginForm = () => { }); } else if ( profile?.data?.data?.userLevel?.id == 794 || - profile?.data?.data?.userLevel?.parentLevelId == 761 + profile?.data?.data?.userLevel?.parentLevelId == 771 ) { window.location.href = "/in/dashboard"; Cookies.set("status", "login", { diff --git a/lib/auth-utils.ts b/lib/auth-utils.ts index bcac0dd1..a21061ce 100644 --- a/lib/auth-utils.ts +++ b/lib/auth-utils.ts @@ -98,7 +98,7 @@ export const isProtectedRole = (roleId: number): boolean => { }; export const isSpecialLevel = (userLevelId: number, parentLevelId?: number): boolean => { - return userLevelId === 794 || parentLevelId === 761; + return userLevelId === 794 || parentLevelId === 771; }; // Navigation utilities diff --git a/lib/menus.ts b/lib/menus.ts index f495686b..5692dc38 100644 --- a/lib/menus.ts +++ b/lib/menus.ts @@ -1929,7 +1929,7 @@ export function getMenuList(pathname: string, t: any): Group[] { (Number(roleId) == 3 || Number(roleId) == 14 || Number(roleId) == 15) && Number(levelNumber) == 2 ) { - if (Number(userLevelId) != 761) { + if (Number(userLevelId) != 771) { menusSelected = [ { groupLabel: t("apps"), @@ -2216,7 +2216,7 @@ export function getMenuList(pathname: string, t: any): Group[] { ], }, ]; - } else if (Number(userLevelId) == 761) { + } else if (Number(userLevelId) == 771) { menusSelected = [ { groupLabel: t("apps"), @@ -2610,7 +2610,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) != 771) { menusSelected = [ { groupLabel: t("apps"), @@ -2869,7 +2869,7 @@ export function getMenuList(pathname: string, t: any): Group[] { ], }, ]; - } else if (Number(userParentLevelId) == 761) { + } else if (Number(userParentLevelId) == 771) { menusSelected = [ { groupLabel: t("apps"),