diff --git a/src/api/05_placement/api.placement.ts b/src/api/05_placement/api.placement.ts index 0d85368a6..547dabc10 100644 --- a/src/api/05_placement/api.placement.ts +++ b/src/api/05_placement/api.placement.ts @@ -169,6 +169,6 @@ export default { appointEmployee: () => `${placement}/appointment/temp`, appointEmployeeByid: (id: string) => `${placement}/appointment/temp/${id}`, appointEmployeePosition: (id: string) => `${placement}/appointment/temp/position/${id}`, - appointEmployeeOrder: () => `${placement}/appointment/temp/report`, + appointEmployeeOrder: (typeId: string) => `${placement}/appointment/temp/report/${typeId}`, apppointmentPositionUse: () => `${placement}/appointment/temp/use`, }; diff --git a/src/modules/05_placement/components/AppointEmployee/Dialogbody.vue b/src/modules/05_placement/components/AppointEmployee/Dialogbody.vue index e29c52cf1..5cb768b82 100644 --- a/src/modules/05_placement/components/AppointEmployee/Dialogbody.vue +++ b/src/modules/05_placement/components/AppointEmployee/Dialogbody.vue @@ -122,7 +122,7 @@ const createdAppoint = async () => { }; showLoader(); await http - .post(config.API.appointEmployeeOrder(), data) + .post(config.API.appointEmployeeOrder(Type), data) .then(() => { success($q, "บันทึกสำเร็จ"); }) @@ -151,7 +151,7 @@ watchEffect(() => {
- +
diff --git a/src/modules/05_placement/components/AppointEmployee/Main.vue b/src/modules/05_placement/components/AppointEmployee/Main.vue index c2e5c2af4..5cc4c5b6e 100644 --- a/src/modules/05_placement/components/AppointEmployee/Main.vue +++ b/src/modules/05_placement/components/AppointEmployee/Main.vue @@ -299,7 +299,8 @@ const fecthTypeOption = async () => { .get(config.API.typeOrder()) .then((res) => { optionsType.value = res.data.result.filter( - (e: OpType) => e.commandCode === "C-PM-05" + (e: OpType) => + e.commandCode === "C-PM-22" || e.commandCode === "C-PM-24" ); type.value = optionsType.value[0].id; }) @@ -370,7 +371,7 @@ const getPosition = async (id: string) => { if (index >= 0) { selectedPosition.value = [data[index]]; } - rowsPosition.value = data; + rowsPosition.value = data; ModalEmployee.value = true; }) .catch((e) => {