From 8ce321943f559ad06f8b6c8c9316139ac5ddd4ba Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Tue, 5 Mar 2024 10:57:08 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B8=A3=E0=B8=B2=E0=B8=A2=E0=B8=81=E0=B8=B2?= =?UTF-8?q?=E0=B8=A3=E0=B9=80=E0=B8=87=E0=B8=B4=E0=B8=99=E0=B9=80=E0=B8=94?= =?UTF-8?q?=E0=B8=B7=E0=B8=AD=E0=B8=99=20=3D>=20=20=E0=B8=9B=E0=B8=A3?= =?UTF-8?q?=E0=B8=B1=E0=B8=9A=20=20async/await?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/13_salary/views/salaryLists.vue | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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(