FIX_dynamic form - KeyStakeholder required removed : ps
This commit is contained in:
parent
4c22bcb7be
commit
3b4a2327d9
File diff suppressed because it is too large
Load Diff
@ -72,7 +72,7 @@ export class FormComponent implements OnInit {
|
|||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
|
||||||
//this.getSectionData()
|
//this.getSectionData()
|
||||||
if(this.pd_all_details.form_id=='5' && this.pd_all_details.pdmaster_details.product_abbr=='LFMP')
|
if(this.pd_all_details.form_id=='5' && (this.pd_all_details.pdmaster_details.product_abbr=='LFMP' || this.pd_all_details.pdmaster_details.product_abbr=='MLAP')
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
@ -83,16 +83,15 @@ export class FormComponent implements OnInit {
|
|||||||
console.log(result)
|
console.log(result)
|
||||||
if(result['dataStatus']) {
|
if(result['dataStatus']) {
|
||||||
|
|
||||||
|
|
||||||
let records = result['records']
|
let records = result['records']
|
||||||
let formValues:any ={};
|
let formValues:any ={};
|
||||||
|
|
||||||
if(records && records.hasOwnProperty('json') && records.json) {
|
if(records && records.hasOwnProperty('json') && records.json) {
|
||||||
formValues = JSON.parse(records.json)
|
formValues = JSON.parse(records.json)
|
||||||
console.log(formValues)
|
console.log(formValues)
|
||||||
if(formValues.key_stakeholders[0].stakeholder_length=='2')
|
if(formValues.key_stakeholders[0].stakeholder_length != '0')
|
||||||
{
|
{
|
||||||
let controlcount='2';
|
let controlcount=formValues.key_stakeholders[0].stakeholder_length;
|
||||||
this.quesService.ques_length(controlcount)
|
this.quesService.ques_length(controlcount)
|
||||||
this.loadTemplate()
|
this.loadTemplate()
|
||||||
}
|
}
|
||||||
@ -118,9 +117,9 @@ export class FormComponent implements OnInit {
|
|||||||
let formValues1:any ={};
|
let formValues1:any ={};
|
||||||
if(records ) {
|
if(records ) {
|
||||||
formValues1 = records
|
formValues1 = records
|
||||||
if(formValues1.key_stakeholders[0].stakeholder_length=='2')
|
if(formValues1.key_stakeholders[0].stakeholder_length != 0)
|
||||||
{
|
{
|
||||||
let controlcount='2';
|
let controlcount=formValues1.key_stakeholders[0].stakeholder_length;
|
||||||
this.quesService.ques_length(controlcount)
|
this.quesService.ques_length(controlcount)
|
||||||
this.loadTemplate()
|
this.loadTemplate()
|
||||||
}
|
}
|
||||||
@ -174,6 +173,7 @@ else
|
|||||||
if(result.dataStatus) {
|
if(result.dataStatus) {
|
||||||
console.log('records');
|
console.log('records');
|
||||||
console.log(result.records);
|
console.log(result.records);
|
||||||
|
console.log(result.records.template);
|
||||||
let question_template: any = result.records
|
let question_template: any = result.records
|
||||||
if (question_template && question_template != null && question_template != undefined
|
if (question_template && question_template != null && question_template != undefined
|
||||||
) {
|
) {
|
||||||
@ -181,6 +181,7 @@ else
|
|||||||
// question_template = JSON.parse(question_template)
|
// question_template = JSON.parse(question_template)
|
||||||
if (question_template.hasOwnProperty('template') && question_template.template) {
|
if (question_template.hasOwnProperty('template') && question_template.template) {
|
||||||
question_template =JSON.parse(question_template.template);
|
question_template =JSON.parse(question_template.template);
|
||||||
|
console.log(question_template);
|
||||||
this.commonFormGroup = new FormGroup({})
|
this.commonFormGroup = new FormGroup({})
|
||||||
this.questions_JSON = question_template;
|
this.questions_JSON = question_template;
|
||||||
console.log(this.questions_JSON)
|
console.log(this.questions_JSON)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user