lfmp multiple entity
This commit is contained in:
parent
cc880cdb51
commit
d8f08eacc6
BIN
ng6-seed/Sparq-Lender Test(22-07-2021)Web.zip
Normal file
BIN
ng6-seed/Sparq-Lender Test(22-07-2021)Web.zip
Normal file
Binary file not shown.
@ -12,13 +12,14 @@
|
|||||||
<!-- {{parent_ques | json}} -->
|
<!-- {{parent_ques | json}} -->
|
||||||
<!-- <div *ngIf="parent_ques.sub_title" fxLayout="row" >
|
<!-- <div *ngIf="parent_ques.sub_title" fxLayout="row" >
|
||||||
<mat-card-subtitle *ngIf="parent_ques.sub_title" fxFlex="100%">
|
<mat-card-subtitle *ngIf="parent_ques.sub_title" fxFlex="100%">
|
||||||
{{parent_ques.sub_title}}
|
{{parent_ques.sub_title}}
|
||||||
</mat-card-subtitle>
|
</mat-card-subtitle>
|
||||||
<br style="clear: both;"/>
|
<br style="clear: both;"/>
|
||||||
</div> -->
|
</div> -->
|
||||||
<div *ngIf="parent_ques.is_repeatable != '1'" >
|
<div *ngIf="parent_ques.is_repeatable != '1'" >
|
||||||
<app-dynamic-question-template [currFormArrayObj]="parent_ques" [json_answers] = "json_answers" [formGroupN]="form_group_name"
|
<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>
|
[whole_json]="questions_JSON.questions" [json_index]="p_i"></app-dynamic-question-template>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="parent_ques.is_repeatable == '1'">
|
<div *ngIf="parent_ques.is_repeatable == '1'">
|
||||||
<!-- {{form_group_name.value[parent_ques.group_key] | json}} -->
|
<!-- {{form_group_name.value[parent_ques.group_key] | json}} -->
|
||||||
|
|||||||
@ -15,6 +15,7 @@ export class DynamicFormComponent implements OnInit {
|
|||||||
@Input() form_group_name:FormGroup;
|
@Input() form_group_name:FormGroup;
|
||||||
@Input() questions_JSON:any;
|
@Input() questions_JSON:any;
|
||||||
@Input() json_answers:any;
|
@Input() json_answers:any;
|
||||||
|
length:any;
|
||||||
step: number=0;
|
step: number=0;
|
||||||
isDefaultGenerated:boolean = false
|
isDefaultGenerated:boolean = false
|
||||||
step_child:number = 0
|
step_child:number = 0
|
||||||
@ -23,30 +24,34 @@ export class DynamicFormComponent implements OnInit {
|
|||||||
constructor(private _fb:FormBuilder,private questionService:QuesFormService) { }
|
constructor(private _fb:FormBuilder,private questionService:QuesFormService) { }
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
//console.log('testing');
|
||||||
// this.form_group_name=new FormGroup({questions:this._fb.array([])})
|
// console.log(this.json_answers);
|
||||||
// console.log(this.questions_JSON,this.json_answers,this.questionService);
|
// 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)
|
this.form_group_name=this.questionService.assignFormControl_array(this.form_group_name,this.questions_JSON.questions)
|
||||||
|
|
||||||
// debugger
|
// debugger
|
||||||
this.generateGroupControls();
|
this.generateGroupControls();
|
||||||
}
|
}
|
||||||
generateGroupControls() {
|
|
||||||
|
generateGroupControls() {
|
||||||
|
|
||||||
|
|
||||||
if(this.json_answers && this.json_answers != null){
|
if(this.json_answers && this.json_answers != null){
|
||||||
this.isDefaultGenerated = true;
|
this.isDefaultGenerated = true;
|
||||||
this.questions_JSON.questions.forEach(parent_ques=>{
|
this.questions_JSON.questions.forEach(parent_ques=>{
|
||||||
|
|
||||||
// debugger;
|
// 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(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) {
|
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) {
|
||||||
|
|
||||||
// this.json_answers[parent_ques.group_key].mobile_numbers= [{mobile_no:93299},{mobile_no:948392}]
|
// this.json_answers[parent_ques.group_key].mobile_numbers= [{mobile_no:93299},{mobile_no:948392}]
|
||||||
this.json_answers[parent_ques.group_key].forEach((group_ques,g_i)=>{
|
this.json_answers[parent_ques.group_key].forEach((group_ques,g_i)=>{
|
||||||
|
|
||||||
|
|
||||||
// debugger;
|
// debugger;
|
||||||
|
|
||||||
if(g_i != 0){
|
if(g_i != 0){
|
||||||
// let parent_control=this.form_group_name
|
// let parent_control=this.form_group_name
|
||||||
|
|
||||||
|
|||||||
@ -26,7 +26,7 @@
|
|||||||
{{validation.message}}</mat-error>
|
{{validation.message}}</mat-error>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
<mat-form-field style="width:100%"
|
<mat-form-field style="width:100%"
|
||||||
*ngIf="parent_ques.type == '9'" >
|
*ngIf="parent_ques.type == '9'" >
|
||||||
<mat-label>{{parent_ques.question}}</mat-label>
|
<mat-label>{{parent_ques.question}}</mat-label>
|
||||||
@ -185,7 +185,7 @@
|
|||||||
{{validation.message}}</mat-error>
|
{{validation.message}}</mat-error>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -22,45 +22,127 @@ export class DynamicQuestionTemplateComponent implements OnInit {
|
|||||||
@Input() whole_form:FormGroup;
|
@Input() whole_form:FormGroup;
|
||||||
@Input() json_answers:any;
|
@Input() json_answers:any;
|
||||||
@Input()group_key:any;
|
@Input()group_key:any;
|
||||||
|
length:any;
|
||||||
@Output() generateGroupControls= new EventEmitter()
|
@Output() generateGroupControls= new EventEmitter()
|
||||||
local_city: any;
|
local_city: any;
|
||||||
local_pincode: any;
|
local_pincode: any;
|
||||||
|
json_answers1:any;
|
||||||
autoCompleteAns:Observable<string[]>
|
autoCompleteAns:Observable<string[]>
|
||||||
public commonFilterCtrl:FormControl = new FormControl();
|
public commonFilterCtrl:FormControl = new FormControl();
|
||||||
public ngxFilteredValue:ReplaySubject<any> = new ReplaySubject<any>(1);
|
public ngxFilteredValue:ReplaySubject<any> = new ReplaySubject<any>(1);
|
||||||
|
parent_ques1: any;
|
||||||
constructor(private quesService:QuesFormService,private _fb:FormBuilder, private matDialog:MatDialog, private loaderService:LoaderService) { }
|
constructor(private quesService:QuesFormService,private _fb:FormBuilder, private matDialog:MatDialog, private loaderService:LoaderService) { }
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
|
||||||
this.parent_ques = this.currFormArrayObj
|
this.parent_ques = this.currFormArrayObj
|
||||||
|
|
||||||
if(this.parent_ques.type == '9' && this.parent_ques.answers && this.parent_ques.answers.length > 0) {
|
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(
|
this.autoCompleteAns =this.formGroupN.get(this.parent_ques.question_key).valueChanges.pipe(
|
||||||
startWith(''),
|
startWith(''),
|
||||||
map(value => this.autoCompleteFilter(value))
|
map(value => this.autoCompleteFilter(value))
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
//let length=this.quesService.ans_length()
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
ngOnChanges() {
|
ngOnChanges() {
|
||||||
this.parent_ques = this.currFormArrayObj
|
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) {
|
if(this.json_answers!=null && this.json_answers != undefined && this.json_answers) {
|
||||||
|
|
||||||
// setTimeout(()=>{
|
// setTimeout(()=>{
|
||||||
// console.clear()
|
// 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_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')
|
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){
|
else if(this.json_answers!=null && this.json_answers != undefined && this.json_answers){
|
||||||
// this.formGroupN.patchValue((this.json_answers[this.group_key] || ''))
|
// this.formGroupN.patchValue((this.json_answers[this.group_key] || ''))
|
||||||
|
|
||||||
// debugger;
|
// debugger;
|
||||||
|
|
||||||
this.whole_form.get(this.group_key).patchValue(this.json_answers)
|
this.whole_form.get(this.group_key).patchValue(this.json_answers)
|
||||||
if(this.json_answers.length > 1) {
|
if(this.json_answers.length > 1) {
|
||||||
this.generateGroupControls.emit()
|
this.generateGroupControls.emit()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
console.log(this.json_answers);
|
||||||
this.json_answers.forEach((value,index)=>{
|
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?){
|
onChangeProperty(event,sec_control,question_key,options?,sec_index?,from?){
|
||||||
console.log(from,"sadf")
|
// alert('datatamil');
|
||||||
if(!from && from != 'TS' && this.quesService.formanswers != null) {
|
if(!from && from != 'TS' && this.quesService.formanswers != null) {
|
||||||
console.log("Value changes",from);
|
console.log("Value changes",from);
|
||||||
this.quesService.formanswers = null
|
this.quesService.formanswers = null
|
||||||
@ -262,6 +344,7 @@ export class DynamicQuestionTemplateComponent implements OnInit {
|
|||||||
let params={records:{state_id:event.value}}
|
let params={records:{state_id:event.value}}
|
||||||
|
|
||||||
this.quesService.apiCall(onChangeProperty.api,params,onChangeProperty.api_method).subscribe(res=>{
|
this.quesService.apiCall(onChangeProperty.api,params,onChangeProperty.api_method).subscribe(res=>{
|
||||||
|
|
||||||
if(res['dataStatus']){
|
if(res['dataStatus']){
|
||||||
this.local_city=res['records'].cities
|
this.local_city=res['records'].cities
|
||||||
this.local_pincode=res['records'].pincode
|
this.local_pincode=res['records'].pincode
|
||||||
@ -284,7 +367,9 @@ export class DynamicQuestionTemplateComponent implements OnInit {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
|
|
||||||
this.quesService.apiCall(onChangeProperty.api,onChangeProperty.params,onChangeProperty.api_method).subscribe((result:any)=>{
|
this.quesService.apiCall(onChangeProperty.api,onChangeProperty.params,onChangeProperty.api_method).subscribe((result:any)=>{
|
||||||
|
|
||||||
if(result['dataStatus']){
|
if(result['dataStatus']){
|
||||||
if(result.hasOwnProperty('records')){
|
if(result.hasOwnProperty('records')){
|
||||||
result=result['records']
|
result=result['records']
|
||||||
@ -564,6 +649,10 @@ export class DynamicQuestionTemplateComponent implements OnInit {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
addOrRemoveControl(val,ques_control,question_index_after,options,paren_ques) {
|
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){
|
if(options == 1){
|
||||||
let check_dup=ques_control.filter(control_key=>control_key.question_key == val.question_key)
|
let check_dup=ques_control.filter(control_key=>control_key.question_key == val.question_key)
|
||||||
|
|
||||||
@ -595,7 +684,7 @@ export class DynamicQuestionTemplateComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
if(control_key.question_key == val.question_key){
|
if(control_key.question_key == val.question_key){
|
||||||
this.whole_json.splice(index,1)
|
this.whole_json.splice(index,1)
|
||||||
this.formGroupN.controls[val.question_key].reset()
|
this.formGroupN.controls[val.question_key].reset()
|
||||||
@ -609,6 +698,7 @@ export class DynamicQuestionTemplateComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
checkAndRemoveSubQuestion(question_obj,ques_control) {
|
checkAndRemoveSubQuestion(question_obj,ques_control) {
|
||||||
|
|
||||||
let getSubQuestion = this.whole_json.filter(vv=>vv.parent_question_key == question_obj.question_key)
|
let getSubQuestion = this.whole_json.filter(vv=>vv.parent_question_key == question_obj.question_key)
|
||||||
if(getSubQuestion.length > 0) {
|
if(getSubQuestion.length > 0) {
|
||||||
getSubQuestion.forEach(val=>{
|
getSubQuestion.forEach(val=>{
|
||||||
@ -619,7 +709,7 @@ export class DynamicQuestionTemplateComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
setValidations_onChange(validation_obj_raw,group_ques,sec_control,sec_index){
|
setValidations_onChange(validation_obj_raw,group_ques,sec_control,sec_index){
|
||||||
|
|
||||||
|
|
||||||
if(validation_obj_raw.validations.length > 0){
|
if(validation_obj_raw.validations.length > 0){
|
||||||
validation_obj_raw.validations.forEach(validation_obj=>{
|
validation_obj_raw.validations.forEach(validation_obj=>{
|
||||||
|
|
||||||
@ -686,6 +776,7 @@ export class DynamicQuestionTemplateComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
proceedValidationSet(validation_obj,group_ques,sec_control,validator_single?){
|
proceedValidationSet(validation_obj,group_ques,sec_control,validator_single?){
|
||||||
|
|
||||||
let ques_control;
|
let ques_control;
|
||||||
if(validation_obj.validation_to == null){
|
if(validation_obj.validation_to == null){
|
||||||
|
|
||||||
@ -738,7 +829,17 @@ export class DynamicQuestionTemplateComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
newAnswerCreateDialog(choosed_answer_obj,curr_ques_obj) {
|
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') {
|
if(choosed_answer_obj.is_others == '-1') {
|
||||||
this.formGroupN.get(curr_ques_obj.question_key).setValue('')
|
this.formGroupN.get(curr_ques_obj.question_key).setValue('')
|
||||||
let dialog = this.matDialog.open(AnswerOptionCreateDialogComponent,{
|
let dialog = this.matDialog.open(AnswerOptionCreateDialogComponent,{
|
||||||
|
|||||||
@ -10,37 +10,590 @@ const apiUrl = environment.apiEndpoint
|
|||||||
providedIn: 'root'
|
providedIn: 'root'
|
||||||
})
|
})
|
||||||
export class QuesFormService {
|
export class QuesFormService {
|
||||||
|
formgroup_company:FormGroup;
|
||||||
|
ques_data_company:any;
|
||||||
|
company_name:any;
|
||||||
|
|
||||||
formanswers=null;
|
formanswers=null;
|
||||||
pd_all_details:any= {}
|
pd_all_details:any= {}
|
||||||
datepipe: DatePipe;
|
datepipe: DatePipe;
|
||||||
|
length: string;
|
||||||
constructor(private _fb:FormBuilder,private http:HttpClient) {
|
constructor(private _fb:FormBuilder,private http:HttpClient) {
|
||||||
this.datepipe=new DatePipe('en-US')
|
this.datepipe=new DatePipe('en-US')
|
||||||
// this.apiUrl = constantProvider.environment().url
|
// this.apiUrl = constantProvider.environment().url
|
||||||
}
|
}
|
||||||
// FOR CREATING A FORM CONTROL DYNAMICALLY
|
// FOR CREATING A FORM CONTROL DYNAMICALLY
|
||||||
assignFormControl_array(formgroup: FormGroup, ques_data: any) {
|
// companynamechanged(choosed_answer_obj,curr_ques_obj) {
|
||||||
|
// alert('new');
|
||||||
const control: any = formgroup
|
// 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
|
||||||
|
// }
|
||||||
|
|
||||||
ques_data.forEach((val, index) => {
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
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') {
|
if (val.hasOwnProperty('is_repeatable') && val.is_repeatable == '1') {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// control.push(this._fb.group({
|
// control.push(this._fb.group({
|
||||||
// "is_repeatable": [val.is_repeatable || null],
|
// "is_repeatable": [val.is_repeatable || null],
|
||||||
// "group_title": [val.group_title || null], "group_type": [val.group_type || null]
|
// "group_title": [val.group_title || null], "group_type": [val.group_type || null]
|
||||||
// ,"question_key":[val.question[0].question_key]
|
// ,"question_key":[val.question[0].question_key]
|
||||||
// }))
|
// }))
|
||||||
|
|
||||||
control.addControl(val.group_key, this._fb.array([]))
|
control.addControl(val.group_key, this._fb.array([]))
|
||||||
|
|
||||||
let childControl: any = control.get(val.group_key) as FormArray
|
let childControl: any = control.get(val.group_key) as FormArray
|
||||||
|
|
||||||
// childControl.push(this._fb.group({ 'questions': this._fb.array([]) }))
|
// 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 sub_childControl: any = childControl.controls[0].get('questions') as FormArray
|
||||||
let control_names:any={}
|
let control_names:any={}
|
||||||
ques_data[index].group_questions = []
|
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) => {
|
val.group_questions[0].forEach((group_indi, arr_index) => {
|
||||||
// CREATING A FORMARRAY AND CONTROL FOR CHILD REPEATABLE
|
// CREATING A FORMARRAY AND CONTROL FOR CHILD REPEATABLE
|
||||||
if(group_indi.is_repeatable == '2') {
|
if(group_indi.is_repeatable == '2') {
|
||||||
@ -128,6 +681,7 @@ export class QuesFormService {
|
|||||||
// })
|
// })
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
||||||
// console.log("con",control)
|
// console.log("con",control)
|
||||||
// let key_list=Object.keys(val)
|
// let key_list=Object.keys(val)
|
||||||
// console.log(Object.keys(val))
|
// console.log(Object.keys(val))
|
||||||
@ -338,9 +892,9 @@ export class QuesFormService {
|
|||||||
params=temp;
|
params=temp;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
console.log('may13');
|
|
||||||
console.log(params);
|
|
||||||
return this.http.post(apiUrl+api_name,params)
|
return this.http.post(apiUrl+api_name,params)
|
||||||
|
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
let httpParams = new HttpParams()
|
let httpParams = new HttpParams()
|
||||||
|
|||||||
@ -22,7 +22,8 @@
|
|||||||
</mat-card-header> -->
|
</mat-card-header> -->
|
||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
<app-dynamic-form [questions_JSON]="questions_JSON" [form_group_name] = "commonFormGroup" [json_answers]="quesService.formanswers"></app-dynamic-form>
|
<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-card>
|
||||||
</mat-dialog-content>
|
</mat-dialog-content>
|
||||||
<mat-dialog-actions *ngIf="questions_JSON.questions.length > 0">
|
<mat-dialog-actions *ngIf="questions_JSON.questions.length > 0">
|
||||||
|
|||||||
@ -825,8 +825,9 @@ uploadSMCDataFile(file,pd_id ?) {
|
|||||||
return this._http.post(this.apiUrl+'uploadSMCDataFile',formData)
|
return this._http.post(this.apiUrl+'uploadSMCDataFile',formData)
|
||||||
}
|
}
|
||||||
loadTemplate(form_id) {
|
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/'+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)}}
|
let returnValue ={dataStatus:true,status:200,records:{template:JSON.stringify(rr)}}
|
||||||
// this.raw_credit_pd_template= returnValue.records.template
|
// this.raw_credit_pd_template= returnValue.records.template
|
||||||
return returnValue
|
return returnValue
|
||||||
|
|||||||
@ -5,196 +5,8 @@
|
|||||||
],
|
],
|
||||||
"questions":[
|
"questions":[
|
||||||
{
|
{
|
||||||
"question":[
|
"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":"Name of the Company",
|
||||||
"question_key":"company_name",
|
"question_key":"company_name",
|
||||||
"place_holder":"Enter text",
|
"place_holder":"Enter text",
|
||||||
@ -224,7 +36,207 @@
|
|||||||
"value":null
|
"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",
|
"is_repeatable":"1",
|
||||||
"group_title":"Details of Key Stakeholders in the Business",
|
"group_title":"Details of Key Stakeholders in the Business",
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user