SMC Feedbacks: Template validation removal, Borrower with multi mobile number, CPA self allocation, Highlighted the mandatory section and some issue fixes

This commit is contained in:
venbatechnologies@gmail.com 2021-02-12 12:32:55 +05:30
parent 4fd9d66581
commit 85f8742c1b
24 changed files with 1232 additions and 1325 deletions

View File

@ -55,6 +55,8 @@ export class AllPdComponent implements OnInit, OnChanges {
common: any;
pagedList: ReplaySubject<any> = new ReplaySubject<any>(1);
user_id: any;
startIndex: number;
endIndex: any;
constructor(private _pd: PdTrigerService,private _fb:FormBuilder,notifier: NotifierService,private userService:UserService,
private _aws:AwsService,private loaderService:LoaderService) {
this.LenderRoleID = localStorage.getItem('LenderRoleID');
@ -126,7 +128,9 @@ console.log(this.displayedColumns)
filterData(text) {
if(!text) {
setTimeout(()=>{
this.pagedList .next(this.PdListData.slice(0, 10));
},0)
this.length = this.PdListData.length;
return
}
@ -138,7 +142,9 @@ console.log(this.displayedColumns)
}
return false
})
this.pagedList.next(temp)
setTimeout(()=>{
this.pagedList.next(temp)
},0)
// this.pa
// this.length = this.pagedList.length
// console.log(this.PdListData,this.pagedList,text)
@ -160,7 +166,12 @@ console.log(this.displayedColumns)
if (data.status == 200) {
this.PdListData = data.records;
// this.PdListData = <GetOrInitializeYourListHere>;
if(this.startIndex && this.endIndex) {
this.pagedList.next(this.PdListData.slice(this.startIndex, this.endIndex));
}
else {
this.pagedList.next(this.PdListData.slice(0, 10));
}
this.length = this.PdListData.length;
this.PdListData.forEach(value=>{
let original=value.pd_sno
@ -193,12 +204,12 @@ console.log(this.displayedColumns)
}
OnPageChange(event: PageEvent){
let startIndex = event.pageIndex * event.pageSize;
let endIndex = startIndex + event.pageSize;
if(endIndex > this.length){
endIndex = this.length;
this.startIndex = event.pageIndex * event.pageSize;
this.endIndex = this.startIndex + event.pageSize;
if(this.endIndex > this.length){
this.endIndex = this.length;
}
this.pagedList.next(this.PdListData.slice(startIndex, endIndex));
this.pagedList.next(this.PdListData.slice(this.startIndex, this.endIndex));
}
pageChange(e) {

View File

@ -74,7 +74,7 @@
<br/>
<div class="example-container">
<!--Start Mobile View Code-->
<div fxLayout="row wrap" *ngFor="let details of pagedList" (click)="details.pd_status != 'BOUNCED' || details.fk_pd_allocated_to == user_id ? viewPD(details.is_child == 0 ? details.pd_id : details.parent_pd_id,details.random_string) : ''" class="webhide">
<div fxLayout="row wrap" *ngFor="let details of pagedList | async" (click)="details.pd_status != 'BOUNCED' || details.fk_pd_allocated_to == user_id ? viewPD(details.is_child == 0 ? details.pd_id : details.parent_pd_id,details.random_string) : ''" class="webhide">
<div fxFlex.xs="20" fxFlex.sm="20" class="webhide" style="text-align: center;">
<p class="lettericon">{{details.pd_sno_split.lender_name}}<br/>
<span style="font-size: 90%">{{details.pd_sno_split.serial_no}}</span></p>
@ -116,7 +116,7 @@
<!--End Mobile View Code-->
<!--Start Web View Code-->
<div fxLayout="row wrap" *ngFor="let details of pagedList">
<div fxLayout="row wrap" *ngFor="let details of pagedList | async">
<div fxFlex.xs="20" fxFlex.sm="20" fxFlex.md="12" fxFlex.lg="12" fxFlex.xl="12" class="cell" style="justify-content:flex-end">
<div [ngStyle]="{'color': '#e00201','font-weight': 'bold','font-size':'16px'}" mat-line>{{details.pd_sno}}</div>
<span *ngIf="(details.lender_short_name == 'MWISE' && details.fk_pd_type == '3') || (details.lender_short_name != 'MWISE')" mat-line class="cell">{{details.pd_type_name}}</span>

View File

@ -7,6 +7,7 @@ import { NotifierService } from 'angular-notifier';
import { UserService } from 'app/settings/service/user.service';
import { AwsService } from 'app/AwsService/aws.service';
import { LoaderService } from 'app/shared/loaderService/loader.service';
import { ReplaySubject } from 'rxjs';
@Component({
selector: 'app-completed-pd',
@ -52,8 +53,10 @@ export class CompletedPdComponent implements OnInit, OnChanges {
user_role_name: string;
limitMsg: boolean = false;
common: any;
pagedList: any=[];
pagedList: ReplaySubject<any> = new ReplaySubject<any>(1);
user_id: any;
startIndex: any;
endIndex: any;
constructor(private _pd: PdTrigerService,public _fb:FormBuilder,notifier: NotifierService,private userService:UserService,
private _aws:AwsService, private loaderService:LoaderService) {
this.notifier = notifier;
@ -112,7 +115,8 @@ export class CompletedPdComponent implements OnInit, OnChanges {
let filteredText = changes.bindFilterValue.currentValue ? changes.bindFilterValue.currentValue.trim() : changes.bindFilterValue.currentValue;
// filteredText = filteredText ? filteredText.trim() : filteredText;
filteredText = filteredText ? filteredText.toLowerCase() : filteredText;
this.dataSourceTab4.filter = filteredText;
// this.dataSourceTab4.filter = filteredText;
this.filterData(filteredText)
}
@ -130,7 +134,12 @@ public LenderRoleID : any = localStorage.getItem('LenderRoleID');
this.completedPdListData = data.records;
// this.dataLengthTab4 = data.records.length;
// this.dataSourceTab4.data = this.completedPdListData;
this.pagedList = this.completedPdListData.slice(0, 10);
if(this.startIndex && this.endIndex) {
this.pagedList.next(this.completedPdListData.slice(this.startIndex, this.endIndex));
}
else {
this.pagedList.next(this.completedPdListData.slice(0, 10));
}
this.length = this.completedPdListData.length;
this.completedPdListData.forEach(value=>{
let original=value.pd_sno
@ -157,13 +166,13 @@ public LenderRoleID : any = localStorage.getItem('LenderRoleID');
}
OnPageChange(event: PageEvent){
let startIndex = event.pageIndex * event.pageSize;
let endIndex = startIndex + event.pageSize;
if(endIndex > this.length){
endIndex = this.length;
}
this.pagedList = this.completedPdListData.slice(startIndex, endIndex);
}
this.startIndex = event.pageIndex * event.pageSize;
this.endIndex = this.startIndex + event.pageSize;
if(this.endIndex > this.length){
this.endIndex = this.length;
}
this.pagedList.next(this.completedPdListData.slice(this.startIndex, this.endIndex));
}
pageChange(e) {
console.log(e);
@ -271,7 +280,7 @@ public LenderRoleID : any = localStorage.getItem('LenderRoleID');
this.completedPdListData=res['records'];
// this.dataSourceTab4.data = res['records'];
// this.dataSourceTab4.paginator = this.paginator;
this.pagedList = this.completedPdListData.slice(0, 10);
this.pagedList .next(this.completedPdListData.slice(0, 10));
this.length = this.completedPdListData.length;
this.completedPdListData.forEach(value=>{
let original=value.pd_sno
@ -285,7 +294,7 @@ public LenderRoleID : any = localStorage.getItem('LenderRoleID');
// this.dataSourceTab4.paginator['pageIndex'] = 0;
// this.dataSourceTab4.data = [];
// this.completedPdListData = [];
this.pagedList = [];
this.pagedList.next([]);
this.recordStatus=true
this.limitMsg = false
}
@ -294,6 +303,30 @@ public LenderRoleID : any = localStorage.getItem('LenderRoleID');
this.notifier.notify('warning', 'Something Went Wrong Try Again.!' + '-' + error.error_text + ' occur');
alert(error.html_format);
});
}
filterData(text) {
if(!text) {
setTimeout(()=>{
this.pagedList .next(this.completedPdListData.slice(0, 10));
},0)
this.length = this.completedPdListData.length;
return
}
let temp = this.completedPdListData.filter(v=>{
if ((v.pd_sno && v.pd_sno.toLowerCase().indexOf(text.toLowerCase())>-1 )|| v.applicat_details[0].applicant_name.toLowerCase().indexOf(text.toLowerCase()) > -1
|| v.pd_status.toLowerCase().indexOf(text.toLowerCase())>-1|| v.city_name && v.city_name.toLowerCase().indexOf(text.toLowerCase())>-1 || v.lender_applicant_id.toLowerCase().indexOf(text.toLowerCase())>-1
||( v.pd_sno_split && v.pd_sno_split.serial_no && v.pd_sno_split.serial_no.toLowerCase().indexOf(text.toLowerCase())>-1)) {
return true;
}
return false
})
setTimeout(()=>{
this.pagedList.next(temp)
},0)
// this.pa
// this.length = this.pagedList.length
// console.log(this.PdListData,this.pagedList,text)
}
onReset(){
this.searchForm.reset();

View File

@ -73,7 +73,7 @@
<br/>
<div class="example-container">
<!--Start Mobile View Code-->
<div fxLayout="row wrap" *ngFor="let details of pagedList" (click)="details.pd_status != 'BOUNCED' || details.fk_pd_allocated_to == user_id ? viewPD(details.is_child == 0 ? details.pd_id : details.parent_pd_id,details.random_string) : ''" class="webhide">
<div fxLayout="row wrap" *ngFor="let details of pagedList | async" (click)="details.pd_status != 'BOUNCED' || details.fk_pd_allocated_to == user_id ? viewPD(details.is_child == 0 ? details.pd_id : details.parent_pd_id,details.random_string) : ''" class="webhide">
<div fxFlex.xs="20" fxFlex.sm="20" class="webhide" style="text-align: center;">
<p class="lettericon">{{details.pd_sno_split.lender_name}}<br/>
<span style="font-size: 90%">{{details.pd_sno_split.serial_no}}</span></p>
@ -115,7 +115,7 @@
<!--End Mobile View Code-->
<!--Start Web View Code-->
<div fxLayout="row wrap" *ngFor="let details of pagedList">
<div fxLayout="row wrap" *ngFor="let details of pagedList | async">
<div fxFlex.xs="20" fxFlex.sm="20" fxFlex.md="12" fxFlex.lg="12" fxFlex.xl="12" class="cell" style="justify-content:flex-end">
<div [ngStyle]="{'color': '#e00201','font-weight': 'bold','font-size':'16px'}" mat-line>{{details.pd_sno}}</div>
<span *ngIf="(details.lender_short_name == 'MWISE' && details.fk_pd_type == '3') || (details.lender_short_name != 'MWISE')" mat-line class="cell">{{details.pd_type_name}}</span>

View File

@ -7,6 +7,7 @@ import { NotifierService } from 'angular-notifier';
import { UserService } from 'app/settings/service/user.service';
import { AwsService } from 'app/AwsService/aws.service';
import { LoaderService } from 'app/shared/loaderService/loader.service';
import { ReplaySubject } from 'rxjs';
@Component({
selector: 'app-inprogress-pd',
@ -50,8 +51,10 @@ export class InprogressPdComponent implements OnInit, OnChanges {
user_role_name: string;
limitMsg: boolean = false;
common: any;
pagedList: any=[];
pagedList: ReplaySubject<any> = new ReplaySubject<any>(1);
user_id: any;
startIndex: any;
endIndex: any;
constructor(private _pd: PdTrigerService,public _fb:FormBuilder,notifier: NotifierService,private userService:UserService,
private _aws:AwsService, private loaderService:LoaderService) {
this.notifier = notifier;
@ -109,7 +112,7 @@ export class InprogressPdComponent implements OnInit, OnChanges {
// filteredText = filteredText ? filteredText.trim() : filteredText;
let filteredText = changes.bindFilterValue.currentValue ? changes.bindFilterValue.currentValue.trim() : changes.bindFilterValue.currentValue;
filteredText = filteredText ? filteredText.toLowerCase() : filteredText;
this.dataSourceTab2.filter = filteredText;
this.filterData(filteredText)
}
// load inprogress pd list
@ -126,7 +129,12 @@ public LenderRoleID : string = localStorage.getItem('LenderRoleID');
this.progressPdListData = data.records;
// this.dataLengthTab2 = data.records.length;
// this.dataSourceTab2.data = this.progressPdListData;
this.pagedList = this.progressPdListData.slice(0, 10);
if(this.startIndex && this.endIndex) {
this.pagedList.next(this.progressPdListData.slice(this.startIndex, this.endIndex));
}
else {
this.pagedList.next(this.progressPdListData.slice(0, 10));
}
this.length = this.progressPdListData.length;
this.progressPdListData.forEach(value=>{
let original=value.pd_sno
@ -150,13 +158,13 @@ public LenderRoleID : string = localStorage.getItem('LenderRoleID');
}
OnPageChange(event: PageEvent){
let startIndex = event.pageIndex * event.pageSize;
let endIndex = startIndex + event.pageSize;
if(endIndex > this.length){
endIndex = this.length;
}
this.pagedList = this.progressPdListData.slice(startIndex, endIndex);
}
this.startIndex = event.pageIndex * event.pageSize;
this.endIndex = this.startIndex + event.pageSize;
if(this.endIndex > this.length){
this.endIndex = this.length;
}
this.pagedList.next(this.progressPdListData.slice(this.startIndex, this.endIndex));
}
pageChange(e) {
console.log(e);
@ -261,7 +269,7 @@ public LenderRoleID : string = localStorage.getItem('LenderRoleID');
this.progressPdListData = res['records'];
// this.dataSourceTab2.data = res['records'];
// this.dataSourceTab2.paginator = this.paginator;
this.pagedList = this.progressPdListData.slice(0, 10);
this.pagedList.next(this.progressPdListData.slice(0, 10));
this.length = this.progressPdListData.length;
this.progressPdListData.forEach(value=>{
let original=value.pd_sno
@ -275,7 +283,7 @@ public LenderRoleID : string = localStorage.getItem('LenderRoleID');
// this.dataSourceTab2.paginator['pageIndex'] = 0;
// this.dataSourceTab2.data = [];
this.progressPdListData = [];
this.pagedList = [];
this.pagedList.next([]);
this.recordStatus=true
this.limitMsg = false
}
@ -285,6 +293,30 @@ public LenderRoleID : string = localStorage.getItem('LenderRoleID');
alert(error.html_format);
});
}
filterData(text) {
if(!text) {
setTimeout(()=>{
this.pagedList .next(this.progressPdListData.slice(0, 10));
},0)
this.length = this.progressPdListData.length;
return
}
let temp = this.progressPdListData.filter(v=>{
if ((v.pd_sno && v.pd_sno.toLowerCase().indexOf(text.toLowerCase())>-1 )|| v.applicat_details[0].applicant_name.toLowerCase().indexOf(text.toLowerCase()) > -1
|| v.pd_status.toLowerCase().indexOf(text.toLowerCase())>-1|| v.city_name && v.city_name.toLowerCase().indexOf(text.toLowerCase())>-1 || v.lender_applicant_id.toLowerCase().indexOf(text.toLowerCase())>-1
||( v.pd_sno_split && v.pd_sno_split.serial_no && v.pd_sno_split.serial_no.toLowerCase().indexOf(text.toLowerCase())>-1)) {
return true;
}
return false
})
setTimeout(()=>{
this.pagedList.next(temp)
},0)
// this.pa
// this.length = this.pagedList.length
// console.log(this.PdListData,this.pagedList,text)
}
onReset(){
this.searchForm.reset();

View File

@ -25,8 +25,8 @@ export class PdStatusChangeDialogueComponent implements OnInit {
constructor(notifier: NotifierService , private pd: PdTrigerService,private dialogRef: MatDialogRef<PdStatusChangeDialogueComponent>,@Inject(MAT_DIALOG_DATA) public data: any)
{
this.notifier = notifier;
this.dialoge_title_content = this.data.pd_status=='INPROGRESS' ? 'Start Discussion' : this.data.pd_status=='COMPLETED' ? 'Complete Discussion' : this.data.pd_status=='ALLOCATED' ? 'Send Back to CPA' : this.data.pd_status=='BOUNCED' ? 'PD Reject' : 'Change Discussion';
this.dialoge_content = this.data.pd_status=='INPROGRESS' ? 'Are you starting the Discussion ?' : this.data.pd_status=='COMPLETED' ? 'Please confirm you are completing the Discussion' : this.data.pd_status=='ALLOCATED' ? 'Do you want to Send back the PD to CPA ?' : this.data.pd_status=='BOUNCED' ? 'Do you want to reject this PD' : 'Change Discussion';
this.dialoge_title_content = this.data.pd_status=='INPROGRESS' ? 'Start Discussion' : this.data.pd_status=='COMPLETED' ? 'Complete Discussion' : this.data.pd_status=='ALLOCATED' ? 'Send Back to CPA' : this.data.pd_status=='BOUNCED' ? 'PD Reject' : this.data.pd_status == 'CM_ALLOCATED' ? 'Self Allocate' : 'Change Discussion';
this.dialoge_content = this.data.pd_status=='INPROGRESS' ? 'Are you starting the Discussion ?' : this.data.pd_status=='COMPLETED' ? 'Please confirm you are completing the Discussion' : this.data.pd_status=='ALLOCATED' ? 'Do you want to Send back the PD to CPA ?' : this.data.pd_status=='BOUNCED' ? 'Do you want to reject this PD' : this.data.pd_status == 'CM_ALLOCATED' ? 'Do you want to Allocate the PD to yourself' : 'Change Discussion';
this.enableAddonPD = false;
this.CompletenessCheck = this.data.pd_status=='INPROGRESS' ? true : this.data.pd_status=='COMPLETED' ? false : true;
this.Loading = this.data.pd_status=='INPROGRESS' ? false : this.data.pd_status=='COMPLETED' ? true : false;

View File

@ -42,8 +42,81 @@
[ngStyle.xs]="{'margin-bottom' : (singleQues.field_type == 'numtoword' || singleQues.field_type == 'str&numtoword') ? '5%' : '0' }">
<!-- {{s_i}} -->
<!-- {{json_answers[parent_ques.group_key][s_i] | json}} -->
<div *ngIf="singleQues.is_repeatable != '2'">
<app-dynamic-question-template [group_key] = parent_ques.group_key [currFormArrayObj]="singleQues" [json_answers] = "json_answers != null && json_answers ? json_answers[parent_ques.group_key] : null" [formGroupN]="group_ques" [whole_form]="form_group_name"
[whole_json]="parent_ques.group_questions[g_i]" [json_index]="g_i" (generateGroupControls) = generateGroupControls($event)></app-dynamic-question-template>
</div>
<!-- Child REPEATABLE QUES -->
<div *ngIf="singleQues.is_repeatable == '2'">
<!-- {{singleQues.questions_level_two | json}} -->
<!-- {{form_group_name.value[parent_ques.group_key] | json}} -->
<div [formArrayName]="singleQues.group_key" *ngIf="singleQues.group_type != '6'" >
<!-- {{g_i}} {{g_l}} -->
<mat-accordion *ngIf="singleQues.group_type != '6'" #accordion="matAccordion" [multi]="true">
<!-- {{group_ques.value | json}} -->
<div *ngFor="let group_ques_child of group_ques.get(singleQues.group_key)['controls'];let g_c_i=index;let g_c_l=last"
[formGroupName]="g_c_i">
<!-- {{group_ques_child.value | json}} -->
<mat-expansion-panel [expanded]="step_child === g_c_i" #mapanel="matExpansionPanel" >
<mat-expansion-panel-header>
<mat-panel-title *ngIf="singleQues.group_title_shown != '0'">
{{singleQues.group_title}} {{g_c_i+1}}
</mat-panel-title>
<!-- <mat-panel-description>
Type your name and age
</mat-panel-description> -->
</mat-expansion-panel-header>
<!-- {{json_answers[parent_ques.group_key][0] | json}} -->
<div *ngFor="let singleQues_child of singleQues.questions_level_two[g_c_i];let s_i=index" fxFlex.xs="100" fxFlex.sm="100" [fxFlex]="singleQues_child.hasOwnProperty('field_width') && singleQues_child.field_width ? singleQues_child.field_width : '100'"
[ngStyle.xs]="{'margin-bottom' : (singleQues_child.field_type == 'numtoword' || singleQues_child.field_type == 'str&numtoword') ? '5%' : '0' }">
<!-- {{s_i}} -->
<!-- {{json_answers[parent_ques.group_key][s_i] | json}} -->
<!-- {{singleQues_child | json}} -->
<app-dynamic-question-template [group_key] = singleQues.group_key [currFormArrayObj]="singleQues_child" [json_answers] = "json_answers != null && json_answers ? json_answers[parent_ques.group_key] : null" [formGroupN]="group_ques_child" [whole_form]="group_ques"
[whole_json]="singleQues.questions_level_two[g_c_i]" [json_index]="g_c_i" (generateGroupControls) = generateGroupControls($event)></app-dynamic-question-template>
</div>
<br/>
<div fxLayout="row" fxLayoutAlign="flex-end" fxFlex="100" style="margin-top: 3%;">
<div >
<!-- <ion-button class="ion-float-right" fill="clear" color="optblue" *ngIf="g_i != 0" (click)="removeData(g_i,parent_ques)">
<ion-icon style="font-size: 22px" name="md-trash"></ion-icon>
</ion-button> -->
<button type="button" class="ml-1 mr-1 hover-icon" mat-raised-button
mat-icon-button matTooltip="Delete"
matTooltipPosition="above" *ngIf="group_ques.get(singleQues.group_key).length > 1" (click)="removeSecondLevelChild(g_c_i,singleQues,group_ques)">
<mat-icon>delete</mat-icon>
</button>
</div>
<div>
<!-- <ion-button class="ion-float-right" fill="clear" color="optblue" *ngIf="g_l"
(click)="addData(g_i,parent_ques,$event)">
<ion-icon style="font-size: 24px" name="add-circle"></ion-icon>
</ion-button> -->
<button type="button" class="ml-1 mr-1 hover-icon" mat-raised-button
mat-icon-button matTooltip="Add More"
matTooltipPosition="above" *ngIf="g_c_l"
(click)="addSecondLevelChild(g_c_i,singleQues,group_ques)">
<mat-icon>add</mat-icon>
</button>
</div>
</div>
</mat-expansion-panel>
</div>
</mat-accordion>
</div>
<!-- IS REPEATABLE -->
</div>
</div>
<br/>
<div fxLayout="row" fxLayoutAlign="flex-end" fxFlex="100" style="margin-top: 3%;">

View File

@ -16,6 +16,7 @@ export class DynamicFormComponent implements OnInit {
@Input() questions_JSON:any;
@Input() json_answers:any;
step: number=0;
step_child:number = 0
@ViewChild('mapanel') matExpansionPanel:MatExpansionPanel
@ViewChild('accordion') Accordion: MatAccordion
constructor(private _fb:FormBuilder,private questionService:QuesFormService) { }
@ -38,9 +39,11 @@ export class DynamicFormComponent implements OnInit {
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) {
console.log(this.json_answers[parent_ques.group_key]);
// 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)=>{
console.log(parent_ques,g_i)
console.log(parent_ques,g_i,group_ques)
// debugger;
if(g_i != 0){
// let parent_control=this.form_group_name
@ -49,6 +52,28 @@ export class DynamicFormComponent implements OnInit {
this.addData(g_i,parent_ques)
// }
}
// FOR CHILD REPEATABLE
let keys= Object.keys(group_ques)
keys.forEach((vv,key_index)=>{
if(typeof(group_ques[vv]) != 'string') {
console.log("Entered",group_ques[vv]);
if(group_ques[vv] && group_ques[vv].length > 0) {
//
group_ques[vv].forEach((child_val,child_index)=>{
if(child_index != 0) {
console.log(parent_ques,this.form_group_name.get(parent_ques.group_key)['controls'][g_i],parent_ques,vv,g_i)
let find_json = parent_ques.group_questions[g_i].filter(val=>val.hasOwnProperty('group_key') && val.group_key == vv)
if(find_json.length > 0) {
find_json = find_json[0]
console.log(find_json,child_index,g_i)
this.addSecondLevelChild(g_i,find_json,this.form_group_name.get(parent_ques.group_key)['controls'][g_i])
}
}
})
}
}
})
})
}
}
@ -93,9 +118,19 @@ export class DynamicFormComponent implements OnInit {
let control_names:any= {}
let control = this.form_group_name.get(json_obj.group_key) as FormArray
json_obj.question.map(val=>{
// FOR CHILD REPEATABLE
if(val.is_repeatable == '2') {
val.question.map(rr=>{
control_names[val.group_key]=this._fb.array([this._fb.group({[rr.question_key]:''})])
// control_names[val.group_key].push({[rr.question_key]:''})
})
}
else {
control_names[val.question_key] = ''
}
})
console.log(control,json_obj.group_key,control_names);
console.log(control,json_obj.group_key,control_names,json_obj.question);
// debugger;
json_obj.group_questions.push(json_obj.question);
control.push(this._fb.group(control_names))
@ -110,6 +145,43 @@ export class DynamicFormComponent implements OnInit {
this.form_group_name.updateValueAndValidity();
this.step = control.length-1
console.log(this.form_group_name.value);
// debugger;
}
// ADDING A CHILD REPEATABLE OBJ IN A EXISTING FORM ARRYA
addSecondLevelChild(index,json_obj,parent_group) {
console.log(json_obj,parent_group)
let control_names:any= {}
let control = parent_group.get(json_obj.group_key) as FormArray
json_obj.question.map(val=>{
control_names[val.question_key] = ''
})
console.log(control,json_obj.group_key,control_names,json_obj.question);
// debugger;
json_obj.questions_level_two.push(json_obj.question);
control.push(this._fb.group(control_names))
json_obj.question.forEach((group_indi,arr_index)=>{
// console.log("sd",childControl)
this.questionService.addAdditionalControl(group_indi, control.controls[control.length-1], arr_index)
})
json_obj.question = JSON.parse(JSON.stringify(json_obj.question))
control.updateValueAndValidity();
control.controls[control.length-1].updateValueAndValidity();
parent_group.updateValueAndValidity();
this.step_child = control.length-1
console.log(this.form_group_name.value,this.questions_JSON);
// debugger;
}
// REMOVE OF CHILD REPEATABLE OBJ
removeSecondLevelChild(index,json_obj,parent_group) {
console.log(json_obj)
// debugger;
let control = parent_group.get(json_obj.group_key)
control.removeAt(index)
json_obj.questions_level_two.splice(index,1)
this.step_child = control.length-1
console.log(json_obj)
}
removeData(index,json_obj) {

View File

@ -20,6 +20,7 @@
align="end" style="font-size: 12px;">{{"&#8377;"}} {{formGroupN.value[parent_ques.question_key] | numberToWords}}
</mat-hint>
<!-- <mat-hint align="end" style="font-size: 11.5px;color: gray;" *ngIf="parent_ques.get('is_amt_in_words').value == true">One Lack</mat-hint> -->
<!-- {{formGroupN.value | json}} -->
<ng-container *ngFor="let validation of parent_ques.validations" ngProjectAs="mat-error">
<mat-error align="end" *ngIf="formGroupN.get(parent_ques.question_key).hasError(validation.name.toLowerCase())">
{{validation.message}}</mat-error>

View File

@ -60,19 +60,28 @@ export class DynamicQuestionTemplateComponent implements OnInit {
this.generateGroupControls.emit()
}
this.json_answers.forEach((value,index)=>{
let keys= Object.keys(value)
keys.forEach(vv=>{
console.log("ype of ",value[vv],typeof(value[vv]),this.whole_json)
// debugger;
if(typeof(value[vv])== 'string') {
// console.log("ype of ",typeof(value[vv]))
// console.log("ansssssssssssssssssssssssssssss",this.json_answers[vv],vv,this.whole_json.filter(vl=>vl.question_key == vv))
if(this.whole_form.get(this.group_key)) {
if(this.whole_form.get(this.group_key) && this.whole_json.length > 0) {
let curr_obj=this.whole_json.filter(vl=>vl.question_key == vv)[0]
this.onChangeProperty({value:value[vv]},curr_obj,'')
}
console.log("Repeatable ques",value,this.parent_ques.question_key)
}
})
})
// debugger;
}
// this.formGroupN.get(this.parent_ques.question_key).patchValue((this.json_answers[this.parent_ques.question_key] || ''))
// setTimeout(()=>{
@ -678,6 +687,9 @@ export class DynamicQuestionTemplateComponent implements OnInit {
ques_control=this.whole_json[this.json_index]
console.log(ques_control,this.whole_json,this.json_index)
let other_control = ques_control
if(ques_control.hasOwnProperty('is_repeatable') && ques_control.is_repeatable == '2') {
return;
}
// =ques_control.filter(val=>{
// if(val.question_key == validation_obj.validation_to){
// return val

View File

@ -42,32 +42,15 @@ export class QuesFormService {
ques_data[index].group_questions = []
ques_data[index].group_questions.push(val.question)
val.group_questions[0].forEach((group_indi, arr_index) => {
// if(group_indi.api_properties != null && typeof(group_indi.api_properties) == 'object'){
console.log("api pro", val.api_properties)
// let param
// val.api_properties.forEach(val=>param=val)
// console.log(param)
// CREATING A FORMARRAY AND CONTROL FOR CHILD REPEATABLE
if(group_indi.is_repeatable == '2') {
this.addLevelTwoControls(group_indi,childControl,val.group_questions[0],val.question,arr_index)
}
else {
group_indi.raw_validations = group_indi.validations
// sub_childControl.push(this.createValue(group_indi))
// childControl.addControl(group_indi.question_key,new FormControl(''))
control_names[group_indi.question_key] = ''
// childControl.push(this._fb.group({
// [group_indi.question_key] :['']
// }))
// setTimeout(()=>{
// this.addAdditionalControl(group_indi, childControl.at(arr_index), arr_index)
// },2000)
// if(group_indi.type == '5'){
// sub_childControl.controls[arr_index].removeControl('answer_value');
// console.log("loop",arr_index,sub_childControl);
// sub_childControl.controls[arr_index].addControl('answer_value',this._fb.array([]))
// }
// if(group_indi.type == '1'){
// sub_childControl.controls[arr_index].addControl('field_type',new FormControl(group_indi.field_type))
// }
// if(val.type == '8'){
// sub_childControl.controls[index].addControl('select_search',new FormControl(val.field_type))
// }
if (group_indi.api_properties != null) {
if(group_indi.api_properties.hasOwnProperty('purpose') && group_indi.api_properties.purpose == 'answer_options_local') {
@ -91,6 +74,7 @@ export class QuesFormService {
const question_temp:any = JSON.parse(JSON.stringify(val.question));
ques_data[index].question = question_temp
}
// else{
// setTimeout(()=>{
// sub_childControl.push(this.createValue(group_indi))
@ -98,15 +82,34 @@ export class QuesFormService {
// }
// sub_childControl.push(this.createValue(group_indi))
})
console.log(control_names);
console.log(control_names, childControl.at(0));
// debugger
// val.questions[0]=val.question;
if(childControl.value.length == 0) {
childControl.push(this._fb.group(control_names))
}
else{
// MERGINE THE 0 INDEX ARRAY WITH CHILD REPEATABLE
// control_names[childControl.at(0)] =''
let previous_added_controls = childControl.at(0).controls
control_names = Object.assign(previous_added_controls,control_names)
console.log(control_names);
// debugger;
childControl.setControl(0,this._fb.group(control_names))
}
console.log(formgroup.value);
// debugger;
val.group_questions[0].forEach((group_indi,arr_index)=>{
console.log("sd",childControl,group_indi)
if(group_indi.is_repeatable == '2' && group_indi.hasOwnProperty('questions_level_two') && group_indi.questions_level_two.length > 0) {
group_indi.questions_level_two.forEach((child_val,child_index)=> {
this.addAdditionalControl(child_val, childControl.at(0).get(group_indi.group_key).controls[0], child_index)
})
}
else{
this.addAdditionalControl(group_indi, childControl.controls[0], arr_index)
}
})
// }
@ -175,7 +178,8 @@ export class QuesFormService {
// else{
// control.push(this.createValue(val))
// }
console.log(formgroup)
console.log(formgroup,ques_data)
// debugger;
}
}, err => console.log(err))
@ -183,6 +187,60 @@ export class QuesFormService {
}
// END OF FORM CREATION
// FUNCTIONAL TO HANDLE THE CREATION OF CHILD REPEABLE 2
addLevelTwoControls(curr_obj:any,child_control,group_ques,valQues,group_index) {
console.log(child_control)
// CURR VALUE(MULTI ARRAY)
const question_temp:any = JSON.parse(JSON.stringify(curr_obj.questions_level_two));
group_ques[group_index].questions_level_two = []
group_ques[group_index].questions_level_two.push(question_temp)
group_ques[group_index].question = question_temp
// RAW VALUES(SINGLE ARRAY)
valQues[group_index].question = question_temp
valQues[group_index].questions_level_two = []
valQues[group_index].questions_level_two.push(question_temp)
console.log(group_ques[group_index],question_temp);
// debugger;
let group_key:any = {}
group_key[curr_obj.group_key] = this._fb.array([])
child_control.push(this._fb.group(group_key))
console.log(child_control)
console.log(child_control.at(0),child_control.controls[0].controls[curr_obj.group_key])
// debugger;
let levelTwoChildCtrl: any = child_control.at(0).get(curr_obj.group_key) as FormArray
let control_names:any={}
curr_obj.questions_level_two[0].forEach((val,arr_index)=>{
console.log("Level 2",val)
val.raw_validations = val.validations
control_names[val.question_key] = ''
if (val.api_properties != null) {
if(val.api_properties.hasOwnProperty('purpose') && val.api_properties.purpose == 'answer_options_local') {
if(val.api_properties.master_name == 'pd_applicants') {
val.answers = (this.convertArrayNames( val.api_properties.fields,this.pd_all_details.pdapplicants_detials))
// val.question[arr_index].answers = val.answers
}
}
else{
this.apiPropertiesCall(val).then(res => {
if (res != false) {
val.answers = []
// group_indi.answers=this.convertArrayNames(val.api_properties.fields,res)
val.answers = (this.convertArrayNames(val.api_properties.fields, res))
// val.question[arr_index].answers = val.answers
}
})
}
}
})
console.log(group_ques[group_index])
levelTwoChildCtrl.push(this._fb.group(control_names))
// console.log(formgroup.value);
}
// FOR CREATING THE FORM CONTROL FOR SPECIFIC FORM ARRAY
createValue(data){

View File

@ -22,7 +22,7 @@
<mat-card-header>
<span style="padding: 17px 14px 3px 15px !important;border-radius: 0px 0px 0px 15px!important;width: 50px !important;" class="menu-badge mat-purple ng-star-inserted" align="center">{{quesIndex+1}}</span>
<div fxFlex="100" align="left" style="padding:15px !important;">
{{ formButton.form_name }}
{{ formButton.form_name }} <span *ngIf="formButton.complete_check_enabled == '1'" class="required_star_class">*</span>
</div>
<!--<div fxFlex="20" align="end">
<span style="padding: 2px 9px 3px 9px !important;" class="menu-badge mat-purple ng-star-inserted" align="center">{{quesIndex+1}}</span>

View File

@ -81,4 +81,9 @@ mat-card .child_mat_card > mat-card {
}
}
.required_star_class
{
color: red;
font-size: 1em;
}

View File

@ -199,8 +199,9 @@
<!-- {{userId == master.fk_pd_allocated_to}} -->
<span *ngIf="master.lender_short_name == 'MWISE' && LenderRoleID != '25' && userId == master.fk_pd_allocated_to"> <button *ngIf="roleAccessDetails.allocate && addresses.assigned_pd && master.pd_type_name && addresses.addtional_pd_data[0].pd_status == pdStatusCheck.ALLOCATED" mat-raised-button mat-button-md mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Reject" matTooltipPosition="above" (click)="rejectPD()"><mat-icon>settings_backup_restore</mat-icon></button></span>
<span *ngIf="master.lender_short_name == 'MWISE' && (LenderRoleID == '27' || LenderRoleID == '25' && currentPDStatus == pdStatusCheck.BOUNCED)"><button *ngIf="roleAccessDetails.allocate && addresses.assigned_pd && addresses.addtional_pd_data[0].pd_type_name && (currentPDStatus == pdStatusCheck.TRIGGERED || (currentPDStatus == pdStatusCheck.ALLOCATED && userId == master.fk_pd_allocated_to)|| (currentPDStatus == pdStatusCheck.BOUNCED && userId == master.fk_pd_allocated_to)) " mat-raised-button mat-button-md mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Allocate" matTooltipPosition="above" (click)="selfAllocation(addresses.fk_city)"><mat-icon>verified_user</mat-icon></button></span>
<span *ngIf="master.lender_short_name == 'MWISE' && LenderRoleID != '25'"><button *ngIf="addresses.assigned_pd && addresses.addtional_pd_data[0].pd_type_name && (currentPDStatus == pdStatusCheck.ALLOCATED || currentPDStatus == pdStatusCheck.INPROGRESS)" mat-raised-button mat-button-md mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Send back to CPA" matTooltipPosition="above" (click)="allocateToCpa()"><mat-icon>swap_vert</mat-icon></button></span>
<span *ngIf="master.lender_short_name == 'MWISE' && LenderRoleID != '25'"><button *ngIf="roleAccessDetails.discussions && addresses.assigned_pd && addresses.addtional_pd_data[0].pd_type_name && addresses.addtional_pd_data[0].pd_status!=pdStatusCheck.DRAFT && currentPDStatus!=pdStatusCheck.BOUNCED && (LenderRoleID == '27' || currentPDStatus!=pdStatusCheck.TRIGGERED)" mat-raised-button mat-button-md mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Discussion" matTooltipPosition="above" (click)="getPDStart(addresses,addresses.addtional_pd_data[0].pd_status)"><mat-icon>question_answer</mat-icon></button></span>
<span *ngIf="master.lender_short_name == 'MWISE' && (LenderRoleID == '26')"><button *ngIf="roleAccessDetails.allocate && addresses.assigned_pd && addresses.addtional_pd_data[0].pd_type_name && (currentPDStatus == pdStatusCheck.TRIGGERED || (currentPDStatus == pdStatusCheck.ALLOCATED && master.pd_allocated_to_role_id == '27')) " mat-raised-button mat-button-md mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Allocate to Self" matTooltipPosition="above" (click)="selfAllocation(addresses.fk_city)"><mat-icon>verified_user</mat-icon></button></span>
<span *ngIf="master.lender_short_name == 'MWISE' && LenderRoleID != '25' && (LenderRoleID == '26' && userId == master.fk_pd_allocated_to)"><button *ngIf="addresses.assigned_pd && addresses.addtional_pd_data[0].pd_type_name && (currentPDStatus == pdStatusCheck.ALLOCATED || currentPDStatus == pdStatusCheck.INPROGRESS)" mat-raised-button mat-button-md mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Send back to CPA" matTooltipPosition="above" (click)="allocateToCpa()"><mat-icon>swap_vert</mat-icon></button></span>
<span *ngIf="master.lender_short_name == 'MWISE' && LenderRoleID != '25' && (LenderRoleID == '26' && userId == master.fk_pd_allocated_to)"><button *ngIf="roleAccessDetails.discussions && addresses.assigned_pd && addresses.addtional_pd_data[0].pd_type_name && addresses.addtional_pd_data[0].pd_status!=pdStatusCheck.DRAFT && currentPDStatus!=pdStatusCheck.BOUNCED && (LenderRoleID == '27' || currentPDStatus!=pdStatusCheck.TRIGGERED)" mat-raised-button mat-button-md mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Discussion" matTooltipPosition="above" (click)="getPDStart(addresses,addresses.addtional_pd_data[0].pd_status)"><mat-icon>question_answer</mat-icon></button></span>
</div>
</div>
</div>

View File

@ -507,6 +507,7 @@ else {
/** To update pd officer*/
selfAllocation(city_id) {
if(this.LenderRoleID == '27') {
const dialogRef1 = this.dialog.open(PdAllocationComponent, {
data: { pd_id:this.viewID, pd_status: this.pdStatusCheck.ALLOCATED,random_string:this.pdMasterData[0].random_string,dialogType:'actionOnly',city_id:city_id, lender_role_id:this.LenderRoleID },
disableClose: true,
@ -518,43 +519,46 @@ else {
}
// this.notifier.notify("success","Allocated Successfully")
})
}
else{
// return;
// const dialogRef = this.dialog.open(PdStatusChangeDialogueComponent, {
// data: { pdid:this.viewID, pd_status: this.pdStatusCheck.ALLOCATED,random_string:this.pdMasterData[0].random_string,dialogType:'actionOnly' },
// disableClose: true,
// minWidth: '30%',
// // maxWidth: '40%',
// });
// dialogRef.afterClosed()
// .subscribe(dataresult => {
// if (dataresult.update_status == true) {
// // return;
// let user_id = this._aws.getlocale();
// if(!user_id) {
// this.notifier.notify('error',"Something went wrong. Try again!!");
// return;
// }
// let updateData = {
// "pd_id":this.viewID,
// "fk_pd_allocated_to":user_id,
// }
// this._pd.updatePdOfficer(updateData).subscribe(
// result => {
// if (result.status == 200) {
// this.notifier.notify('success', 'PD Allocated Successfully.!');
// this.viewPdDetails(this.viewID)
// }
// else {
// this.notifier.notify('warning', 'Something Went Wrong Try Again.!');
// this.errorMessage = "Something Went Wrong Try Again.!";
// }
// }, error => {
// this.notifier.notify('error', 'Something Went Wrong Try Again.! \t\"' + (error.error_type == 2 ? error.error_status + ' ( ' + error.error_text + ' ) ' : ' ( ' + error.error_text + ' ) ') +'\" Error Occur.!');
// this.errorMessage = "Some Thing Wents Wrong Try Again.!";
// // this.dialogRef.close();
// });
// }
// });
const dialogRef = this.dialog.open(PdStatusChangeDialogueComponent, {
data: { pdid:this.viewID, pd_status: "CM_ALLOCATED",random_string:this.pdMasterData[0].random_string,dialogType:'actionOnly' },
disableClose: true,
minWidth: '30%',
// maxWidth: '40%',
});
dialogRef.afterClosed()
.subscribe(dataresult => {
if (dataresult.update_status == true) {
// return;
let user_id = this._aws.getlocale();
if(!user_id) {
this.notifier.notify('error',"Something went wrong. Try again!!");
return;
}
let updateData = {
"pd_id":this.viewID,
"fk_pd_allocated_to":user_id,
}
this._pd.updatePdOfficer(updateData).subscribe(
result => {
if (result.status == 200) {
this.notifier.notify('success', 'PD Allocated Successfully.!');
this.viewPdDetails(this.viewID)
}
else {
this.notifier.notify('warning', 'Something Went Wrong Try Again.!');
this.errorMessage = "Something Went Wrong Try Again.!";
}
}, error => {
this.notifier.notify('error', 'Something Went Wrong Try Again.! \t\"' + (error.error_type == 2 ? error.error_status + ' ( ' + error.error_text + ' ) ' : ' ( ' + error.error_text + ' ) ') +'\" Error Occur.!');
this.errorMessage = "Some Thing Wents Wrong Try Again.!";
// this.dialogRef.close();
});
}
});
}
}

View File

@ -90,6 +90,27 @@
}
]
},
{
"questions_level_two":[
{
"question":"Mobile Number",
"question_key":"mobile_no",
"type":"1",
"field_type":"num",
"field_width":"100",
"onchange_properties":null,
"api_properties":null,
"answers":null,
"is_repeatable":null,
"validations":[
]
}
],
"is_repeatable":"2",
"group_key":"mobile_numbers",
"group_title":"Mobile Number"
},
{
"question":"Entity Type",
"question_key":"entity_type",

File diff suppressed because it is too large Load Diff

View File

@ -31,13 +31,7 @@
"parent_question_key":"supplier_info_available",
"answers":null,
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Field required",
"value":null
}
]
} ] } ] },
{
@ -63,13 +57,7 @@
"parent_question_key":"supplier_info_available",
"answers":null,
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Field required",
"value":null
}
]
},
{
@ -84,13 +72,7 @@
"parent_question_key":"supplier_info_available",
"answers":null,
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Field required",
"value":null
}
]
},
{
@ -105,13 +87,7 @@
"parent_question_key":"supplier_info_available",
"answers":null,
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Field required",
"value":null
}
]
},
{
@ -151,13 +127,13 @@
"parent_question_key":"supplier_info_available",
"answers":null,
"validations":[
{
"name":"pattern",
"isactive":"1",
"validator":"[0-9]{10,12}",
"message":"Mobile number should be 10-12 digit",
"value":null
}
{
"name":"pattern",
"isactive":"1",
"validator":"[0-9]{10,12}",
"message":"Mobile number should be 10-12 digit",
"value":null
}
]
},
{
@ -174,13 +150,13 @@
"parent_question_key":"supplier_info_available",
"answers":null,
"validations":[
{
"name":"pattern",
"isactive":"1",
"validator":"[0-9]{3,5}",
"message":"Maximum 5 digit allowed",
"value":null
}
{
"name":"pattern",
"isactive":"1",
"validator":"[0-9]{3,5}",
"message":"Maximum 5 digit allowed",
"value":null
}
]
},
{
@ -196,13 +172,13 @@
"parent_question_key":"supplier_info_available",
"answers":null,
"validations":[
{
"name":"pattern",
"isactive":"1",
"validator":"[0-9]{6,8}",
"message":"Maximum 8 digit allowed",
"value":null
}
{
"name":"pattern",
"isactive":"1",
"validator":"[0-9]{6,8}",
"message":"Maximum 8 digit allowed",
"value":null
}
]
},
{
@ -244,13 +220,7 @@
"parent_question_key":"payment_type",
"answers":null,
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Field required",
"value":null
}
]
},
{
@ -266,13 +236,7 @@
"parent_question_key":"payment_type",
"answers":null,
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Field required",
"value":null
},
{
"name":"max",
"isactive":"1",
@ -289,13 +253,7 @@
"parent_question_key":"payment_type",
"answers":null,
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Field required",
"value":null
}
]
},
{
@ -323,13 +281,7 @@
}
],
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Field required",
"value":null
}
]
}
],
@ -352,13 +304,7 @@
"answer_id":"No"
}],
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Field required",
"value":null
}
]
},
{

View File

@ -31,13 +31,7 @@
"parent_question_key":"client_info_available",
"answers":null,
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Field required",
"value":null
}
]
} ] } ] },
{
@ -63,13 +57,7 @@
"parent_question_key":"client_info_available",
"answers":null,
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Field required",
"value":null
}
]
},
{
@ -84,13 +72,7 @@
"parent_question_key":"client_info_available",
"answers":null,
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Field required",
"value":null
}
]
},
{
@ -105,13 +87,7 @@
"parent_question_key":"client_info_available",
"answers":null,
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Field required",
"value":null
}
]
},
{
@ -244,13 +220,7 @@
"parent_question_key":"payment_type",
"answers":null,
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Field required",
"value":null
}
]
},
{
@ -266,13 +236,7 @@
"parent_question_key":"payment_type",
"answers":null,
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Field required",
"value":null
},
{
"name":"max",
"isactive":"1",
@ -289,13 +253,7 @@
"parent_question_key":"payment_type",
"answers":null,
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Field required",
"value":null
}
]
},
{
@ -323,13 +281,7 @@
}
],
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Field required",
"value":null
}
]
}
],
@ -352,13 +304,7 @@
"answer_id":"No"
}],
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Field required",
"value":null
}
]
},
{

View File

@ -32,13 +32,7 @@
"parent_question_key": "stock_info_available",
"answers": null,
"validations": [
{
"name": "required",
"isactive": "1",
"validator": "Validators.required",
"message": "Field required",
"value": null
}
]
}
]
@ -80,13 +74,7 @@
}
],
"validations": [
{
"name": "required",
"isactive": "1",
"validator": "Validators.required",
"message": "Field required",
"value": null
}
]
}
]
@ -125,13 +113,7 @@
}
],
"validations": [
{
"name": "required",
"isactive": "1",
"validator": "Validators.required",
"message": "Field required",
"value": null
}
]
},
{
@ -145,13 +127,7 @@
"is_repeatable": null,
"field_type": "string",
"validations": [
{
"name": "required",
"isactive": "1",
"validator": "Validators.required",
"message": "Required",
"value": null
}
]
},
{
@ -171,13 +147,7 @@
],
"is_repeatable": null,
"validations": [
{
"name": "required",
"isactive": "1",
"validator": "Validators.required",
"message": "Required",
"value": null
}
],
"onchange_properties": [
{
@ -222,13 +192,7 @@
"parent_question_key": "provider_observed",
"answers": null,
"validations": [
{
"name": "required",
"isactive": "1",
"validator": "Validators.required",
"message": "Either Estimated Stock value or Estimated Quantity is required",
"value": null
}
]
},
{
@ -314,13 +278,7 @@
}
],
"validations": [
{
"name": "required",
"isactive": "1",
"validator": "Validators.required",
"message": "Field required",
"value": null
}
]
},
{

View File

@ -36,13 +36,7 @@
"parent_question_key":"total_fund_requirement",
"answers":null,
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Field required",
"value":null
}
]
}
]
@ -51,13 +45,7 @@
],
"is_repeatable":null,
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Field Required",
"value":null
}
]
},
{
@ -71,13 +59,7 @@
"answers":null,
"is_repeatable":null,
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Field Required",
"value":null
}
]
},
{
@ -100,13 +82,7 @@
"onchange_properties":null,
"is_repeatable":null,
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Field Required",
"value":null
}
]
},
{
@ -119,13 +95,7 @@
"onchange_properties":null,
"is_repeatable":null,
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Field Required",
"value":null
}
]
},
{
@ -161,13 +131,7 @@
"parent_question_key":"total_fund_requirement",
"answers":null,
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Field required",
"value":null
}
]
}
]
@ -175,13 +139,7 @@
}],
"is_repeatable":null,
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Field Required",
"value":null
}
]
},
{
@ -224,13 +182,7 @@
"parent_question_key":"is_transfer",
"answers":null,
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Field required",
"value":null
}
]
},
{
@ -253,13 +205,7 @@
"onchange_properties":null,
"is_repeatable":null,
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Field Required",
"value":null
}
]
},
{
@ -273,13 +219,7 @@
"onchange_properties":null,
"is_repeatable":null,
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Field Required",
"value":null
}
]
}
]
@ -288,13 +228,7 @@
}],
"is_repeatable":null,
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Field Required",
"value":null
}
]
},
{
@ -307,13 +241,7 @@
"onchange_properties":null,
"is_repeatable":null,
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Field Required",
"value":null
}
]
},
{
@ -331,13 +259,7 @@
"onchange_properties":null,
"is_repeatable":null,
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Field Required",
"value":null
}
]
},
{
@ -371,13 +293,7 @@
"parent_question_key":"construction_status",
"answers":null,
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Field required",
"value":null
}
]
}
]
@ -386,13 +302,7 @@
],
"is_repeatable":null,
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Field Required",
"value":null
}
]
},
{
@ -407,13 +317,7 @@
"is_repeatable":null,
"answers":null,
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Field required",
"value":null
}
]
},
{
@ -428,13 +332,7 @@
"is_repeatable":null,
"answers":null,
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Field required",
"value":null
}
]
},
{
@ -448,13 +346,7 @@
"is_repeatable":null,
"field_type":"string",
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Address Required",
"value":null
}
]
},
{
@ -489,13 +381,7 @@
],
"is_repeatable":null,
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"State Required",
"value":null
}
]
},
{
@ -508,13 +394,7 @@
"onchange_properties":null,
"is_repeatable":null,
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"CIty Required",
"value":null
}
]
},
{
@ -527,13 +407,7 @@
"onchange_properties":null,
"is_repeatable":null,
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Pincode Required",
"value":null
}
]
},
{
@ -548,13 +422,7 @@
"is_repeatable":null,
"answers":null,
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Field required",
"value":null
}
]
},
{
@ -569,13 +437,7 @@
"is_repeatable":null,
"answers":null,
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Field required",
"value":null
}
]
},
{

View File

@ -96,6 +96,29 @@
"seasonality"
],
"questions":[
{
"question_key":"low_sale_month_reason",
"question":"Reason for Months in which sales/services is low?",
"place_holder":"Enter the text",
"type":"1",
"api_properties":null,
"answers":null,
"onchange_properties":null,
"is_repeatable":null,
"field_type":"string",
"is_subfield":"1",
"field_width":"45",
"parent_question_key":"seasonality",
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Required",
"value":null
}
]
},
{
"question_key":"low_sale_month",
"question":"Months in which sales/services is low?",
@ -167,30 +190,8 @@
"value":null
}
]
},
{
"question_key":"low_sale_month_reason",
"question":"Reason for Months in which sales/services is low?",
"place_holder":"Enter the text",
"type":"1",
"api_properties":null,
"answers":null,
"onchange_properties":null,
"is_repeatable":null,
"field_type":"string",
"is_subfield":"1",
"field_width":"45",
"parent_question_key":"seasonality",
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Required",
"value":null
}
]
}
}
]
}
]

