fix: hide menu in sidebar satker

This commit is contained in:
Sabda Yagra 2025-10-08 16:49:26 +07:00
parent 3e920e9108
commit 838b492768
3 changed files with 57 additions and 57 deletions

View File

@ -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 {

View File

@ -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;

View File

@ -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) {