diff --git a/src/modules/10_registry/components/PositionReview/Table.vue b/src/modules/10_registry/components/PositionReview/Table.vue index d2b7712..3d20dd6 100644 --- a/src/modules/10_registry/components/PositionReview/Table.vue +++ b/src/modules/10_registry/components/PositionReview/Table.vue @@ -323,20 +323,23 @@ async function fetchData() { // .get( // `${config.API.profileSalaryTemp}/${empType.value}/done/${profileId.value}`, // ) - http - .get(`${config.API.profileSalaryTemp}/${empType.value}/${profileId.value}`) - .then((res) => { - const data = res.data.result; - rowsMain.value = data; - rows.value = data; - serchDataTable(); - }) - .catch((err) => { - messageError($q, err); - }) - .finally(() => { - isLoad.value = false; - }); + try { + await http.get( + `${config.API.profileSalaryTemp}/${empType.value}/${profileId.value}`, + ); + + const res = await http.get( + `${config.API.profileSalaryTemp}/${empType.value}/done/${profileId.value}`, + ); + const data = res.data.result; + rowsMain.value = data; + rows.value = data; + serchDataTable(); + } catch (err) { + messageError($q, err); + } finally { + isLoad.value = false; + } } /** function ค้นหาข้อมูลรายการในตาราง*/