This commit is contained in:
natib21
2026-07-10 11:25:59 +00:00
parent 2696ca7498
commit e6e44e773b
1146 changed files with 200266 additions and 90527 deletions

View File

@@ -1,23 +1,23 @@
import { t } from "i18next";
export type ModuleKey = "objective" | "performance";
export const ROUTE_CONFIG: Record<
ModuleKey,
{
basePath: string;
planYearsPath: string;
navLabelKey: string;
}
> = {
performance: {
basePath: "/performance-management",
planYearsPath: "/performance-management/plan-years",
navLabelKey: "nav.performanceManagement",
},
objective: {
basePath: "/objective-management",
planYearsPath: "/objective-management/plan-years",
navLabelKey: "nav.objectiveManagement",
},
};
import { t } from "i18next";
export type ModuleKey = "objective" | "performance";
export const ROUTE_CONFIG: Record<
ModuleKey,
{
basePath: string;
planYearsPath: string;
navLabelKey: string;
}
> = {
performance: {
basePath: "/performance-management",
planYearsPath: "/performance-management/plan-years",
navLabelKey: "nav.performanceManagement",
},
objective: {
basePath: "/objective-management",
planYearsPath: "/objective-management/plan-years",
navLabelKey: "nav.objectiveManagement",
},
};

View File

@@ -1,12 +1,12 @@
import { useLocation } from "react-router-dom";
import { ModuleKey } from "./routeConfig";
export function useActiveModule(): ModuleKey {
const { pathname } = useLocation();
if (pathname.startsWith("/objective-management")) {
return "objective";
}
return "performance";
}
import { useLocation } from "react-router-dom";
import { ModuleKey } from "./routeConfig";
export function useActiveModule(): ModuleKey {
const { pathname } = useLocation();
if (pathname.startsWith("/objective-management")) {
return "objective";
}
return "performance";
}