Fairoj : SMC Credit PD Feedback 1 18-11-2020 changes and discussion enabled for complete status. total 14 templates changed in both product

This commit is contained in:
venbatechnologies@gmail.com 2020-11-19 20:30:33 +05:30
parent 658711c8cd
commit 666e57d272
24 changed files with 533 additions and 218 deletions

View File

@ -65,12 +65,17 @@
<!-- <mat-error *ngIf="pdMain.lender_applicant_id.hasError('required')">Applicant ID Required</mat-error> -->
</mat-form-field>
<!-- <div *ngIf="sales_and_credit_enable"> -->
<mat-form-field fxFlex="28%" fxFlex.xs="100%" *ngIf="userDetails.short_name != 'IIB'">
<mat-form-field fxFlex="28%" fxFlex.xs="100%" *ngIf="userDetails.short_name != 'IIB' && lenderShortName != 'MWISE'">
<mat-select placeholder="Lender Sales Person" formControlName="lender_sales_person">
<mat-option>Select</mat-option>
<mat-option *ngFor="let person of sales_and_credit_person.sales_person" [value]="person.userid">{{person.user_name}}</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field *ngIf="lenderShortName == 'MWISE'">
<mat-label>Lender Sales Person</mat-label>
<input matInput type="text" formControlName="mwise_sales_person"/>
<mat-error *ngIf="_PDtriggerForm.controls['mwise_sales_person'].hasError('required')">Required</mat-error>
</mat-form-field>
<mat-form-field fxFlex="28%" fxFlex.xs="100%" *ngIf="lenderShortName != 'MWISE'">
<mat-select placeholder="Lender Credit Person" formControlName="lender_credit_person">
<mat-option>Select</mat-option>

View File

@ -162,6 +162,7 @@ export class AddPdComponent implements OnInit, OnDestroy {
pd_branch_id: [null],
lender_applicant_id: [null, Validators.compose([Validators.required])],
lender_sales_person:[null],
mwise_sales_person:[null],
lender_credit_person:[{value:this.lenderShortName != 'MWISE' ? this.userDetails.userid : '',disabled:false} || ''],
imgc_fin_institute:[null],
// lender_contact_person: [null],
@ -747,6 +748,7 @@ export class AddPdComponent implements OnInit, OnDestroy {
"lender_applicant_id": formValue.lender_applicant_id,
"pd_branch_id": formValue.pd_branch_id,
"lender_sales_person":formValue.lender_sales_person,
"mwise_sales_person":formValue.mwise_sales_person,
"lender_credit_person":this.lenderShortName != 'MWISE' ? this._PDtriggerForm.controls['lender_credit_person'].value : '',
"imgc_fin_institute":formValue.imgc_fin_institute,
// "pd_contact_person": formValue.lender_contact_person,

View File

@ -58,14 +58,24 @@ export class ListPdComponent implements OnInit, OnDestroy {
localStorage.setItem('len_user_role',role_name);
this.user_role_name=role_name
})
if(localStorage.getItem('LocalSetEntity')) {
let entity_id = localStorage.getItem('LocalSetEntity')
if(entity_id) {
this.allTabC.loadPDDetails();
}
}
else{
// for Listening the local storage LocalSetEntity
this.userService.messageSubject.subscribe(rr=>{
console.log(rr)
let entity_id = localStorage.getItem('LocalSetEntity')
if(entity_id) {
this.allTabC.loadPDDetails();
this.userService.messageSubject.unsubscribe()
}
})
}
}

View File

