diff --git a/src/modules/13_salary/views/salaryLists.vue b/src/modules/13_salary/views/salaryLists.vue index 8405caf49..f2ca032c4 100644 --- a/src/modules/13_salary/views/salaryLists.vue +++ b/src/modules/13_salary/views/salaryLists.vue @@ -139,9 +139,9 @@ function getSnap(code: string) { * function เรียกข้อมูลหน่ยวงาน * @param id revisionId */ -function getAgency(id: string) { +async function getAgency(id: string) { id && - http + (await http .get(config.API.activeOrganizationRootById(id)) .then(async (res) => { const data = res.data.result; @@ -153,7 +153,7 @@ function getAgency(id: string) { }) .catch((err) => { messageError($q, err); - }); + })); } /** @@ -162,7 +162,7 @@ function getAgency(id: string) { */ async function getAgencyPosition(id: string) { if (id) { - http + await http .get(config.API.keycloakPositionByid(id)) .then(async (res) => { const data = res.data.result; @@ -170,7 +170,7 @@ async function getAgencyPosition(id: string) { const position = agencyOptions.value?.find( (e: DataOption) => e.id === data.rootId ); - agencyFilter.value = await (position ? position.id : ""); + agencyFilter.value = position ? position.id : ""; if (agencyFilter.value && roundFilter.value.id && snapFilter.value) { fetchSalalyPeriod(