edit path manual
This commit is contained in:
parent
1dff367e7b
commit
f4c978cbcc
1 changed files with 21 additions and 25 deletions
|
|
@ -34,9 +34,7 @@ const API = {
|
|||
...reports,
|
||||
};
|
||||
|
||||
const path =
|
||||
import.meta.env.VITE_MANUAL_URL ??
|
||||
"https://bma-ehr-manual.frappet.synology.me";
|
||||
const path = import.meta.env.VITE_MANUAL_URL ?? "e";
|
||||
|
||||
/**
|
||||
* ไปหน้าคู่มือ
|
||||
|
|
@ -46,58 +44,56 @@ const path =
|
|||
*/
|
||||
const generatePopupPath = (routeName: any, type: string) => {
|
||||
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")) {
|
||||
return `${path}/manual/chapter-2-user${type}-registry`;
|
||||
return `${path}/chapter-2-user${type}-registry`;
|
||||
}
|
||||
if (routeName.includes("evaluate")) {
|
||||
return `${path}/manual/chapter-3-user-evaluate`;
|
||||
return `${path}/chapter-3-user-evaluate`;
|
||||
}
|
||||
|
||||
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")) {
|
||||
return `${path}/manual/chapter-5-user-portfolio`;
|
||||
return `${path}/chapter-5-user-portfolio`;
|
||||
}
|
||||
if (routeName.includes("transfer")) {
|
||||
return `${path}/manual/chapter-6-user-transfer`;
|
||||
return `${path}/chapter-6-user-transfer`;
|
||||
}
|
||||
if (routeName.includes("appealComplain")) {
|
||||
return `${path}/manual/chapter-${
|
||||
type ? "4" : "7"
|
||||
}-user${type}-appeal-complain`;
|
||||
return `${path}/chapter-${type ? "4" : "7"}-user${type}-appeal-complain`;
|
||||
}
|
||||
if (routeName.includes("KPI-evaluator")) {
|
||||
return `${path}/manual/chapter-9-user-KPI-evaluator`;
|
||||
return `${path}/chapter-9-user-KPI-evaluator`;
|
||||
}
|
||||
if (routeName.includes("scholarship")) {
|
||||
return `${path}/manual/chapter-10-user-scholarship`;
|
||||
return `${path}/chapter-10-user-scholarship`;
|
||||
}
|
||||
if (routeName.includes("idp")) {
|
||||
return `${path}/manual/chapter-11-user-Individual-development`;
|
||||
return `${path}/chapter-11-user-Individual-development`;
|
||||
}
|
||||
if (routeName.includes("probation-reportMain")) {
|
||||
return `${path}/manual/chapter-14-user-service-testing`;
|
||||
return `${path}/chapter-14-user-service-testing`;
|
||||
}
|
||||
if (routeName.includes("Retire")) {
|
||||
return `${path}/manual/chapter-${type ? "5" : "11"}-user${type}-retire`;
|
||||
return `${path}/chapter-${type ? "5" : "11"}-user${type}-retire`;
|
||||
} else {
|
||||
return manualConfig[routeName as keyof typeof manualConfig];
|
||||
}
|
||||
};
|
||||
|
||||
const manualConfig = {
|
||||
dashboard: `${path}/manual/chapter-1-user-organization-chart`,
|
||||
leave: `${path}/manual/chapter-4-user-leave`,
|
||||
organizationChart: `${path}/manual/chapter-1-user-organization-chart`,
|
||||
registryMain: `${path}/manual/chapter-2-user-registry`,
|
||||
addPortfolio: `${path}/manual/chapter-5-user-portfolio`,
|
||||
addTransfer: `${path}/manual/chapter-6-user-transfer`,
|
||||
KPIMain: `${path}/manual/chapter-8-user-KPI`,
|
||||
KPIMainEvaluator: `${path}/manual/chapter-9-user-KPI-evaluator`,
|
||||
dashboard: `${path}/chapter-1-user-organization-chart`,
|
||||
leave: `${path}/chapter-4-user-leave`,
|
||||
organizationChart: `${path}/chapter-1-user-organization-chart`,
|
||||
registryMain: `${path}/chapter-2-user-registry`,
|
||||
addPortfolio: `${path}/chapter-5-user-portfolio`,
|
||||
addTransfer: `${path}/chapter-6-user-transfer`,
|
||||
KPIMain: `${path}/chapter-8-user-KPI`,
|
||||
KPIMainEvaluator: `${path}/chapter-9-user-KPI-evaluator`,
|
||||
};
|
||||
|
||||
export default {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue