dropdown
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
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, IStateDrop, IStateResultResponse } from '../../interfaces/dashboard.interface'
|
||||
import { DashboardStateService } from '../../services/state/dashboard-state.service';
|
||||
|
||||
@Component({
|
||||
@@ -17,7 +17,9 @@ export class MainDashboardComponent implements OnInit {
|
||||
isSubmitting: boolean = false;
|
||||
arrearsForm!: FormGroup;
|
||||
saveFrm!: FormGroup;
|
||||
myDropAct!: IDropAct;
|
||||
// myDropAct: IStateDrop[] = [];
|
||||
myDropAct: IStateDrop = { income: [], expense: [] };
|
||||
|
||||
|
||||
readonly ownerName = 'Nuttakit';
|
||||
|
||||
@@ -185,11 +187,10 @@ export class MainDashboardComponent implements OnInit {
|
||||
ngOnInit(): void {
|
||||
this.setupFormControl();
|
||||
this.dashboardStateService.getStateResult().subscribe(data => {
|
||||
if(data) {
|
||||
this.myDropAct = data;
|
||||
}
|
||||
if (data) {
|
||||
this.myDropAct = data;
|
||||
}
|
||||
)
|
||||
});
|
||||
}
|
||||
|
||||
setupFormControl(){
|
||||
|
||||
Reference in New Issue
Block a user