-
This commit is contained in:
@@ -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';
|
||||
|
||||
Reference in New Issue
Block a user