From 139167be8a0690a24b454124cdfda134fcdd0ed0 Mon Sep 17 00:00:00 2001 From: x2Skyz Date: Thu, 13 Nov 2025 20:23:55 +0700 Subject: [PATCH] - --- .../main-dashboard-content.component.ts | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/accounting-ng-nuttakit/src/app/content/main-dashboard-content/main-dashboard-content.component.ts b/accounting-ng-nuttakit/src/app/content/main-dashboard-content/main-dashboard-content.component.ts index 34489e0..b4445e6 100644 --- a/accounting-ng-nuttakit/src/app/content/main-dashboard-content/main-dashboard-content.component.ts +++ b/accounting-ng-nuttakit/src/app/content/main-dashboard-content/main-dashboard-content.component.ts @@ -26,6 +26,7 @@ export class MainDashboardContentComponent implements OnInit { let token = localStorage.getItem('access_token') this.OnSearchAct(token, true); this.OnSetupDashboard(token, true); + this.OnSearchSum(token, true); } OnSearchAct(value: any, setupFirst: boolean): void { @@ -74,6 +75,28 @@ export class MainDashboardContentComponent implements OnInit { }); } + OnSearchSum(value: any, setupFirst: boolean): void { + const uri = '/api/web/accountingSum'; + let request = { + token: value + } + this.generalService.postRequest(uri, request).subscribe({ + next: (result: any) => { + if (result.code === '200') { + this.generalService.trowApi(result); + this.myDropAct = result.data + this.dashboardStateService.setStateResult(this.myDropAct) + } + }, + error: (error: any) => { + + }, + complete: () => { + + } + }); + } + // fetchChartData(): void { // // NOTE: Using a placeholder endpoint as the actual one was not provided. // const uri = '/api/dashboard/summary-last-6-months';