Commit f11c6620 by kantavee

หน้าเเก้ไขข้อมูล ส่วนย่อยที่ 1 2 เเละ 3

parent 87d9dc4b
import { Component, EventEmitter, Input, OnInit } from '@angular/core';
import { ChangeDetectorRef ,Component, EventEmitter, Input, OnInit } from '@angular/core';
import { ToastrService } from 'ngx-toastr';
import { Bu6Model, MyBu6Model } from 'src/app/shared/model/bu6.model';
import { Bu7Model, MyBu7Model } from 'src/app/shared/model/bu7.model';
......@@ -38,7 +38,8 @@ export class SubDepartmentFourComponent implements OnInit {
currentModal = ""
constructor(private bu7Service: Bu7Service,
private bu6Service: Bu6Service,
private toastr: ToastrService
private toastr: ToastrService,
private cdr: ChangeDetectorRef
) { }
ngOnInit(): void {
this.getBu7List()
......@@ -65,6 +66,7 @@ export class SubDepartmentFourComponent implements OnInit {
if (this.bu7.parent) {
this.bu6Service.getById(this.bu7.parent).subscribe(response => {
this.bu6 = new MyBu6Model(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 { Bu3Model, MyBu3Model } from 'src/app/shared/model/bu3.model';
import { Bu4Model, MyBu4Model } from 'src/app/shared/model/bu4.model';
......@@ -37,7 +37,8 @@ export class SubDepartmentOneComponent implements OnInit {
currentModal = ""
constructor(private bu4Service: Bu4Service,
private bu3Service: Bu3Service,
private toastr: ToastrService
private toastr: ToastrService,
private cdr: ChangeDetectorRef
) { }
ngOnInit(): void {
this.getBu4List()
......@@ -64,6 +65,7 @@ export class SubDepartmentOneComponent implements OnInit {
if (this.bu4.parent) {
this.bu3Service.getById(this.bu4.parent).subscribe(response => {
this.bu3 = new MyBu3Model(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 { Bu5Model, MyBu5Model } from 'src/app/shared/model/bu5.model';
import { Bu6Model, MyBu6Model } from 'src/app/shared/model/bu6.model';
......@@ -38,7 +38,8 @@ export class SubDepartmentThreeComponent implements OnInit {
currentModal = ""
constructor(private bu6Service: Bu6Service,
private bu5Service: Bu5Service,
private toastr: ToastrService
private toastr: ToastrService,
private cdr: ChangeDetectorRef
) { }
ngOnInit(): void {
this.getBu6List()
......@@ -65,6 +66,7 @@ export class SubDepartmentThreeComponent implements OnInit {
if (this.bu6.parent) {
this.bu5Service.getById(this.bu6.parent).subscribe(response => {
this.bu5 = new MyBu5Model(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