Commit f98e2989 by Natthaphat Pankiang

Bu3

parent d19b6e76
......@@ -257,7 +257,7 @@
<div class="relative w-full">
<div>
<div class="relative flex rounded-md">
<input type="text" id="hs-leading-button-add-on-with-icon-and-button" name="hs-leading-button-add-on-with-icon-and-button" class="ti-form-input rounded-none ltr:rounded-r-md rtl:rounded-l-md focus:z-10" value="01" style="padding-right: 3.5rem;">
<input type="text" id="hs-leading-button-add-on-with-icon-and-button" name="hs-leading-button-add-on-with-icon-and-button" class="ti-form-input rounded-none ltr:rounded-r-md rtl:rounded-l-md focus:z-10" value="01" style="padding-right: 3.5rem;" [(ngModel)]="bu2.bu2id">
<div class="absolute inset-y-0 ltr:right-0 rtl:left-0 flex items-center pointer-events-none z-20 ltr:pr-4 rtl:pl-4 space-x-2">
<i class="ti ti-circle-x text-red-500 cursor-pointer right-10"></i>
<svg class="h-3.5 w-3.5 text-gray-500 dark:text-white/70" xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16">
......@@ -269,7 +269,7 @@
</div>
<div class="flex flex-col-6">
<input type="text" id="part2" class="ti-form-input w-full" placeholder="" style="background-color: #B3B3B3; margin-left: 10px;" disabled value="แผนก 1">
<input type="text" id="part2" class="ti-form-input w-full" placeholder="" style="background-color: #B3B3B3; margin-left: 10px;" [(ngModel)]="bu2.tdesc" readonly>
</div>
</div>
</div>
......
import { Component, EventEmitter, Input, OnInit, } from '@angular/core';
import { Bu2Model, MyBu2Model } from 'src/app/shared/model/bu2.model';
import { Bu3Model, MyBu3Model } from 'src/app/shared/model/bu3.model';
import { Bu2Service } from 'src/app/shared/services/bu2.service';
import { Bu3Service } from 'src/app/shared/services/bu3.service';
......@@ -13,8 +15,11 @@ export class SectionRegistrationComponent implements OnInit {
page = Array.from({ length: 1 }, (_, i) => i + 1);
bu3List: Bu3Model[] = []
bu3: Bu3Model = new MyBu3Model({})
bu2: Bu2Model = new MyBu2Model({})
search = ""
constructor(private bu3Service: Bu3Service) { }
constructor(private bu3Service: Bu3Service,
private bu2Service: Bu2Service
) { }
ngOnInit(): void {
this.getBu3List()
}
......@@ -34,8 +39,8 @@ export class SectionRegistrationComponent implements OnInit {
x.edesc.toLowerCase().includes(this.search))
}
selectBu3(bu3: Bu3Model) {
this.bu3Service.getById(bu3.parent).subscribe(response =>{
console.log(response)
this.bu2Service.getById(bu3.parent).subscribe(response =>{
this.bu2 = response
})
this.bu3 = new MyBu3Model(bu3)
}
......
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