single company choosed

This commit is contained in:
venbatechnologies@gmail.com 2022-01-20 16:11:28 +05:30
parent 1edaa11143
commit 7a1d23f253

View File

@ -132,14 +132,14 @@ export class DynamicQuestionTemplateComponent implements OnInit {
setTimeout(()=>{
console.log(this.parent_ques);
if( this.parent_ques.answers ){
if( this.parent_ques.answers && this.parent_ques.answers instanceof Array){
console.log(this.parent_ques.answers.length)
console.log( this.formGroupN.get(this.parent_ques.question_key))
if(this.parent_ques.answers.length == 1){
if(this.parent_ques.type == '3' && this.parent_ques.answers.length == 1){
console.log(this.parent_ques.answers.answer_id)
this.formGroupN.get(this.parent_ques.question_key).patchValue(this.parent_ques.answers[0].answer_id || '')
}else if(this.parent_ques.type == 3 && this.parent_ques.answers.length == 0){
}else if(this.parent_ques.type == '3' && this.parent_ques.answers.length == 0){
console.log(this.parent_ques.answers.answer_id)
this.formGroupN.get(this.parent_ques.question_key).patchValue(this.parent_ques.answers[0].answer_id || '')
}