diff --git a/src/modules/08_registryEmployee/views/SalaryEmployee.vue b/src/modules/08_registryEmployee/views/SalaryEmployee.vue index 047b169da..8819beb13 100644 --- a/src/modules/08_registryEmployee/views/SalaryEmployee.vue +++ b/src/modules/08_registryEmployee/views/SalaryEmployee.vue @@ -536,6 +536,7 @@ + (""); @@ -1498,6 +1500,8 @@ const fetchData = async () => { .get(config.API.profileSalaryEmployeeId(profileId.value)) .then((res) => { const data = res.data.result; + console.log(data); + rows.value = []; data.map((e: ResponseObjectEmployee) => { rows.value.push({ @@ -1711,12 +1715,14 @@ const clickSave = () => { }; const SaveData = async () => { await myForm.value.validate().then(async (result: boolean) => { - if (result) { + if (result && agencyId.value) { if (modalEdit.value) { await editData(); } else { await saveData(); } + } else if (agencyId.value == "") { + dialogMessageNotify($q, "กรุณาเลือกหน่วยงาน"); } }); }; @@ -1761,6 +1767,8 @@ const saveData = async () => { * บันทึกแก้ไขข้อมูล */ const editData = async () => { + console.log(agencyId.value); + showLoader(); await http .put(config.API.profileSalaryEmployeeId(id.value), { @@ -1970,7 +1978,7 @@ const clickHistory = async (row: RequestItemsEmployee) => { .get(config.API.profileSalaryHisId(row.id)) .then((res) => { const data = res.data.result; - // console.log("clickHistory", data); + console.log("clickHistory", data); rowsHistory.value = []; data.map((e: ResponseObjectEmployee) => { rowsHistory.value.push({