business info , company details added : kdk
This commit is contained in:
parent
6a7e5b7fd5
commit
d46f78a301
@ -94,6 +94,7 @@ export class BusinessInfoComponent implements OnInit {
|
||||
this.getStateCityList();
|
||||
this.initBusinessForm();
|
||||
this.getCompanyRelation();
|
||||
this.getCompanyListForBusiness();
|
||||
// const Desgn = <FormArray>this.businessForm.controls['designation'];
|
||||
// const Partnr = <FormArray>this.businessForm.controls['partners'];
|
||||
// const otherDoc = <FormArray>this.businessForm.controls['documents'];
|
||||
@ -516,7 +517,7 @@ export class BusinessInfoComponent implements OnInit {
|
||||
// otherDoc.push(this.createDocument());
|
||||
|
||||
// load exist company list from master
|
||||
this.existCompanyList = this.pd_all_details.pdapplicants_detials.filter(item=>item.company_name!=null).map(mapItem=>mapItem.company_name);
|
||||
// this.existCompanyList = this.pd_all_details.pdapplicants_detials.filter(item=>item.company_name!=null).map(mapItem=>mapItem.company_name);
|
||||
|
||||
this.businessForm.controls['profession_name'].valueChanges.subscribe(val => {
|
||||
val.toUpperCase()=='OTHERS' ? this.businessForm.addControl('profession_name_other', new FormControl('', Validators.required)) : this.businessForm.removeControl('profession_name_other');
|
||||
@ -1261,4 +1262,12 @@ export class BusinessInfoComponent implements OnInit {
|
||||
return merged.length > 0 ? merged : [];
|
||||
}
|
||||
}
|
||||
|
||||
getCompanyListForBusiness(): void{
|
||||
this._pd.getCompaniesListsForBusiness(this.pdid).subscribe(data=>{
|
||||
if(data.dataStatus){
|
||||
this.existCompanyList = data.records;
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@ -469,6 +469,15 @@ export class PdTrigerService {
|
||||
catchError(this.handleError('operation', []))
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
getCompaniesListsForBusiness(pdid: any): Observable<any> {
|
||||
return this._http.post<any>(this.apiUrl + "getCompaniesListsForBusiness", { "records":{ "pd_id" : pdid}})
|
||||
.pipe(
|
||||
catchError(this.handleError('operation', []))
|
||||
)
|
||||
}
|
||||
|
||||
// private handleError<T>(operation = 'operation', result?: T) {
|
||||
// return (error: any): Observable<T> => {
|
||||
// return of(result as T);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user