View File

@ -13,13 +13,7 @@
"onchange_properties":null,
"is_repeatable":null,
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Field Required",
"value":null
}
]
},
{
@ -47,6 +41,22 @@
"is_business_address"
],
"questions":[
{
"question":"No of Months",
"question_key":"business_months",
"place_holder":"",
"field_type":"num",
"type":"1",
"field_width":"45",
"api_properties":null,
"onchange_properties":null,
"is_repeatable":null,
"is_subfield":"1",
"parent_question_key":"is_business_address",
"answers":null,
"validations":[
]
},
{
"question":"No of Years",
"sub_title":"How Long has business been operated from visited premises? (Eg. If operating for 5 years and 4 months enter 5 in Years field and 4 in months field)",
@ -62,31 +72,9 @@
"parent_question_key":"is_business_address",
"answers":null,
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Field required",
"value":null
}
]
},
{
"question":"No of Months",
"question_key":"business_months",
"place_holder":"",
"field_type":"num",
"type":"1",
"field_width":"45",
"api_properties":null,
"onchange_properties":null,
"is_repeatable":null,
"is_subfield":"1",
"parent_question_key":"is_business_address",
"answers":null,
"validations":[
]
},
{
"question":"Was any business activities seen during visit?",
"question_key":"business_is_pd_visited",
@ -120,13 +108,7 @@
"parent_question_key":"business_is_pd_visited",
"answers":null,
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Field required",
"value":null
}
]
}
]
@ -144,13 +126,7 @@
"answer_id":"No"
}],
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Field required",
"value":null
}
]
},
{
@ -186,13 +162,7 @@
"parent_question_key":"business_ownership_type",
"answers":null,
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Field required",
"value":null
}
]
},
{
@ -212,13 +182,7 @@
"parent_question_key":"business_ownership_type",
"answers":null,
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Field required",
"value":null
}
]
},
{
@ -293,13 +257,7 @@
}
],
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Field required",
"value":null
}
]
}
]
@ -331,13 +289,7 @@
"parent_question_key":"business_ownership_type",
"answers":null,
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Field required",
"value":null
}
]
}
]
@ -359,13 +311,7 @@
}
],
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Field required",
"value":null
}
]
}
]
@ -375,13 +321,7 @@
],
"is_repeatable":null,
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Field Required",
"value":null
}
]
},
{
@ -475,13 +415,7 @@
"parent_question_key":"property_type",
"answers":null,
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Field required",
"value":null
}
]
}
]
@ -508,13 +442,7 @@
"parent_question_key":"property_type",
"answers":null,
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Field required",
"value":null
}
]
}
]
@ -526,13 +454,7 @@
"parent_question_key":"business_assets_mode",
"answers":null,
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Field required",
"value":null
}
]
}
]
@ -588,13 +510,7 @@
"parent_question_key":"vehicle_type",
"answers":null,
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Field required",
"value":null
}
]
}
]
@ -606,13 +522,7 @@
"parent_question_key":"business_assets_mode",
"answers":null,
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Field required",
"value":null
}
]
}
]
@ -623,13 +533,7 @@
"is_repeatable":null,
"answers":null,
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Field required",
"value":null
}
]
},
{
@ -676,13 +580,7 @@
"parent_question_key":"business_ownership_type",
"answers":null,
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Field required",
"value":null
}
]
},
{
@ -702,13 +600,7 @@
"parent_question_key":"business_ownership_type",
"answers":null,
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Field required",
"value":null
}
]
},
{
@ -785,13 +677,7 @@
}
],
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Field required",
"value":null
}
]
}
]
@ -822,13 +708,7 @@
"parent_question_key":"business_ownership_type",
"answers":null,
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Field required",
"value":null
}
]
}
]
@ -850,13 +730,7 @@
}
],
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Field required",
"value":null
}
]
}],
"is_repeatable":"1",
@ -878,13 +752,7 @@
"answer_id":"No"
}],
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Field required",
"value":null
}
]
},
{

View File

@ -36,13 +36,7 @@
"parent_question_key":"total_fund_requirement",
"answers":null,
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Field required",
"value":null
}
]
}
]
@ -51,13 +45,7 @@
],
"is_repeatable":null,
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Field Required",
"value":null
}
]
},
{
@ -71,13 +59,7 @@
"answers":null,
"is_repeatable":null,
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Field Required",
"value":null
}
]
},
{
@ -90,13 +72,7 @@
"onchange_properties":null,
"is_repeatable":null,
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Field Required",
"value":null
}
]
},
{
@ -132,13 +108,7 @@
"parent_question_key":"total_fund_requirement",
"answers":null,
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Field required",
"value":null
}
]
}
]
@ -146,13 +116,7 @@
}],
"is_repeatable":null,
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Field Required",
"value":null
}
]
},
{