83 lines
2.6 KiB
TypeScript
83 lines
2.6 KiB
TypeScript
// P17 HR-Hub core (AK-P17a) — pure route-path builders for HR URLs. Loaders build
|
|
// these and pass them into the View-Models so the VMs stay routing-agnostic.
|
|
//
|
|
// Tenant connector module key. It lives in this client-safe module (not in
|
|
// hrAccess.server) so a route `handle` export can reference it without dragging
|
|
// the server-only access guard into the client bundle (RR code-splitting only
|
|
// strips loader/action/middleware/headers, not `handle`).
|
|
export const HR_MODULE_KEY = "hr";
|
|
|
|
export function hrHubPath(tenantSlug: string): string {
|
|
return `/${tenantSlug}/hr`;
|
|
}
|
|
|
|
export function hrDirectoryPath(tenantSlug: string): string {
|
|
return `/${tenantSlug}/hr/directory`;
|
|
}
|
|
|
|
export function hrDirectoryDetailPath(tenantSlug: string, userId: string): string {
|
|
return `/${tenantSlug}/hr/directory/${userId}`;
|
|
}
|
|
|
|
export function hrLocationsPath(tenantSlug: string): string {
|
|
return `/${tenantSlug}/hr/locations`;
|
|
}
|
|
|
|
export function hrMyDocumentsPath(tenantSlug: string): string {
|
|
return `/${tenantSlug}/hr/my-documents`;
|
|
}
|
|
|
|
// --- AK-P17b workflow paths ------------------------------------------------
|
|
|
|
export function hrLeavePath(tenantSlug: string): string {
|
|
return `/${tenantSlug}/hr/leave`;
|
|
}
|
|
|
|
export function hrSickPath(tenantSlug: string): string {
|
|
return `/${tenantSlug}/hr/sick`;
|
|
}
|
|
|
|
export function hrAnnouncementsPath(tenantSlug: string): string {
|
|
return `/${tenantSlug}/hr/announcements`;
|
|
}
|
|
|
|
export function hrAnnouncementDetailPath(tenantSlug: string, announcementId: string): string {
|
|
return `/${tenantSlug}/hr/announcements/${announcementId}`;
|
|
}
|
|
|
|
export function hrAdminAnnouncementsPath(tenantSlug: string): string {
|
|
return `/${tenantSlug}/hr/admin/announcements`;
|
|
}
|
|
|
|
export function hrPayslipsPath(tenantSlug: string): string {
|
|
return `/${tenantSlug}/hr/payslips`;
|
|
}
|
|
|
|
export function hrAdminPayslipsPath(tenantSlug: string): string {
|
|
return `/${tenantSlug}/hr/admin/payslips`;
|
|
}
|
|
|
|
export function hrRequestsPath(tenantSlug: string): string {
|
|
return `/${tenantSlug}/hr/requests`;
|
|
}
|
|
|
|
export function hrAdminRequestTemplatesPath(tenantSlug: string): string {
|
|
return `/${tenantSlug}/hr/admin/request-templates`;
|
|
}
|
|
|
|
export function hrSurveysPath(tenantSlug: string): string {
|
|
return `/${tenantSlug}/hr/surveys`;
|
|
}
|
|
|
|
export function hrSurveyParticipatePath(tenantSlug: string, surveyId: string): string {
|
|
return `/${tenantSlug}/hr/surveys/${surveyId}`;
|
|
}
|
|
|
|
export function hrSurveyResultsPath(tenantSlug: string, surveyId: string): string {
|
|
return `/${tenantSlug}/hr/surveys/${surveyId}/results`;
|
|
}
|
|
|
|
export function hrAdminUploadRemindersPath(tenantSlug: string): string {
|
|
return `/${tenantSlug}/hr/admin/upload-reminders`;
|
|
}
|