route manual

This commit is contained in:
setthawutttty 2025-06-23 10:05:41 +07:00
parent 7c6aaeb520
commit f6e4520b61

View file

@ -151,98 +151,126 @@ const API = {
const path = import.meta.env.VITE_MANUAL_URL ?? "";
const generatePopupPath = (routeName: any) => {
console.log("🚀 ~ generatePopupPath ~ routeName:", routeName);
if (routeName.includes("metadata")) {
return `${path}/chapter-2-admin-metadata`;
} else if (routeName.includes("registryNew")) {
return `${path}/chapter-6-1-admin-registry`;
} else if (routeName.includes("registryEmployeeList")) {
return `${path}/chapter-6-2-admin-registry`;
} else if (routeName.includes("registry-employee")) {
return `${path}/chapter-6-3-admin-registry`;
} else if (routeName == "registryNew" || routeName == "registryNewByid") {
return `${path}/chapter-2-1-admin-registry`;
} else if (
routeName == "registryEmployeeList" ||
routeName == "registryNewEmployeeByid"
) {
return `${path}/chapter-2-2-admin-registry`;
} else if (routeName == "registry-employee") {
return `${path}/chapter-2-3-admin-registry`;
} else if (routeName.includes("acting")) {
return `${path}/chapter-4-admin-acting`;
return `${path}/chapter-7-admin-acting`;
} else if (routeName.includes("positionEmployee")) {
return `${path}/chapter-5-admin-position-employee`;
} else if (routeName == "retirement") {
return `${path}/chapter-11-admin-retirement`;
return `${path}/chapter-14-admin-retirement`;
} else if (routeName == "resign") {
return `${path}/chapter-11-2-admin-retirement`;
return `${path}/chapter-14-2-admin-retirement`;
} else if (routeName == "resignEmployee") {
return `${path}/chapter-11-3-admin-retirement`;
return `${path}/chapter-14-3-admin-retirement`;
} else if (routeName == "exit-Interview") {
return `${path}/chapter-11-4-admin-retirement`;
return `${path}/chapter-14-4-admin-retirement`;
} else if (routeName == "deceased") {
return `${path}/chapter-11-5-admin-retirement`;
return `${path}/chapter-14-5-admin-retirement`;
} else if (routeName == "dismiss-order") {
return `${path}/chapter-11-6-admin-retirement`;
return `${path}/chapter-14-6-admin-retirement`;
} else if (routeName == "dismiss-order-emp") {
return `${path}/chapter-14-7-admin-retirement`;
} else if (routeName == "retireReport") {
return `${path}/chapter-14-8-admin-retirement`;
} else if (routeName.includes("disciplineComplaints")) {
return `${path}/chapter-14-admin-discipline-complaints`;
return `${path}/chapter-17-admin-discipline-complaints`;
} else if (routeName.includes("disciplineInvestigatefacts")) {
return `${path}/chapter-14-2-admin-discipline-investigatefacts`;
return `${path}/chapter-17-2-admin-discipline-investigatefacts`;
} else if (routeName.includes("disciplineDisciplinary")) {
return `${path}/chapter-14-3-admin-discipline-disciplinary`;
return `${path}/chapter-17-3-admin-discipline-disciplinary`;
} else if (routeName.includes("disciplineResult")) {
return `${path}/chapter-14-4-admin-discipline-result`;
return `${path}/chapter-17-4-admin-discipline-result`;
} else if (routeName.includes("disciplineListSuspend")) {
return `${path}/chapter-14-5-admin-discipline-suspend`;
return `${path}/chapter-17-5-admin-discipline-suspend`;
} else if (routeName.includes("appealComplain")) {
return `${path}/chapter-14-6-admin-discipline-appealcomplain`;
return `${path}/chapter-17-6-admin-discipline-appealcomplain`;
} else if (routeName.includes("disciplineDirector")) {
return `${path}/chapter-14-7-admin-discipline-director`;
return `${path}/chapter-17-7-admin-discipline-director`;
} else if (routeName.includes("disciplineChannel")) {
return `${path}/chapter-14-7-2-admin-discipline-channel`;
return `${path}/chapter-17-7-2-admin-discipline-channel`;
} else if (routeName.includes("disciplineReport")) {
return `${path}/chapter-17-8-admin-discipline-report`;
} else if (routeName.includes("KPIIndicatorByPlan")) {
return `${path}/chapter-2-admin-evaluate`;
return `${path}/chapter-9-admin-indicator-plan`;
} else if (routeName.includes("KPIIndicatorByRole")) {
return `${path}/chapter-2-1-2-admin-evaluate`;
return `${path}/chapter-9-1-2-admin-indicator-role`;
} else if (routeName.includes("KPIAssignment")) {
return `${path}/chapter-2-1-3-admin-evaluate`;
return `${path}/chapter-9-1-3-admin-indicator-assignment`;
} else if (routeName.includes("KPICompetency")) {
return `${path}/chapter-2-2-admin-evaluate`;
return `${path}/chapter-9-2-admin-competency`;
} else if (routeName.includes("strategic")) {
return `${path}/chapter-2-3-admin-evaluate`;
return `${path}/chapter-9-3-admin-strategic`;
} else if (routeName == "commandListPage") {
return `${path}/chapter-7-admin-order`;
return `${path}/chapter-10-admin-order`;
} else if (routeName == "competePeriod") {
return `${path}/chapter-8-3-admin-compete-period`;
return `${path}/chapter-11-3-admin-compete-period`;
} else if (routeName == "qualifyPeriod") {
return `${path}/chapter-8-4-1-admin-qualify-period`;
return `${path}/chapter-11-4-1-admin-qualify-period`;
} else if (routeName == "disablePeriod") {
return `${path}/chapter-8-4-2-admin-disable-period`;
return `${path}/chapter-11-4-2-admin-disable-period`;
} else if (routeName == "manage") {
return `${path}/chapter-8-4-3-admin-qualify-manage`;
return `${path}/chapter-11-4-3-admin-qualify-manage`;
} else if (routeName == "qualifyPeriodStat") {
return `${path}/chapter-8-4-4-admin-qualify-period-stat`;
return `${path}/chapter-11-4-4-admin-qualify-period-stat`;
} else if (routeName == "qualifyPeriodStatDisable") {
return `${path}/chapter-8-4-5-admin-qualify-disable-stat`;
return `${path}/chapter-11-4-5-admin-qualify-disable-stat`;
} else if (routeName.includes("competePeriodStat")) {
return `${path}/chapter-8-3-2-admin-compete-period-stat`;
return `${path}/chapter-11-3-2-admin-compete-period-stat`;
} else if (routeName.includes("probation")) {
return `${path}/chapter-10-admin-probation`;
return `${path}/chapter-13-admin-probation`;
} else if (routeName.includes("insigniaProposals")) {
return `${path}/chapter-12-admin-insignia`;
} else if (routeName.includes("insigniaManage")) {
return `${path}/chapter-12-2-admin-insignia`;
} else if (routeName.includes("insigniaRecord")) {
return `${path}/chapter-12-3-admin-insignia`;
return `${path}/chapter-15-admin-insignia`;
} else if (routeName == "insigniaManage") {
return `${path}/chapter-15-2-admin-insignia`;
} else if (routeName == "insigniaManageEmp") {
return `${path}/chapter-15-3-admin-insignia`;
} else if (routeName == "insigniaRecord") {
return `${path}/chapter-15-4-admin-insignia`;
} else if (routeName == "insigniaRecordEmp") {
return `${path}/chapter-15-5-admin-insignia`;
} else if (routeName.includes("insigniaAllocate")) {
return `${path}/chapter-12-4-admin-insignia`;
return `${path}/chapter-15-6-admin-insignia`;
} else if (routeName.includes("insigniaBorrow")) {
return `${path}/chapter-12-5-admin-insignia`;
return `${path}/chapter-15-7-admin-insignia`;
} else if (routeName == "insigniaReclaim") {
return `${path}/chapter-15-8-admin-insignia`;
} else if (routeName.includes("insigniaReport")) {
return `${path}/chapter-12-6-admin-insignia`;
return `${path}/chapter-15-9-admin-insignia`;
} else if (routeName.includes("roundTime")) {
return `${path}/chapter-13-admin-leave`;
return `${path}/chapter-16-admin-leave`;
} else if (routeName.includes("workList")) {
return `${path}/chapter-13-2-admin-leave`;
return `${path}/chapter-16-2-admin-leave`;
} else if (routeName.includes("changeRound")) {
return `${path}/chapter-13-3-admin-leave`;
return `${path}/chapter-16-3-admin-leave`;
} else if (routeName.includes("timestampSpecial")) {
return `${path}/chapter-13-4-admin-leave`;
return `${path}/chapter-16-4-admin-leave`;
} else if (routeName == "checkinReport") {
return `${path}/chapter-16-5-admin-leave`;
} else if (routeName == "leave") {
return `${path}/chapter-13-5-admin-leave`;
return `${path}/chapter-16-6-admin-leave`;
} else if (routeName == "leaveHistory") {
return `${path}/chapter-16-7-admin-leave`;
} else if (routeName == "leaveReport") {
return `${path}/chapter-13-6-admin-leave`;
return `${path}/chapter-16-8-admin-leave`;
} else if (routeName == "registryRetireOfficer") {
return `${path}/chapter-3-admin-registry-retire-officer`;
} else if (routeName == "registryRetireEmployee") {
return `${path}/chapter-3-2-admin-registry-retire-employee`;
} else if (routeName == "positionTemp") {
return `${path}/chapter-6-admin-position-temp`;
} else if (routeName == "competeReport") {
return `${path}/chapter-11-3-3-admin-compete-report`;
} else if (
routeName.includes("qualify") ||
routeName.includes("recruiting") ||
@ -252,39 +280,39 @@ const generatePopupPath = (routeName: any) => {
) {
return `${path}/chapter-9-admin-recruit`;
} else if (routeName.includes("developmentMain")) {
return `${path}/chapter-18-admin-development`;
return `${path}/chapter-21-admin-development`;
} else if (routeName.includes("developmentHistory")) {
return `${path}/chapter-18-2-admin-development-history`;
return `${path}/chapter-21-2-admin-development-history`;
} else if (routeName.includes("developmentEmployeeHistory")) {
return `${path}/chapter-18-3-admin-development-employee-history`;
return `${path}/chapter-21-3-admin-development-employee-history`;
} else if (routeName.includes("developmentScholarship")) {
return `${path}/chapter-18-4-admin-development-scholarship`;
return `${path}/chapter-21-4-admin-development-scholarship`;
} else if (routeName == "evaluate") {
return `${path}/chapter-15-admin-KPI`;
return `${path}/chapter-18-admin-evaluate`;
} else if (routeName == "evaluateDirector") {
return `${path}/chapter-15-2-admin-KPI`;
return `${path}/chapter-18-2-admin-evaluate-director`;
} else if (routeName == "evaluateMeeting") {
return `${path}/chapter-15-2-2-admin-KPI`;
return `${path}/chapter-18-2-2-admin-evaluate-meeting`;
} else if (routeName == "salaryChart") {
return `${path}/chapter-16-admin-salary`;
return `${path}/chapter-19-admin-salary`;
} else if (routeName == "salaryEmployeeChart") {
return `${path}/chapter-16-2-admin-salary`;
return `${path}/chapter-19-2-admin-salary-employee`;
} else if (routeName == "salaryRound") {
return `${path}/chapter-16-3-admin-salary`;
return `${path}/chapter-19-3-admin-salary-round`;
} else if (routeName == "salaryLists") {
return `${path}/chapter-16-4-admin-salary`;
return `${path}/chapter-19-4-admin-salary-lists`;
} else if (routeName == "salaryEmployeeLists") {
return `${path}/chapter-16-5-admin-salary`;
return `${path}/chapter-19-5-admin-salary-employee-lists`;
} else if (routeName == "KPIRound") {
return `${path}/chapter-17-admin-development`;
return `${path}/chapter-20-admin-KPI-round`;
} else if (routeName == "KPIList") {
return `${path}/chapter-17-2-admin-development-history`;
return `${path}/chapter-20-2-admin-KPI-list`;
} else if (routeName == "KPIResults") {
return `${path}/chapter-17-3-admin-development-employee-history`;
return `${path}/chapter-20-3-admin-KPI-results`;
} else if (routeName == "KPIReport") {
return `${path}/chapter-17-4-admin-development-scholarship`;
return `${path}/chapter-20-4-admin-KPI-report`;
} else if (routeName == "positionCondition") {
return `${path}/chapter-19-admin-position-condition`;
return `${path}/chapter-8-admin-position-condition`;
} else {
return manualConfig[routeName as keyof typeof manualConfig];
}
@ -292,19 +320,19 @@ const generatePopupPath = (routeName: any) => {
const manualConfig = {
dashboard: `${path}/`,
strategic: `${path}/chapter-2-admin-evaluate`,
KPIIndicatorByRoleAdd: `${path}/chapter-2-admin-evaluate`,
KPIIndicatorByPlan: `${path}/chapter-2-admin-evaluate`,
"KPIIndicatorByPlan/Add": `${path}/chapter-2-admin-evaluate`,
KPIIndicatorByPlanByid: `${path}/chapter-2-admin-evaluate`,
KPIIndicatorByRoleByid: `${path}/chapter-2-admin-evaluate`,
KPICompetency: `${path}/chapter-2-admin-evaluate`,
KPIAssignment: `${path}/chapter-2-admin-evaluate`,
KPIAssignmentById: `${path}/chapter-2-admin-evaluate`,
KPIIndicatorByRole: `${path}/chapter-2-admin-evaluate`,
KPICompetencyAdd: `${path}/chapter-2-admin-evaluate`,
KPICompetencyByid: `${path}/chapter-2-admin-evaluate`,
organizationalNew: `${path}/chapter-3-admin-organization`,
strategic: `${path}/chapter-9-admin-indicator-plan`,
KPIIndicatorByRoleAdd: `${path}/chapter-9-1-2-admin-indicator-role`,
KPIIndicatorByPlan: `${path}/chapter-9-admin-indicator-plan`,
"KPIIndicatorByPlan/Add": `${path}/chapter-9-admin-indicator-plan`,
KPIIndicatorByPlanByid: `${path}/chapter-9-admin-indicator-plan`,
KPIIndicatorByRoleByid: `${path}/chapter-9-admin-indicator-plan`,
KPICompetency: `${path}/chapter-9-2-admin-competency`,
KPIAssignment: `${path}/chapter-9-admin-indicator-plan`,
KPIAssignmentById: `${path}/chapter-9-admin-indicator-plan`,
KPIIndicatorByRole: `${path}/chapter-9-admin-indicator-plan`,
KPICompetencyAdd: `${path}/chapter-9-2-admin-competency`,
KPICompetencyByid: `${path}/chapter-9-2-admin-competency`,
organizationalNew: `${path}/chapter-4-admin-organization`,
organization: `${path}/chapter-6-admin-registry`,
registry: `${path}/chapter-6-admin-registry`,
registryDetail: `${path}/chapter-6-admin-registry`,
@ -312,24 +340,21 @@ const manualConfig = {
order: `${path}/chapter-8-admin-order`,
OrderDetail: `${path}/chapter-8-admin-order`,
OrderAdd: `${path}/chapter-8-admin-order`,
editorweb: `${path}/chapter-8-admin-recruit`,
editorweb: `${path}/chapter-11-admin-recruit`,
placement: `${path}/chapter-9-admin-placement`,
transfer: `${path}/chapter-9-2-admin-transfer`,
receive: `${path}/chapter-9-3-admin-receive`,
"help-government": `${path}/chapter-9-4-admin-help-government`,
repatriate: `${path}/chapter-9-5-admin-repatriate`,
"appoint-promote": `${path}/chapter-9-6-admin-appoint-promote`,
"appoint-employee": `${path}/chapter-9-7-admin-appoint-employee`,
other: `${path}/chapter-9-8-admin-other`,
placement: `${path}/chapter-12-admin-placement`,
transfer: `${path}/chapter-12-2-admin-transfer`,
receive: `${path}/chapter-12-3-admin-receive`,
"help-government": `${path}/chapter-12-4-admin-help-government`,
repatriate: `${path}/chapter-12-5-admin-repatriate`,
"appoint-promote": `${path}/chapter-12-6-admin-appoint-promote`,
"appoint-employee": `${path}/chapter-12-7-admin-appoint-employee`,
other: `${path}/chapter-12-8-admin-other`,
placementReport: `${path}/chapter-12-9-admin-placement-repoet`,
probation: `${path}/chapter-11-admin-probation`,
probationDetail: `${path}/chapter-11-admin-probation`,
probationForm: `${path}/chapter-11-admin-probation`,
retirement: `${path}/chapter-12-admin-retirement`,
resign: `${path}/chapter-12-admin-retirement`,
ExitInterviewEditQuestion: `${path}/chapter-12-admin-retirement`,
"dismiss-order": `${path}/chapter-12-admin-retirement`,
"report-report": `${path}/chapter-13-admin-insignia`,
"report-report-01": `${path}/chapter-13-admin-insignia`,
roundTime: `${path}/chapter-14-admin-leave`,