@ -167,7 +167,7 @@ export class DynamicQuestionTemplateComponent implements OnInit {
}
//FOR API CALLS
// console.log(sec_control.value);
if(sec_control.onchange_properties != null && sec_control.onchange_properties.length >0){
if(sec_control && sec_control.onchange_properties != null && sec_control.onchange_properties.length >0){
let onChangeProperties_value=sec_control.onchange_properties
@ -304,7 +304,7 @@ export class DynamicQuestionTemplateComponent implements OnInit {
// this.creteNewField(onChangeProperty,this.quesAnsForm,sec_control,sec_index)
// }
}
if(onChangeProperty.purpose == 'answer_value') {
if(onChangeProperty.purpose == 'answer_value' || onChangeProperty.purpose == 'question_label') {
this.setModifiedValuetoControl(onChangeProperty,this.formGroupN,sec_index)
}
// for calculation field from multiple arr values
@ -335,7 +335,7 @@ export class DynamicQuestionTemplateComponent implements OnInit {
}
for(let value of curr_obj.value_keys) {
console.log("dsf",value_index,value,value+'['+index_str+']',index_str)
let control_value = formArray.value[value_index] ? formArray.value[value_index][value] : ''
let control_value = formArray.getRawValue()[value_index] ? formArray.getRawValue()[value_index][value] : ''
if(control_value) {
expression_value = expression_value.split(value+'['+index_str+']').join(control_value)
}
@ -371,9 +371,9 @@ export class DynamicQuestionTemplateComponent implements OnInit {
// curr_obj.value_keys.forEach(val=>{
for(let val of curr_obj.value_keys) {
let control_value
control_value =form_control_obj.value[val]
control_value =form_control_obj.getRawValue()[val]
if(control_value) {
expression_value = expression_value.replace(val,control_value)
expression_value = expression_value.split(val).join(control_value)
}
else{
return;
@ -384,11 +384,22 @@ export class DynamicQuestionTemplateComponent implements OnInit {
let calc_exp=eval(expression_value)
console.log(calc_exp)
if(calc_exp){
if(typeof(calc_exp) == 'number'){
calc_exp = calc_exp.toFixed(2)
}
// if(typeof(calc_exp) == 'number'){
// calc_exp = calc_exp.toFixed(2)
// }
if(curr_obj.insert_control) {
// FOR SETTING THE ANSWER TO OTHER OR SAME FIELD
if(curr_obj.purpose == 'answer_value') {
form_control_obj.controls[curr_obj.insert_control].setValue(calc_exp)
}
// FOR SETTING THE Question Label TO OTHER OR SAME Question
if(curr_obj.purpose == 'question_label') {
let curr_question_obj = this.whole_json.filter(val=>val.question_key == curr_obj.insert_control)
if(curr_question_obj && curr_question_obj.length > 0) {
curr_question_obj[0].question = calc_exp
}
}
}
}
}
@ -413,7 +424,7 @@ export class DynamicQuestionTemplateComponent implements OnInit {
// if(control_value_obj.answer_value == ''){
// control_value_obj.answer_value =0
// }
expression_value=expression_value.replace(res,control_value_obj)
expression_value=expression_value.split(res).join(control_value_obj)
}
})
console.log("Expression",expression_value)
@ -544,12 +555,12 @@ export class DynamicQuestionTemplateComponent implements OnInit {
let expression_value=validation_obj.value
validation_obj.value_keys.forEach(res=>{
let validator_value_obj=this.formGroupN.value[res]
if(validator_value_obj){
expression_value=expression_value.replace(res,validator_value_obj)
}
let validator_value_obj=group_ques.value[res]
// if(validator_value_obj){
expression_value=expression_value.split(res).join(validator_value_obj)
// }
})
console.log("Validation expresseion final ",expression_value)
// validation_obj.value=expression_value
validation_obj.validator=eval(expression_value)

View File

@ -371,6 +371,11 @@ export class QuesFormService {
}
}
// FOR DISABLE THE CONTROL
if(data.hasOwnProperty('is_disabled') && data.is_disabled == '1') {
curr_control.controls[data.question_key].disable();
}
//FOR SETTING THE VALIDATORS
this.settingArrayofValidators(data,curr_control,curr_index)
this.setAnswerOptionsorValue(data,curr_control)

View File

@ -2,5 +2,5 @@
<mat-icon name="camera" *ngIf="!addMoreBtn">camera_alt</mat-icon>
<mat-icon name="camera" *ngIf="addMoreBtn">add_a_photo</mat-icon>
</button>
<input type="file" (change)="capturedImage($event)" id="input-file" name="file" accept="image/*" capture="user" style="display: none">
<input type="file" (change)="capturedImage($event)" #input_file id="input-file" name="file" accept="image/*" capture="user" style="display: none">
<!-- document.querySelector('#input-file').click() -->

View File

@ -1,4 +1,5 @@
import { Component, OnInit, Output, EventEmitter, Input } from '@angular/core';
import { Component, OnInit, Output, EventEmitter, Input, ElementRef, ViewChild } from '@angular/core';
import { CameraService } from 'app/personal-discussion/pd-service/camera.service';
import { Ng2ImgMaxService } from 'ng2-img-max';
@Component({
@ -7,15 +8,16 @@ import { Ng2ImgMaxService } from 'ng2-img-max';
styleUrls: ['./capture-btn.component.scss']
})
export class CaptureBtnComponent implements OnInit {
@ViewChild('input_file') fileBtn :ElementRef
@Input() addMoreBtn;
@Output() imageDataEmitter = new EventEmitter
constructor(private ng2ImgMax:Ng2ImgMaxService) { }
constructor(private ng2ImgMax:Ng2ImgMaxService,private cameraService:CameraService) { }
ngOnInit(): void {
console.log(this.addMoreBtn)
}
capturedImage(event){
// event.stopPropagation()
console.log(event);
let imageData= event.target.files[0]
this.ng2ImgMax.resizeImage(imageData, 450, 650).subscribe(
@ -30,7 +32,19 @@ export class CaptureBtnComponent implements OnInit {
}
capture(event){
event.preventDefault();
let element:HTMLElement = document.getElementById('input-file') as HTMLElement
element.click();
this.cameraService.getPosition().then(geoCords=>{
let geoCoordinates
if(geoCords != 'error') {
geoCoordinates = geoCords
// let element:HTMLElement = document.getElementById('input-file') as HTMLElement
// element.click();
console.log(this.fileBtn)
this.fileBtn.nativeElement.click()
console.log("After Click")
}
else{
alert("Location is OFF. Make sure Location is turned ON in your device before capturing images")
}
})
}
}

View File

@ -163,7 +163,7 @@
<div fxFlex="60" align="right">
<!-- <span><button *ngIf="roleAccessDetails.trigger && addresses.assigned_pd==null || addresses.assigned_pd==''" mat-raised-button mat-button-md mat-icon-button class="mr-1 mb-1 hover-icon" type="button" [matTooltip]="master.fk_primary_address_id ? 'Initiate PD for this address' : 'Initiate Address for PD Process'" matTooltipPosition="above" (click)="initiateAddtionalPD(master,addresses,master.fk_primary_address_id ? true : false)"><mat-icon>where_to_vote</mat-icon></button></span> -->
<!-- <button *ngIf="roleAccessDetails.allocate && addresses.assigned_pd && master.pd_type_name && currentPDStatus!=pdStatusCheck.DRAFT && currentPDStatus!=pdStatusCheck.COMPLETED && master.pd_status!=pdStatusCheck.ADD_ON_PENDING && currentPDStatus!=pdStatusCheck.QC_COMPLETED" mat-raised-button mat-button-md mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Allocate" matTooltipPosition="above" (click)="pdAllocationTo(master,addresses)"><mat-icon>verified_user</mat-icon></button> -->
<span *ngIf="master.lender_short_name == 'MWISE'"><button *ngIf="roleAccessDetails.discussions && addresses.assigned_pd && addresses.addtional_pd_data[0].pd_type_name && addresses.addtional_pd_data[0].pd_status!=pdStatusCheck.DRAFT && addresses.addtional_pd_data[0].pd_status!=pdStatusCheck.COMPLETED && addresses.addtional_pd_data[0].pd_status!=pdStatusCheck.QC_COMPLETED" 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'"><button *ngIf="roleAccessDetails.discussions && addresses.assigned_pd && addresses.addtional_pd_data[0].pd_type_name && addresses.addtional_pd_data[0].pd_status!=pdStatusCheck.DRAFT" 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>
@ -204,7 +204,7 @@
<div fxFlex="60" align="right">
<!-- <span *ngIf="userRoleID == 10 || userRoleID == 3"><button *ngIf="roleAccessDetails.allocate && addresses.assigned_pd && addresses.addtional_pd_data[0].pd_type_name && addresses.addtional_pd_data[0].pd_status!=pdStatusCheck.DRAFT && addresses.addtional_pd_data[0].pd_status!=pdStatusCheck.COMPLETED && addresses.addtional_pd_data[0].pd_status!=pdStatusCheck.ADD_ON_PENDING && addresses.addtional_pd_data[0].pd_status!=pdStatusCheck.QC_COMPLETED" mat-raised-button mat-button-md mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Allocate" matTooltipPosition="above" (click)="pdAllocationTo(master,addresses)"><mat-icon>verified_user</mat-icon></button></span> -->
<!-- <span *ngIf="userRoleID == 3 || userRoleID == 4 || userRoleID == 5 || userRoleID == 10 "><button *ngIf="roleAccessDetails.schedule && addresses.assigned_pd && addresses.addtional_pd_data[0].pd_type_name && addresses.addtional_pd_data[0].pd_status!=pdStatusCheck.DRAFT && addresses.addtional_pd_data[0].pd_status!=pdStatusCheck.COMPLETED && addresses.addtional_pd_data[0].pd_status!=pdStatusCheck.ADD_ON_PENDING && addresses.addtional_pd_data[0].pd_status!=pdStatusCheck.QC_COMPLETED" mat-raised-button mat-button-md mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Schedule" matTooltipPosition="above" (click)="scheduleDetails(master,addresses)"><mat-icon>schedule</mat-icon></button></span> -->
<span *ngIf="master.lender_short_name == 'MWISE'"><button *ngIf="roleAccessDetails.discussions && addresses.assigned_pd && addresses.addtional_pd_data[0].pd_type_name && addresses.addtional_pd_data[0].pd_status!=pdStatusCheck.DRAFT && addresses.addtional_pd_data[0].pd_status!=pdStatusCheck.COMPLETED && addresses.addtional_pd_data[0].pd_status!=pdStatusCheck.QC_COMPLETED" 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'"><button *ngIf="roleAccessDetails.discussions && addresses.assigned_pd && addresses.addtional_pd_data[0].pd_type_name && addresses.addtional_pd_data[0].pd_status!=pdStatusCheck.DRAFT" 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 fxLayout="row nowrap">

View File

@ -7,6 +7,7 @@ import * as watermark from 'watermarkjs';
})
export class CameraService {
pipe = new DatePipe('en-US')
isLocationAlertShowed: boolean = false;
constructor() {
setTimeout(()=>{
this.getPosition().then(res=>{
@ -96,7 +97,7 @@ export class CameraService {
{
return new Promise((resolve, reject) => {
navigator.geolocation.getCurrentPosition(resp => {
return navigator.geolocation.getCurrentPosition(resp => {
console.log("Geo",resp.coords);
let latLong:string = resp.coords.latitude+', '+resp.coords.longitude
// resolve({lng: resp.coords.longitude, lat: resp.coords.latitude});
@ -104,9 +105,55 @@ export class CameraService {
},
err => {
console.log("Error Getting Geolocation",err)
if(err.code == 1) {
// alert("Make sure Location ")
// let is_mobile = this.getMobileOperatingSystem()
// console.log("isMobile",is_mobile);
if( !this.isLocationAlertShowed) {
this.isLocationAlertShowed = true
// alert("Make sure Location is turned ON in your device before capturing images");
}
}
resolve('error');
});
},{enableHighAccuracy:true});
});
}
/**
* Determine the mobile operating system.
* This function returns one of 'iOS', 'Android', 'Windows Phone', or 'unknown'.
*
* @returns {String}
*/
// getMobileOperatingSystem() {
// var userAgent = navigator.userAgent || navigator.vendor;
// console.log(userAgent)
// // Windows Phone must come first because its UA also contains "Android"
// if (/windows phone/i.test(userAgent)) {
// return "Windows Phone";
// }
// if (/android/i.test(userAgent)) {
// return "Android";
// }
// // iOS detection from: http://stackoverflow.com/a/9039885/177710
// if (/iPad|iPhone|iPod/.test(userAgent) && !window.MSStream) {
// return "iOS";
// }
// return "unknown";
// }
// getMobileOperatingSystem() {
// if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|ipad|iris|kindle|Android|Silk|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(navigator.userAgent)
// || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(navigator.userAgent.substr(0,4))) {
// let isMobile = true;
// return isMobile
// }
// else{
// return false
// }
// }
}

View File

@ -73,8 +73,8 @@
<mat-cell class="cell" *matCellDef="let details;" style="justify-content: flex-end;padding: 0 !important" fxFlex.xs="10" fxFlex.sm="15" fxFlex.md="15" fxFlex.lg="18">
<button style="float: right" mat-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="PDF Download" [disabled]="details.status != 'COMPLETED'"
matTooltipPosition="above" color="primary" (click)="salesPDpdf(details.sales_pd_id)"><mat-icon>file_download</mat-icon></button>
<button style="float: right" mat-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Trigger Credit PD" *ngIf="user_type == 'credit'" [disabled]="details.status != 'COMPLETED'"
matTooltipPosition="above" color="primary" (click)="newcreditTrigger(details)"><mat-icon>add</mat-icon></button>
<!-- <button style="float: right" mat-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Trigger Credit PD" *ngIf="user_type == 'credit'" [disabled]="details.status != 'COMPLETED'"
matTooltipPosition="above" color="primary" (click)="newcreditTrigger(details)"><mat-icon>add</mat-icon></button> -->
</mat-cell>
</ng-container>
<mat-row style="align-items: normal !important;" *matRowDef="let row; columns: displayedColumns;">

View File

@ -49,7 +49,56 @@
"field_width":"100",
"api_properties":null,
"answers":null,
"onchange_properties":null,
"onchange_properties":[{
"purpose":"FORM_CTRL",
"form_controls":[
{
"insert_index":"relationship",
"expression":"(String('entity_type').toLowerCase() == String('individual'))",
"value_keys":[
"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_repeatable":null,
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Field Required",
"value":null
}
]
}
]
}
]
},
{
"purpose":"question_label",
"expression":"(function () {let label= '';(String('entity_type').toLowerCase().includes('individual')) ? label= 'Number of years the borrower has been in this business.' : label = 'Number of years for which the business has been running';return label}())",
"value_keys":[
"entity_type"
],
"insert_control":"numbers_of_years_business_running"
}],
"is_repeatable":null,
"validations":[
{
@ -118,38 +167,12 @@
}
]
},
{
"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_repeatable":null,
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Field Required",
"value":null
}
]
},
{
"question":"Age",
"question_key":"borrower_age",
"type":"1",
"field_type":"num",
"field_width":"45",
"api_properties":null,
"answers":null,
@ -170,6 +193,7 @@
"question_key":"numbers_of_years_business_running",
"type":"1",
"field_width":"45",
"field_type":"num",
"api_properties":null,
"answers":null,
"onchange_properties":null,

View File

@ -73,7 +73,7 @@
"onchange_properties":[
{
"purpose":"answer_value",
"expression":"(Number(net_profit)/Number(sales_revenue))*100",
"expression":"((Number(net_profit)/Number(sales_revenue))*100).toFixed(2)",
"value_keys":[
"sales_revenue","net_profit"
],
@ -154,6 +154,7 @@
"question":"Net Profit or (Net Loss) to Sales % ",
"question_key":"net_profit_sales_percent",
"type":"1",
"is_disabled":"1",
"field_width":"45",
"answers":null,
"api_properties":null,
@ -184,6 +185,7 @@
"question":"% (↑ /↓) in Sales over PY",
"question_key":"sales_py",
"type":"1",
"is_disabled":"1",
"field_width":"45",
"answers":null,
"api_properties":null,
@ -204,6 +206,7 @@
"question":"% (↑ /↓) in Net Profit over PY",
"question_key":"netprofit_py",
"type":"1",
"is_disabled":"1",
"field_width":"45",
"answers":null,
"api_properties":null,
@ -225,6 +228,7 @@
"question":"% (↑ /↓) in Net Profit % over PY",
"question_key":"netprofit_py_percent",
"type":"1",
"is_disabled":"1",
"field_width":"45",
"answers":null,
"api_properties":null,
@ -297,6 +301,118 @@
]
},
{
"question":"No of Months",
"question_key":"broken_period_no_of_months",
"type":"1",
"field_width":"45",
"answers":null,
"api_properties":null,
"onchange_properties":null,
"is_repeatable":null,
"field_type":"num",
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Required",
"value":null
},
{
"name":"pattern",
"isactive":"1",
"validator":"([0-9]*)",
"message":"Numeric only",
"value":null
}
]
},
{
"question":"Turnover for Broken Period in CY (Rs)",
"question_key":"broken_period_turnover_cy",
"type":"1",
"field_width":"45",
"answers":null,
"api_properties":null,
"onchange_properties":null,
"is_repeatable":null,
"field_type":"numtoword",
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Required",
"value":null
},
{
"name":"pattern",
"isactive":"1",
"validator":"([0-9]*)",
"message":"Numeric only",
"value":null
}
]
},
{
"question":"Turnover for Broken Period in PY (Rs)",
"question_key":"broken_period_turnover_py",
"type":"1",
"field_width":"45",
"answers":null,
"api_properties":null,
"onchange_properties":null,
"is_repeatable":null,
"field_type":"numtoword",
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Required",
"value":null
},
{
"name":"pattern",
"isactive":"1",
"validator":"([0-9]*)",
"message":"Numeric only",
"value":null
}
]
},
{
"question":"Increase / Decrease in Turnover for Broken Period %",
"question_key":"broken_period_turnover_percent",
"type":"1",
"field_width":"45",
"answers":null,
"api_properties":null,
"onchange_properties":null,
"is_repeatable":null,
"field_type":"num",
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Required",
"value":null
},
{
"name":"pattern",
"isactive":"1",
"validator":"([0-9]*)",
"message":"Numeric only",
"value":null
}
]
},
{
"question":"Sales / Revenue (Rs) for the broken period of the Current FY as per applicant",
"question_key":"broken_period_sales_amount",

View File

@ -136,13 +136,6 @@
"parent_question_key":"supplier_info_available",
"answers":null,
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Field required",
"value":null
}
]
},
{
@ -188,13 +181,6 @@
"parent_question_key":"supplier_info_available",
"answers":null,
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Field required",
"value":null
},
{
"name":"pattern",
"isactive":"1",
@ -217,13 +203,6 @@
"parent_question_key":"supplier_info_available",
"answers":null,
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Field required",
"value":null
},
{
"name":"pattern",
"isactive":"1",

View File

@ -136,13 +136,6 @@
"parent_question_key":"client_info_available",
"answers":null,
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Field required",
"value":null
}
]
},
{
@ -188,13 +181,6 @@
"parent_question_key":"client_info_available",
"answers":null,
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Field required",
"value":null
},
{
"name":"pattern",
"isactive":"1",
@ -217,13 +203,6 @@
"parent_question_key":"client_info_available",
"answers":null,
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Field required",
"value":null
},
{
"name":"pattern",
"isactive":"1",

View File

@ -67,19 +67,36 @@
"field_width":"100",
"field_type":"num",
"api_properties":null,
"onchange_properties":null,
"onchange_properties":[
{
"purpose": "validations",
"validations": [
{
"name": "required",
"isactive": "1",
"validator": "",
"message": "Required",
"value": "(String('estimated_quantity') != String('')) || (String('estimated_stock_value') != String('')) ",
"validation_to": null,
"value_keys": ["estimated_quantity","estimated_stock_value"]
},
{
"name": "required",
"isactive": "1",
"validator": "",
"message": "Required",
"value": "(String('estimated_quantity') != String('')) || (String('estimated_stock_value') != String('')) ",
"validation_to": "estimated_stock_value",
"value_keys": ["estimated_quantity","estimated_stock_value"]
}
]
}
],
"is_repeatable":null,
"is_subfield":"1",
"parent_question_key":"provider_observed",
"answers":null,
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Field required",
"value":null
}
]
} ,
{
@ -120,19 +137,36 @@
"field_type":"num",
"field_width":"100",
"api_properties":null,
"onchange_properties":null,
"onchange_properties":[
{
"purpose": "validations",
"validations": [
{
"name": "required",
"isactive": "1",
"validator": "",
"message": "Required",
"value": "(String('estimated_quantity') != String('')) || (String('estimated_stock_value') != String('')) ",
"validation_to": null,
"value_keys": ["estimated_quantity","estimated_stock_value"]
},
{
"name": "required",
"isactive": "1",
"validator": "",
"message": "Required",
"value": "(String('estimated_quantity') != String('')) || (String('estimated_stock_value') != String('')) ",
"validation_to": "estimated_quantity",
"value_keys": ["estimated_quantity","estimated_stock_value"]
}
]
}
],
"is_repeatable":null,
"is_subfield":"1",
"parent_question_key":"provider_observed",
"answers":null,
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Field required",
"value":null
}
]
}
] } ] }]

