รายการเงินเดือน => ปรับ async/await
This commit is contained in:
parent
c9b4238c97
commit
8ce321943f
1 changed files with 5 additions and 5 deletions
|
|
@ -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(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue