feat: persist portal invitation locales
This commit is contained in:
@@ -7,6 +7,7 @@ import {
|
||||
|
||||
export type PortalSidebarNavItem = {
|
||||
title: string;
|
||||
titleKey?: string;
|
||||
href?: string;
|
||||
icon?: LucideIcon;
|
||||
items?: PortalSidebarNavItem[];
|
||||
@@ -14,22 +15,36 @@ export type PortalSidebarNavItem = {
|
||||
|
||||
export type PortalSidebarNavGroup = {
|
||||
title: string;
|
||||
titleKey?: string;
|
||||
items: PortalSidebarNavItem[];
|
||||
};
|
||||
|
||||
export const portalSidebarData: PortalSidebarNavGroup[] = [
|
||||
{
|
||||
title: "GENEL BAKIŞ",
|
||||
titleKey: "navigation.groups.overview",
|
||||
items: [
|
||||
{ title: "Dashboard", href: "/portal", icon: Sparkles },
|
||||
{ title: "Dashboard", titleKey: "navigation.items.dashboard", href: "/portal", icon: Sparkles },
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "SÜREÇLER",
|
||||
titleKey: "navigation.groups.processes",
|
||||
items: [
|
||||
{ title: "Projeleriniz", href: "/portal/projects", icon: FolderKanban },
|
||||
{ title: "Yapılan Görevler", href: "/portal/tasks", icon: CheckSquare2 },
|
||||
{ title: "Revizyon Talepleri", href: "/portal/revisions", icon: Sparkles },
|
||||
{ title: "Projeleriniz", titleKey: "navigation.items.portalProjects", href: "/portal/projects", icon: FolderKanban },
|
||||
{ title: "Yapılan Görevler", titleKey: "navigation.items.portalTasks", href: "/portal/tasks", icon: CheckSquare2 },
|
||||
{ title: "Revizyon Talepleri", titleKey: "navigation.items.portalRevisions", href: "/portal/revisions", icon: Sparkles },
|
||||
],
|
||||
}
|
||||
];
|
||||
|
||||
export function localizePortalSidebarData(t: (key: string) => string): PortalSidebarNavGroup[] {
|
||||
return portalSidebarData.map((group) => ({
|
||||
...group,
|
||||
title: group.titleKey ? t(group.titleKey) : group.title,
|
||||
items: group.items.map((item) => ({
|
||||
...item,
|
||||
title: item.titleKey ? t(item.titleKey) : item.title,
|
||||
})),
|
||||
}));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user