diff --git a/entrypoint.sh b/entrypoint.sh index 9aac55098..f9467745a 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -18,6 +18,7 @@ do sed -i 's|VITE_REALM_KEYCLOAK|'${VITE_REALM_KEYCLOAK}'|g' $file sed -i 's|VITE_CLIENTID_KEYCLOAK|'${VITE_CLIENTID_KEYCLOAK}'|g' $file sed -i 's|VITE_CLIENTSECRET_KEYCLOAK|'${VITE_CLIENTSECRET_KEYCLOAK}'|g' $file + sed -i 's|VITE_MANUAL_URL|'${VITE_MANUAL_URL}'|g' $file done diff --git a/src/app.config.ts b/src/app.config.ts index e973145ce..03d765ebe 100644 --- a/src/app.config.ts +++ b/src/app.config.ts @@ -137,67 +137,52 @@ const API = { ...file, }; -const path = "https://bma-ehr-manual.frappet.synology.me"; +const path = + import.meta.env.VITE_MANUAL_URL ?? + "https://bma-ehr-manual.frappet.synology.me"; const generatePopupPath = (routeName: any) => { if (routeName.includes("metadata")) { return `${path}/manual/chapter-2-admin-metadata`; - } - // if (routeName.includes("KPI")) { - // return `${path}/manual/chapter-3-admin-evaluate`; - // } - if (routeName.includes("compete")) { - return `${path}/manual/chapter-9-admin-recruit`; - } - if (routeName.includes("registryNew")) { + } else if (routeName.includes("registryNew")) { return `${path}/manual/chapter-6-admin-registry`; - } - if (routeName.includes("registry-employee")) { + } else if (routeName.includes("registry-employee")) { return `${path}/manual/chapter-7-admin-registry-employee`; - } - if (routeName.includes("qualify")) { - return `${path}/manual/chapter-9-admin-recruit`; - } - if (routeName.includes("insignia")) { + } else if (routeName.includes("insignia")) { return `${path}/manual/chapter-13-admin-insignia`; - } - if (routeName.includes("acting")) { - return `${path}/manual/chapter-5-admin-acting`; - } - if (routeName.includes("positionEmployee")) { - return `${path}/manual/chapter-6-admin-position-employee`; - } - if (routeName.includes("resign")) { + } else if (routeName.includes("acting")) { + return `${path}/manual/chapter-4-admin-acting`; + } else if (routeName.includes("positionEmployee")) { + return `${path}/manual/chapter-5-admin-position-employee`; + } else if (routeName.includes("resign")) { return `${path}/manual/chapter-12-admin-retirement`; - } - if (routeName.includes("retirement")) { + } else if (routeName.includes("retirement")) { return `${path}/manual/chapter-12-admin-retirement`; - } - if (routeName.includes("deceased")) { + } else if (routeName.includes("deceased")) { return `${path}/manual/chapter-12-admin-retirement`; - } - if (routeName.includes("exit-Interview")) { + } else if (routeName.includes("exit-Interview")) { return `${path}/manual/chapter-12-admin-retirement`; - } - if (routeName.includes("expulsion")) { + } else if (routeName.includes("expulsion")) { return `${path}/manual/chapter-12-admin-retirement`; - } - if (routeName.includes("discharged")) { + } else if (routeName.includes("discharged")) { return `${path}/manual/chapter-12-admin-retirement`; - } - if (routeName.includes("discipline")) { + } else if (routeName.includes("discipline")) { return `${path}/manual/chapter-15-admin-discipline`; - } - if (routeName.includes("appeal")) { + } else if (routeName.includes("appeal")) { return `${path}/manual/chapter-15-admin-discipline`; - } - if (routeName.includes("evaluate")) { - return `${path}/manual/chapter-16-admin-KPI`; - } - if (routeName.includes("salary")) { + } else if (routeName.includes("KPI")) { + return `${path}/manual/chapter-18-admin-perf-evaluation`; + } else if (routeName.includes("salary")) { return `${path}/manual/chapter-17-admin-salary`; - } - if (routeName.includes("development")) { + } else if ( + routeName.includes("qualify") || + routeName.includes("recruiting") || + routeName.includes("compete") || + routeName.includes("disable") || + routeName.includes("manage") + ) { + return `${path}/manual/chapter-9-admin-recruit`; + } else if (routeName.includes("development")) { return `${path}/manual/chapter-19-admin-development`; } else { return manualConfig[routeName as keyof typeof manualConfig]; @@ -226,12 +211,7 @@ const manualConfig = { order: `${path}/manual/chapter-8-admin-order`, OrderDetail: `${path}/manual/chapter-8-admin-order`, OrderAdd: `${path}/manual/chapter-8-admin-order`, - disableperiod: `${path}/manual/chapter-9-admin-recruit`, - manage: `${path}/manual/chapter-9-admin-recruit`, editorweb: `${path}/manual/chapter-9-admin-recruit`, - manageDetaill: `${path}/manual/chapter-9-admin-recruit`, - ExamForm: `${path}/manual/chapter-9-admin-recruit`, - Payment: `${path}/manual/chapter-9-admin-recruit`, placement: `${path}/manual/chapter-10-admin-appointment`, transfer: `${path}/manual/chapter-10-admin-appointment`, receive: `${path}/manual/chapter-10-admin-appointment`, @@ -241,6 +221,8 @@ const manualConfig = { "appoint-employee": `${path}/manual/chapter-10-admin-appointment`, other: `${path}/manual/chapter-10-admin-appointment`, probation: `${path}/manual/chapter-11-admin-probation`, + probationDetail: `${path}/manual/chapter-11-admin-probation`, + probationForm: `${path}/manual/chapter-11-admin-probation`, retirement: `${path}/manual/chapter-12-admin-retirement`, resign: `${path}/manual/chapter-12-admin-retirement`, ExitInterviewEditQuestion: `${path}/manual/chapter-12-admin-retirement`, @@ -256,11 +238,13 @@ const manualConfig = { leaveRejectDetail: `${path}/manual/chapter-14-admin-leave`, leaveReport: `${path}/manual/chapter-14-admin-leave`, appealComplain: `${path}/manual/chapter-15-admin-discipline`, - KPIRound: `${path}/manual/chapter-18-admin-perf-evaluation`, - "KPI​List": `${path}/manual/chapter-18-admin-perf-evaluation`, - KPIDetail: `${path}/manual/chapter-18-admin-perf-evaluation`, - KPIReport: `${path}/manual/chapter-18-admin-perf-evaluation`, - KPIDetailnew: `${path}/manual/chapter-18-admin-perf-evaluation`, + // KPIRound: `${path}/manual/chapter-18-admin-perf-evaluation`, + // "KPI​List": `${path}/manual/chapter-18-admin-perf-evaluation`, + // KPIDetail: `${path}/manual/chapter-18-admin-perf-evaluation`, + // KPIReport: `${path}/manual/chapter-18-admin-perf-evaluation`, + // KPIDetailnew: `${path}/manual/chapter-18-admin-perf-evaluation`, + evaluate: `${path}/manual/chapter-16-admin-KPI`, + evaluateDetail: `${path}/manual/chapter-16-admin-KPI`, }; export default { diff --git a/src/stores/menuList.ts b/src/stores/menuList.ts index 6aeeb2842..cfdba272d 100644 --- a/src/stores/menuList.ts +++ b/src/stores/menuList.ts @@ -13,18 +13,7 @@ import type { export const useMenuDataStore = defineStore("menuUse", () => { /****************** เมนู **************************/ /** รายการเมนู*/ - const menuList = ref([ - { - id: "dashboard", - order: 0, - icon: "mdi-home-variant-outline", - sysName: "หน้าแรก", - sysDescription: "หน้าแรก", - path: "dashboard", - parentId: null, - children: [], - }, - ]); + const menuList = ref([]); /** ข้อมูล Level3*/ const childLevelTree = ref({ @@ -117,7 +106,19 @@ export const useMenuDataStore = defineStore("menuUse", () => { */ function fetchListMenu(data: ListMenu[]) { if (data) { - menuList.value.push(...data); + menuList.value = [ + { + id: "dashboard", + order: 0, + icon: "mdi-home-variant-outline", + sysName: "หน้าแรก", + sysDescription: "หน้าแรก", + path: "dashboard", + parentId: null, + children: [], + }, + ...data, + ]; } }