ปรับ API Report โครงสร้าง

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-11-19 13:23:35 +07:00
parent 418a7e98e9
commit 751f40eb1f

View file

@ -459,9 +459,14 @@ function getSummary() {
* function DownloadReport
*/
async function onClickDownloadReport(val: string, name: string) {
const newReport =
store.typeOrganizational !== "draft" && val === "report2"
? "report2-history"
: val;
showLoader();
await http
.get(config.API.orgReport(val) + `/${orgRootId.value}`)
.get(config.API.orgReport(newReport) + `/${orgRootId.value}`)
.then(async (res) => {
const data = res.data.result;
if (data) {