View File

@ -81,11 +81,33 @@
}
]
},
{
"question":"Monthly Obligations",
"question_key":"monthly_obligations",
"type":"1",
"field_type":"num",
"field_width":"100",
"api_properties":null,
"answers":null,
"onchange_properties":null,
"is_repeatable":null,
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Field Required",
"value":null
}
]
},
{
"question":"Instalment Amount",
"question_key":"instalment_amount",
"type":"1",
"field_width":"100",
"field_type":"numtoword",
"api_properties":null,
"answers":null,
"onchange_properties":null,
@ -103,10 +125,39 @@
{
"question":"Installment frequency",
"question_key":"instalment_frequency",
"type":"1",
"type":"3",
"field_width":"100",
"api_properties":null,
"answers":null,
"answers":[
{
"answer_id":"Daily",
"answer":"Daily"
},
{
"answer_id":"Every 12 days",
"answer":"Every 12 days"
},
{
"answer_id":"Every 15 days",
"answer":"Every 15 days"
},
{
"answer_id":"Monthly",
"answer":"Monthly"
},
{
"answer_id":"Every 3 months",
"answer":"Every 3 months"
},
{
"answer_id":"Every 6 months",
"answer":"Every 6 months"
},
{
"answer_id":"Yearly",
"answer":"Yearly"
}
],
"onchange_properties":null,
"is_repeatable":null,
"validations":[

View File

@ -2,6 +2,22 @@
"section_id":"16",
"section_name":"Family Members Involved in Business",
"onsubmit":null,
"questions":[
{
"question":"Is any other family member involved in the business",
"question_key":"is_family_details_available",
"type":"2",
"field_width":"45",
"api_properties":null,
"onchange_properties":[{
"purpose":"FORM_CTRL",
"form_controls":[
{
"insert_index":"is_family_details_available",
"expression":"(String('is_family_details_available') == String('Yes'))",
"value_keys":[
"is_family_details_available"
],
"questions":[
{
"question":[
@ -14,7 +30,6 @@
"answers":null,
"onchange_properties":null,
"is_repeatable":null,
"field_type":"string",
"validations":[
{
"name":"required",
@ -36,18 +51,27 @@
"question":"Relationship",
"question_key":"relationship",
"place_holder":"Enter the text",
"type":"1",
"api_properties":null,
"type":"8",
"api_properties":{
"api":"getListOfMaster",
"api_method":"POST",
"params":{
"master_name":"RELATIONSHIPS"
},
"fields":[
"relationship_id",
"name"
]
},
"answers":null,
"onchange_properties":null,
"is_repeatable":null,
"field_type":"string",
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Share value Required",
"message":"Required",
"value":null
}
]
@ -56,18 +80,21 @@
"question":"Relation to Individual Stakeholders",
"question_key":"stakeholder_relation",
"place_holder":"Enter text",
"type":"1",
"api_properties":null,
"type":"3",
"api_properties":{
"purpose":"answer_options_local",
"master_name":"pd_applicants",
"fields":["pd_co_applicant_id","applicant_name"]
},
"answers":null,
"onchange_properties":null,
"is_repeatable":null,
"field_type":"string",
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Name Required",
"message":"Required",
"value":null
}
]
@ -76,18 +103,27 @@
"question":"Relation to Company / Firm",
"question_key":"company_relation",
"place_holder":"Enter text",
"type":"1",
"api_properties":null,
"type":"8",
"api_properties":{
"api":"getListOfMaster",
"api_method":"POST",
"params":{
"master_name":"COMPANYRELATIONSHIPS"
},
"fields":[
"company_relationship_id",
"name"
]
},
"answers":null,
"onchange_properties":null,
"is_repeatable":null,
"field_type":"string",
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Name Required",
"message":"Required",
"value":null
}
]
@ -96,18 +132,26 @@
"question":"Started Business (Yes / No)",
"question_key":"started_biz",
"place_holder":"Enter text",
"type":"1",
"type":"2",
"api_properties":null,
"answers":null,
"answers":[
{
"answer_id":"Yes",
"answer":"Yes"
},
{
"answer_id":"No",
"answer":"No"
}
],
"onchange_properties":null,
"is_repeatable":null,
"field_type":"string",
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Name Required",
"message":"Required",
"value":null
}
]
@ -118,5 +162,27 @@
"group_title":"Family Members Involved in Business",
"group_key":"family_details"
}
]}]
}],
"is_repeatable":null,
"answers":[{
"answer":"Yes",
"answer_id":"Yes"
},
{
"answer":"No",
"answer_id":"No"
}],
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Required",
"value":null
}
]
}
]
}

