This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-07-04 16:04:59 +07:00
parent f51bf40958
commit 91105a3a90

View file

@ -53,6 +53,7 @@ async function fecthlistRound() {
}));
// UI
if (optionRound.value.length !== 0) {
loadview.value = true;
DataStore.optionRound = optionRound.value;
const lastValue = optionRound.value[0];
if (DataStore.roundId) {
@ -63,7 +64,6 @@ async function fecthlistRound() {
DataStore.roundId = round.value;
roundName.value = lastValue.name;
await fecthStat(round.value);
// await fecthAgency();
}
})
.catch((err) => {
@ -89,7 +89,7 @@ async function fecthAgency() {
await http
.get(config.API.keycloakPosition())
.then(async (res) => {
loadview.value = true;
// loadview.value = true;
DataStore.agency = res.data.result.rootId;
DataStore.typeOc = DataStore.agency;
})
@ -97,7 +97,7 @@ async function fecthAgency() {
messageError($q, err);
})
.finally(() => {
loading.value = true;
// loading.value = true;
});
}
@ -215,20 +215,20 @@ async function sendToDirector() {
await http
.get(config.API.insigniaSendToDirector(round.value, DataStore.agency))
.then(async () => {
success($q, "บันทึกสำเร็จ");
await fecthStat(round.value);
await fecthInsigniaByOc(
round.value,
DataStore.agency,
"officer",
tab.value
);
await success($q, "บันทึกสำเร็จ");
})
.catch((err) => {
messageError($q, err);
})
.finally(async () => {
await fecthStat(round.value);
await hideLoader();
.finally(() => {
hideLoader();
});
});
}