2024-05-29 17:58:57 +07:00
|
|
|
/**ใช้รวมไฟล์ย่อยๆ ของ api แต่ละไฟล์ */
|
|
|
|
|
|
|
|
|
|
/** API Metadata */
|
2024-07-01 09:19:17 +07:00
|
|
|
import manageOrganization from "./api/manage/api.organization"
|
|
|
|
|
import managePerson from "./api/manage/api.person"
|
|
|
|
|
import managePosition from "./api/manage/api.position"
|
|
|
|
|
import managePositionEmployee from "./api/manage/api.positionEmployee"
|
|
|
|
|
import manageInsignia from "./api/manage/api.insignia"
|
|
|
|
|
import manageHoliday from "./api/manage/api.holiday"
|
2024-05-29 17:58:57 +07:00
|
|
|
|
|
|
|
|
/** API Tree List */
|
2024-07-01 09:19:17 +07:00
|
|
|
import organizationTreeList from "./api/02_organizational/api.treelist"
|
2024-05-29 17:58:57 +07:00
|
|
|
|
|
|
|
|
/** API Structure & Org Chart */
|
2024-07-01 09:19:17 +07:00
|
|
|
import organizationChart from "./api/02_organizational/api.chart"
|
2024-05-29 17:58:57 +07:00
|
|
|
|
|
|
|
|
/** API Profile List */
|
2024-07-01 09:19:17 +07:00
|
|
|
import profile from "./api/registry/api.profile"
|
|
|
|
|
import registry from "./api/registry/api.registry"
|
2024-05-29 17:58:57 +07:00
|
|
|
|
|
|
|
|
/** API dashboard */
|
2024-07-01 09:19:17 +07:00
|
|
|
import message from "./api/00_dashboard/api.message"
|
2024-05-29 17:58:57 +07:00
|
|
|
|
|
|
|
|
/** API reports */
|
2024-07-01 09:19:17 +07:00
|
|
|
import reports from "./api/reports/api.report"
|
2024-05-29 17:58:57 +07:00
|
|
|
|
|
|
|
|
/** API โครงสร้างอัตรากำลัง*/
|
2024-07-01 09:19:17 +07:00
|
|
|
import organization from "./api/02_organizational/api.organization"
|
2024-05-29 17:58:57 +07:00
|
|
|
|
2024-07-01 09:19:17 +07:00
|
|
|
import file from "./api/file/api.file"
|
2024-05-29 17:58:57 +07:00
|
|
|
|
2024-05-30 14:04:48 +07:00
|
|
|
/** API ManagementUsers*/
|
2024-07-01 09:19:17 +07:00
|
|
|
import menagement from "./api/manage/api.management"
|
2024-05-30 14:04:48 +07:00
|
|
|
|
2024-06-06 14:33:31 +07:00
|
|
|
/** API ระเมินผลการปฏิบัติราชการระดับบุคคล*/
|
2024-07-01 09:19:17 +07:00
|
|
|
import KPI from "./api/14_KPI/api.KPI"
|
2024-06-06 14:33:31 +07:00
|
|
|
|
|
|
|
|
/** API เงินเดือน/ค่าจ้าง*/
|
2024-07-01 09:19:17 +07:00
|
|
|
import development from "./api/15_development/api.development"
|
2024-06-06 14:33:31 +07:00
|
|
|
|
2024-05-29 17:58:57 +07:00
|
|
|
// environment variables
|
2024-07-01 09:19:17 +07:00
|
|
|
export const compettitivePanel = import.meta.env.VITE_COMPETITIVE_EXAM_PANEL
|
|
|
|
|
export const qualifyDisableExamPanel = import.meta.env.VITE_QUALIFY_DISABLE_EMAM_PANEL
|
|
|
|
|
export const qualifyExamPanel = import.meta.env.VITE_QUALIFY_EXAM_PANEL
|
|
|
|
|
|
2024-07-03 10:47:02 +07:00
|
|
|
const path = "http://chamomind.ddns.net:20006"
|
2024-07-01 09:19:17 +07:00
|
|
|
|
|
|
|
|
const generatePopupPath = (routeName: any) => {
|
|
|
|
|
if (routeName.includes("viewLogs")) {
|
|
|
|
|
return `${path}/build-and-deploy`
|
|
|
|
|
}
|
|
|
|
|
if (routeName.includes("manageUsers")) {
|
|
|
|
|
return `${path}/build-and-deploy`
|
|
|
|
|
}
|
|
|
|
|
if (routeName.includes("manageRoles")) {
|
|
|
|
|
return `${path}/build-and-deploy`
|
|
|
|
|
}
|
|
|
|
|
if (routeName.includes("managePermission")) {
|
|
|
|
|
return `${path}/build-and-deploy`
|
|
|
|
|
} else {
|
|
|
|
|
return manualConfig[routeName as keyof typeof manualConfig]
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const manualConfig = {
|
|
|
|
|
dashboard: `${path}/build-and-deploy`,
|
|
|
|
|
}
|
2024-05-29 17:58:57 +07:00
|
|
|
const API = {
|
2024-07-01 09:19:17 +07:00
|
|
|
//Metadata
|
|
|
|
|
...manageOrganization,
|
|
|
|
|
...managePerson,
|
|
|
|
|
...managePosition,
|
|
|
|
|
...managePositionEmployee,
|
|
|
|
|
...manageInsignia,
|
|
|
|
|
...manageHoliday,
|
2024-05-29 17:58:57 +07:00
|
|
|
|
2024-07-01 09:19:17 +07:00
|
|
|
// โครงสร้างอัตรากำลัง
|
|
|
|
|
...organization,
|
2024-05-29 17:58:57 +07:00
|
|
|
|
2024-07-01 09:19:17 +07:00
|
|
|
//Tree List
|
|
|
|
|
...organizationTreeList,
|
|
|
|
|
...organizationChart,
|
2024-05-29 17:58:57 +07:00
|
|
|
|
2024-07-01 09:19:17 +07:00
|
|
|
//profile
|
|
|
|
|
...profile,
|
|
|
|
|
...registry,
|
2024-05-29 17:58:57 +07:00
|
|
|
|
2024-07-01 09:19:17 +07:00
|
|
|
//dashboard
|
|
|
|
|
...message,
|
2024-05-29 17:58:57 +07:00
|
|
|
|
2024-07-01 09:19:17 +07:00
|
|
|
//reports
|
|
|
|
|
...reports,
|
2024-05-29 17:58:57 +07:00
|
|
|
|
2024-07-01 09:19:17 +07:00
|
|
|
/*file*/
|
|
|
|
|
...file,
|
2024-05-30 14:04:48 +07:00
|
|
|
|
2024-07-01 09:19:17 +07:00
|
|
|
/** menagement*/
|
|
|
|
|
...menagement,
|
|
|
|
|
/** KPI*/
|
|
|
|
|
...KPI,
|
|
|
|
|
...development,
|
|
|
|
|
}
|
2024-05-29 17:58:57 +07:00
|
|
|
|
|
|
|
|
export default {
|
2024-07-01 09:19:17 +07:00
|
|
|
API: API,
|
|
|
|
|
generatePopupPath,
|
|
|
|
|
}
|