This commit is contained in:
2025-11-13 20:23:55 +07:00
parent 80edb10361
commit 139167be8a

View File

@@ -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';