import { Component, OnInit, Input } from '@angular/core'; import { NzModalRef } from 'ng-zorro-antd/modal'; import { FormBuilder, FormGroup, Validators } from '@angular/forms'; import { HttpClient } from '@angular/common/http'; import { TreeService } from 'src/app/service/tree.service'; @Component({ selector: 'app-allot-person', templateUrl: './allot-person.component.html', styleUrls: ['./allot-person.component.scss'] }) export class AllotPersonComponent implements OnInit { @Input() mainsupervisorList?: any; @Input() assitantsupervisorList?: any; validateForm!: FormGroup; constructor(private modal: NzModalRef, private fb: FormBuilder, private http: HttpClient) { } ngOnInit(): void { this.validateForm = this.fb.group({ main: [null, [Validators.required]], assitant: [null, [Validators.required]] }); } destroyModal(): void { this.modal.destroy({ data: 'this the result data' }); } listOfData: any[] = []; }