Merge branch 'develop' into devTee

This commit is contained in:
setthawutttty 2024-12-20 17:29:37 +07:00
commit 4dad94911b

View file

@ -34,9 +34,7 @@ const API = {
...reports, ...reports,
}; };
const path = const path = import.meta.env.VITE_MANUAL_URL ?? "e";
import.meta.env.VITE_MANUAL_URL ??
"https://bma-ehr-manual.frappet.synology.me";
/** /**
* *
@ -46,58 +44,56 @@ const path =
*/ */
const generatePopupPath = (routeName: any, type: string) => { const generatePopupPath = (routeName: any, type: string) => {
if (routeName.includes("organizationChart")) { if (routeName.includes("organizationChart")) {
return `${path}/manual/chapter-1-user${type}-organization-chart`; return `${path}/chapter-1-user${type}-organization-chart`;
} }
if (routeName.includes("registry")) { if (routeName.includes("registry")) {
return `${path}/manual/chapter-2-user${type}-registry`; return `${path}/chapter-2-user${type}-registry`;
} }
if (routeName.includes("evaluate")) { if (routeName.includes("evaluate")) {
return `${path}/manual/chapter-3-user-evaluate`; return `${path}/chapter-3-user-evaluate`;
} }
if (routeName.includes("leave")) { if (routeName.includes("leave")) {
return `${path}/manual/chapter-${type ? "3" : "4"}-user${type}-leave`; return `${path}/chapter-${type ? "3" : "4"}-user${type}-leave`;
} }
if (routeName.includes("portfolio")) { if (routeName.includes("portfolio")) {
return `${path}/manual/chapter-5-user-portfolio`; return `${path}/chapter-5-user-portfolio`;
} }
if (routeName.includes("transfer")) { if (routeName.includes("transfer")) {
return `${path}/manual/chapter-6-user-transfer`; return `${path}/chapter-6-user-transfer`;
} }
if (routeName.includes("appealComplain")) { if (routeName.includes("appealComplain")) {
return `${path}/manual/chapter-${ return `${path}/chapter-${type ? "4" : "7"}-user${type}-appeal-complain`;
type ? "4" : "7"
}-user${type}-appeal-complain`;
} }
if (routeName.includes("KPI-evaluator")) { if (routeName.includes("KPI-evaluator")) {
return `${path}/manual/chapter-9-user-KPI-evaluator`; return `${path}/chapter-9-user-KPI-evaluator`;
} }
if (routeName.includes("scholarship")) { if (routeName.includes("scholarship")) {
return `${path}/manual/chapter-10-user-scholarship`; return `${path}/chapter-10-user-scholarship`;
} }
if (routeName.includes("idp")) { if (routeName.includes("idp")) {
return `${path}/manual/chapter-11-user-Individual-development`; return `${path}/chapter-11-user-Individual-development`;
} }
if (routeName.includes("probation-reportMain")) { if (routeName.includes("probation-reportMain")) {
return `${path}/manual/chapter-14-user-service-testing`; return `${path}/chapter-14-user-service-testing`;
} }
if (routeName.includes("Retire")) { if (routeName.includes("Retire")) {
return `${path}/manual/chapter-${type ? "5" : "11"}-user${type}-retire`; return `${path}/chapter-${type ? "5" : "11"}-user${type}-retire`;
} else { } else {
return manualConfig[routeName as keyof typeof manualConfig]; return manualConfig[routeName as keyof typeof manualConfig];
} }
}; };
const manualConfig = { const manualConfig = {
dashboard: `${path}/manual/chapter-1-user-organization-chart`, dashboard: `${path}/chapter-1-user-organization-chart`,
leave: `${path}/manual/chapter-4-user-leave`, leave: `${path}/chapter-4-user-leave`,
organizationChart: `${path}/manual/chapter-1-user-organization-chart`, organizationChart: `${path}/chapter-1-user-organization-chart`,
registryMain: `${path}/manual/chapter-2-user-registry`, registryMain: `${path}/chapter-2-user-registry`,
addPortfolio: `${path}/manual/chapter-5-user-portfolio`, addPortfolio: `${path}/chapter-5-user-portfolio`,
addTransfer: `${path}/manual/chapter-6-user-transfer`, addTransfer: `${path}/chapter-6-user-transfer`,
KPIMain: `${path}/manual/chapter-8-user-KPI`, KPIMain: `${path}/chapter-8-user-KPI`,
KPIMainEvaluator: `${path}/manual/chapter-9-user-KPI-evaluator`, KPIMainEvaluator: `${path}/chapter-9-user-KPI-evaluator`,
}; };
export default { export default {