View File

@ -16,13 +16,6 @@
"is_repeatable":null,
"field_type":"string",
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Required",
"value":null
}
]
},
{
@ -35,13 +28,6 @@
"onchange_properties":null,
"is_repeatable":null,
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Required",
"value":null
}
]
}
],

View File

@ -200,13 +200,6 @@
"onchange_properties":null,
"is_repeatable":null,
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Required",
"value":null
}
]
}

View File

@ -227,18 +227,29 @@
"question_key":"uom",
"type":"8",
"field_width":"45",
"api_properties":{
"api":"getListOfMaster",
"api_method":"POST",
"params":{
"master_name":"UOM"
},
"fields":[
"uom_id",
"name"
]
},
"answers":null,
"api_properties":null,
"answers":[
{
"answer":"Acres",
"answer_id":"Acres"
},
{
"answer":"Hectares",
"answer_id":"Hectares"
},
{
"answer":"Square Feet",
"answer_id":"Square Feet"
},
{
"answer":"Square Meters",
"answer_id":"Square Meters"
},
{
"answer":"Square Yards",
"answer_id":"Square Yards"
}
],
"onchange_properties": [{
"purpose":"FORM_CTRL",
"form_controls":[

View File

@ -7,6 +7,7 @@
"question":"Loan amount applied for",
"question_key":"loan_amount",
"type":"1",
"field_type":"numtoword",
"field_width":"100",
"answers":null,
"api_properties":null,
@ -26,6 +27,7 @@
"question":"Loan Tenure",
"question_key":"loan_tenure",
"type":"1",
"field_type":"num",
"field_width":"100",
"onchange_properties": null,
"api_properties":null,

View File

@ -29,8 +29,8 @@
],
"questions":[
{
"question":"Year",
"sub_title":"How Long has business been operated from visited premises?",
"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)",
"question_key":"business_years",
"place_holder":"",
"field_type":"num",
@ -53,7 +53,7 @@
]
},
{
"question":"Month",
"question":"No of Months",
"question_key":"business_months",
"place_holder":"",
"field_type":"num",
@ -66,13 +66,6 @@
"parent_question_key":"is_business_address",
"answers":null,
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Field required",
"value":null
}
]
},
{
@ -88,7 +81,7 @@
"form_controls":[
{
"insert_index":"business_is_pd_visited",
"expression":"(String('business_is_pd_visited') == String('Yes')) && (String('is_business_address') == String('Yes'))",
"expression":"(String('business_is_pd_visited') != String('')) && (String('is_business_address') == String('Yes'))",
"value_keys":[
"business_is_pd_visited",
"is_business_address"
@ -223,13 +216,6 @@
"parent_question_key":"business_ownership_type",
"answers":null,
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Field required",
"value":null
}
]
},
{
@ -246,13 +232,6 @@
"parent_question_key":"business_ownership_type",
"answers":null,
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Field required",
"value":null
}
]
}
,
@ -508,19 +487,22 @@
"type":"1",
"field_width":"45",
"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_subfield":"1",
"parent_question_key":"business_ownership_type",
"answers":null,
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Field required",
"value":null
}
]
},
{
@ -531,19 +513,22 @@
"type":"1",
"field_width":"45",
"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_subfield":"1",
"parent_question_key":"business_ownership_type",
"answers":null,
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Field required",
"value":null
}
]
}
,

View File

@ -112,13 +112,13 @@
]
},
{
"question":"Year",
"question":"No of Years",
"sub_title":"Approximate vintage of the account",
"question_key":"vintage_year",
"place_holder":"",
"field_type":"num",
"type":"1",
"field_width":"45",
"field_width":"100",
"api_properties":null,
"onchange_properties":null,
"is_repeatable":null,
@ -134,7 +134,7 @@
]
},
{
"question":"Month",
"question":"No of Months",
"question_key":"vintage_month",
"place_holder":"",
"field_type":"num",
@ -145,13 +145,6 @@
"is_repeatable":null,
"answers":null,
"validations":[
{
"name":"required",
"isactive":"1",
"validator":"Validators.required",
"message":"Field required",
"value":null
}
]
}
],

View File

@ -7,6 +7,7 @@
"question":"Loan amount applied for",
"question_key":"loan_amount",
"type":"1",
"field_typ":"numtoword",
"field_width":"100",
"answers":null,
"api_properties":null,
@ -26,6 +27,7 @@
"question":"Loan Tenure",
"question_key":"loan_tenure",
"type":"1",
"field_type":"num",
"field_width":"100",
"onchange_properties": null,
"api_properties":null,