fix bug Loading หน้า Logs

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2025-06-12 09:42:34 +07:00
parent f033d88fbb
commit 4c1c2c6084

View file

@ -243,6 +243,7 @@ async function selectedOrg(id: string) {
* งชนสำหรบดงไอดโครงสรางปจจ
*/
async function fetchOrganizationActive() {
showLoader();
await http
.get(config.API.activeOrganization)
.then(async (res) => {
@ -253,6 +254,9 @@ async function fetchOrganizationActive() {
})
.catch((err) => {
messageError($q, err);
})
.finally(() => {
hideLoader();
});
}
@ -279,9 +283,7 @@ async function fatchOrg(id: string) {
})
.catch((err) => {
messageError($q, err);
hideLoader();
})
.finally(() => {});
});
}
/*** scroll และโหลดข้อมูลรายการ Logs เพิ่ม */
@ -441,6 +443,7 @@ function updateDate() {
}
function onSendCSV() {
showLoader();
const queryString = {
rootId: qureyBody.rootId ?? undefined,
// size: size.value ?? undefined,
@ -455,14 +458,16 @@ function onSendCSV() {
.get(config.API.reportLog, {
params: queryString,
})
.then((res) => {
.then(async (res) => {
const data = res.data;
genReportXLSX(data, `LOG_${date2Thai(new Date(startDate.value))}`);
await genReportXLSX(data, `LOG_${date2Thai(new Date(startDate.value))}`);
})
.catch((e) => {
messageError($q, e);
})
.finally(() => {});
.finally(() => {
hideLoader();
});
}
async function downloadTxt() {