-interface
-service -เพิ่มเทคนิค การส่ง ผ่านข้อมูล
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
|
||||
import { FormBuilder, FormGroup, Validators, FormControl } from '@angular/forms';
|
||||
import { GeneralService } from '../../services/generalservice';
|
||||
import { IDropAct } from '../interfaces/dashboard.interface'
|
||||
import { IDropAct } from '../../interfaces/dashboard.interface'
|
||||
import { DashboardStateService } from '../../services/state/dashboard-state.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-main-dashboard',
|
||||
@@ -20,6 +21,10 @@ export class MainDashboardComponent implements OnInit {
|
||||
|
||||
readonly ownerName = 'Nuttakit';
|
||||
|
||||
constructor(
|
||||
private dashboardStateService: DashboardStateService
|
||||
){}
|
||||
|
||||
readonly kpiCards = [
|
||||
{
|
||||
label: 'รายรับรวม',
|
||||
@@ -179,6 +184,12 @@ export class MainDashboardComponent implements OnInit {
|
||||
|
||||
ngOnInit(): void {
|
||||
this.setupFormControl();
|
||||
this.dashboardStateService.getStateResult().subscribe(data => {
|
||||
if(data) {
|
||||
this.myDropAct = data;
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
setupFormControl(){
|
||||
|
||||
Reference in New Issue
Block a user