hrms-mgt/src/api/05_placement/api.placement.ts

155 lines
7.5 KiB
TypeScript
Raw Normal View History

2023-06-01 12:54:58 +07:00
import env from "../index";
2023-07-13 12:30:57 +07:00
const placement = `${env.API_PLACEMENT_URI}/placement`;
const orgTree = `${env.API_URI_ORG_TREE}`;
2023-08-04 12:07:24 +07:00
const order = `${env.API_PLACEMENT_URI}`;
const receive = `${env.API_PLACEMENT_URI}/placement/Receive`;
const transfer = `${placement}/transfer`;
2023-08-11 14:06:28 +07:00
const placemenHelpGov = `${placement}/officer`;
const placemenRepatriation = `${placement}/repatriation`;
const placemenRelocation = `${placement}/relocation`;
const placemenOther = `${env.API_URI}/retirement/other`;
2023-08-15 18:12:52 +07:00
const placemenAppointment = `${placement}/appointment`;
2023-07-13 09:10:43 +07:00
export default {
2023-07-12 14:50:35 +07:00
MainDetail: (year: number) => `${placement}/exam/${year}`,
yearOptions: () => `${placement}/fiscal`,
personalList: (examId: string) => `${placement}/pass/${examId}`,
2023-07-12 14:50:35 +07:00
disclaimF: () => `${placement}/pass/disclaim`,
2023-07-12 16:56:52 +07:00
deferment: () => `${placement}/pass/deferment`,
2023-07-12 14:50:35 +07:00
getStatCard: (examId: string) => `${placement}/pass/stat/${examId}`,
getDatapersonal: (id: string) => `${placement}/personal/${id}`,
putProperty: (id: string) => `${placement}/property/${id}`,
orgTree: orgTree,
placementPass: () => `${placement}/pass`,
placementDefermentInfo: (id: string) => `${placement}/pass/deferment/${id}`,
placementDisclaimInfo: (id: string) => `${placement}/pass/disclaim/${id}`,
2023-07-13 09:10:43 +07:00
//personal
placementPersonalId: (personalId: string) =>
2023-07-13 09:38:48 +07:00
`${placement}/personal/${personalId}`,
2023-07-13 09:10:43 +07:00
//personal
placementPropertyId: (personalId: string) =>
2023-07-13 09:38:48 +07:00
`${placement}/property/${personalId}`,
2023-07-13 09:10:43 +07:00
//information
placementInformationId: (personalId: string) =>
2023-07-13 09:38:48 +07:00
`${placement}/information/${personalId}`,
2023-07-13 09:10:43 +07:00
//address
placementAddressId: (personalId: string) =>
2023-07-13 09:38:48 +07:00
`${placement}/address/${personalId}`,
2023-07-13 09:10:43 +07:00
//family
2023-07-13 09:38:48 +07:00
placementFamilyId: (personalId: string) =>
`${placement}/family/${personalId}`,
2023-07-13 09:10:43 +07:00
//certificate
placementCertId: (personalId: string) =>
2023-07-13 09:38:48 +07:00
`${placement}/certificate/${personalId}`,
2023-07-13 09:10:43 +07:00
placementCertDetailId: (personalId: string, certificateId: string) =>
2023-07-13 09:38:48 +07:00
`${placement}/certificate/${personalId}/${certificateId}`,
2023-07-13 09:10:43 +07:00
//education
2023-07-13 09:38:48 +07:00
placementEducationId: (id: string) => `${placement}/education/${id}`,
// position
2023-07-13 17:30:16 +07:00
placementPosition: () => `${placement}/position/use`,
2023-07-20 17:57:05 +07:00
// putPositiom
2023-08-04 12:07:24 +07:00
putPosition: (id: any) => `${placement}/position/${id}`,
// clear Position
clearPosition: (personalId: string) =>
`${placement}/position/clear/${personalId}`,
2023-08-04 12:07:24 +07:00
// order
organizationsOrder: () => `${order}/order/organizations`,
approverOC: (id: string) => `${order}/order/approver/${id}`,
2023-08-04 12:07:24 +07:00
yearOptionsOrder: () => `${order}/order/fiscal-year`,
listOrder: () => `${order}/order`,
2023-08-07 18:12:26 +07:00
detailOrder: (orderId: string) => `${order}/order/detail/${orderId}`,
deleteOrder: (orderId: string) => `${order}/order/${orderId}`,
2023-08-04 12:07:24 +07:00
typeOrder: () => `${order}/order/order-type`,
2023-08-08 11:25:44 +07:00
nextStep: (orderId: string) => `${order}/order/next/${orderId}`,
prevStep: (orderId: string) => `${order}/order/prev/${orderId}`,
executeOrder: (orderId: string) => `${order}/order/execute/${orderId}`,
createOrder: () => `${order}/order/detail`,
2023-08-04 12:07:24 +07:00
examroundOrder: () => `${order}/order/detail/exam-round`,
personsOrder: (orderId: string) => `${order}/order/persons/${orderId}`, //ข้อมูลเลือกรายชื่อออกคำสั่ง, ลบรายชื่อ
personsselectedOrder: (orderId: string) =>
`${order}/order/persons-selected/${orderId}`,
nextOrder: (orderId: string) => `${order}/order/next/${orderId}`, //เปลี่ยน status ของคำสั่งไปขั้นตอนถัดไป
preventOrder: (orderId: string) => `${order}/order/prev/${orderId}`, //เปลี่ยน status ของคำสั่งไปขั้นตอนถัดไป
swapUpOrder: (personalId: string) => `${order}/order/swap/up/${personalId}`, //สลับลำดับข้อมูลในบัญชีแนบท้ายขึ้น
swapDownOrder: (personalId: string) =>
`${order}/order/swap/down/${personalId}`, //สลับลำดับข้อมูลในบัญชีแนบท้ายลง
salaryOrder: (id: string) => `${order}/order/salary/${id}`, //บันทึกข้อมูลเงินเดือนสำหรับผู้บรรจุ
copyOrderPersonsId: (id: string) => `${order}/order/copy-order/persons/${id}`, // popup แสดงรายชื่อตามหน่วยงานที่เลือก , popup เลือกรายชื่อส่งสำเนา
copyOrder: `${order}/order/copy-order`,
copyOrderId: (id: string) => `${order}/order/copy-order/${id}`,
attachmentId: (id: string) => `${order}/order/attachment/${id}`,
attachmentOrderId: (orderId: string) =>
`${order}/order/attachment/order-file/${orderId}`,
attachmentFileId: (orderId: string) =>
`${order}/order/attachment/file/${orderId}`,
orderReady: (id: string) => `${order}/order/ready/${id}`,
attachmentOrder: (orderId: string) => `${order}/order/attachment/${orderId}`,
//receive ระบบรับโอน
receiveData: () => `${receive}`,
2023-08-14 16:45:23 +07:00
receiveReport: `${receive}/report`,
receiveDataId: (id: string) => `${receive}/${id}`,
receivePosition: (id: string) => `${receive}/position/${id}`,
2023-08-19 13:36:39 +07:00
receiveDataPosition: () => `${receive}/use`,
//tranfer ระบบคำขอโอน
transfer,
transferId: (id: string) => `${transfer}/${id}`,
2023-08-11 13:29:19 +07:00
transferReport: `${transfer}/report`,
transferUser: `${transfer}/user`,
transferUserId: (id: string) => `${transfer}/user/${id}`,
transferConfirmId: (id: string) => `${transfer}/confirm/${id}`,
2023-08-11 14:06:28 +07:00
// แต่งตั้ง-เลื่อน
placemenAppointment,
appointmentMain: () => `${placement}/appointment`,
appointmentByid: (id: string) => `${placement}/appointment/${id}`,
appointmentDelete: (id: string) => `${placement}/appointment/${id}`,
appointmentPosition: (id: string) => `${placement}/appointment/position/${id}`,
apppointmentReport: (id: string) => `${placement}/appointment/report/${id}`,
2023-08-19 13:36:39 +07:00
apppointmentPosition: () => `${placement}/appointment/use`,
2023-08-11 14:06:28 +07:00
// ช่วยราชการ
placemenHelpGov,
officerMain: () => `${placement}/officer`,
officerDetail: (id: string) => `${placement}/officer/${id}`,
officerMainDelete: (id: string) => `${placement}/officer/${id}`,
officerMainReport: () => `${placement}/officer/report`,
officerMainEdit: (id: string) => `${placemenHelpGov}/${id}`,
2023-08-11 14:06:28 +07:00
// ส่งตัวกลับ
placemenRepatriation,
repatriationMain: () => `${placement}/repatriation`,
repatriationDetail: (id: string) => `${placement}/repatriation/${id}`,
repatriationMainDelete: (id: string) => `${placement}/repatriation/${id}`,
repatriationMainReport: () => `${placement}/repatriation/report`,
repatriationMainEdit: (id: string) => `${placemenRepatriation}/${id}`,
2023-08-11 14:06:28 +07:00
// ขอย้าย
placemenRelocation,
2023-08-15 13:58:07 +07:00
relocationMain: () => `${placement}/relocation`,
relocationDetail: (id: string) => `${placement}/relocation/${id}`,
relocationMainDelete: (id: string) => `${placement}/relocation/${id}`,
2023-08-15 13:58:07 +07:00
relocationMainReport: () => `${placement}/relocation/report`,
relocationMainPut: (id: string) => `${placement}/relocation/position/${id}`,
relocationMainEdit: (id: string) => `${placemenRelocation}/${id}`,
2023-08-19 13:36:39 +07:00
relocationMainPosition: () => `${placement}/relocation/use`,
2023-08-11 14:06:28 +07:00
// อื่นๆ
placemenOther,
otherMain: () => `${placemenOther}`,
otherPosition: (id: string) => `${placemenOther}/position/${id}`,
otherReport: (id: string) => `${placemenOther}/report/${id}`,
otherByid: (id: string) => `${placemenOther}/${id}`,
userPlacement:(id:string) => `${placement}/user/${id}`
2023-07-13 09:10:43 +07:00
};