latest changes lfmp
This commit is contained in:
parent
d8f08eacc6
commit
46a7e02fcd
@ -42,7 +42,9 @@ export class QuesFormService {
|
||||
assignFormControl_array(formgroup: FormGroup, ques_data: any) {
|
||||
|
||||
const control: any = formgroup
|
||||
console.log('control');
|
||||
console.log(formgroup);
|
||||
|
||||
ques_data.forEach((val, index) => {
|
||||
|
||||
if (val.hasOwnProperty('is_repeatable') && val.is_repeatable == '1') {
|
||||
@ -56,14 +58,17 @@ export class QuesFormService {
|
||||
// }))
|
||||
|
||||
control.addControl(val.group_key, this._fb.array([]))
|
||||
|
||||
|
||||
|
||||
let childControl: any = control.get(val.group_key) as FormArray
|
||||
|
||||
//let childControl1: any = control.get(val.value) as FormArray
|
||||
console.log('childControl');
|
||||
console.log(childControl);
|
||||
console.log(val.group_key);
|
||||
// childControl.push(this._fb.group({ 'questions': this._fb.array([]) }))
|
||||
|
||||
this.length='3';
|
||||
|
||||
if(this.length=='3')
|
||||
if(this.length=='3' && val.form_name=='Key Stakeholders in Business')
|
||||
{
|
||||
|
||||
val.question.push({
|
||||
@ -331,7 +336,45 @@ export class QuesFormService {
|
||||
"value":null
|
||||
}
|
||||
],
|
||||
|
||||
"onchange_properties":[
|
||||
{
|
||||
"purpose":"FORM_CTRL",
|
||||
"form_controls":[
|
||||
{
|
||||
"insert_index":"started_biz2",
|
||||
"expression":"(total_work_exp2 > vintage_in_current_biz2)",
|
||||
"value_keys":[
|
||||
"total_work_exp2",
|
||||
"vintage_in_current_biz2"
|
||||
],
|
||||
"questions":[
|
||||
{
|
||||
"question_key":"previous_experience_details1",
|
||||
"question":"Previous Experience Details1",
|
||||
"place_holder":"Enter text",
|
||||
"type":"1",
|
||||
|
||||
"api_properties":null,
|
||||
"answers":null,
|
||||
"onchange_properties":null,
|
||||
"is_repeatable":null,
|
||||
"field_type":"string",
|
||||
"parent_question_key":"vintage_in_current_biz2",
|
||||
"validations":[
|
||||
{
|
||||
"name":"required",
|
||||
"isactive":"1",
|
||||
"validator":"Validators.required",
|
||||
"message":"Previous Experience Required",
|
||||
"value":null
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"question":"",
|
||||
@ -352,7 +395,45 @@ export class QuesFormService {
|
||||
"value":null
|
||||
}
|
||||
],
|
||||
|
||||
"onchange_properties":[
|
||||
{
|
||||
"purpose":"FORM_CTRL",
|
||||
"form_controls":[
|
||||
{
|
||||
"insert_index":"started_biz2",
|
||||
"expression":"(total_work_exp2 > vintage_in_current_biz2)",
|
||||
"value_keys":[
|
||||
"total_work_exp2",
|
||||
"vintage_in_current_biz2"
|
||||
],
|
||||
"questions":[
|
||||
{
|
||||
"question":"Previous Experience Details2",
|
||||
"question_key":"previous_experience_details2",
|
||||
"place_holder":"Enter text",
|
||||
"type":"1",
|
||||
|
||||
"api_properties":null,
|
||||
"answers":null,
|
||||
"onchange_properties":null,
|
||||
"is_repeatable":null,
|
||||
"field_type":"string",
|
||||
"parent_question_key":"total_work_exp2",
|
||||
"validations":[
|
||||
{
|
||||
"name":"required",
|
||||
"isactive":"1",
|
||||
"validator":"Validators.required",
|
||||
"message":"Previous Experience Required",
|
||||
"value":null
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"question":"",
|
||||
@ -385,7 +466,7 @@ export class QuesFormService {
|
||||
}
|
||||
)
|
||||
}
|
||||
else if(this.length=='2')
|
||||
else if(this.length=='2' && val.form_name=='Key Stakeholders in Business')
|
||||
{
|
||||
|
||||
val.question.push({
|
||||
|
||||
@ -120,7 +120,7 @@
|
||||
],
|
||||
"questions":[
|
||||
{
|
||||
"question_key":"previous_experience_details",
|
||||
"question_key":"previous_experience_details0",
|
||||
"question":"Previous Experience Details0",
|
||||
"place_holder":"Enter text",
|
||||
"type":"1",
|
||||
@ -179,7 +179,7 @@
|
||||
],
|
||||
"questions":[
|
||||
{
|
||||
"question":"Previous Experience Details",
|
||||
"question":"Previous Experience Details0",
|
||||
"question_key":"previous_experience_details0",
|
||||
"place_holder":"Enter text",
|
||||
"type":"1",
|
||||
@ -240,7 +240,8 @@
|
||||
],
|
||||
"is_repeatable":"1",
|
||||
"group_title":"Details of Key Stakeholders in the Business",
|
||||
"group_key":"key_stakeholders"
|
||||
"group_key":"key_stakeholders",
|
||||
"form_name":"Key Stakeholders in Business"
|
||||
},
|
||||
{
|
||||
"question_key":"common_remarks",
|
||||
|
||||
Loading…
Reference in New Issue
Block a user