From 838b492768e6113f86fced9208266a6b38eb0ac9 Mon Sep 17 00:00:00 2001 From: Sabda Yagra Date: Wed, 8 Oct 2025 16:49:26 +0700 Subject: [PATCH] fix: hide menu in sidebar satker --- .../management-user/internal/create/page.tsx | 1 - app/[locale]/(public)/profile/page.tsx | 13 +-- lib/menus.ts | 100 +++++++++--------- 3 files changed, 57 insertions(+), 57 deletions(-) diff --git a/app/[locale]/(protected)/admin/management-user/internal/create/page.tsx b/app/[locale]/(protected)/admin/management-user/internal/create/page.tsx index 4e0bdbcc..dd7e7b97 100644 --- a/app/[locale]/(protected)/admin/management-user/internal/create/page.tsx +++ b/app/[locale]/(protected)/admin/management-user/internal/create/page.tsx @@ -5,7 +5,6 @@ import { zodResolver } from "@hookform/resolvers/zod"; import { Check, ChevronsUpDown, Eye, EyeOff } from "lucide-react"; import { useForm } from "react-hook-form"; import { z } from "zod"; - import { cn, getCookiesDecrypt } from "@/lib/utils"; import { Button } from "@/components/ui/button"; import { diff --git a/app/[locale]/(public)/profile/page.tsx b/app/[locale]/(public)/profile/page.tsx index 8a9b6293..1f3d57ea 100644 --- a/app/[locale]/(public)/profile/page.tsx +++ b/app/[locale]/(public)/profile/page.tsx @@ -19,14 +19,15 @@ import { Link } from "@/components/navigation"; import { useTranslations } from "next-intl"; const profileSchema = z.object({ - username: z.string().min(1, { message: "Judul diperlukan" }), - fullname: z.string().min(1, { message: "Judul diperlukan" }), - memberIdentity: z.string().min(1, { message: "Judul diperlukan" }), - email: z.string().min(1, { message: "Judul diperlukan" }), - address: z.string().min(2, { message: "Narasi Penugasan harus lebih dari 2 karakter." }), - phoneNumber: z.string().min(1, { message: "Kategori diperlukan" }), + username: z.string().optional(), + fullname: z.string().optional(), + memberIdentity: z.string().optional(), + email: z.string().email("Format email tidak valid").optional(), + address: z.string().optional(), + phoneNumber: z.string().optional(), }); + type Detail = { id: number; userId: any; diff --git a/lib/menus.ts b/lib/menus.ts index 206c0f4b..cd0b37fd 100644 --- a/lib/menus.ts +++ b/lib/menus.ts @@ -3021,20 +3021,20 @@ export function getMenuList(pathname: string, t: any): Group[] { }, ], }, - { - 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: "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", @@ -3141,42 +3141,42 @@ export function getMenuList(pathname: string, t: any): Group[] { }, ], }, - { - groupLabel: "", - id: "settings", - menus: [ - { - id: "settings", - href: "/admin/settings", - label: t("settings"), - active: pathname.includes("/settinng"), - icon: "material-symbols:settings", - submenus: [ - { - href: "/admin/settings/banner", - label: "Banner", - active: pathname === "/admin/settings/banner", - icon: "heroicons:arrow-trending-up", - children: [], - }, - { - href: "/admin/settings/popup", - label: "Pop Up", - active: pathname === "/admin/settings/popup", - icon: "heroicons:arrow-trending-up", - children: [], - }, - { - href: "/admin/settings/iklan", - label: "Iklan", - active: pathname === "/admin/settings/iklan", - icon: "heroicons:arrow-trending-up", - children: [], - }, - ], - }, - ], - }, + // { + // groupLabel: "", + // id: "settings", + // menus: [ + // { + // id: "settings", + // href: "/admin/settings", + // label: t("settings"), + // active: pathname.includes("/settinng"), + // icon: "material-symbols:settings", + // submenus: [ + // { + // href: "/admin/settings/banner", + // label: "Banner", + // active: pathname === "/admin/settings/banner", + // icon: "heroicons:arrow-trending-up", + // children: [], + // }, + // { + // href: "/admin/settings/popup", + // label: "Pop Up", + // active: pathname === "/admin/settings/popup", + // icon: "heroicons:arrow-trending-up", + // children: [], + // }, + // { + // href: "/admin/settings/iklan", + // label: "Iklan", + // active: pathname === "/admin/settings/iklan", + // icon: "heroicons:arrow-trending-up", + // children: [], + // }, + // ], + // }, + // ], + // }, ]; } } else if (Number(roleId) == 9) {