fix: hide menu in sidebar satker
This commit is contained in:
parent
3e920e9108
commit
838b492768
|
|
@ -5,7 +5,6 @@ import { zodResolver } from "@hookform/resolvers/zod";
|
||||||
import { Check, ChevronsUpDown, Eye, EyeOff } from "lucide-react";
|
import { Check, ChevronsUpDown, Eye, EyeOff } from "lucide-react";
|
||||||
import { useForm } from "react-hook-form";
|
import { useForm } from "react-hook-form";
|
||||||
import { z } from "zod";
|
import { z } from "zod";
|
||||||
|
|
||||||
import { cn, getCookiesDecrypt } from "@/lib/utils";
|
import { cn, getCookiesDecrypt } from "@/lib/utils";
|
||||||
import { Button } from "@/components/ui/button";
|
import { Button } from "@/components/ui/button";
|
||||||
import {
|
import {
|
||||||
|
|
|
||||||
|
|
@ -19,14 +19,15 @@ import { Link } from "@/components/navigation";
|
||||||
import { useTranslations } from "next-intl";
|
import { useTranslations } from "next-intl";
|
||||||
|
|
||||||
const profileSchema = z.object({
|
const profileSchema = z.object({
|
||||||
username: z.string().min(1, { message: "Judul diperlukan" }),
|
username: z.string().optional(),
|
||||||
fullname: z.string().min(1, { message: "Judul diperlukan" }),
|
fullname: z.string().optional(),
|
||||||
memberIdentity: z.string().min(1, { message: "Judul diperlukan" }),
|
memberIdentity: z.string().optional(),
|
||||||
email: z.string().min(1, { message: "Judul diperlukan" }),
|
email: z.string().email("Format email tidak valid").optional(),
|
||||||
address: z.string().min(2, { message: "Narasi Penugasan harus lebih dari 2 karakter." }),
|
address: z.string().optional(),
|
||||||
phoneNumber: z.string().min(1, { message: "Kategori diperlukan" }),
|
phoneNumber: z.string().optional(),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
type Detail = {
|
type Detail = {
|
||||||
id: number;
|
id: number;
|
||||||
userId: any;
|
userId: any;
|
||||||
|
|
|
||||||
100
lib/menus.ts
100
lib/menus.ts
|
|
@ -3021,20 +3021,20 @@ export function getMenuList(pathname: string, t: any): Group[] {
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
groupLabel: "",
|
// groupLabel: "",
|
||||||
id: "task",
|
// id: "task",
|
||||||
menus: [
|
// menus: [
|
||||||
{
|
// {
|
||||||
id: "task",
|
// id: "task",
|
||||||
href: "/contributor/task",
|
// href: "/contributor/task",
|
||||||
label: t("task"),
|
// label: t("task"),
|
||||||
active: pathname.includes("/task"),
|
// active: pathname.includes("/task"),
|
||||||
icon: "fluent:clipboard-task-add-24-regular",
|
// icon: "fluent:clipboard-task-add-24-regular",
|
||||||
submenus: [],
|
// submenus: [],
|
||||||
},
|
// },
|
||||||
],
|
// ],
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
groupLabel: "",
|
groupLabel: "",
|
||||||
id: "schedule",
|
id: "schedule",
|
||||||
|
|
@ -3141,42 +3141,42 @@ export function getMenuList(pathname: string, t: any): Group[] {
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
groupLabel: "",
|
// groupLabel: "",
|
||||||
id: "settings",
|
// id: "settings",
|
||||||
menus: [
|
// menus: [
|
||||||
{
|
// {
|
||||||
id: "settings",
|
// id: "settings",
|
||||||
href: "/admin/settings",
|
// href: "/admin/settings",
|
||||||
label: t("settings"),
|
// label: t("settings"),
|
||||||
active: pathname.includes("/settinng"),
|
// active: pathname.includes("/settinng"),
|
||||||
icon: "material-symbols:settings",
|
// icon: "material-symbols:settings",
|
||||||
submenus: [
|
// submenus: [
|
||||||
{
|
// {
|
||||||
href: "/admin/settings/banner",
|
// href: "/admin/settings/banner",
|
||||||
label: "Banner",
|
// label: "Banner",
|
||||||
active: pathname === "/admin/settings/banner",
|
// active: pathname === "/admin/settings/banner",
|
||||||
icon: "heroicons:arrow-trending-up",
|
// icon: "heroicons:arrow-trending-up",
|
||||||
children: [],
|
// children: [],
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
href: "/admin/settings/popup",
|
// href: "/admin/settings/popup",
|
||||||
label: "Pop Up",
|
// label: "Pop Up",
|
||||||
active: pathname === "/admin/settings/popup",
|
// active: pathname === "/admin/settings/popup",
|
||||||
icon: "heroicons:arrow-trending-up",
|
// icon: "heroicons:arrow-trending-up",
|
||||||
children: [],
|
// children: [],
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
href: "/admin/settings/iklan",
|
// href: "/admin/settings/iklan",
|
||||||
label: "Iklan",
|
// label: "Iklan",
|
||||||
active: pathname === "/admin/settings/iklan",
|
// active: pathname === "/admin/settings/iklan",
|
||||||
icon: "heroicons:arrow-trending-up",
|
// icon: "heroicons:arrow-trending-up",
|
||||||
children: [],
|
// children: [],
|
||||||
},
|
// },
|
||||||
],
|
// ],
|
||||||
},
|
// },
|
||||||
],
|
// ],
|
||||||
},
|
// },
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
} else if (Number(roleId) == 9) {
|
} else if (Number(roleId) == 9) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue