Feedback changes and issues fixes
This commit is contained in:
parent
ffecdb2dec
commit
8441c37ede
@ -58,6 +58,7 @@
|
|||||||
{{LB.branch_name}}
|
{{LB.branch_name}}
|
||||||
</mat-option>
|
</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
|
<mat-error *ngIf="pdMain.pd_branch_id.hasError('required')">Branch Required.</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
<mat-form-field fxFlex="28%" fxFlex.xs="100%">
|
<mat-form-field fxFlex="28%" fxFlex.xs="100%">
|
||||||
@ -124,7 +125,7 @@
|
|||||||
</mat-option>
|
</mat-option>
|
||||||
|
|
||||||
</mat-select>
|
</mat-select>
|
||||||
<!-- <mat-error *ngIf="pdMain.fk_product_id.hasError('required')">Product Required.</mat-error> -->
|
<mat-error *ngIf="pdMain.fk_product_id.hasError('required')">Product Required.</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
<mat-form-field *ngIf="isSubproductShown" fxFlex="28%" fxFlex.xs="100%">
|
<mat-form-field *ngIf="isSubproductShown" fxFlex="28%" fxFlex.xs="100%">
|
||||||
@ -135,7 +136,7 @@
|
|||||||
{{SPL.subproduct_name}}
|
{{SPL.subproduct_name}}
|
||||||
</mat-option>
|
</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
<!-- <mat-error *ngIf="pdMain.fk_subproduct_id.hasError('required')">Sub Product Required.</mat-error> -->
|
<mat-error *ngIf="pdMain.fk_subproduct_id.hasError('required')">Sub Product Required.</mat-error>
|
||||||
|
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<!-- {{customerSegmentList | json}} -->
|
<!-- {{customerSegmentList | json}} -->
|
||||||
@ -184,7 +185,7 @@
|
|||||||
<textarea matInput autocomplete="off" placeholder="Address at which PD is to be done" formControlName="addressline1"
|
<textarea matInput autocomplete="off" placeholder="Address at which PD is to be done" formControlName="addressline1"
|
||||||
[value]="addresses.get('addressline1').value | titlecase"></textarea>
|
[value]="addresses.get('addressline1').value | titlecase"></textarea>
|
||||||
<!-- oninput="this.value = this.value.toUpperCase()" -->
|
<!-- oninput="this.value = this.value.toUpperCase()" -->
|
||||||
<!-- <mat-error *ngIf="pdAddresses.addressline1.hasError('required')">Address1 required.</mat-error> -->
|
<mat-error *ngIf="addresses.controls.addressline1.hasError('required')">Address required.</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
<mat-form-field fxFlex="32%">
|
<mat-form-field fxFlex="32%">
|
||||||
@ -200,7 +201,7 @@
|
|||||||
|
|
||||||
|
|
||||||
</mat-select>
|
</mat-select>
|
||||||
<!-- <mat-error *ngIf="pdAddresses.fk_state.hasError('required')">State Required.</mat-error> -->
|
<mat-error *ngIf="addresses.controls.fk_state.hasError('required')">State Required.</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field fxFlex="32%">
|
<mat-form-field fxFlex="32%">
|
||||||
<mat-select placeholder="City" formControlName="fk_city">
|
<mat-select placeholder="City" formControlName="fk_city">
|
||||||
@ -213,7 +214,7 @@
|
|||||||
{{CL.city_name}}
|
{{CL.city_name}}
|
||||||
</mat-option>
|
</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
<!-- <mat-error *ngIf="pdAddresses.fk_city.hasError('required')">City Required.</mat-error> -->
|
<mat-error *ngIf="addresses.controls.fk_city.hasError('required')">City Required.</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
<mat-form-field fxFlex="24%">
|
<mat-form-field fxFlex="24%">
|
||||||
@ -225,6 +226,7 @@
|
|||||||
</mat-option>
|
</mat-option>
|
||||||
<mat-option *ngFor="let PL of pincodeList[i]" [value]="PL.pincode_id">{{PL.pincode}}</mat-option>
|
<mat-option *ngFor="let PL of pincodeList[i]" [value]="PL.pincode_id">{{PL.pincode}}</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
|
<mat-error *ngIf="addresses.controls.pincode.hasError('required')">Pincode Required.</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
<mat-form-field fxFlex="24%" *ngIf="pincodeflag[i]">
|
<mat-form-field fxFlex="24%" *ngIf="pincodeflag[i]">
|
||||||
|
|||||||
@ -4,4 +4,7 @@ mat-form-field {
|
|||||||
.mat-form-field-appearance-legacy .mat-hint{
|
.mat-form-field-appearance-legacy .mat-hint{
|
||||||
color:rgba(0, 0, 0, 0.8) !important;
|
color:rgba(0, 0, 0, 0.8) !important;
|
||||||
}
|
}
|
||||||
|
.mat-error {
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
|
|
||||||
@ -159,7 +159,7 @@ export class AddPdComponent implements OnInit, OnDestroy {
|
|||||||
fk_lender_id: [{value:this.userDetails.fk_entity_id,disabled: true} || ''],
|
fk_lender_id: [{value:this.userDetails.fk_entity_id,disabled: true} || ''],
|
||||||
// fk_lender_id: [{value:this.userDetails.fk_entity_id,disabled: this.userDetails.short_name != 'CHFPL' && this.userDetails.short_name != 'CLIX' ? true : false} || ''],
|
// fk_lender_id: [{value:this.userDetails.fk_entity_id,disabled: this.userDetails.short_name != 'CHFPL' && this.userDetails.short_name != 'CLIX' ? true : false} || ''],
|
||||||
sub_entity_id: [{value:this.userDetails.fk_entity_id,disabled: this.userDetails.short_name != 'CHFPL' ? true : false} || ''],
|
sub_entity_id: [{value:this.userDetails.fk_entity_id,disabled: this.userDetails.short_name != 'CHFPL' ? true : false} || ''],
|
||||||
pd_branch_id: [null],
|
pd_branch_id: [null,Validators.required],
|
||||||
lender_applicant_id: [null, Validators.compose([Validators.required])],
|
lender_applicant_id: [null, Validators.compose([Validators.required])],
|
||||||
lender_sales_person:[null],
|
lender_sales_person:[null],
|
||||||
mwise_sales_person:[null],
|
mwise_sales_person:[null],
|
||||||
@ -170,7 +170,7 @@ export class AddPdComponent implements OnInit, OnDestroy {
|
|||||||
// lender_stdcode: [null, Validators.compose([Validators.minLength(3), Validators.maxLength(5), Validators.pattern('^[0-9]*$')])],
|
// lender_stdcode: [null, Validators.compose([Validators.minLength(3), Validators.maxLength(5), Validators.pattern('^[0-9]*$')])],
|
||||||
// lender_landline: [null, Validators.compose([Validators.minLength(6), Validators.maxLength(8), Validators.pattern('^[0-9]*$')])],
|
// lender_landline: [null, Validators.compose([Validators.minLength(6), Validators.maxLength(8), Validators.pattern('^[0-9]*$')])],
|
||||||
//lender_billing: [null],
|
//lender_billing: [null],
|
||||||
fk_product_id: [null],
|
fk_product_id: [null,Validators.required],
|
||||||
fk_subproduct_id: [null],
|
fk_subproduct_id: [null],
|
||||||
fk_pd_type: ['1'],
|
fk_pd_type: ['1'],
|
||||||
fk_customer_segment: [null],
|
fk_customer_segment: [null],
|
||||||
@ -337,6 +337,7 @@ export class AddPdComponent implements OnInit, OnDestroy {
|
|||||||
}
|
}
|
||||||
// console.log('productID',productID,productabbr);
|
// console.log('productID',productID,productabbr);
|
||||||
/**customer segment */
|
/**customer segment */
|
||||||
|
this._PDtriggerForm.controls['fk_subproduct_id'].clearValidators()
|
||||||
switch(productabbr){
|
switch(productabbr){
|
||||||
case 'WCTL' :
|
case 'WCTL' :
|
||||||
// console.log(1);
|
// console.log(1);
|
||||||
@ -360,9 +361,10 @@ export class AddPdComponent implements OnInit, OnDestroy {
|
|||||||
// console.log(3);
|
// console.log(3);
|
||||||
this.customerSegmentList = this.customerSegmentAllList;
|
this.customerSegmentList = this.customerSegmentAllList;
|
||||||
this.isSubproductShown = true;
|
this.isSubproductShown = true;
|
||||||
|
this._PDtriggerForm.controls['fk_subproduct_id'].setValidators(Validators.required)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
this._PDtriggerForm.controls['fk_subproduct_id'].updateValueAndValidity();
|
||||||
// if(this.lenderShortName == 'CLIX' && productabbr != ''){
|
// if(this.lenderShortName == 'CLIX' && productabbr != ''){
|
||||||
// this._PDtriggerForm.controls['fk_pd_type'].setValue('1');
|
// this._PDtriggerForm.controls['fk_pd_type'].setValue('1');
|
||||||
// this._PDtriggerForm.controls['fk_customer_segment'].setValue('5');
|
// this._PDtriggerForm.controls['fk_customer_segment'].setValue('5');
|
||||||
@ -472,13 +474,13 @@ export class AddPdComponent implements OnInit, OnDestroy {
|
|||||||
get pdAddresses() { return this._PDtriggerForm.get('addresses') as FormArray; }
|
get pdAddresses() { return this._PDtriggerForm.get('addresses') as FormArray; }
|
||||||
createAddresses(): FormGroup {
|
createAddresses(): FormGroup {
|
||||||
return this._fb.group({
|
return this._fb.group({
|
||||||
addressline1: [null],
|
addressline1: [null,Validators.required],
|
||||||
fk_city: [null],
|
fk_city: [null,Validators.required],
|
||||||
fk_state: [null],
|
fk_state: [null,Validators.required],
|
||||||
stateSearch:[null],
|
stateSearch:[null],
|
||||||
citySearch:[null],
|
citySearch:[null],
|
||||||
pinSearch:[null],
|
pinSearch:[null],
|
||||||
pincode: [null],/** ,Validators.compose([Validators.minLength(6),Validators.maxLength(6)]) */
|
pincode: [null,Validators.required],/** ,Validators.compose([Validators.minLength(6),Validators.maxLength(6)]) */
|
||||||
other_pincode: [null, Validators.compose([Validators.minLength(6), Validators.maxLength(6)])],
|
other_pincode: [null, Validators.compose([Validators.minLength(6), Validators.maxLength(6)])],
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
@ -652,12 +652,14 @@ export class DynamicQuestionTemplateComponent implements OnInit {
|
|||||||
this.quesService.settingArrayofValidators({validations:new_validation_obj,question_key:sec_control.question_key},this.formGroupN,'')
|
this.quesService.settingArrayofValidators({validations:new_validation_obj,question_key:sec_control.question_key},this.formGroupN,'')
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
ques_control=this.whole_json
|
ques_control=this.whole_json[this.json_index]
|
||||||
let other_control=ques_control.filter(val=>{
|
console.log(ques_control,this.whole_json,this.json_index)
|
||||||
if(val.question_key == validation_obj.validation_to){
|
let other_control = ques_control
|
||||||
return val
|
// =ques_control.filter(val=>{
|
||||||
}
|
// if(val.question_key == validation_obj.validation_to){
|
||||||
})[0]
|
// return val
|
||||||
|
// }
|
||||||
|
// })[0]
|
||||||
// let updateMsg=other_control.value.validations.filter(val=>val.name != validation_obj.name)
|
// let updateMsg=other_control.value.validations.filter(val=>val.name != validation_obj.name)
|
||||||
// updateMsg.push(validation_obj)
|
// updateMsg.push(validation_obj)
|
||||||
console.log("OTHER CONTROL",other_control)
|
console.log("OTHER CONTROL",other_control)
|
||||||
|
|||||||
@ -387,7 +387,7 @@ export class QuesFormService {
|
|||||||
|
|
||||||
// FOR SETTING THE ARRAY OF VALIDATORS COMING FROM JSON Temp,
|
// FOR SETTING THE ARRAY OF VALIDATORS COMING FROM JSON Temp,
|
||||||
settingArrayofValidators(data,curr_control,curr_index){
|
settingArrayofValidators(data,curr_control,curr_index){
|
||||||
console.log("entered",data);
|
console.log("entered",data,curr_control);
|
||||||
if(data.hasOwnProperty('validations') && data.validations.length > 0 ){
|
if(data.hasOwnProperty('validations') && data.validations.length > 0 ){
|
||||||
const validList :any= [];
|
const validList :any= [];
|
||||||
let validator_value
|
let validator_value
|
||||||
@ -413,9 +413,11 @@ export class QuesFormService {
|
|||||||
// console.log(eval(val))
|
// console.log(eval(val))
|
||||||
console.log(validList)
|
console.log(validList)
|
||||||
// curr_control.controls[curr_index].controls.answer_value.setValidators(validList)
|
// curr_control.controls[curr_index].controls.answer_value.setValidators(validList)
|
||||||
|
if(curr_control.controls[data.question_key]) {
|
||||||
curr_control.controls[data.question_key].setValidators(validList)
|
curr_control.controls[data.question_key].setValidators(validList)
|
||||||
console.log("ddvdeeqq",validList)
|
console.log("ddvdeeqq",validList)
|
||||||
curr_control.controls[data.question_key].updateValueAndValidity()
|
curr_control.controls[data.question_key].updateValueAndValidity()
|
||||||
|
}
|
||||||
console.log("after setting validators",curr_control.controls[data.question_key])
|
console.log("after setting validators",curr_control.controls[data.question_key])
|
||||||
// debugger;
|
// debugger;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -32,19 +32,19 @@ export class CaptureBtnComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
capture(event){
|
capture(event){
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
this.cameraService.getPosition().then(geoCords=>{
|
// this.cameraService.getPosition().then(geoCords=>{
|
||||||
let geoCoordinates
|
// let geoCoordinates
|
||||||
if(geoCords != 'error') {
|
// if(geoCords != 'error') {
|
||||||
geoCoordinates = geoCords
|
// geoCoordinates = geoCords
|
||||||
// let element:HTMLElement = document.getElementById('input-file') as HTMLElement
|
let element:HTMLElement = document.getElementById('input-file') as HTMLElement
|
||||||
// element.click();
|
element.click();
|
||||||
console.log(this.fileBtn)
|
console.log(this.fileBtn)
|
||||||
this.fileBtn.nativeElement.click()
|
// this.fileBtn.nativeElement.click()
|
||||||
console.log("After Click")
|
console.log("After Click")
|
||||||
}
|
// }
|
||||||
else{
|
// else{
|
||||||
alert("Location is OFF. Make sure Location is turned ON in your device before capturing images")
|
// alert("Location is OFF. Make sure Location is turned ON in your device before capturing images")
|
||||||
}
|
// }
|
||||||
})
|
// })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -111,6 +111,9 @@ export class ImageCaptureComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
geoCoordinates = null;
|
geoCoordinates = null;
|
||||||
|
alert("Location is OFF. Make sure Location is turned ON in your device before capturing images");
|
||||||
|
this.loaderService.closeMatSpinnerDialog()
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
console.log(geoCords);
|
console.log(geoCords);
|
||||||
this.cameraService.addWatermarks(reader.result,geoCoordinates).then(watermarked_img=>{
|
this.cameraService.addWatermarks(reader.result,geoCoordinates).then(watermarked_img=>{
|
||||||
@ -153,6 +156,8 @@ export class ImageCaptureComponent implements OnInit {
|
|||||||
console.log("dk",err);
|
console.log("dk",err);
|
||||||
this.loaderService.closeMatSpinnerDialog();
|
this.loaderService.closeMatSpinnerDialog();
|
||||||
})
|
})
|
||||||
|
},err=>{
|
||||||
|
this.loaderService.closeMatSpinnerDialog()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -11,7 +11,55 @@
|
|||||||
"field_width":"100",
|
"field_width":"100",
|
||||||
"answers":null,
|
"answers":null,
|
||||||
"api_properties":null,
|
"api_properties":null,
|
||||||
"onchange_properties":null,
|
"onchange_properties":[
|
||||||
|
{
|
||||||
|
"purpose":"FORM_CTRL",
|
||||||
|
"form_controls":[
|
||||||
|
{
|
||||||
|
"insert_index":"relationship",
|
||||||
|
"expression":"(String('borrower_type').toLowerCase() != String('guarantor'))",
|
||||||
|
"value_keys":[
|
||||||
|
"borrower_type"
|
||||||
|
],
|
||||||
|
"questions":[
|
||||||
|
{
|
||||||
|
"question":"Numbers of years for which the business has been running",
|
||||||
|
"question_key":"numbers_of_years_business_running",
|
||||||
|
"type":"1",
|
||||||
|
"field_width":"45",
|
||||||
|
"field_type":"num",
|
||||||
|
"api_properties":null,
|
||||||
|
"answers":null,
|
||||||
|
"onchange_properties":null,
|
||||||
|
"is_subfield":"1",
|
||||||
|
"parent_question_key":"entity_type",
|
||||||
|
"is_repeatable":null,
|
||||||
|
"validations":[
|
||||||
|
{
|
||||||
|
"name":"required",
|
||||||
|
"isactive":"1",
|
||||||
|
"validator":"Validators.required",
|
||||||
|
"message":"Field Required",
|
||||||
|
"value":null
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"purpose":"validations",
|
||||||
|
"validations":[{
|
||||||
|
"value_keys":["borrower_type"],
|
||||||
|
"value":"(String('borrower_type').toLowerCase() != String('guarantor'))",
|
||||||
|
"validation_to":"borrower_age",
|
||||||
|
"name":"required",
|
||||||
|
"isactive":"1",
|
||||||
|
"validator":"Validators.required",
|
||||||
|
"message":"Required"
|
||||||
|
}]}
|
||||||
|
],
|
||||||
"is_repeatable":null,
|
"is_repeatable":null,
|
||||||
"validations":[
|
"validations":[
|
||||||
{
|
{
|
||||||
@ -59,45 +107,6 @@
|
|||||||
"value_keys":[
|
"value_keys":[
|
||||||
"entity_type"
|
"entity_type"
|
||||||
],
|
],
|
||||||
"questions":[
|
|
||||||
{
|
|
||||||
"question":"Met / Not Met",
|
|
||||||
"question_key":"borrower_met",
|
|
||||||
"type":"2",
|
|
||||||
"field_width":"100",
|
|
||||||
"api_properties":null,
|
|
||||||
"answers":[
|
|
||||||
{
|
|
||||||
"answer_id":"Yes",
|
|
||||||
"answer":"Yes"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"answer_id":"No",
|
|
||||||
"answer":"No"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"onchange_properties":null,
|
|
||||||
"is_subfield":"1",
|
|
||||||
"parent_question_key":"entity_type",
|
|
||||||
"is_repeatable":null,
|
|
||||||
"validations":[
|
|
||||||
{
|
|
||||||
"name":"required",
|
|
||||||
"isactive":"1",
|
|
||||||
"validator":"Validators.required",
|
|
||||||
"message":"Field Required",
|
|
||||||
"value":null
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"insert_index":"relationship",
|
|
||||||
"expression":"(String('entity_type').toLowerCase() != String('borrower'))",
|
|
||||||
"value_keys":[
|
|
||||||
"entity_type"
|
|
||||||
],
|
|
||||||
"questions":[
|
"questions":[
|
||||||
{
|
{
|
||||||
"question":"Age",
|
"question":"Age",
|
||||||
@ -124,19 +133,27 @@
|
|||||||
]},
|
]},
|
||||||
{
|
{
|
||||||
"insert_index":"relationship",
|
"insert_index":"relationship",
|
||||||
"expression":"(String('entity_type').toLowerCase() != String('guarantor'))",
|
"expression":"(String('entity_type').toLowerCase() == String('individual'))",
|
||||||
"value_keys":[
|
"value_keys":[
|
||||||
"entity_type"
|
"entity_type"
|
||||||
],
|
],
|
||||||
"questions":[
|
"questions":[
|
||||||
{
|
{
|
||||||
"question":"Numbers of years for which the business has been running",
|
"question":"Met / Not Met",
|
||||||
"question_key":"numbers_of_years_business_running",
|
"question_key":"borrower_met",
|
||||||
"type":"1",
|
"type":"2",
|
||||||
"field_width":"45",
|
"field_width":"100",
|
||||||
"field_type":"num",
|
|
||||||
"api_properties":null,
|
"api_properties":null,
|
||||||
"answers":null,
|
"answers":[
|
||||||
|
{
|
||||||
|
"answer_id":"Yes",
|
||||||
|
"answer":"Yes"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"answer_id":"No",
|
||||||
|
"answer":"No"
|
||||||
|
}
|
||||||
|
],
|
||||||
"onchange_properties":null,
|
"onchange_properties":null,
|
||||||
"is_subfield":"1",
|
"is_subfield":"1",
|
||||||
"parent_question_key":"entity_type",
|
"parent_question_key":"entity_type",
|
||||||
@ -151,7 +168,9 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]}
|
]
|
||||||
|
}
|
||||||
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -162,17 +181,18 @@
|
|||||||
],
|
],
|
||||||
"insert_control":"numbers_of_years_business_running"
|
"insert_control":"numbers_of_years_business_running"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"purpose":"validations",
|
"purpose":"validations",
|
||||||
"validations":[{
|
"validations":[{
|
||||||
"value_keys":["entity_type"],
|
"value_keys":["borrower_type"],
|
||||||
"value":"(String('entity_type').toLowerCase() != String('guarantor'))",
|
"value":"(String('borrower_type').toLowerCase() != String('guarantor'))",
|
||||||
"validation_to":"borrower_age",
|
"validation_to":"borrower_age",
|
||||||
"name":"required",
|
"name":"required",
|
||||||
"isactive":"1",
|
"isactive":"1",
|
||||||
"validator":"Validators.required",
|
"validator":"Validators.required",
|
||||||
"message":"Required"
|
"message":"Required"
|
||||||
}]}],
|
}]}
|
||||||
|
],
|
||||||
"is_repeatable":null,
|
"is_repeatable":null,
|
||||||
"validations":[
|
"validations":[
|
||||||
{
|
{
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
"section_name":"Financial Information",
|
"section_name":"Financial Information",
|
||||||
"onsubmit":[
|
"onsubmit":[
|
||||||
{
|
{
|
||||||
"expression":"(function (){let sum_val=null;let ques_key=[];control.questions_group.forEach(ques_obj=>{ques_obj.questions.map(ques=>{if(ques.question_key == submitProperty.key_name){ques_key.push(ques.answer_value)}})});console.log('none',ques_key);return new Set(ques_key).size === ques_key.length}())",
|
"expression":"(function (){let sum_val=null;let ques_key=[];control.forEach(ques_obj=>{ques_key.push(ques_obj[submitProperty.key_name])});console.log('none',ques_key);return new Set(ques_key).size === ques_key.length}())",
|
||||||
"group_key":"financial_info",
|
"group_key":"financial_info",
|
||||||
"key_name":"fy",
|
"key_name":"fy",
|
||||||
"msg":"Financial Year already entered earlier"
|
"msg":"Financial Year already entered earlier"
|
||||||
@ -112,7 +112,7 @@
|
|||||||
"onchange_properties":[
|
"onchange_properties":[
|
||||||
{
|
{
|
||||||
"purpose":"answer_value",
|
"purpose":"answer_value",
|
||||||
"expression":"(Number(net_profit)/Number(sales_revenue))*100",
|
"expression":"((Number(net_profit)/Number(sales_revenue))*100).toFixed(2)",
|
||||||
"value_keys":[
|
"value_keys":[
|
||||||
"sales_revenue","net_profit"
|
"sales_revenue","net_profit"
|
||||||
],
|
],
|
||||||
@ -130,7 +130,7 @@
|
|||||||
{
|
{
|
||||||
"purpose":"answer_value_arr",
|
"purpose":"answer_value_arr",
|
||||||
"arr_include":["py","now"],
|
"arr_include":["py","now"],
|
||||||
"expression":"((Number(net_profit_sales_percent[now])-Number(net_profit_sales_percent[py]))/Number(net_profit_sales_percent[py]))*100",
|
"expression":"(((Number(net_profit_sales_percent[now])-Number(net_profit_sales_percent[py]))/Number(net_profit_sales_percent[py]))*100).toFixed(2)",
|
||||||
"value_keys":[
|
"value_keys":[
|
||||||
"net_profit_sales_percent"
|
"net_profit_sales_percent"
|
||||||
],
|
],
|
||||||
@ -162,7 +162,7 @@
|
|||||||
{
|
{
|
||||||
"purpose":"answer_value_arr",
|
"purpose":"answer_value_arr",
|
||||||
"arr_include":["py","now"],
|
"arr_include":["py","now"],
|
||||||
"expression":"((Number(net_profit_sales_percent[now])-Number(net_profit_sales_percent[py]))/Number(net_profit_sales_percent[py]))*100",
|
"expression":"(((Number(net_profit_sales_percent[now])-Number(net_profit_sales_percent[py]))/Number(net_profit_sales_percent[py]))*100).toFixed(2)",
|
||||||
"value_keys":[
|
"value_keys":[
|
||||||
"net_profit_sales_percent"
|
"net_profit_sales_percent"
|
||||||
],
|
],
|
||||||
@ -597,13 +597,6 @@
|
|||||||
"onchange_properties": null,
|
"onchange_properties": null,
|
||||||
"is_repeatable": null,
|
"is_repeatable": null,
|
||||||
"validations": [
|
"validations": [
|
||||||
{
|
|
||||||
"name": "required",
|
|
||||||
"isactive": "1",
|
|
||||||
"validator": "Validators.required",
|
|
||||||
"message": "Field Required",
|
|
||||||
"value": null
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@ -664,7 +657,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"purpose":"answer_value",
|
"purpose":"answer_value",
|
||||||
"expression":"(function (){let final_value; Number(net_profit_rs) ? final_value = (Number(net_profit_rs)/Number(sales_amount))*100 : '';return final_value}())",
|
"expression":"(function (){let final_value; Number(net_profit_rs) ? final_value = (Number(net_profit_rs)/Number(sales_amount))*100 : '';return final_value.toFixed(2)}())",
|
||||||
"value_keys":[
|
"value_keys":[
|
||||||
"sales_amount", "net_profit_rs"
|
"sales_amount", "net_profit_rs"
|
||||||
],
|
],
|
||||||
@ -741,7 +734,7 @@
|
|||||||
"onchange_properties":[
|
"onchange_properties":[
|
||||||
{
|
{
|
||||||
"purpose":"answer_value",
|
"purpose":"answer_value",
|
||||||
"expression":"(Number(net_profit_rs)/Number(sales_amount))*100",
|
"expression":"((Number(net_profit_rs)/Number(sales_amount))*100).toFixed(2)",
|
||||||
"value_keys":[
|
"value_keys":[
|
||||||
"sales_amount", "net_profit_rs"
|
"sales_amount", "net_profit_rs"
|
||||||
],
|
],
|
||||||
|
|||||||
@ -151,13 +151,6 @@
|
|||||||
"parent_question_key":"client_info_available",
|
"parent_question_key":"client_info_available",
|
||||||
"answers":null,
|
"answers":null,
|
||||||
"validations":[
|
"validations":[
|
||||||
{
|
|
||||||
"name":"required",
|
|
||||||
"isactive":"1",
|
|
||||||
"validator":"Validators.required",
|
|
||||||
"message":"Field required",
|
|
||||||
"value":null
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name":"pattern",
|
"name":"pattern",
|
||||||
"isactive":"1",
|
"isactive":"1",
|
||||||
|
|||||||
@ -253,20 +253,13 @@
|
|||||||
"parent_question_key": "provider_observed",
|
"parent_question_key": "provider_observed",
|
||||||
"answers": null,
|
"answers": null,
|
||||||
"validations": [
|
"validations": [
|
||||||
{
|
|
||||||
"name": "required",
|
|
||||||
"isactive": "1",
|
|
||||||
"validator": "Validators.required",
|
|
||||||
"message": "Field required",
|
|
||||||
"value": null
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"question": "Estimated value of stock observed",
|
"question": "Estimated value of stock observed",
|
||||||
"question_key": "estimated_stock_value",
|
"question_key": "estimated_stock_value",
|
||||||
"type": "1",
|
"type": "1",
|
||||||
"field_type": "num",
|
"field_type": "numtoword",
|
||||||
"field_width": "100",
|
"field_width": "100",
|
||||||
"api_properties": null,
|
"api_properties": null,
|
||||||
"onchange_properties": [
|
"onchange_properties": [
|
||||||
|
|||||||
@ -28,7 +28,7 @@
|
|||||||
"question": "Loan amount",
|
"question": "Loan amount",
|
||||||
"question_key": "loan_amount",
|
"question_key": "loan_amount",
|
||||||
"type": "1",
|
"type": "1",
|
||||||
"field_type": "num",
|
"field_type": "numtoword",
|
||||||
"field_width": "100",
|
"field_width": "100",
|
||||||
"onchange_properties": null,
|
"onchange_properties": null,
|
||||||
"api_properties": null,
|
"api_properties": null,
|
||||||
@ -216,7 +216,16 @@
|
|||||||
"field_type": "num",
|
"field_type": "num",
|
||||||
"api_properties": null,
|
"api_properties": null,
|
||||||
"answers": null,
|
"answers": null,
|
||||||
"onchange_properties": null,
|
"onchange_properties": [
|
||||||
|
{
|
||||||
|
"purpose":"answer_value",
|
||||||
|
"expression":"(Number(original_tenure_months)-Number(elapsed_tenure_months))",
|
||||||
|
"value_keys":[
|
||||||
|
"original_tenure_months", "elapsed_tenure_months"
|
||||||
|
],
|
||||||
|
"insert_control":"current_tenure_months"
|
||||||
|
}
|
||||||
|
],
|
||||||
"is_repeatable": null,
|
"is_repeatable": null,
|
||||||
"validations": [
|
"validations": [
|
||||||
{
|
{
|
||||||
|
|||||||
@ -64,7 +64,33 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"answers":null,
|
"answers":null,
|
||||||
"onchange_properties":null,
|
"onchange_properties":[
|
||||||
|
{
|
||||||
|
"purpose":"FORM_CTRL",
|
||||||
|
"form_controls":[{
|
||||||
|
"insert_index":"relationship",
|
||||||
|
"expression":"(String('relationship').toLowerCase() == String('1'))",
|
||||||
|
"value_keys":[
|
||||||
|
"relationship"
|
||||||
|
],
|
||||||
|
"questions":[
|
||||||
|
{
|
||||||
|
"question": "Specify Facility details",
|
||||||
|
"question_key": "relationship_other",
|
||||||
|
"type": "1",
|
||||||
|
"field_width": "45",
|
||||||
|
"field_type": "string",
|
||||||
|
"api_properties": null,
|
||||||
|
"answers": null,
|
||||||
|
"onchange_properties": null,
|
||||||
|
"is_repeatable": null,
|
||||||
|
"validations": [
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
],
|
||||||
"is_repeatable":null,
|
"is_repeatable":null,
|
||||||
"validations":[
|
"validations":[
|
||||||
{
|
{
|
||||||
|
|||||||
@ -168,7 +168,33 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"answers":null,
|
"answers":null,
|
||||||
"onchange_properties":null,
|
"onchange_properties":[
|
||||||
|
{
|
||||||
|
"purpose":"FORM_CTRL",
|
||||||
|
"form_controls":[{
|
||||||
|
"insert_index":"pd_locality",
|
||||||
|
"expression":"(String('pd_locality').toLowerCase() == String('1'))",
|
||||||
|
"value_keys":[
|
||||||
|
"pd_locality"
|
||||||
|
],
|
||||||
|
"questions":[
|
||||||
|
{
|
||||||
|
"question": "Specify Locality",
|
||||||
|
"question_key": "locality_other",
|
||||||
|
"type": "1",
|
||||||
|
"field_width": "45",
|
||||||
|
"field_type": "string",
|
||||||
|
"api_properties": null,
|
||||||
|
"answers": null,
|
||||||
|
"onchange_properties": null,
|
||||||
|
"is_repeatable": null,
|
||||||
|
"validations": [
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
],
|
||||||
"is_repeatable":null,
|
"is_repeatable":null,
|
||||||
"validations":[
|
"validations":[
|
||||||
{
|
{
|
||||||
|
|||||||
@ -134,44 +134,9 @@
|
|||||||
"type":"1",
|
"type":"1",
|
||||||
"field_width":"45",
|
"field_width":"45",
|
||||||
"api_properties":null,
|
"api_properties":null,
|
||||||
|
"field_type":"numtoword",
|
||||||
"answers":null,
|
"answers":null,
|
||||||
"onchange_properties": [{
|
"onchange_properties": [
|
||||||
"purpose":"FORM_CTRL",
|
|
||||||
"form_controls":[
|
|
||||||
{
|
|
||||||
"insert_index":"total_fund_requirement",
|
|
||||||
"expression":"(String('total_fund_requirement').toLowerCase() == String('disclosed')) && (String('total_fund_requirement'))",
|
|
||||||
"value_keys":[
|
|
||||||
"total_fund_requirement"
|
|
||||||
],
|
|
||||||
"questions":[
|
|
||||||
{
|
|
||||||
"question":"Fund Requirement for end use",
|
|
||||||
"question_key":"end_use_fund_requirement",
|
|
||||||
"place_holder":"",
|
|
||||||
"field_type":"string",
|
|
||||||
"type":"1",
|
|
||||||
"field_width":"100",
|
|
||||||
"api_properties":null,
|
|
||||||
"onchange_properties":null,
|
|
||||||
"is_repeatable":null,
|
|
||||||
"is_subfield":"1",
|
|
||||||
"parent_question_key":"total_fund_requirement",
|
|
||||||
"answers":null,
|
|
||||||
"validations":[
|
|
||||||
{
|
|
||||||
"name":"required",
|
|
||||||
"isactive":"1",
|
|
||||||
"validator":"Validators.required",
|
|
||||||
"message":"Field required",
|
|
||||||
"value":null
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"purpose":"FORM_CTRL",
|
"purpose":"FORM_CTRL",
|
||||||
"form_controls":[
|
"form_controls":[
|
||||||
|
|||||||
@ -196,9 +196,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"question":"Factory owned by",
|
"question":"Owned by",
|
||||||
"question_key":"business_name_of_the_owner",
|
"question_key":"business_name_of_the_owner",
|
||||||
"type":"3",
|
"type":"4",
|
||||||
"field_width":"45",
|
"field_width":"45",
|
||||||
"api_properties":
|
"api_properties":
|
||||||
{
|
{
|
||||||
@ -229,7 +229,16 @@
|
|||||||
"type":"1",
|
"type":"1",
|
||||||
"field_width":"45",
|
"field_width":"45",
|
||||||
"api_properties":null,
|
"api_properties":null,
|
||||||
"onchange_properties":null,
|
"onchange_properties":[
|
||||||
|
{
|
||||||
|
"purpose":"answer_value",
|
||||||
|
"expression":"(function(){let current_year = new Date().getFullYear(); return current_year-Number(business_vintage)}())",
|
||||||
|
"value_keys":[
|
||||||
|
"business_vintage"
|
||||||
|
],
|
||||||
|
"insert_control":"business_purchase_year"
|
||||||
|
}
|
||||||
|
],
|
||||||
"is_repeatable":null,
|
"is_repeatable":null,
|
||||||
"is_subfield":"1",
|
"is_subfield":"1",
|
||||||
"parent_question_key":"business_ownership_type",
|
"parent_question_key":"business_ownership_type",
|
||||||
@ -245,7 +254,16 @@
|
|||||||
"type":"1",
|
"type":"1",
|
||||||
"field_width":"45",
|
"field_width":"45",
|
||||||
"api_properties":null,
|
"api_properties":null,
|
||||||
"onchange_properties":null,
|
"onchange_properties":[
|
||||||
|
{
|
||||||
|
"purpose":"answer_value",
|
||||||
|
"expression":"(function(){let current_year = new Date().getFullYear(); return current_year-Number(business_purchase_year)}())",
|
||||||
|
"value_keys":[
|
||||||
|
"business_purchase_year"
|
||||||
|
],
|
||||||
|
"insert_control":"business_vintage"
|
||||||
|
}
|
||||||
|
],
|
||||||
"is_repeatable":null,
|
"is_repeatable":null,
|
||||||
"is_subfield":"1",
|
"is_subfield":"1",
|
||||||
"parent_question_key":"business_ownership_type",
|
"parent_question_key":"business_ownership_type",
|
||||||
|
|||||||
@ -103,46 +103,11 @@
|
|||||||
"question":"Total fund requirement",
|
"question":"Total fund requirement",
|
||||||
"question_key":"total_fund_requirement",
|
"question_key":"total_fund_requirement",
|
||||||
"type":"1",
|
"type":"1",
|
||||||
|
"field_type":"numtoword",
|
||||||
"field_width":"45",
|
"field_width":"45",
|
||||||
"api_properties":null,
|
"api_properties":null,
|
||||||
"answers":null,
|
"answers":null,
|
||||||
"onchange_properties": [{
|
"onchange_properties": [
|
||||||
"purpose":"FORM_CTRL",
|
|
||||||
"form_controls":[
|
|
||||||
{
|
|
||||||
"insert_index":"total_fund_requirement",
|
|
||||||
"expression":"(String('total_fund_requirement').toLowerCase() == String('disclosed')) && (String('total_fund_requirement'))",
|
|
||||||
"value_keys":[
|
|
||||||
"total_fund_requirement"
|
|
||||||
],
|
|
||||||
"questions":[
|
|
||||||
{
|
|
||||||
"question":"Fund Requirement for end use",
|
|
||||||
"question_key":"end_use_fund_requirement",
|
|
||||||
"place_holder":"",
|
|
||||||
"field_type":"string",
|
|
||||||
"type":"1",
|
|
||||||
"field_width":"100",
|
|
||||||
"api_properties":null,
|
|
||||||
"onchange_properties":null,
|
|
||||||
"is_repeatable":null,
|
|
||||||
"is_subfield":"1",
|
|
||||||
"parent_question_key":"total_fund_requirement",
|
|
||||||
"answers":null,
|
|
||||||
"validations":[
|
|
||||||
{
|
|
||||||
"name":"required",
|
|
||||||
"isactive":"1",
|
|
||||||
"validator":"Validators.required",
|
|
||||||
"message":"Field required",
|
|
||||||
"value":null
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"purpose":"FORM_CTRL",
|
"purpose":"FORM_CTRL",
|
||||||
"form_controls":[
|
"form_controls":[
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user