diff --git a/src/api/05_placement/api.placement.ts b/src/api/05_placement/api.placement.ts index 503c64a92..a810db909 100644 --- a/src/api/05_placement/api.placement.ts +++ b/src/api/05_placement/api.placement.ts @@ -26,6 +26,7 @@ export default { placementPass: () => `${placement}/pass`, placementDefermentInfo: (id: string) => `${placement}/pass/deferment/${id}`, placementDisclaimInfo: (id: string) => `${placement}/pass/disclaim/${id}`, + placementUpdatePass: `${placement}/pass/update-status`, //personal placementPersonalId: (personalId: string) => diff --git a/src/modules/04_registryPerson/components/detail/PersonalInformation/01_Profile.vue b/src/modules/04_registryPerson/components/detail/PersonalInformation/01_Profile.vue index 7bdf10fe0..439bbd7c7 100644 --- a/src/modules/04_registryPerson/components/detail/PersonalInformation/01_Profile.vue +++ b/src/modules/04_registryPerson/components/detail/PersonalInformation/01_Profile.vue @@ -589,10 +589,11 @@ onMounted(() => { option-label="name" option-value="name" v-model="formData.prefix" + clearable class="inputgreen" :options="store.Ops.prefixOps" :label="dataLabel.prefix" - :rules="[(val: string) => !!val || `${'กรุณาเลือก คำนำหน้าชื่อ'}`]" + :rules="[(val: string) => !!formData.rank || !!formData.prefix || `${'กรุณาเลือกคำนำหน้าชื่อ หรือยศ'}`]" @filter="(inputValue: string, doneFn: Function) => filterSelector(inputValue, doneFn, 'prefixOps' )" @@ -613,6 +614,7 @@ onMounted(() => { input-debounce="0" option-label="name" option-value="name" + :rules="[(val: string) => !!formData.rank || !!formData.prefix || `${'กรุณาเลือกคำนำหน้าชื่อ หรือยศ'}`]" v-model="formData.rank" class="inputgreen" :options="store.Ops.rankOps" diff --git a/src/modules/04_registryPerson/components/requestEdit/Page01_Detail.vue b/src/modules/04_registryPerson/components/requestEdit/Page01_Detail.vue index 17fde57a0..136b7a1c3 100644 --- a/src/modules/04_registryPerson/components/requestEdit/Page01_Detail.vue +++ b/src/modules/04_registryPerson/components/requestEdit/Page01_Detail.vue @@ -553,7 +553,6 @@ onMounted(async () => {
- {{ typeEmp }} { + if (!file) { + return Promise.reject("No file provided"); + } return new Promise((resolve, reject) => { const img = new Image(); const reader = new FileReader(); @@ -240,9 +244,9 @@ const newProfileFile = ref(null); /** ฟังก์ชันอัปโหลด*/ async function uploadImg() { - showLoader(); newProfileFile.value = await resizeImage(profileFile.value); closeImage(); + showLoader(); await http .post(config.API.orgProfileAvatarbyType(empType.value), { profileId: empType.value == "" ? profileId.value : undefined, diff --git a/src/modules/05_placement/components/PersonalList/Table.vue b/src/modules/05_placement/components/PersonalList/Table.vue index 3e2038712..499af6acd 100644 --- a/src/modules/05_placement/components/PersonalList/Table.vue +++ b/src/modules/05_placement/components/PersonalList/Table.vue @@ -920,6 +920,28 @@ function onRefCommand(data: any) { // commandId.value = 'bdf9da91-ba45-497a-a2b7-cc49e2446d97'; //จำลอง } +function onUpdateStatus(id: string) { + dialogConfirm( + $q, + async () => { + showLoader(); + try { + await http.post(config.API.placementUpdatePass, { + personalId: id, + }); + await success($q, "บันทึกสำเร็จ"); + await getTable(); + } catch (error) { + messageError($q, error); + } finally { + hideLoader(); + } + }, + "ยืนยันการส่งบรรจุ", + "ต้องการยืนยันการส่งบรรจุนี้ใช่หรือไม่ ?" + ); +} + onMounted(async () => { await getWorkFlow(); await getTable(); @@ -982,6 +1004,7 @@ onMounted(async () => { รายละเอียด + { คืนตำแหน่ง + + + + + บรรจุแล้ว + +