fix bug Loading หน้า Logs
This commit is contained in:
parent
f033d88fbb
commit
4c1c2c6084
1 changed files with 11 additions and 6 deletions
|
|
@ -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() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue