Commit 4c0fcf79 by kantavee

Merge branch 'DEV' of https://mygit.myhr.co.th/angular/myAppraisal into DEV

parents f11c6620 54af895b
import { Component, EventEmitter, Input, OnInit, } from '@angular/core'; import { ChangeDetectorRef, Component, EventEmitter, Input, OnInit, } from '@angular/core';
import { ToastrService } from 'ngx-toastr'; import { ToastrService } from 'ngx-toastr';
import { Bu2Model, MyBu2Model } from 'src/app/shared/model/bu2.model'; import { Bu2Model, MyBu2Model } from 'src/app/shared/model/bu2.model';
import { Bu3Model, MyBu3Model } from 'src/app/shared/model/bu3.model'; import { Bu3Model, MyBu3Model } from 'src/app/shared/model/bu3.model';
...@@ -37,7 +37,8 @@ export class SectionRegistrationComponent implements OnInit { ...@@ -37,7 +37,8 @@ export class SectionRegistrationComponent implements OnInit {
currentModal = "" currentModal = ""
constructor(private bu3Service: Bu3Service, constructor(private bu3Service: Bu3Service,
private bu2Service: Bu2Service, private bu2Service: Bu2Service,
private toastr: ToastrService private toastr: ToastrService,
private cdr: ChangeDetectorRef
) { } ) { }
ngOnInit(): void { ngOnInit(): void {
this.getBu3List() this.getBu3List()
...@@ -64,6 +65,7 @@ export class SectionRegistrationComponent implements OnInit { ...@@ -64,6 +65,7 @@ export class SectionRegistrationComponent implements OnInit {
if (this.bu3.parent) { if (this.bu3.parent) {
this.bu2Service.getById(this.bu3.parent).subscribe(response => { this.bu2Service.getById(this.bu3.parent).subscribe(response => {
this.bu2 = new MyBu2Model(response) this.bu2 = new MyBu2Model(response)
this.cdr.detectChanges()
}) })
} }
} }
......
import { Component, EventEmitter, Input, OnInit, } from '@angular/core'; import { ChangeDetectorRef, Component, EventEmitter, Input, OnInit, } from '@angular/core';
import { ToastrService } from 'ngx-toastr'; import { ToastrService } from 'ngx-toastr';
import { Bu4Model, MyBu4Model } from 'src/app/shared/model/bu4.model'; import { Bu4Model, MyBu4Model } from 'src/app/shared/model/bu4.model';
import { Bu5Model, MyBu5Model } from 'src/app/shared/model/bu5.model'; import { Bu5Model, MyBu5Model } from 'src/app/shared/model/bu5.model';
...@@ -37,7 +37,8 @@ export class SubDepartmentTwoComponent implements OnInit { ...@@ -37,7 +37,8 @@ export class SubDepartmentTwoComponent implements OnInit {
currentModal = "" currentModal = ""
constructor(private bu5Service: Bu5Service, constructor(private bu5Service: Bu5Service,
private bu4Service: Bu4Service, private bu4Service: Bu4Service,
private toastr: ToastrService private toastr: ToastrService,
private cdr: ChangeDetectorRef
) { } ) { }
ngOnInit(): void { ngOnInit(): void {
this.getBu5List() this.getBu5List()
...@@ -64,6 +65,7 @@ export class SubDepartmentTwoComponent implements OnInit { ...@@ -64,6 +65,7 @@ export class SubDepartmentTwoComponent implements OnInit {
if (this.bu5.parent) { if (this.bu5.parent) {
this.bu4Service.getById(this.bu5.parent).subscribe(response => { this.bu4Service.getById(this.bu5.parent).subscribe(response => {
this.bu4 = new MyBu4Model(response) this.bu4 = new MyBu4Model(response)
this.cdr.detectChanges()
}) })
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment