lfmp multiple entity

This commit is contained in:
Your Name 2021-08-13 12:29:10 +05:30
parent cc880cdb51
commit d8f08eacc6
9 changed files with 898 additions and 223 deletions

Binary file not shown.

View File

@ -19,6 +19,7 @@
<div *ngIf="parent_ques.is_repeatable != '1'" >
<app-dynamic-question-template [currFormArrayObj]="parent_ques" [json_answers] = "json_answers" [formGroupN]="form_group_name"
[whole_json]="questions_JSON.questions" [json_index]="p_i"></app-dynamic-question-template>
</div>
<div *ngIf="parent_ques.is_repeatable == '1'">
<!-- {{form_group_name.value[parent_ques.group_key] | json}} -->

View File

@ -15,6 +15,7 @@ export class DynamicFormComponent implements OnInit {
@Input() form_group_name:FormGroup;
@Input() questions_JSON:any;
@Input() json_answers:any;
length:any;
step: number=0;
isDefaultGenerated:boolean = false
step_child:number = 0
@ -23,21 +24,25 @@ export class DynamicFormComponent implements OnInit {
constructor(private _fb:FormBuilder,private questionService:QuesFormService) { }
ngOnInit() {
// this.form_group_name=new FormGroup({questions:this._fb.array([])})
// console.log(this.questions_JSON,this.json_answers,this.questionService);
//console.log('testing');
// console.log(this.json_answers);
// this.questions_JSON.questions.push({"ans_length":this.json_answers.key_stakeholders.length})
//this.length=this.questionService.ques_length(this.json_answers.key_stakeholders.length)
this.form_group_name=this.questionService.assignFormControl_array(this.form_group_name,this.questions_JSON.questions)
// debugger
this.generateGroupControls();
}
generateGroupControls() {
if(this.json_answers && this.json_answers != null){
this.isDefaultGenerated = true;
this.questions_JSON.questions.forEach(parent_ques=>{
// debugger;
// FOR ADDING THE GROUP QUES TO DISPLAY WITHOUT CONSIDERING INDEX 0
// FOR ADDING THE GROUP QUES TO DISPLAY WITHOUT CONSIDERING INDEX 0
if(parent_ques.is_repeatable == '1'){
if(this.json_answers[parent_ques.group_key] && this.json_answers[parent_ques.group_key].length > this.form_group_name.value[parent_ques.group_key].length) {

View File

@ -22,45 +22,127 @@ export class DynamicQuestionTemplateComponent implements OnInit {
@Input() whole_form:FormGroup;
@Input() json_answers:any;
@Input()group_key:any;
length:any;
@Output() generateGroupControls= new EventEmitter()
local_city: any;
local_pincode: any;
json_answers1:any;
autoCompleteAns:Observable<string[]>
public commonFilterCtrl:FormControl = new FormControl();
public ngxFilteredValue:ReplaySubject<any> = new ReplaySubject<any>(1);
parent_ques1: any;
constructor(private quesService:QuesFormService,private _fb:FormBuilder, private matDialog:MatDialog, private loaderService:LoaderService) { }
ngOnInit() {
this.parent_ques = this.currFormArrayObj
if(this.parent_ques.type == '9' && this.parent_ques.answers && this.parent_ques.answers.length > 0) {
this.autoCompleteAns =this.formGroupN.get(this.parent_ques.question_key).valueChanges.pipe(
startWith(''),
map(value => this.autoCompleteFilter(value))
)
}
//let length=this.quesService.ans_length()
}
ngOnChanges() {
this.parent_ques = this.currFormArrayObj
this.json_answers1=[{
stakeholder_name0: "SUMIT KHANDELWAL",
share_holding0: 10,
vintage_in_current_biz0: 5,
total_work_exp0: 10,
started_biz0: "",
stakeholder_name1: "RAM",
share_holding1: 10.5,
vintage_in_current_biz1: 8,
total_work_exp1: 5,
started_biz1: "",
stakeholder_name2: "VIGNESH",
share_holding2: 55,
vintage_in_current_biz2: 6,
total_work_exp2: 0,
started_biz2: "",
company_name: 3},
{
stakeholder_name0: "SUMIT KHANDELWAL",
share_holding0: 15,
vintage_in_current_biz0: 6,
total_work_exp0: 11,
started_biz0: "",
stakeholder_name1: "RAM",
share_holding1: 0,
vintage_in_current_biz1: 10,
total_work_exp1: 9,
started_biz1: "",
stakeholder_name2: "VIGNESH",
share_holding2: 25,
vintage_in_current_biz2: 12,
total_work_exp2: 8,
started_biz2: "",
company_name: 2},{
stakeholder_name0: "SUMIT KHANDELWAL",
share_holding0: 25,
vintage_in_current_biz0: 7,
total_work_exp0: 12,
started_biz0: "",
stakeholder_name1: "RAM",
share_holding1: 25.5,
vintage_in_current_biz1: 15,
total_work_exp1: 0,
started_biz1: "",
stakeholder_name2: "VIGNESH",
share_holding2: 0,
vintage_in_current_biz2: 10,
total_work_exp2: 9,
started_biz2: "",
company_name: 1}
]
if(this.json_answers!=null && this.json_answers != undefined && this.json_answers) {
// setTimeout(()=>{
// console.clear()
if(this.json_answers!=null && this.json_answers != undefined && this.json_answers && !this.group_key) {
if(this.json_answers!=null && this.json_answers!= undefined && this.json_answers&& !this.group_key) {
this.formGroupN.get(this.parent_ques.question_key).patchValue((this.json_answers[this.parent_ques.question_key] || ''))
// this.formGroupN.get(this.parent_ques1.question_key).patchValue((this.json_answers[1][this.parent_ques1.question_key] || ''))
this.onChangeProperty({value:this.json_answers[this.parent_ques.question_key]},this.parent_ques,'','','','TS')
}
else if(this.json_answers!=null && this.json_answers != undefined && this.json_answers){
// this.formGroupN.patchValue((this.json_answers[this.group_key] || ''))
// debugger;
this.whole_form.get(this.group_key).patchValue(this.json_answers)
if(this.json_answers.length > 1) {
this.generateGroupControls.emit()
}
console.log(this.json_answers);
this.json_answers.forEach((value,index)=>{
@ -176,7 +258,7 @@ export class DynamicQuestionTemplateComponent implements OnInit {
}
}
onChangeProperty(event,sec_control,question_key,options?,sec_index?,from?){
console.log(from,"sadf")
// alert('datatamil');
if(!from && from != 'TS' && this.quesService.formanswers != null) {
console.log("Value changes",from);
this.quesService.formanswers = null
@ -262,6 +344,7 @@ export class DynamicQuestionTemplateComponent implements OnInit {
let params={records:{state_id:event.value}}
this.quesService.apiCall(onChangeProperty.api,params,onChangeProperty.api_method).subscribe(res=>{
if(res['dataStatus']){
this.local_city=res['records'].cities
this.local_pincode=res['records'].pincode
@ -284,7 +367,9 @@ export class DynamicQuestionTemplateComponent implements OnInit {
})
}
else{
this.quesService.apiCall(onChangeProperty.api,onChangeProperty.params,onChangeProperty.api_method).subscribe((result:any)=>{
if(result['dataStatus']){
if(result.hasOwnProperty('records')){
result=result['records']
@ -564,6 +649,10 @@ export class DynamicQuestionTemplateComponent implements OnInit {
})
}
addOrRemoveControl(val,ques_control,question_index_after,options,paren_ques) {
console.log(val);
console.log(ques_control);
console.log(question_index_after);
console.log(paren_ques);
if(options == 1){
let check_dup=ques_control.filter(control_key=>control_key.question_key == val.question_key)
@ -609,6 +698,7 @@ export class DynamicQuestionTemplateComponent implements OnInit {
}
}
checkAndRemoveSubQuestion(question_obj,ques_control) {
let getSubQuestion = this.whole_json.filter(vv=>vv.parent_question_key == question_obj.question_key)
if(getSubQuestion.length > 0) {
getSubQuestion.forEach(val=>{
@ -686,6 +776,7 @@ export class DynamicQuestionTemplateComponent implements OnInit {
}
proceedValidationSet(validation_obj,group_ques,sec_control,validator_single?){
let ques_control;
if(validation_obj.validation_to == null){
@ -738,7 +829,17 @@ export class DynamicQuestionTemplateComponent implements OnInit {
}
}
newAnswerCreateDialog(choosed_answer_obj,curr_ques_obj) {
// console.log('aa');
// console.log(choosed_answer_obj);
// console.log(curr_ques_obj);
// console.log('abx');
// console.log(choosed_answer_obj.answer)
// if(choosed_answer_obj.answer!='')
// {
// console.log('changed');
// let company=this.quesService.companynamechanged(choosed_answer_obj,curr_ques_obj)
// }
if(choosed_answer_obj.is_others == '-1') {
this.formGroupN.get(curr_ques_obj.question_key).setValue('')
let dialog = this.matDialog.open(AnswerOptionCreateDialogComponent,{

View File

@ -10,21 +10,45 @@ const apiUrl = environment.apiEndpoint
providedIn: 'root'
})
export class QuesFormService {
formgroup_company:FormGroup;
ques_data_company:any;
company_name:any;
formanswers=null;
pd_all_details:any= {}
datepipe: DatePipe;
length: string;
constructor(private _fb:FormBuilder,private http:HttpClient) {
this.datepipe=new DatePipe('en-US')
// this.apiUrl = constantProvider.environment().url
}
// FOR CREATING A FORM CONTROL DYNAMICALLY
// companynamechanged(choosed_answer_obj,curr_ques_obj) {
// alert('new');
// console.log('aa');
// console.log(choosed_answer_obj);
// console.log(curr_ques_obj);
// console.log('abx');
// console.log(choosed_answer_obj.answer)
// if(choosed_answer_obj.answer!='')
// {
// console.log('changed');
// this.company_name=choosed_answer_obj.answer
// }
// }
assignFormControl_array(formgroup: FormGroup, ques_data: any) {
const control: any = formgroup
console.log(formgroup);
ques_data.forEach((val, index) => {
if (val.hasOwnProperty('is_repeatable') && val.is_repeatable == '1') {
// control.push(this._fb.group({
// "is_repeatable": [val.is_repeatable || null],
// "group_title": [val.group_title || null], "group_type": [val.group_type || null]
@ -37,10 +61,539 @@ export class QuesFormService {
// childControl.push(this._fb.group({ 'questions': this._fb.array([]) }))
this.length='3';
if(this.length=='3')
{
val.question.push({
"question":"",
"question_key":"stakeholder_name1",
"place_holder":"Enter text",
"type":"1",
"field_width":"19",
"api_properties":null,
"answers":null,
"onchange_properties":null,
"is_repeatable":null,
"field_type":"string",
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Name Required",
"value":null
}
]
},
{
"question":"",
"question_key":"share_holding1",
"place_holder":"Enter number",
"type":"1",
"field_width":"19",
"api_properties":null,
"answers":null,
"onchange_properties":null,
"is_repeatable":null,
"field_type":"num",
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Share value Required",
"value":null
},
{
"name":"max",
"validator":"100",
"isactive":"1",
"message":"Number must be less than 100",
"value":null
}
]
},
{
"question":"",
"question_key":"vintage_in_current_biz1",
"place_holder":"Enter in years",
"type":"1",
"field_width":"19",
"api_properties":null,
"answers":null,
"is_repeatable":null,
"field_type":"num",
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Current vintage Required",
"value":null
}
],
"onchange_properties":[
{
"purpose":"FORM_CTRL",
"form_controls":[
{
"insert_index":"started_biz1",
"expression":"(total_work_exp1 > vintage_in_current_biz1)",
"value_keys":[
"total_work_exp1",
"vintage_in_current_biz1"
],
"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_biz1",
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Previous Experience Required",
"value":null
}
]
}
]
}
]
}
]
},
{
"question":"",
"question_key":"total_work_exp1",
"place_holder":"Enter in years",
"type":"1",
"field_width":"19",
"api_properties":null,
"answers":null,
"is_repeatable":null,
"field_type":"num",
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Total experience Required",
"value":null
}
],
"onchange_properties":[
{
"purpose":"FORM_CTRL",
"form_controls":[
{
"insert_index":"started_biz1",
"expression":"(total_work_exp1 > vintage_in_current_biz1)",
"value_keys":[
"total_work_exp1",
"vintage_in_current_biz1"
],
"questions":[
{
"question":"Previous Experience Details1",
"question_key":"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":"total_work_exp1",
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Previous Experience Required",
"value":null
}
]
}
]
}
]
}
]
},
{
"question":"",
"question_key":"started_biz1",
"type":"2",
"field_width":"19",
"api_properties":null,
"onchange_properties":null,
"is_repeatable":null,
"answers":[
{
"answer_id":"Yes",
"answer":"Yes"
},
{
"answer_id":"No",
"answer":"No"
}
],
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Started Business Required",
"value":null
}
]
},{
"question":"",
"question_key":"stakeholder_name2",
"place_holder":"Enter text",
"type":"1",
"field_width":"19",
"api_properties":null,
"answers":null,
"onchange_properties":null,
"is_repeatable":null,
"field_type":"string",
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Name Required",
"value":null
}
]
},
{
"question":"",
"question_key":"share_holding2",
"place_holder":"Enter number",
"type":"1",
"field_width":"19",
"api_properties":null,
"answers":null,
"onchange_properties":null,
"is_repeatable":null,
"field_type":"num",
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Share value Required",
"value":null
},
{
"name":"max",
"validator":"100",
"isactive":"1",
"message":"Number must be less than 100",
"value":null
}
]
},
{
"question":"",
"question_key":"vintage_in_current_biz2",
"place_holder":"Enter in years",
"type":"1",
"field_width":"19",
"api_properties":null,
"answers":null,
"is_repeatable":null,
"field_type":"num",
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Current vintage Required",
"value":null
}
],
},
{
"question":"",
"question_key":"total_work_exp2",
"place_holder":"Enter in years",
"type":"1",
"field_width":"19",
"api_properties":null,
"answers":null,
"is_repeatable":null,
"field_type":"num",
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Total experience Required",
"value":null
}
],
},
{
"question":"",
"question_key":"started_biz2",
"type":"2",
"field_width":"19",
"api_properties":null,
"onchange_properties":null,
"is_repeatable":null,
"answers":[
{
"answer_id":"Yes",
"answer":"Yes"
},
{
"answer_id":"No",
"answer":"No"
}
],
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Started Business Required",
"value":null
}
]
}
)
}
else if(this.length=='2')
{
val.question.push({
"question":"",
"question_key":"stakeholder_name1",
"place_holder":"Enter text",
"type":"1",
"field_width":"19",
"api_properties":null,
"answers":null,
"onchange_properties":null,
"is_repeatable":null,
"field_type":"string",
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Name Required",
"value":null
}
]
},
{
"question":"",
"question_key":"share_holding1",
"place_holder":"Enter number",
"type":"1",
"field_width":"19",
"api_properties":null,
"answers":null,
"onchange_properties":null,
"is_repeatable":null,
"field_type":"num",
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Share value Required",
"value":null
},
{
"name":"max",
"validator":"100",
"isactive":"1",
"message":"Number must be less than 100",
"value":null
}
]
},
{
"question":"",
"question_key":"vintage_in_current_biz1",
"place_holder":"Enter in years",
"type":"1",
"field_width":"19",
"api_properties":null,
"answers":null,
"is_repeatable":null,
"field_type":"num",
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Current vintage Required",
"value":null
}
],
"onchange_properties":[
{
"purpose":"FORM_CTRL",
"form_controls":[
{
"insert_index":"started_biz1",
"expression":"(total_work_exp1 > vintage_in_current_biz1)",
"value_keys":[
"total_work_exp1",
"vintage_in_current_biz1"
],
"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_biz1",
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Previous Experience Required",
"value":null
}
]
}
]
}
]
}
]
},
{
"question":"",
"question_key":"total_work_exp1",
"place_holder":"Enter in years",
"type":"1",
"field_width":"19",
"api_properties":null,
"answers":null,
"is_repeatable":null,
"field_type":"num",
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Total experience Required",
"value":null
}
],
"onchange_properties":[
{
"purpose":"FORM_CTRL",
"form_controls":[
{
"insert_index":"started_biz1",
"expression":"(total_work_exp1 > vintage_in_current_biz1)",
"value_keys":[
"total_work_exp1",
"vintage_in_current_biz1"
],
"questions":[
{
"question":"Previous Experience Details1",
"question_key":"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":"total_work_exp1",
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Previous Experience Required",
"value":null
}
]
}
]
}
]
}
]
},
{
"question":"",
"question_key":"started_biz1",
"type":"2",
"field_width":"19",
"api_properties":null,
"onchange_properties":null,
"is_repeatable":null,
"answers":[
{
"answer_id":"Yes",
"answer":"Yes"
},
{
"answer_id":"No",
"answer":"No"
}
],
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Started Business Required",
"value":null
}
]
})
}
// let sub_childControl: any = childControl.controls[0].get('questions') as FormArray
let control_names:any={}
ques_data[index].group_questions = []
ques_data[index].group_questions.push(val.question)
//ques_data[index].group_questions1 = []
ques_data[index].group_questions.push(val.question)
val.group_questions[0].forEach((group_indi, arr_index) => {
// CREATING A FORMARRAY AND CONTROL FOR CHILD REPEATABLE
if(group_indi.is_repeatable == '2') {
@ -128,6 +681,7 @@ export class QuesFormService {
// })
}
else {
// console.log("con",control)
// let key_list=Object.keys(val)
// console.log(Object.keys(val))
@ -338,9 +892,9 @@ export class QuesFormService {
params=temp;
}
}
console.log('may13');
console.log(params);
return this.http.post(apiUrl+api_name,params)
}
else{
let httpParams = new HttpParams()

View File

@ -22,7 +22,8 @@
</mat-card-header> -->
<mat-card-content>
<app-dynamic-form [questions_JSON]="questions_JSON" [form_group_name] = "commonFormGroup" [json_answers]="quesService.formanswers"></app-dynamic-form>
</mat-card-content>
</mat-card-content>
</mat-card>
</mat-dialog-content>
<mat-dialog-actions *ngIf="questions_JSON.questions.length > 0">

View File

@ -825,8 +825,9 @@ uploadSMCDataFile(file,pd_id ?) {
return this._http.post(this.apiUrl+'uploadSMCDataFile',formData)
}
loadTemplate(form_id) {
return this._http.get('assets/data/SMC_CREDIT_TEMPLATES/'+form_id+'.json').map(rr=>{
//return this._http.get('assets/data/SMC_CREDIT_TEMPLATES/WCTL/1.json').map(rr=>{
//return this._http.get('assets/data/SMC_CREDIT_TEMPLATES/LFMP/5.json').map(rr=>{
let returnValue ={dataStatus:true,status:200,records:{template:JSON.stringify(rr)}}
// this.raw_credit_pd_template= returnValue.records.template
return returnValue

View File

@ -6,195 +6,7 @@
"questions":[
{
"question":[
{
"question":"Name of key Stakeholder",
"question_key":"stakeholder_name",
"place_holder":"Enter text",
"type":"1",
"api_properties":null,
"answers":null,
"onchange_properties":null,
"is_repeatable":null,
"field_type":"string",
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Name Required",
"value":null
}
]
},
{
"question":"Share Holding (%)",
"question_key":"share_holding",
"place_holder":"Enter number",
"type":"1",
"api_properties":null,
"answers":null,
"onchange_properties":null,
"is_repeatable":null,
"field_type":"num",
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Share value Required",
"value":null
},
{
"name":"max",
"validator":"100",
"isactive":"1",
"message":"Number must be less than 100",
"value":null
}
]
},
{
"question":"Vintage in Current Business (in years)",
"question_key":"vintage_in_current_biz",
"place_holder":"Enter in years",
"type":"1",
"api_properties":null,
"answers":null,
"is_repeatable":null,
"field_type":"num",
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Current vintage Required",
"value":null
}
],
"onchange_properties":[
{
"purpose":"FORM_CTRL",
"form_controls":[
{
"insert_index":"total_work_exp",
"expression":"(total_work_exp > vintage_in_current_biz)",
"value_keys":[
"total_work_exp",
"vintage_in_current_biz"
],
"questions":[
{
"question_key":"previous_experience_details",
"question":"Previous Experience Details",
"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_biz",
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Previous Experience Required",
"value":null
}
]
}
]
}
]
}
]
},
{
"question":"Total Work Experience (in years)",
"question_key":"total_work_exp",
"place_holder":"Enter in years",
"type":"1",
"api_properties":null,
"answers":null,
"is_repeatable":null,
"field_type":"num",
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Total experience Required",
"value":null
}
],
"onchange_properties":[
{
"purpose":"FORM_CTRL",
"form_controls":[
{
"insert_index":"total_work_exp",
"expression":"(total_work_exp > vintage_in_current_biz)",
"value_keys":[
"total_work_exp",
"vintage_in_current_biz"
],
"questions":[
{
"question":"Previous Experience Details",
"question_key":"previous_experience_details",
"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_exp",
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Previous Experience Required",
"value":null
}
]
}
]
}
]
}
]
},
{
"question":"Started Business (Yes / No)",
"question_key":"started_biz",
"type":"2",
"api_properties":null,
"onchange_properties":null,
"is_repeatable":null,
"answers":[
{
"answer_id":"Yes",
"answer":"Yes"
},
{
"answer_id":"No",
"answer":"No"
}
],
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Started Business Required",
"value":null
}
]
},
{
{
"question":"Name of the Company",
"question_key":"company_name",
"place_holder":"Enter text",
@ -224,7 +36,207 @@
"value":null
}
]
},
{
"question":"Name of key Stakeholder",
"question_key":"stakeholder_name0",
"place_holder":"Enter text",
"type":"1",
"field_width":"19",
"api_properties":null,
"answers":null,
"onchange_properties":null,
"is_repeatable":null,
"field_type":"string",
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Name Required",
"value":null
}
]
},
{
"question":"Share Holding (%)",
"question_key":"share_holding0",
"place_holder":"Enter number",
"type":"1",
"field_width":"19",
"api_properties":null,
"answers":null,
"onchange_properties":null,
"is_repeatable":null,
"field_type":"num",
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Share value Required",
"value":null
},
{
"name":"max",
"validator":"100",
"isactive":"1",
"message":"Number must be less than 100",
"value":null
}
]
},
{
"question":"Vintage in Current Business (in years)",
"question_key":"vintage_in_current_biz0",
"place_holder":"Enter in years",
"type":"1",
"field_width":"19",
"api_properties":null,
"answers":null,
"is_repeatable":null,
"field_type":"num",
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Current vintage Required",
"value":null
}
],
"onchange_properties":[
{
"purpose":"FORM_CTRL",
"form_controls":[
{
"insert_index":"started_biz0",
"expression":"(total_work_exp0 > vintage_in_current_biz0)",
"value_keys":[
"total_work_exp0",
"vintage_in_current_biz0"
],
"questions":[
{
"question_key":"previous_experience_details",
"question":"Previous Experience Details0",
"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_biz0",
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Previous Experience Required",
"value":null
}
]
}
]
}
]
}
]
},
{
"question":"Total Work Experience (in years)",
"question_key":"total_work_exp0",
"place_holder":"Enter in years",
"type":"1",
"field_width":"19",
"api_properties":null,
"answers":null,
"is_repeatable":null,
"field_type":"num",
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Total experience Required",
"value":null
}
],
"onchange_properties":[
{
"purpose":"FORM_CTRL",
"form_controls":[
{
"insert_index":"started_biz0",
"expression":"(total_work_exp0 > vintage_in_current_biz0)",
"value_keys":[
"total_work_exp0",
"vintage_in_current_biz0"
],
"questions":[
{
"question":"Previous Experience Details",
"question_key":"previous_experience_details0",
"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_exp0",
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Previous Experience Required",
"value":null
}
]
}
]
}
]
}
]
},
{
"question":"Started Business (Yes / No)",
"question_key":"started_biz0",
"type":"2",
"field_width":"19",
"api_properties":null,
"onchange_properties":null,
"is_repeatable":null,
"answers":[
{
"answer_id":"Yes",
"answer":"Yes"
},
{
"answer_id":"No",
"answer":"No"
}
],
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Started Business Required",
"value":null
}
]
}
],
"is_repeatable":"1",
"group_title":"Details of Key Stakeholders in the Business",