forked from ttc/micro-frontend
-เชื่อมโยง api search กับ frontend
-ปรับปรุงระบบ state -เพิ่ม ระบบ pipe dtmtodatetime
This commit is contained in:
@@ -3,7 +3,7 @@ import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { ChartConfiguration, ChartOptions } from 'chart.js';
|
||||
import { BaseChartDirective } from 'ng2-charts';
|
||||
import { GeneralService } from '../../services/generalservice';
|
||||
import { IDropAct, IStateDrop } from '../../interfaces/dashboard.interface';
|
||||
import { IDropAct, IStateDrop, IActData } from '../../interfaces/dashboard.interface';
|
||||
|
||||
|
||||
@Component({
|
||||
@@ -15,6 +15,7 @@ import { IDropAct, IStateDrop } from '../../interfaces/dashboard.interface';
|
||||
export class MainDashboardContentComponent implements OnInit {
|
||||
@ViewChild(BaseChartDirective) chart?: BaseChartDirective;
|
||||
myDropAct!: IStateDrop;
|
||||
myActData: IActData[] = [];
|
||||
|
||||
constructor(
|
||||
private generalService: GeneralService,
|
||||
@@ -36,7 +37,8 @@ export class MainDashboardContentComponent implements OnInit {
|
||||
next: (result: any) => {
|
||||
if (result.code === '200') {
|
||||
this.generalService.trowApi(result);
|
||||
this.myDropAct = result.data
|
||||
this.myActData = result.data;
|
||||
this.dashboardStateService.setStateAccountResult(this.myActData);
|
||||
}
|
||||
},
|
||||
error: (error: any) => {
|
||||
|
||||
Reference in New Issue
Block a user