business other documents vendor form fetching
This commit is contained in:
parent
748118f9cb
commit
ea83a9d22d
@ -707,7 +707,20 @@ export class BusinessInfoComponent implements OnInit {
|
||||
result.records[val.document_name] = 'yes'
|
||||
}
|
||||
})
|
||||
if(result.records.hasOwnProperty('other_documents') && result.records.other_documents == 'yes' && result.records.other_documents_info.length > 0) {
|
||||
const otherDoc = <FormArray>this.businessForm.controls['documents'];
|
||||
for(let i=1; i<= result.records.other_documents_info.length;i++) {
|
||||
// result.records.other_documents_info.forEach(val=>{
|
||||
let val = result.records.other_documents_info[i]
|
||||
if(val) {
|
||||
otherDoc.push(this.createDocument());
|
||||
}
|
||||
// })
|
||||
}
|
||||
}
|
||||
delete result.records.documents_info
|
||||
result.records.documents = result.records.other_documents_info
|
||||
delete result.records.other_documents_info
|
||||
this.businessForm.patchValue(result.records);
|
||||
console.log(this.businessForm.value,result.records)
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user