Merge branch 'smc_credit_pd_new' of https://bitbucket.org/venbaittech/sparq-lender into smc_credit_pd_new
This commit is contained in:
commit
adeb5b3693
@ -45,7 +45,9 @@
|
|||||||
"node_modules/hammerjs/hammer.min.js",
|
"node_modules/hammerjs/hammer.min.js",
|
||||||
"node_modules/sortablejs/Sortable.js",
|
"node_modules/sortablejs/Sortable.js",
|
||||||
"node_modules/chart.js/dist/Chart.bundle.min.js",
|
"node_modules/chart.js/dist/Chart.bundle.min.js",
|
||||||
"src/assets/cropper/cropper.js"
|
"src/assets/cropper/cropper.js",
|
||||||
|
"node_modules/blueimp-canvas-to-blob/js/canvas-to-blob.min.js"
|
||||||
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"configurations": {
|
"configurations": {
|
||||||
|
|||||||
23
ng6-seed/package-lock.json
generated
23
ng6-seed/package-lock.json
generated
@ -2223,6 +2223,11 @@
|
|||||||
"resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.2.tgz",
|
"resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.2.tgz",
|
||||||
"integrity": "sha512-dhHTWMI7kMx5whMQntl7Vr9C6BvV10lFXDAasnqnrMYhXVCzzk6IO9Fo2L75jXHT07WrOngL1WDXOp+yYS91Yg=="
|
"integrity": "sha512-dhHTWMI7kMx5whMQntl7Vr9C6BvV10lFXDAasnqnrMYhXVCzzk6IO9Fo2L75jXHT07WrOngL1WDXOp+yYS91Yg=="
|
||||||
},
|
},
|
||||||
|
"blueimp-canvas-to-blob": {
|
||||||
|
"version": "3.28.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/blueimp-canvas-to-blob/-/blueimp-canvas-to-blob-3.28.0.tgz",
|
||||||
|
"integrity": "sha512-5q+YHzgGsuHQ01iouGgJaPJXod2AzTxJXmVv90PpGrRxU7G7IqgPqWXz+PBmt3520jKKi6irWbNV87DicEa7wg=="
|
||||||
|
},
|
||||||
"bn.js": {
|
"bn.js": {
|
||||||
"version": "5.1.3",
|
"version": "5.1.3",
|
||||||
"resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.1.3.tgz",
|
"resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.1.3.tgz",
|
||||||
@ -2439,7 +2444,7 @@
|
|||||||
},
|
},
|
||||||
"buffer": {
|
"buffer": {
|
||||||
"version": "4.9.1",
|
"version": "4.9.1",
|
||||||
"resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.1.tgz",
|
"resolved": "http://registry.npmjs.org/buffer/-/buffer-4.9.1.tgz",
|
||||||
"integrity": "sha1-bRu2AbB6TvztlwlBMgkwJ8lbwpg=",
|
"integrity": "sha1-bRu2AbB6TvztlwlBMgkwJ8lbwpg=",
|
||||||
"requires": {
|
"requires": {
|
||||||
"base64-js": "^1.0.2",
|
"base64-js": "^1.0.2",
|
||||||
@ -2570,7 +2575,7 @@
|
|||||||
},
|
},
|
||||||
"calendar-utils": {
|
"calendar-utils": {
|
||||||
"version": "0.1.2",
|
"version": "0.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/calendar-utils/-/calendar-utils-0.1.2.tgz",
|
"resolved": "http://registry.npmjs.org/calendar-utils/-/calendar-utils-0.1.2.tgz",
|
||||||
"integrity": "sha512-9j4Zd1itopNYTSWzFU4MqD2IDHMqznfxsGr8UWGh7hWv+lKzjRJz0LS29iAg5rHtP6+6x3ikQnhoMGqFUzoD2Q=="
|
"integrity": "sha512-9j4Zd1itopNYTSWzFU4MqD2IDHMqznfxsGr8UWGh7hWv+lKzjRJz0LS29iAg5rHtP6+6x3ikQnhoMGqFUzoD2Q=="
|
||||||
},
|
},
|
||||||
"caller-callsite": {
|
"caller-callsite": {
|
||||||
@ -7303,7 +7308,7 @@
|
|||||||
},
|
},
|
||||||
"lodash": {
|
"lodash": {
|
||||||
"version": "3.10.1",
|
"version": "3.10.1",
|
||||||
"resolved": "https://registry.npmjs.org/lodash/-/lodash-3.10.1.tgz",
|
"resolved": "http://registry.npmjs.org/lodash/-/lodash-3.10.1.tgz",
|
||||||
"integrity": "sha1-W/Rejkm6QYnhfUgnid/RW9FAt7Y=",
|
"integrity": "sha1-W/Rejkm6QYnhfUgnid/RW9FAt7Y=",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
@ -7478,7 +7483,7 @@
|
|||||||
},
|
},
|
||||||
"load-json-file": {
|
"load-json-file": {
|
||||||
"version": "1.1.0",
|
"version": "1.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz",
|
"resolved": "http://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz",
|
||||||
"integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=",
|
"integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=",
|
||||||
"requires": {
|
"requires": {
|
||||||
"graceful-fs": "^4.1.2",
|
"graceful-fs": "^4.1.2",
|
||||||
@ -7620,7 +7625,7 @@
|
|||||||
},
|
},
|
||||||
"log4js": {
|
"log4js": {
|
||||||
"version": "0.6.38",
|
"version": "0.6.38",
|
||||||
"resolved": "https://registry.npmjs.org/log4js/-/log4js-0.6.38.tgz",
|
"resolved": "http://registry.npmjs.org/log4js/-/log4js-0.6.38.tgz",
|
||||||
"integrity": "sha1-LElBFmldb7JUgJQ9P8hy5mKlIv0=",
|
"integrity": "sha1-LElBFmldb7JUgJQ9P8hy5mKlIv0=",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
@ -7941,7 +7946,7 @@
|
|||||||
},
|
},
|
||||||
"meow": {
|
"meow": {
|
||||||
"version": "3.7.0",
|
"version": "3.7.0",
|
||||||
"resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz",
|
"resolved": "http://registry.npmjs.org/meow/-/meow-3.7.0.tgz",
|
||||||
"integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=",
|
"integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=",
|
||||||
"requires": {
|
"requires": {
|
||||||
"camelcase-keys": "^2.0.0",
|
"camelcase-keys": "^2.0.0",
|
||||||
@ -8456,7 +8461,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"semver": {
|
"semver": {
|
||||||
"version": "5.3.0",
|
"version": "5.3.0",
|
||||||
"resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz",
|
"resolved": "http://registry.npmjs.org/semver/-/semver-5.3.0.tgz",
|
||||||
"integrity": "sha1-myzl094C0XxgEq0yaqa00M9U+U8="
|
"integrity": "sha1-myzl094C0XxgEq0yaqa00M9U+U8="
|
||||||
},
|
},
|
||||||
"tar": {
|
"tar": {
|
||||||
@ -8897,7 +8902,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"minimist": {
|
"minimist": {
|
||||||
"version": "0.0.10",
|
"version": "0.0.10",
|
||||||
"resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz",
|
"resolved": "http://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz",
|
||||||
"integrity": "sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8=",
|
"integrity": "sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8=",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
@ -12786,7 +12791,7 @@
|
|||||||
},
|
},
|
||||||
"sax": {
|
"sax": {
|
||||||
"version": "0.6.1",
|
"version": "0.6.1",
|
||||||
"resolved": "https://registry.npmjs.org/sax/-/sax-0.6.1.tgz",
|
"resolved": "http://registry.npmjs.org/sax/-/sax-0.6.1.tgz",
|
||||||
"integrity": "sha1-VjsZx8HeiS4Jv8Ty/DDjwn8JUrk=",
|
"integrity": "sha1-VjsZx8HeiS4Jv8Ty/DDjwn8JUrk=",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
|||||||
@ -43,6 +43,7 @@
|
|||||||
"angular-sortablejs": "^2.7.0",
|
"angular-sortablejs": "^2.7.0",
|
||||||
"angular-split": "^3.0.2",
|
"angular-split": "^3.0.2",
|
||||||
"angular-tree-component": "6.1.0",
|
"angular-tree-component": "6.1.0",
|
||||||
|
"blueimp-canvas-to-blob": "^3.28.0",
|
||||||
"chart.js": "2.6.0",
|
"chart.js": "2.6.0",
|
||||||
"core-js": "^2.6.5",
|
"core-js": "^2.6.5",
|
||||||
"d3": "^4.9.1",
|
"d3": "^4.9.1",
|
||||||
|
|||||||
@ -218,7 +218,7 @@ private handleError<T> (operation = 'operation', error?: T) {
|
|||||||
}
|
}
|
||||||
else if(error.status == 0){
|
else if(error.status == 0){
|
||||||
console.log("NO Internet")
|
console.log("NO Internet")
|
||||||
this.router.navigate(['/error/404']);
|
// this.router.navigate(['/error/404']);
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
// alert("Please Check your Internet connection");
|
// alert("Please Check your Internet connection");
|
||||||
|
|||||||
@ -188,6 +188,12 @@
|
|||||||
<mat-card-header>
|
<mat-card-header>
|
||||||
<mat-card-title>Address Details</mat-card-title>
|
<mat-card-title>Address Details</mat-card-title>
|
||||||
</mat-card-header>
|
</mat-card-header>
|
||||||
|
<mat-form-field style="width:95%" *ngIf="lenderShortName == 'MWISE' && excel_file_id != null">
|
||||||
|
<mat-select [formControl] = "choosed_address" placeholder="Choose the Address" (selectionChange) = "onChangeSelectedAddress($event.value)" required>
|
||||||
|
<mat-option class="large-select-option" *ngFor="let val of addressList" [value]="val.id"><span > {{ val.display }}</span> </mat-option>
|
||||||
|
</mat-select>
|
||||||
|
<mat-error *ngIf="choosed_address.hasError('required')">Required.</mat-error>
|
||||||
|
</mat-form-field>
|
||||||
<div formArrayName="addresses" *ngFor="let addresses of pdAddresses.controls; let i = index;">
|
<div formArrayName="addresses" *ngFor="let addresses of pdAddresses.controls; let i = index;">
|
||||||
<mat-card-content [formGroupName]="i" fxLayout="row wrap" fxLayout.xs="column">
|
<mat-card-content [formGroupName]="i" fxLayout="row wrap" fxLayout.xs="column">
|
||||||
<mat-form-field fxFlex="100%">
|
<mat-form-field fxFlex="100%">
|
||||||
@ -250,7 +256,7 @@
|
|||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<mat-card-actions align="end">
|
<mat-card-actions align="end" *ngIf="lenderShortName != 'MWISE'">
|
||||||
|
|
||||||
<button type="button" mat-raised-button mat-icon-button (click)="addAddresses()"
|
<button type="button" mat-raised-button mat-icon-button (click)="addAddresses()"
|
||||||
matTooltip="Add More Additional Addresses" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" color="primary" type="button">
|
matTooltip="Add More Additional Addresses" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" color="primary" type="button">
|
||||||
@ -258,7 +264,7 @@
|
|||||||
</button>
|
</button>
|
||||||
</mat-card-actions>
|
</mat-card-actions>
|
||||||
</mat-card>
|
</mat-card>
|
||||||
|
<div #applicant_details></div>
|
||||||
<mat-card >
|
<mat-card >
|
||||||
<mat-card-header>
|
<mat-card-header>
|
||||||
<mat-card-title>Applicant Details</mat-card-title>
|
<mat-card-title>Applicant Details</mat-card-title>
|
||||||
@ -450,8 +456,8 @@
|
|||||||
<div fxFlex="30" align="end">
|
<div fxFlex="30" align="end">
|
||||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Reset" matTooltipPosition="above" type="button"
|
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Reset" matTooltipPosition="above" type="button"
|
||||||
(click)="onReset()"><mat-icon>settings_backup_restore</mat-icon></button>
|
(click)="onReset()"><mat-icon>settings_backup_restore</mat-icon></button>
|
||||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" (click)="saveDraftPD(_PDtriggerForm.value,draftStatus)" matTooltip="Save as Draft" matTooltipPosition="above" type="button" [disabled]="disableAfterSubmit===true"><mat-icon>description</mat-icon></button>
|
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" (click)="saveDraftPD(_PDtriggerForm.getRawValue(),draftStatus)" matTooltip="Save as Draft" matTooltipPosition="above" type="button" [disabled]="disableAfterSubmit===true"><mat-icon>description</mat-icon></button>
|
||||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Trigger PD" matTooltipPosition="above" (click)="triggerPD(_PDtriggerForm.value,PDTriggerStatus)" [disabled]="disableAfterSubmit===true"><mat-icon>save</mat-icon></button>
|
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Trigger PD" matTooltipPosition="above" (click)="triggerPD(_PDtriggerForm.getRawValue(),PDTriggerStatus)" [disabled]="disableAfterSubmit===true"><mat-icon>save</mat-icon></button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</mat-card-actions>
|
</mat-card-actions>
|
||||||
|
|||||||
@ -38,3 +38,23 @@ mat-radio-button,mat-checkbox{
|
|||||||
::ng-deep .mat-slide-toggle.mat-checked:not(.mat-disabled) .mat-slide-toggle-thumb {
|
::ng-deep .mat-slide-toggle.mat-checked:not(.mat-disabled) .mat-slide-toggle-thumb {
|
||||||
background-color:rgb(212, 15, 15);
|
background-color:rgb(212, 15, 15);
|
||||||
}
|
}
|
||||||
|
// .large-select {
|
||||||
|
// ::ng-deep .mat-select-panel .mat-optgroup-label, .mat-select-panel .mat-option {
|
||||||
|
// height: unset;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// ::ng-deep .mat-option-text {
|
||||||
|
// white-space: normal;
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
// }
|
||||||
|
.large-select-option {
|
||||||
|
height: unset !important;
|
||||||
|
line-height: 1.2em !important;
|
||||||
|
padding-top: 0.9em !important;
|
||||||
|
padding-bottom: 0.9em !important;
|
||||||
|
span {
|
||||||
|
white-space: normal;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,4 +1,4 @@
|
|||||||
import { Component, OnInit, ViewEncapsulation, Output, EventEmitter, OnDestroy, Input, ViewChild } from '@angular/core';
|
import { Component, OnInit, ViewEncapsulation, Output, EventEmitter, OnDestroy, Input, ViewChild, ElementRef } from '@angular/core';
|
||||||
import { FormBuilder, FormGroup, Validators, FormControl, FormArray } from '@angular/forms';
|
import { FormBuilder, FormGroup, Validators, FormControl, FormArray } from '@angular/forms';
|
||||||
import { ActivatedRoute, Router } from '@angular/router';
|
import { ActivatedRoute, Router } from '@angular/router';
|
||||||
import { CustomValidators } from 'ng2-validation';
|
import { CustomValidators } from 'ng2-validation';
|
||||||
@ -73,6 +73,10 @@ export class AddPdComponent implements OnInit, OnDestroy {
|
|||||||
billingtolist: any;
|
billingtolist: any;
|
||||||
removedControl: any = [];
|
removedControl: any = [];
|
||||||
excel_file_id: any = null;
|
excel_file_id: any = null;
|
||||||
|
choosed_address:FormControl = new FormControl('')
|
||||||
|
addressList:any = []
|
||||||
|
|
||||||
|
@ViewChild('applicant_details') applicant_details_element :ElementRef
|
||||||
constructor(notifier: NotifierService, private _fb: FormBuilder, private route: ActivatedRoute,
|
constructor(notifier: NotifierService, private _fb: FormBuilder, private route: ActivatedRoute,
|
||||||
private router: Router, private _pd: PdTrigerService, private _aws: AwsService, private ListPdComponent: ListPdComponent,
|
private router: Router, private _pd: PdTrigerService, private _aws: AwsService, private ListPdComponent: ListPdComponent,
|
||||||
private titleCase : TitleCasePipe,private userService:UserService,private matDialog:MatDialog) {
|
private titleCase : TitleCasePipe,private userService:UserService,private matDialog:MatDialog) {
|
||||||
@ -614,9 +618,11 @@ export class AddPdComponent implements OnInit, OnDestroy {
|
|||||||
this._PDtriggerForm.controls['applicant_name'].updateValueAndValidity();
|
this._PDtriggerForm.controls['applicant_name'].updateValueAndValidity();
|
||||||
this._PDtriggerForm.controls['applicant_title_name'].setValidators([Validators.required]);
|
this._PDtriggerForm.controls['applicant_title_name'].setValidators([Validators.required]);
|
||||||
this._PDtriggerForm.controls['applicant_title_name'].updateValueAndValidity();
|
this._PDtriggerForm.controls['applicant_title_name'].updateValueAndValidity();
|
||||||
|
// console.log("seleccccc", this.lenderShortName)
|
||||||
|
if(this.lenderShortName != 'MWISE') {
|
||||||
this._PDtriggerForm.controls['mobile_no'].setValidators([Validators.required]);
|
this._PDtriggerForm.controls['mobile_no'].setValidators([Validators.required]);
|
||||||
this._PDtriggerForm.controls['mobile_no'].updateValueAndValidity();
|
this._PDtriggerForm.controls['mobile_no'].updateValueAndValidity();
|
||||||
|
}
|
||||||
|
|
||||||
// this._PDtriggerForm.controls['addressline1'].setValidators([Validators.required]);
|
// this._PDtriggerForm.controls['addressline1'].setValidators([Validators.required]);
|
||||||
// this._PDtriggerForm.controls['addressline1'].updateValueAndValidity();
|
// this._PDtriggerForm.controls['addressline1'].updateValueAndValidity();
|
||||||
@ -718,7 +724,7 @@ export class AddPdComponent implements OnInit, OnDestroy {
|
|||||||
// return;
|
// return;
|
||||||
// }
|
// }
|
||||||
|
|
||||||
if (formValue.mobile_no != null && formValue.mobile_no.length != 10){
|
if (formValue.mobile_no != null && formValue.mobile_no.length != 10 && this.lenderShortName != 'MWISE'){
|
||||||
this.notifier.notify('warning', 'Please Check Applicant Mobile Number.!');
|
this.notifier.notify('warning', 'Please Check Applicant Mobile Number.!');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -838,6 +844,18 @@ export class AddPdComponent implements OnInit, OnDestroy {
|
|||||||
pd_applicant_details.push(obj1)
|
pd_applicant_details.push(obj1)
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// FOR MOBILE NUMBER CHECK FOR MWISE LENDER -- ATLEAST ONE NUMBER TO BE PROVIDED FOR MWISE
|
||||||
|
if(this.lenderShortName == 'MWISE') {
|
||||||
|
let mobile_number_check = pd_applicant_details.filter(vv=>vv.mobile_no != '' && vv.mobile_no != null)
|
||||||
|
console.log(mobile_number_check)
|
||||||
|
if(mobile_number_check == 0 || mobile_number_check == -1) {
|
||||||
|
this.applicant_details_element.nativeElement.scrollIntoView({'behaviour':'smooth'})
|
||||||
|
this.disableAfterSubmit = false;
|
||||||
|
this.notifier.notify("info", "Please provide atleast 1 Mobile Number")
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (formValue.addresses.length > 0) {
|
if (formValue.addresses.length > 0) {
|
||||||
formValue.addresses.forEach((addressElement, itemIndex) => {
|
formValue.addresses.forEach((addressElement, itemIndex) => {
|
||||||
let addressobj = {
|
let addressobj = {
|
||||||
@ -1144,6 +1162,7 @@ searchFun(control:any,i:number,option){
|
|||||||
maxWidth:'75vw'
|
maxWidth:'75vw'
|
||||||
})
|
})
|
||||||
dialogRef.afterClosed().subscribe(result=>{
|
dialogRef.afterClosed().subscribe(result=>{
|
||||||
|
if(result) {
|
||||||
this.excel_file_id = result.excel_file_id
|
this.excel_file_id = result.excel_file_id
|
||||||
console.log(result,JSON.stringify(result));
|
console.log(result,JSON.stringify(result));
|
||||||
// let formValues = {}
|
// let formValues = {}
|
||||||
@ -1167,13 +1186,35 @@ searchFun(control:any,i:number,option){
|
|||||||
this.addCoApplicant()
|
this.addCoApplicant()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(key_name == 'address_details') {
|
||||||
|
this.addressList = records['address_details']
|
||||||
|
let control_address = this._PDtriggerForm.get('addresses')['controls'][0] as FormArray
|
||||||
|
control_address.get('addressline1').disable()
|
||||||
|
control_address.get('fk_state').disable()
|
||||||
|
control_address.get('fk_city').disable()
|
||||||
|
control_address.get('pincode').disable()
|
||||||
|
this.choosed_address.setValidators(Validators.required)
|
||||||
|
}
|
||||||
// formValues[val.key_name] = val.value
|
// formValues[val.key_name] = val.value
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
this._PDtriggerForm.patchValue(records)
|
this._PDtriggerForm.patchValue(records)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
onChangeSelectedAddress(value) {
|
||||||
|
console.log(value)
|
||||||
|
if(value) {
|
||||||
|
let control_address = this._PDtriggerForm.get('addresses')['controls'][0] as FormArray
|
||||||
|
console.log(control_address);
|
||||||
|
control_address.get('addressline1').setValue(value.addressline)
|
||||||
|
control_address.get('fk_state').setValue(value.state)
|
||||||
|
this.getCityList(value.state,0);
|
||||||
|
control_address.get('fk_city').setValue(value.city)
|
||||||
|
control_address.get('pincode').setValue(value.pincode)
|
||||||
|
}
|
||||||
|
}
|
||||||
changePDTypeSlideValue(event) {
|
changePDTypeSlideValue(event) {
|
||||||
if(event.checked) {
|
if(event.checked) {
|
||||||
this._PDtriggerForm.controls['fk_pd_type'].setValue('3')
|
this._PDtriggerForm.controls['fk_pd_type'].setValue('3')
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { Component, OnInit } from '@angular/core';
|
import { Component, Inject, OnInit } from '@angular/core';
|
||||||
import { MatDialogRef, MatSnackBar } from '@angular/material';
|
import { MatDialogRef, MatSnackBar, MAT_DIALOG_DATA } from '@angular/material';
|
||||||
import { PdTrigerService } from 'app/personal-discussion/pd-service/pd-triger.service';
|
import { PdTrigerService } from 'app/personal-discussion/pd-service/pd-triger.service';
|
||||||
import { LoaderService } from 'app/shared/loaderService/loader.service';
|
import { LoaderService } from 'app/shared/loaderService/loader.service';
|
||||||
|
|
||||||
@ -13,7 +13,7 @@ export class ExcelUploadDialogComponent implements OnInit {
|
|||||||
sheetBufferRender: File;
|
sheetBufferRender: File;
|
||||||
|
|
||||||
constructor(private snackBar:MatSnackBar,private loaderService:LoaderService,private _pdService:PdTrigerService,
|
constructor(private snackBar:MatSnackBar,private loaderService:LoaderService,private _pdService:PdTrigerService,
|
||||||
private dialogRef:MatDialogRef<ExcelUploadDialogComponent>) { }
|
private dialogRef:MatDialogRef<ExcelUploadDialogComponent>, @Inject(MAT_DIALOG_DATA)public data:any) { }
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
}
|
}
|
||||||
@ -68,7 +68,8 @@ export class ExcelUploadDialogComponent implements OnInit {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.loaderService.showMatSpinnerDialog("Upload is in progress.. Please wait..")
|
this.loaderService.showMatSpinnerDialog("Upload is in progress.. Please wait..")
|
||||||
this._pdService.uploadSMCDataFile(this.sheetBufferRender).subscribe(res=>{
|
let pd_id = this.data && this.data.hasOwnProperty('pd_id') ? this.data.pd_id : null
|
||||||
|
this._pdService.uploadSMCDataFile(this.sheetBufferRender,pd_id).subscribe(res=>{
|
||||||
if(res['dataStatus']) {
|
if(res['dataStatus']) {
|
||||||
this.dialogRef.close(res)
|
this.dialogRef.close(res)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -74,7 +74,7 @@
|
|||||||
<p class="note" *ngIf="!recordStatus && limitMsg">Showing data for last {{common}}. To see older records, please use advanced filter</p>
|
<p class="note" *ngIf="!recordStatus && limitMsg">Showing data for last {{common}}. To see older records, please use advanced filter</p>
|
||||||
<br/>
|
<br/>
|
||||||
<div class="example-container">
|
<div class="example-container">
|
||||||
<div fxLayout="row wrap" *ngFor="let details of pagedList | async" (click)="details.fk_pd_allocated_to == null || details.fk_pd_allocated_to == user_id || details.pd_status == 'BOUNCED' ? 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">
|
||||||
<!--Start Mobile View Code-->
|
<!--Start Mobile View Code-->
|
||||||
<!-- <div (click)="viewPD(details.is_child == 0 ? details.pd_id : details.parent_pd_id,details.random_string)" class="webhide"> -->
|
<!-- <div (click)="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;">
|
<div fxFlex.xs="20" fxFlex.sm="20" class="webhide" style="text-align: center;">
|
||||||
@ -165,7 +165,8 @@
|
|||||||
</span><br/>
|
</span><br/>
|
||||||
<span class="fontsize" style="font-weight: bold;font-size: 1.1rem;" [ngStyle] = "{'color' : details.fk_pd_allocated_to == user_id ? 'black' : 'gray'}" *ngIf="details.fk_pd_allocated_to != null" matTooltip="Allocated to" matTooltipPosition="above">{{details.fk_pd_allocated_to == user_id ? 'Self' : details.pd_allocated_to }}</span>
|
<span class="fontsize" style="font-weight: bold;font-size: 1.1rem;" [ngStyle] = "{'color' : details.fk_pd_allocated_to == user_id ? 'black' : 'gray'}" *ngIf="details.fk_pd_allocated_to != null" matTooltip="Allocated to" matTooltipPosition="above">{{details.fk_pd_allocated_to == user_id ? 'Self' : details.pd_allocated_to }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div fxFlex.xs="20" fxFlex.sm="20" fxFlex.md="16.66" fxFlex.lg="16.66" fxFlex.xl="16.66" class="cell center" style="justify-content:flex-end" *ngIf="details.fk_pd_allocated_to == null || details.fk_pd_allocated_to == user_id || details.pd_status == 'BOUNCED'">
|
<!-- *ngIf="details.fk_pd_allocated_to == null || details.fk_pd_allocated_to == user_id || details.pd_status == 'BOUNCED' || LenderRoleID == '27' || LenderRoleID == '25' -->
|
||||||
|
<div fxFlex.xs="20" fxFlex.sm="20" fxFlex.md="16.66" fxFlex.lg="16.66" fxFlex.xl="16.66" class="cell center" style="justify-content:flex-end" *ngIf="details.pd_status != 'BOUNCED' || details.fk_pd_allocated_to == user_id">
|
||||||
<a [style.visibility]="details.pd_status=='INITIATED' && details.encrypted_url!=null && details.encrypted_url!='' ? 'visible' : 'hidden'" [attr.href]="details.encrypted_url" target="_blank">
|
<a [style.visibility]="details.pd_status=='INITIATED' && details.encrypted_url!=null && details.encrypted_url!='' ? 'visible' : 'hidden'" [attr.href]="details.encrypted_url" target="_blank">
|
||||||
<button mat-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" color="primary"
|
<button mat-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" color="primary"
|
||||||
matTooltip="Officer Tracking" matTooltipPosition="above">
|
matTooltip="Officer Tracking" matTooltipPosition="above">
|
||||||
|
|||||||
@ -7,6 +7,7 @@ import { NotifierService } from 'angular-notifier';
|
|||||||
import { AwsService } from 'app/AwsService/aws.service';
|
import { AwsService } from 'app/AwsService/aws.service';
|
||||||
import { UserService } from 'app/settings/service/user.service';
|
import { UserService } from 'app/settings/service/user.service';
|
||||||
import { ReplaySubject } from 'rxjs';
|
import { ReplaySubject } from 'rxjs';
|
||||||
|
import { LoaderService } from 'app/shared/loaderService/loader.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-all-pd',
|
selector: 'app-all-pd',
|
||||||
@ -54,8 +55,12 @@ export class AllPdComponent implements OnInit, OnChanges {
|
|||||||
common: any;
|
common: any;
|
||||||
pagedList: ReplaySubject<any> = new ReplaySubject<any>(1);
|
pagedList: ReplaySubject<any> = new ReplaySubject<any>(1);
|
||||||
user_id: any;
|
user_id: any;
|
||||||
|
startIndex: number;
|
||||||
|
endIndex: any;
|
||||||
|
filtered_raw_data: any[];
|
||||||
constructor(private _pd: PdTrigerService,private _fb:FormBuilder,notifier: NotifierService,private userService:UserService,
|
constructor(private _pd: PdTrigerService,private _fb:FormBuilder,notifier: NotifierService,private userService:UserService,
|
||||||
private _aws:AwsService) {
|
private _aws:AwsService,private loaderService:LoaderService) {
|
||||||
|
this.LenderRoleID = localStorage.getItem('LenderRoleID');
|
||||||
this.notifier = notifier;
|
this.notifier = notifier;
|
||||||
|
|
||||||
this.searchForm = this._fb.group(
|
this.searchForm = this._fb.group(
|
||||||
@ -99,9 +104,11 @@ export class AllPdComponent implements OnInit, OnChanges {
|
|||||||
if(this.user_role_name == 'sales'){
|
if(this.user_role_name == 'sales'){
|
||||||
this.displayedColumns = this.displayedColumns.filter(val=>val != 'Action')
|
this.displayedColumns = this.displayedColumns.filter(val=>val != 'Action')
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
this.recordStatus=false;
|
this.recordStatus=false;
|
||||||
// this.loadPDDetails();
|
// this.loadPDDetails();
|
||||||
|
|
||||||
//this.getcommonDropDown();
|
//this.getcommonDropDown();
|
||||||
|
|
||||||
|
|
||||||
@ -122,7 +129,10 @@ console.log(this.displayedColumns)
|
|||||||
|
|
||||||
filterData(text) {
|
filterData(text) {
|
||||||
if(!text) {
|
if(!text) {
|
||||||
|
setTimeout(()=>{
|
||||||
|
this.filtered_raw_data = []
|
||||||
this.pagedList .next(this.PdListData.slice(0, 10));
|
this.pagedList .next(this.PdListData.slice(0, 10));
|
||||||
|
},0)
|
||||||
this.length = this.PdListData.length;
|
this.length = this.PdListData.length;
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -134,7 +144,12 @@ console.log(this.displayedColumns)
|
|||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
})
|
})
|
||||||
this.pagedList.next(temp)
|
setTimeout(()=>{
|
||||||
|
console.log(temp)
|
||||||
|
this.filtered_raw_data = temp
|
||||||
|
this.length = this.filtered_raw_data.length
|
||||||
|
this.pagedList.next(temp.slice(0, 10))
|
||||||
|
},0)
|
||||||
// this.pa
|
// this.pa
|
||||||
// this.length = this.pagedList.length
|
// this.length = this.pagedList.length
|
||||||
// console.log(this.PdListData,this.pagedList,text)
|
// console.log(this.PdListData,this.pagedList,text)
|
||||||
@ -144,14 +159,24 @@ console.log(this.displayedColumns)
|
|||||||
// load inprogress pd list
|
// load inprogress pd list
|
||||||
public LenderRoleID : string = localStorage.getItem('LenderRoleID');
|
public LenderRoleID : string = localStorage.getItem('LenderRoleID');
|
||||||
loadPDDetails() {
|
loadPDDetails() {
|
||||||
|
this.LenderRoleID = localStorage.getItem('LenderRoleID');
|
||||||
|
if(this.PdListData.length == 0) {
|
||||||
|
this.loaderService.showMatSpinnerDialog("Loading...")
|
||||||
|
}
|
||||||
//this._pd.getTabStatusPdDetails(this.tabStatus)
|
//this._pd.getTabStatusPdDetails(this.tabStatus)
|
||||||
this._pd.getPdDetails(this.LenderRoleID)
|
this._pd.getPdDetails(this.LenderRoleID)
|
||||||
.subscribe(
|
.subscribe(
|
||||||
data => {
|
data => {
|
||||||
|
this.loaderService.closeMatSpinnerDialog();
|
||||||
if (data.status == 200) {
|
if (data.status == 200) {
|
||||||
this.PdListData = data.records;
|
this.PdListData = data.records;
|
||||||
// this.PdListData = <GetOrInitializeYourListHere>;
|
// 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.pagedList.next(this.PdListData.slice(0, 10));
|
||||||
|
}
|
||||||
this.length = this.PdListData.length;
|
this.length = this.PdListData.length;
|
||||||
this.PdListData.forEach(value=>{
|
this.PdListData.forEach(value=>{
|
||||||
let original=value.pd_sno
|
let original=value.pd_sno
|
||||||
@ -176,6 +201,7 @@ console.log(this.displayedColumns)
|
|||||||
}
|
}
|
||||||
// , error => {this.errorMessage = <any> error});
|
// , error => {this.errorMessage = <any> error});
|
||||||
,error => {
|
,error => {
|
||||||
|
this.loaderService.closeMatSpinnerDialog();
|
||||||
this.errorMessage.push(error);
|
this.errorMessage.push(error);
|
||||||
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!' + '-' + error.error_text + ' occur');
|
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!' + '-' + error.error_text + ' occur');
|
||||||
alert(error.html_format);
|
alert(error.html_format);
|
||||||
@ -183,12 +209,13 @@ console.log(this.displayedColumns)
|
|||||||
}
|
}
|
||||||
|
|
||||||
OnPageChange(event: PageEvent){
|
OnPageChange(event: PageEvent){
|
||||||
let startIndex = event.pageIndex * event.pageSize;
|
this.startIndex = event.pageIndex * event.pageSize;
|
||||||
let endIndex = startIndex + event.pageSize;
|
this.endIndex = this.startIndex + event.pageSize;
|
||||||
if(endIndex > this.length){
|
if(this.endIndex > this.length){
|
||||||
endIndex = this.length;
|
this.endIndex = this.length;
|
||||||
}
|
}
|
||||||
this.pagedList.next(this.PdListData.slice(startIndex, endIndex));
|
let raw_data = this.filtered_raw_data && this.filtered_raw_data.length > 0 ? this.filtered_raw_data : this.PdListData
|
||||||
|
this.pagedList.next(raw_data.slice(this.startIndex, this.endIndex));
|
||||||
}
|
}
|
||||||
|
|
||||||
pageChange(e) {
|
pageChange(e) {
|
||||||
|
|||||||
@ -74,7 +74,7 @@
|
|||||||
<br/>
|
<br/>
|
||||||
<div class="example-container">
|
<div class="example-container">
|
||||||
<!--Start Mobile View Code-->
|
<!--Start Mobile View Code-->
|
||||||
<div fxLayout="row wrap" *ngFor="let details of pagedList" (click)="details.fk_pd_allocated_to == null || details.fk_pd_allocated_to == user_id || details.pd_status == 'BOUNCED' ? 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;">
|
<div fxFlex.xs="20" fxFlex.sm="20" class="webhide" style="text-align: center;">
|
||||||
<p class="lettericon">{{details.pd_sno_split.lender_name}}<br/>
|
<p class="lettericon">{{details.pd_sno_split.lender_name}}<br/>
|
||||||
<span style="font-size: 90%">{{details.pd_sno_split.serial_no}}</span></p>
|
<span style="font-size: 90%">{{details.pd_sno_split.serial_no}}</span></p>
|
||||||
@ -116,7 +116,7 @@
|
|||||||
<!--End Mobile View Code-->
|
<!--End Mobile View Code-->
|
||||||
|
|
||||||
<!--Start Web 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 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>
|
<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>
|
<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>
|
||||||
@ -157,7 +157,7 @@
|
|||||||
</span><br/>
|
</span><br/>
|
||||||
<span class="fontsize" style="font-weight: bold;font-size: 1.1rem;" [ngStyle] = "{'color' : details.fk_pd_allocated_to == user_id ? 'black' : 'gray'}" *ngIf="details.fk_pd_allocated_to != null" matTooltip="Allocated to" matTooltipPosition="above">{{details.fk_pd_allocated_to == user_id ? 'Self' : details.pd_allocated_to }}</span>
|
<span class="fontsize" style="font-weight: bold;font-size: 1.1rem;" [ngStyle] = "{'color' : details.fk_pd_allocated_to == user_id ? 'black' : 'gray'}" *ngIf="details.fk_pd_allocated_to != null" matTooltip="Allocated to" matTooltipPosition="above">{{details.fk_pd_allocated_to == user_id ? 'Self' : details.pd_allocated_to }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div fxFlex.xs="20" fxFlex.sm="20" fxFlex.md="16.66" fxFlex.lg="16.66" fxFlex.xl="16.66" class="cell center" style="justify-content:flex-end" *ngIf="details.fk_pd_allocated_to == null || details.fk_pd_allocated_to == user_id || details.pd_status == 'BOUNCED'">
|
<div fxFlex.xs="20" fxFlex.sm="20" fxFlex.md="16.66" fxFlex.lg="16.66" fxFlex.xl="16.66" class="cell center" style="justify-content:flex-end" *ngIf="details.pd_status != 'BOUNCED' || details.fk_pd_allocated_to == user_id">
|
||||||
<a [style.visibility]="details.pd_status=='INITIATED' && details.encrypted_url!=null && details.encrypted_url!='' ? 'visible' : 'hidden'" [attr.href]="details.encrypted_url" target="_blank">
|
<a [style.visibility]="details.pd_status=='INITIATED' && details.encrypted_url!=null && details.encrypted_url!='' ? 'visible' : 'hidden'" [attr.href]="details.encrypted_url" target="_blank">
|
||||||
<button mat-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" color="primary"
|
<button mat-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" color="primary"
|
||||||
matTooltip="Officer Tracking" matTooltipPosition="above">
|
matTooltip="Officer Tracking" matTooltipPosition="above">
|
||||||
@ -223,7 +223,7 @@
|
|||||||
|
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
<div [hidden]="recordStatus">
|
<div [hidden]="recordStatus">
|
||||||
<mat-paginator #paginator class="mat-elevation-z1" [length]="completedPdListData.length" [pageIndex]="pageIndex" [pageSize]="pageSize"
|
<mat-paginator #paginator class="mat-elevation-z1" [length]="length" [pageIndex]="pageIndex" [pageSize]="pageSize"
|
||||||
[pageSizeOptions]="[5, 10, 25,50, 100]" (page)="pageEvent=OnPageChange($event)" showFirstLastButtons>
|
[pageSizeOptions]="[5, 10, 25,50, 100]" (page)="pageEvent=OnPageChange($event)" showFirstLastButtons>
|
||||||
</mat-paginator>
|
</mat-paginator>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -6,6 +6,8 @@ import { DatePipe } from '@angular/common';
|
|||||||
import { NotifierService } from 'angular-notifier';
|
import { NotifierService } from 'angular-notifier';
|
||||||
import { UserService } from 'app/settings/service/user.service';
|
import { UserService } from 'app/settings/service/user.service';
|
||||||
import { AwsService } from 'app/AwsService/aws.service';
|
import { AwsService } from 'app/AwsService/aws.service';
|
||||||
|
import { LoaderService } from 'app/shared/loaderService/loader.service';
|
||||||
|
import { ReplaySubject } from 'rxjs';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-completed-pd',
|
selector: 'app-completed-pd',
|
||||||
@ -51,10 +53,13 @@ export class CompletedPdComponent implements OnInit, OnChanges {
|
|||||||
user_role_name: string;
|
user_role_name: string;
|
||||||
limitMsg: boolean = false;
|
limitMsg: boolean = false;
|
||||||
common: any;
|
common: any;
|
||||||
pagedList: any=[];
|
pagedList: ReplaySubject<any> = new ReplaySubject<any>(1);
|
||||||
user_id: any;
|
user_id: any;
|
||||||
|
startIndex: any;
|
||||||
|
endIndex: any;
|
||||||
|
filtered_raw_data: any[];
|
||||||
constructor(private _pd: PdTrigerService,public _fb:FormBuilder,notifier: NotifierService,private userService:UserService,
|
constructor(private _pd: PdTrigerService,public _fb:FormBuilder,notifier: NotifierService,private userService:UserService,
|
||||||
private _aws:AwsService) {
|
private _aws:AwsService, private loaderService:LoaderService) {
|
||||||
this.notifier = notifier;
|
this.notifier = notifier;
|
||||||
|
|
||||||
this.searchForm = this._fb.group(
|
this.searchForm = this._fb.group(
|
||||||
@ -111,21 +116,31 @@ export class CompletedPdComponent implements OnInit, OnChanges {
|
|||||||
let filteredText = changes.bindFilterValue.currentValue ? changes.bindFilterValue.currentValue.trim() : changes.bindFilterValue.currentValue;
|
let filteredText = changes.bindFilterValue.currentValue ? changes.bindFilterValue.currentValue.trim() : changes.bindFilterValue.currentValue;
|
||||||
// filteredText = filteredText ? filteredText.trim() : filteredText;
|
// filteredText = filteredText ? filteredText.trim() : filteredText;
|
||||||
filteredText = filteredText ? filteredText.toLowerCase() : filteredText;
|
filteredText = filteredText ? filteredText.toLowerCase() : filteredText;
|
||||||
this.dataSourceTab4.filter = filteredText;
|
// this.dataSourceTab4.filter = filteredText;
|
||||||
|
this.filterData(filteredText)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// load inprogress pd list
|
// load inprogress pd list
|
||||||
public LenderRoleID : any = localStorage.getItem('LenderRoleID');
|
public LenderRoleID : any = localStorage.getItem('LenderRoleID');
|
||||||
loadPDDetails() {
|
loadPDDetails() {
|
||||||
|
if(this.completedPdListData.length == 0) {
|
||||||
|
this.loaderService.showMatSpinnerDialog("Loading...")
|
||||||
|
}
|
||||||
this._pd.getTabStatusPdDetails(this.tabStatus,this.LenderRoleID)
|
this._pd.getTabStatusPdDetails(this.tabStatus,this.LenderRoleID)
|
||||||
.subscribe(
|
.subscribe(
|
||||||
data => {
|
data => {
|
||||||
|
this.loaderService.closeMatSpinnerDialog();
|
||||||
if (data.status == 200) {
|
if (data.status == 200) {
|
||||||
this.completedPdListData = data.records;
|
this.completedPdListData = data.records;
|
||||||
// this.dataLengthTab4 = data.records.length;
|
// this.dataLengthTab4 = data.records.length;
|
||||||
// this.dataSourceTab4.data = this.completedPdListData;
|
// 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.length = this.completedPdListData.length;
|
||||||
this.completedPdListData.forEach(value=>{
|
this.completedPdListData.forEach(value=>{
|
||||||
let original=value.pd_sno
|
let original=value.pd_sno
|
||||||
@ -144,6 +159,7 @@ public LenderRoleID : any = localStorage.getItem('LenderRoleID');
|
|||||||
}
|
}
|
||||||
// , error => this.errorMessage = <any> error);
|
// , error => this.errorMessage = <any> error);
|
||||||
,error => {
|
,error => {
|
||||||
|
this.loaderService.closeMatSpinnerDialog();
|
||||||
this.errorMessage.push(error);
|
this.errorMessage.push(error);
|
||||||
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!' + '-' + error.error_text + ' occur');
|
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!' + '-' + error.error_text + ' occur');
|
||||||
alert(error.html_format);
|
alert(error.html_format);
|
||||||
@ -151,13 +167,14 @@ public LenderRoleID : any = localStorage.getItem('LenderRoleID');
|
|||||||
}
|
}
|
||||||
|
|
||||||
OnPageChange(event: PageEvent){
|
OnPageChange(event: PageEvent){
|
||||||
let startIndex = event.pageIndex * event.pageSize;
|
this.startIndex = event.pageIndex * event.pageSize;
|
||||||
let endIndex = startIndex + event.pageSize;
|
this.endIndex = this.startIndex + event.pageSize;
|
||||||
if(endIndex > this.length){
|
if(this.endIndex > this.length){
|
||||||
endIndex = this.length;
|
this.endIndex = this.length;
|
||||||
}
|
}
|
||||||
this.pagedList = this.completedPdListData.slice(startIndex, endIndex);
|
let raw_data = this.filtered_raw_data && this.filtered_raw_data.length > 0 ? this.filtered_raw_data : this.completedPdListData
|
||||||
}
|
this.pagedList.next(raw_data.slice(this.startIndex, this.endIndex));
|
||||||
|
}
|
||||||
|
|
||||||
pageChange(e) {
|
pageChange(e) {
|
||||||
console.log(e);
|
console.log(e);
|
||||||
@ -265,7 +282,7 @@ public LenderRoleID : any = localStorage.getItem('LenderRoleID');
|
|||||||
this.completedPdListData=res['records'];
|
this.completedPdListData=res['records'];
|
||||||
// this.dataSourceTab4.data = res['records'];
|
// this.dataSourceTab4.data = res['records'];
|
||||||
// this.dataSourceTab4.paginator = this.paginator;
|
// 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.length = this.completedPdListData.length;
|
||||||
this.completedPdListData.forEach(value=>{
|
this.completedPdListData.forEach(value=>{
|
||||||
let original=value.pd_sno
|
let original=value.pd_sno
|
||||||
@ -279,7 +296,7 @@ public LenderRoleID : any = localStorage.getItem('LenderRoleID');
|
|||||||
// this.dataSourceTab4.paginator['pageIndex'] = 0;
|
// this.dataSourceTab4.paginator['pageIndex'] = 0;
|
||||||
// this.dataSourceTab4.data = [];
|
// this.dataSourceTab4.data = [];
|
||||||
// this.completedPdListData = [];
|
// this.completedPdListData = [];
|
||||||
this.pagedList = [];
|
this.pagedList.next([]);
|
||||||
this.recordStatus=true
|
this.recordStatus=true
|
||||||
this.limitMsg = false
|
this.limitMsg = false
|
||||||
}
|
}
|
||||||
@ -288,6 +305,34 @@ public LenderRoleID : any = localStorage.getItem('LenderRoleID');
|
|||||||
this.notifier.notify('warning', 'Something Went Wrong Try Again.!' + '-' + error.error_text + ' occur');
|
this.notifier.notify('warning', 'Something Went Wrong Try Again.!' + '-' + error.error_text + ' occur');
|
||||||
alert(error.html_format);
|
alert(error.html_format);
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
filterData(text) {
|
||||||
|
if(!text) {
|
||||||
|
setTimeout(()=>{
|
||||||
|
this.filtered_raw_data = []
|
||||||
|
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(()=>{
|
||||||
|
console.log(temp)
|
||||||
|
this.filtered_raw_data = temp
|
||||||
|
this.length = this.filtered_raw_data.length
|
||||||
|
this.pagedList.next(temp.slice(0, 10))
|
||||||
|
},0)
|
||||||
|
// this.pa
|
||||||
|
// this.length = this.pagedList.length
|
||||||
|
// console.log(this.PdListData,this.pagedList,text)
|
||||||
|
|
||||||
}
|
}
|
||||||
onReset(){
|
onReset(){
|
||||||
this.searchForm.reset();
|
this.searchForm.reset();
|
||||||
|
|||||||
@ -37,7 +37,7 @@
|
|||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
<mat-form-field style="width: 40%">
|
<mat-form-field style="width: 40%">
|
||||||
<input matInput placeholder="Mobile Number" formControlName="mobile_no" type="text" maxlength="10" ForMobileNumbers required>
|
<input matInput placeholder="Mobile Number" formControlName="mobile_no" type="text" maxlength="10" ForMobileNumbers>
|
||||||
<mat-error *ngIf="pdMainApplicant.mobile_no.hasError('maxlength') || pdMainApplicant.mobile_no.hasError('minlength')">Enter Valid Mobile Number. </mat-error>
|
<mat-error *ngIf="pdMainApplicant.mobile_no.hasError('maxlength') || pdMainApplicant.mobile_no.hasError('minlength')">Enter Valid Mobile Number. </mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field style="width: 15%">
|
<mat-form-field style="width: 15%">
|
||||||
@ -115,6 +115,6 @@
|
|||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<!-- <notifier-container></notifier-container> -->
|
<notifier-container></notifier-container>
|
||||||
|
|
||||||
|
|
||||||
@ -143,6 +143,9 @@ export class EditPdApplicantComponent implements OnInit {
|
|||||||
this.coApplicantItems = this._EditApplicantForm.get('coApplicantItems') as FormArray;
|
this.coApplicantItems = this._EditApplicantForm.get('coApplicantItems') as FormArray;
|
||||||
this.coApplicantItems.push(this.createItem(listData));
|
this.coApplicantItems.push(this.createItem(listData));
|
||||||
}
|
}
|
||||||
|
else if(!listData){
|
||||||
|
this.notifier.notify("info","Please Fill all the fields")
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -155,11 +158,11 @@ export class EditPdApplicantComponent implements OnInit {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if((formValue.mobile_no == '') && (formValue.stdcode == '' || formValue.landline == '')){
|
if(this.data.lender_short_name != 'MWISE' && (formValue.mobile_no == '') && (formValue.stdcode == '' || formValue.landline == '')){
|
||||||
this.notifier.notify('warning', 'Either Mobile or Landline Need.!');
|
this.notifier.notify('warning', 'Either Mobile or Landline Need.!');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if(formValue.mobile_no.length != 10){
|
else if(this.data.lender_short_name != 'MWISE' && formValue.mobile_no.length != 10){
|
||||||
this.notifier.notify('warning', 'Please Check Applicant Mobile Number.!');
|
this.notifier.notify('warning', 'Please Check Applicant Mobile Number.!');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -252,6 +255,16 @@ export class EditPdApplicantComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
pd_applicant_details.push(obj1)
|
pd_applicant_details.push(obj1)
|
||||||
});
|
});
|
||||||
|
// FOR MOBILE NUMBER CHECK FOR MWISE LENDER -- ATLEAST ONE NUMBER TO BE PROVIDED FOR MWISE
|
||||||
|
if(this.data.lender_short_name == 'MWISE') {
|
||||||
|
let mobile_number_check = pd_applicant_details.filter(vv=>vv.mobile_no != '' && vv.mobile_no != null)
|
||||||
|
console.log(mobile_number_check)
|
||||||
|
if(mobile_number_check == 0 || mobile_number_check == -1) {
|
||||||
|
// this.applicant_details_element.nativeElement.scrollIntoView({'behaviour':'smooth'})
|
||||||
|
this.notifier.notify("info", "Please provide atleast 1 Mobile Number")
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
this.disableAfterSubmit = true;
|
this.disableAfterSubmit = true;
|
||||||
this._pd.updatePdApplicant(pd_applicant_details).subscribe(result => {
|
this._pd.updatePdApplicant(pd_applicant_details).subscribe(result => {
|
||||||
if (result.status == 200) {
|
if (result.status == 200) {
|
||||||
|
|||||||
@ -73,7 +73,7 @@
|
|||||||
<br/>
|
<br/>
|
||||||
<div class="example-container">
|
<div class="example-container">
|
||||||
<!--Start Mobile View Code-->
|
<!--Start Mobile View Code-->
|
||||||
<div fxLayout="row wrap" *ngFor="let details of pagedList" (click)="details.fk_pd_allocated_to == null || details.fk_pd_allocated_to == user_id || details.pd_status == 'BOUNCED' ? 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;">
|
<div fxFlex.xs="20" fxFlex.sm="20" class="webhide" style="text-align: center;">
|
||||||
<p class="lettericon">{{details.pd_sno_split.lender_name}}<br/>
|
<p class="lettericon">{{details.pd_sno_split.lender_name}}<br/>
|
||||||
<span style="font-size: 90%">{{details.pd_sno_split.serial_no}}</span></p>
|
<span style="font-size: 90%">{{details.pd_sno_split.serial_no}}</span></p>
|
||||||
@ -115,7 +115,7 @@
|
|||||||
<!--End Mobile View Code-->
|
<!--End Mobile View Code-->
|
||||||
|
|
||||||
<!--Start Web 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 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>
|
<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>
|
<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>
|
||||||
@ -156,7 +156,7 @@
|
|||||||
</span><br/>
|
</span><br/>
|
||||||
<span class="fontsize" style="font-weight: bold;font-size: 1.1rem;" [ngStyle] = "{'color' : details.fk_pd_allocated_to == user_id ? 'black' : 'gray'}" *ngIf="details.fk_pd_allocated_to != null" matTooltip="Allocated to" matTooltipPosition="above">{{details.fk_pd_allocated_to == user_id ? 'Self' : details.pd_allocated_to }}</span>
|
<span class="fontsize" style="font-weight: bold;font-size: 1.1rem;" [ngStyle] = "{'color' : details.fk_pd_allocated_to == user_id ? 'black' : 'gray'}" *ngIf="details.fk_pd_allocated_to != null" matTooltip="Allocated to" matTooltipPosition="above">{{details.fk_pd_allocated_to == user_id ? 'Self' : details.pd_allocated_to }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div fxFlex.xs="20" fxFlex.sm="20" fxFlex.md="16.66" fxFlex.lg="16.66" fxFlex.xl="16.66" class="cell center" style="justify-content:flex-end" *ngIf="details.fk_pd_allocated_to == null || details.fk_pd_allocated_to == user_id || details.pd_status == 'BOUNCED'">
|
<div fxFlex.xs="20" fxFlex.sm="20" fxFlex.md="16.66" fxFlex.lg="16.66" fxFlex.xl="16.66" class="cell center" style="justify-content:flex-end" *ngIf="details.pd_status != 'BOUNCED' || details.fk_pd_allocated_to == user_id">
|
||||||
<a [style.visibility]="details.pd_status=='INITIATED' && details.encrypted_url!=null && details.encrypted_url!='' ? 'visible' : 'hidden'" [attr.href]="details.encrypted_url" target="_blank">
|
<a [style.visibility]="details.pd_status=='INITIATED' && details.encrypted_url!=null && details.encrypted_url!='' ? 'visible' : 'hidden'" [attr.href]="details.encrypted_url" target="_blank">
|
||||||
<button mat-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" color="primary"
|
<button mat-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" color="primary"
|
||||||
matTooltip="Officer Tracking" matTooltipPosition="above">
|
matTooltip="Officer Tracking" matTooltipPosition="above">
|
||||||
@ -220,7 +220,7 @@
|
|||||||
|
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
<div [hidden]="recordStatus">
|
<div [hidden]="recordStatus">
|
||||||
<mat-paginator #paginator class="mat-elevation-z1" [length]="progressPdListData.length" [pageIndex]="pageIndex" [pageSize]="pageSize"
|
<mat-paginator #paginator class="mat-elevation-z1" [length]="length" [pageIndex]="pageIndex" [pageSize]="pageSize"
|
||||||
[pageSizeOptions]="[5, 10, 25,50, 100]" (page)="pageEvent=OnPageChange($event)" showFirstLastButtons>
|
[pageSizeOptions]="[5, 10, 25,50, 100]" (page)="pageEvent=OnPageChange($event)" showFirstLastButtons>
|
||||||
</mat-paginator>
|
</mat-paginator>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -6,6 +6,8 @@ import { DatePipe } from '@angular/common';
|
|||||||
import { NotifierService } from 'angular-notifier';
|
import { NotifierService } from 'angular-notifier';
|
||||||
import { UserService } from 'app/settings/service/user.service';
|
import { UserService } from 'app/settings/service/user.service';
|
||||||
import { AwsService } from 'app/AwsService/aws.service';
|
import { AwsService } from 'app/AwsService/aws.service';
|
||||||
|
import { LoaderService } from 'app/shared/loaderService/loader.service';
|
||||||
|
import { ReplaySubject } from 'rxjs';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-inprogress-pd',
|
selector: 'app-inprogress-pd',
|
||||||
@ -49,10 +51,13 @@ export class InprogressPdComponent implements OnInit, OnChanges {
|
|||||||
user_role_name: string;
|
user_role_name: string;
|
||||||
limitMsg: boolean = false;
|
limitMsg: boolean = false;
|
||||||
common: any;
|
common: any;
|
||||||
pagedList: any=[];
|
pagedList: ReplaySubject<any> = new ReplaySubject<any>(1);
|
||||||
user_id: any;
|
user_id: any;
|
||||||
|
startIndex: any;
|
||||||
|
endIndex: any;
|
||||||
|
filtered_raw_data:any = [];
|
||||||
constructor(private _pd: PdTrigerService,public _fb:FormBuilder,notifier: NotifierService,private userService:UserService,
|
constructor(private _pd: PdTrigerService,public _fb:FormBuilder,notifier: NotifierService,private userService:UserService,
|
||||||
private _aws:AwsService) {
|
private _aws:AwsService, private loaderService:LoaderService) {
|
||||||
this.notifier = notifier;
|
this.notifier = notifier;
|
||||||
|
|
||||||
this.searchForm = this._fb.group(
|
this.searchForm = this._fb.group(
|
||||||
@ -108,20 +113,29 @@ export class InprogressPdComponent implements OnInit, OnChanges {
|
|||||||
// filteredText = filteredText ? filteredText.trim() : filteredText;
|
// filteredText = filteredText ? filteredText.trim() : filteredText;
|
||||||
let filteredText = changes.bindFilterValue.currentValue ? changes.bindFilterValue.currentValue.trim() : changes.bindFilterValue.currentValue;
|
let filteredText = changes.bindFilterValue.currentValue ? changes.bindFilterValue.currentValue.trim() : changes.bindFilterValue.currentValue;
|
||||||
filteredText = filteredText ? filteredText.toLowerCase() : filteredText;
|
filteredText = filteredText ? filteredText.toLowerCase() : filteredText;
|
||||||
this.dataSourceTab2.filter = filteredText;
|
this.filterData(filteredText)
|
||||||
}
|
}
|
||||||
|
|
||||||
// load inprogress pd list
|
// load inprogress pd list
|
||||||
public LenderRoleID : string = localStorage.getItem('LenderRoleID');
|
public LenderRoleID : string = localStorage.getItem('LenderRoleID');
|
||||||
loadPDDetails() {
|
loadPDDetails() {
|
||||||
|
if(this.progressPdListData.length == 0) {
|
||||||
|
this.loaderService.showMatSpinnerDialog("Loading...")
|
||||||
|
}
|
||||||
this._pd.getTabStatusPdDetails(this.tabStatus,this.LenderRoleID)
|
this._pd.getTabStatusPdDetails(this.tabStatus,this.LenderRoleID)
|
||||||
.subscribe(
|
.subscribe(
|
||||||
data => {
|
data => {
|
||||||
|
this.loaderService.closeMatSpinnerDialog();
|
||||||
if (data.status == 200) {
|
if (data.status == 200) {
|
||||||
this.progressPdListData = data.records;
|
this.progressPdListData = data.records;
|
||||||
// this.dataLengthTab2 = data.records.length;
|
// this.dataLengthTab2 = data.records.length;
|
||||||
// this.dataSourceTab2.data = this.progressPdListData;
|
// 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.length = this.progressPdListData.length;
|
||||||
this.progressPdListData.forEach(value=>{
|
this.progressPdListData.forEach(value=>{
|
||||||
let original=value.pd_sno
|
let original=value.pd_sno
|
||||||
@ -137,6 +151,7 @@ public LenderRoleID : string = localStorage.getItem('LenderRoleID');
|
|||||||
this.limitMsg = false
|
this.limitMsg = false
|
||||||
}
|
}
|
||||||
},error => {
|
},error => {
|
||||||
|
this.loaderService.closeMatSpinnerDialog();
|
||||||
this.errorMessage.push(error);
|
this.errorMessage.push(error);
|
||||||
this.notifier.notify('warning', 'Something Went Wrong Try Again.!' + '-' + error.error_text + ' occur');
|
this.notifier.notify('warning', 'Something Went Wrong Try Again.!' + '-' + error.error_text + ' occur');
|
||||||
alert(error.html_format);
|
alert(error.html_format);
|
||||||
@ -144,13 +159,14 @@ public LenderRoleID : string = localStorage.getItem('LenderRoleID');
|
|||||||
}
|
}
|
||||||
|
|
||||||
OnPageChange(event: PageEvent){
|
OnPageChange(event: PageEvent){
|
||||||
let startIndex = event.pageIndex * event.pageSize;
|
this.startIndex = event.pageIndex * event.pageSize;
|
||||||
let endIndex = startIndex + event.pageSize;
|
this.endIndex = this.startIndex + event.pageSize;
|
||||||
if(endIndex > this.length){
|
if(this.endIndex > this.length){
|
||||||
endIndex = this.length;
|
this.endIndex = this.length;
|
||||||
}
|
}
|
||||||
this.pagedList = this.progressPdListData.slice(startIndex, endIndex);
|
let raw_data = this.filtered_raw_data && this.filtered_raw_data.length > 0 ? this.filtered_raw_data : this.progressPdListData
|
||||||
}
|
this.pagedList.next(raw_data.slice(this.startIndex, this.endIndex));
|
||||||
|
}
|
||||||
|
|
||||||
pageChange(e) {
|
pageChange(e) {
|
||||||
console.log(e);
|
console.log(e);
|
||||||
@ -255,7 +271,7 @@ public LenderRoleID : string = localStorage.getItem('LenderRoleID');
|
|||||||
this.progressPdListData = res['records'];
|
this.progressPdListData = res['records'];
|
||||||
// this.dataSourceTab2.data = res['records'];
|
// this.dataSourceTab2.data = res['records'];
|
||||||
// this.dataSourceTab2.paginator = this.paginator;
|
// 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.length = this.progressPdListData.length;
|
||||||
this.progressPdListData.forEach(value=>{
|
this.progressPdListData.forEach(value=>{
|
||||||
let original=value.pd_sno
|
let original=value.pd_sno
|
||||||
@ -269,7 +285,7 @@ public LenderRoleID : string = localStorage.getItem('LenderRoleID');
|
|||||||
// this.dataSourceTab2.paginator['pageIndex'] = 0;
|
// this.dataSourceTab2.paginator['pageIndex'] = 0;
|
||||||
// this.dataSourceTab2.data = [];
|
// this.dataSourceTab2.data = [];
|
||||||
this.progressPdListData = [];
|
this.progressPdListData = [];
|
||||||
this.pagedList = [];
|
this.pagedList.next([]);
|
||||||
this.recordStatus=true
|
this.recordStatus=true
|
||||||
this.limitMsg = false
|
this.limitMsg = false
|
||||||
}
|
}
|
||||||
@ -279,6 +295,34 @@ public LenderRoleID : string = localStorage.getItem('LenderRoleID');
|
|||||||
alert(error.html_format);
|
alert(error.html_format);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
filterData(text) {
|
||||||
|
if(!text) {
|
||||||
|
setTimeout(()=>{
|
||||||
|
this.filtered_raw_data = []
|
||||||
|
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(()=>{
|
||||||
|
console.log(temp)
|
||||||
|
this.filtered_raw_data = temp
|
||||||
|
this.length = this.filtered_raw_data.length
|
||||||
|
this.pagedList.next(temp.slice(0, 10))
|
||||||
|
},0)
|
||||||
|
// this.pa
|
||||||
|
// this.length = this.pagedList.length
|
||||||
|
// console.log(this.PdListData,this.pagedList,text)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
onReset(){
|
onReset(){
|
||||||
this.searchForm.reset();
|
this.searchForm.reset();
|
||||||
|
|||||||
@ -3,10 +3,11 @@
|
|||||||
<div fxLayout="row">
|
<div fxLayout="row">
|
||||||
<div fxFlex="50" class="pb-0 text-sm-left">
|
<div fxFlex="50" class="pb-0 text-sm-left">
|
||||||
<mat-form-field dividerColor="primary" style="width: 50%;">
|
<mat-form-field dividerColor="primary" style="width: 50%;">
|
||||||
<input matInput [(ngModel)]="filterValue" placeholder="Search">
|
<input matInput autocomplete="off" [(ngModel)]="filterValue" placeholder="Search">
|
||||||
|
<span matSuffix class="close_btn_filter" *ngIf="filterValue" (click)="filterValue = ''"><mat-icon>close</mat-icon></span>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
<div fxFlex="50" class="pb-0 text-sm-right" *ngIf="user_role_name != 'sales' && LenderRoleID != '26'">
|
<div fxFlex="50" class="pb-0 text-sm-right" *ngIf="user_role_name != 'sales' && LenderRoleID != '26' && LenderRoleID != '27'">
|
||||||
<!-- <button mat-fab (click)="viewMapPdDetails()" class="mr-1 mb-1 hover-icon" matTooltip="Map view" matTooltipPosition="above"><mat-icon>map</mat-icon></button> -->
|
<!-- <button mat-fab (click)="viewMapPdDetails()" class="mr-1 mb-1 hover-icon" matTooltip="Map view" matTooltipPosition="above"><mat-icon>map</mat-icon></button> -->
|
||||||
<button mat-fab (click)="addPdDetails()" class="mr-1 mb-1 hover-icon" matTooltip="Add PD" matTooltipPosition="above" *ngIf="roleAccessDetails.trigger"><mat-icon>add</mat-icon></button>
|
<button mat-fab (click)="addPdDetails()" class="mr-1 mb-1 hover-icon" matTooltip="Add PD" matTooltipPosition="above" *ngIf="roleAccessDetails.trigger"><mat-icon>add</mat-icon></button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -26,3 +26,10 @@
|
|||||||
background-color: #fff !important;
|
background-color: #fff !important;
|
||||||
float: right;
|
float: right;
|
||||||
}
|
}
|
||||||
|
.close_btn_filter{
|
||||||
|
color: gainsboro
|
||||||
|
}
|
||||||
|
.close_btn_filter:hover{
|
||||||
|
color: black;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|||||||
@ -59,12 +59,13 @@ export class ListPdComponent implements OnInit, OnDestroy {
|
|||||||
this.user_role_name=role_name
|
this.user_role_name=role_name
|
||||||
})
|
})
|
||||||
if(localStorage.getItem('LocalSetEntity')) {
|
if(localStorage.getItem('LocalSetEntity')) {
|
||||||
|
console.log("Sudden")
|
||||||
this.getUserFromLocal()
|
this.getUserFromLocal()
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
// for Listening the local storage LocalSetEntity
|
// for Listening the local storage LocalSetEntity
|
||||||
this.userService.messageSubject.subscribe(rr=>{
|
this.userService.messageSubject.subscribe(rr=>{
|
||||||
console.log(rr)
|
console.log("late",rr)
|
||||||
this.getUserFromLocal()
|
this.getUserFromLocal()
|
||||||
// let entity_id = localStorage.getItem('LocalSetEntity')
|
// let entity_id = localStorage.getItem('LocalSetEntity')
|
||||||
// if(entity_id) {
|
// if(entity_id) {
|
||||||
@ -119,7 +120,7 @@ export class ListPdComponent implements OnInit, OnDestroy {
|
|||||||
}
|
}
|
||||||
pdListLoad(status: boolean){
|
pdListLoad(status: boolean){
|
||||||
this.viewPdList = status;
|
this.viewPdList = status;
|
||||||
this.getTabIndex==0 ? this.allTabC.loadPDDetails() : this.getTabIndex==1 ? this.scheduledTabC.loadPDDetails() : this.getTabIndex==2 ? this.inprogressTabC.loadPDDetails() : this.getTabIndex==3 ? this.completedTabC.loadPDDetails() : this.qcCompletedTabC.loadPDDetails();
|
this.getTabIndex==0 ? this.allTabC.loadPDDetails() : this.getTabIndex==3 ? this.scheduledTabC.loadPDDetails() : this.getTabIndex==1 ? this.inprogressTabC.loadPDDetails() : this.getTabIndex==2 ? this.completedTabC.loadPDDetails() : this.qcCompletedTabC.loadPDDetails();
|
||||||
|
|
||||||
}
|
}
|
||||||
viewPDDetails(event){
|
viewPDDetails(event){
|
||||||
@ -134,6 +135,7 @@ export class ListPdComponent implements OnInit, OnDestroy {
|
|||||||
//get tab changes
|
//get tab changes
|
||||||
onTabClick(event: MatTabChangeEvent) {
|
onTabClick(event: MatTabChangeEvent) {
|
||||||
this.getTabIndex=event.index;
|
this.getTabIndex=event.index;
|
||||||
|
this.filterValue = ''
|
||||||
// this.getTabIndex==0 ? this.allTabC.loadPDDetails() : this.getTabIndex==1 ? this.scheduledTabC.loadPDDetails() : this.getTabIndex==2 ? this.inprogressTabC.loadPDDetails() : this.getTabIndex==3 ? this.completedTabC.loadPDDetails() : this.qcCompletedTabC.loadPDDetails();
|
// this.getTabIndex==0 ? this.allTabC.loadPDDetails() : this.getTabIndex==1 ? this.scheduledTabC.loadPDDetails() : this.getTabIndex==2 ? this.inprogressTabC.loadPDDetails() : this.getTabIndex==3 ? this.completedTabC.loadPDDetails() : this.qcCompletedTabC.loadPDDetails();
|
||||||
this.getTabIndex==0 ? this.allTabC.loadPDDetails() : this.getTabIndex==1 ? this.inprogressTabC.loadPDDetails() : this.getTabIndex==2 ? this.completedTabC.loadPDDetails() : this.qcCompletedTabC.loadPDDetails();
|
this.getTabIndex==0 ? this.allTabC.loadPDDetails() : this.getTabIndex==1 ? this.inprogressTabC.loadPDDetails() : this.getTabIndex==2 ? this.completedTabC.loadPDDetails() : this.qcCompletedTabC.loadPDDetails();
|
||||||
|
|
||||||
|
|||||||
@ -0,0 +1,64 @@
|
|||||||
|
<h2 mat-dialog-title class="paragraph_change">
|
||||||
|
<div fxFlex="70" style="padding: 10px !important;">
|
||||||
|
{{pageTitle}}
|
||||||
|
</div>
|
||||||
|
<div fxFlex="30" align="end" style="padding: 10px !important;">
|
||||||
|
<!-- <button *ngIf="data.fk_pd_type == 2" mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Allocate Vendor" matTooltipPosition="above" (click)="viewVendorOfficer()"><mat-icon>verified_user</mat-icon></button> -->
|
||||||
|
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" (click)="closeAllocationComponent()" matTooltip="Close" matTooltipPosition="below"><mat-icon>close</mat-icon></button>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</h2>
|
||||||
|
<mat-dialog-content class="mat-typography">
|
||||||
|
<!-- <form [formGroup]="_pdAllocationForm" (submit)="onSubmit()"> -->
|
||||||
|
|
||||||
|
<mat-list role="list" *ngIf="pdOfficerList.length > 0">
|
||||||
|
|
||||||
|
<mat-list-item role="listitem" *ngFor="let officer of pdOfficerList; let i = index">
|
||||||
|
<div fxFlex="100">
|
||||||
|
<div fxLayout="row wrap">
|
||||||
|
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="30" fxFlex.lg="30" fxFlex.xl="30">
|
||||||
|
<mat-radio-button color="primary" [value]="officer" (change)="selectedItem = $event.value">
|
||||||
|
{{officer.first_name}} {{officer.last_name}}
|
||||||
|
</mat-radio-button>
|
||||||
|
</div>
|
||||||
|
<!-- <div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="30" fxFlex.lg="30" fxFlex.xl="30">
|
||||||
|
<span>{{officer.mobile_no}}</span>
|
||||||
|
</div>
|
||||||
|
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="40" fxFlex.lg="40" fxFlex.xl="40">
|
||||||
|
<span class="view_more" (click)="viewMoreDetails(officer)" matTooltip="View More" matTooltipPosition="right">PD in hand - {{officer.count}}</span>
|
||||||
|
|
||||||
|
</div> -->
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</mat-list-item>
|
||||||
|
|
||||||
|
</mat-list>
|
||||||
|
<mat-list *ngIf="pdOfficerList.length == 0">
|
||||||
|
<mat-list-item>
|
||||||
|
<p>No <span *ngIf="data.lender_role_id == '25'">Regional </span>Credit Managers available.</p>
|
||||||
|
</mat-list-item>
|
||||||
|
</mat-list>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- </form> -->
|
||||||
|
</mat-dialog-content>
|
||||||
|
|
||||||
|
<mat-dialog-actions >
|
||||||
|
<div fxFlex="50" align="left">
|
||||||
|
<p *ngIf="selectedItem"> <span *ngIf="data.lender_role_id == '25'">Regional </span>Credit Manager: {{selectedItem.first_name}}</p>
|
||||||
|
</div>
|
||||||
|
<div fxFlex="50" align="right">
|
||||||
|
<!-- <button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" (click)="closeAllocationComponent()" matTooltip="Close" matTooltipPosition="below"><mat-icon>close</mat-icon></button> -->
|
||||||
|
<button mat-raised-button mat-icon-button (click)="updatePdOfficer(selectedItem)" class="mr-1 mb-1 hover-icon" type="button" matTooltip="Allocate" matTooltipPosition="below"><mat-icon>save</mat-icon></button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</mat-dialog-actions>
|
||||||
|
|
||||||
|
|
||||||
|
<notifier-container></notifier-container>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -0,0 +1,23 @@
|
|||||||
|
.example-full-width{
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.view_more {
|
||||||
|
cursor: pointer;
|
||||||
|
color: #e00201 !important;
|
||||||
|
// text-decoration-line: underline;
|
||||||
|
// text-decoration-style: dotted;
|
||||||
|
// font-weight: bold;
|
||||||
|
|
||||||
|
}
|
||||||
|
.text_change {
|
||||||
|
color: #e00201 !important;
|
||||||
|
}
|
||||||
|
.cdk-global-overlay-wrapper{
|
||||||
|
justify-content: center !important;
|
||||||
|
}
|
||||||
|
.paragraph_change {
|
||||||
|
color: #fff !important;
|
||||||
|
background-color: #e00201 !important;
|
||||||
|
// padding: 10px !important;
|
||||||
|
}
|
||||||
|
|
||||||
@ -0,0 +1,126 @@
|
|||||||
|
import { Component, OnInit, Inject, ViewEncapsulation } from '@angular/core';
|
||||||
|
import { MatDialog, MatDialogRef, MAT_DIALOG_DATA , DialogPosition} from '@angular/material';
|
||||||
|
import { FormBuilder, FormGroup, Validators, FormControl, FormArray } from '@angular/forms';
|
||||||
|
import { NotifierService } from 'angular-notifier';
|
||||||
|
import { PdTrigerService } from '../../../pd-service/pd-triger.service';
|
||||||
|
// import { AllocationViewMoreComponent } from './../allocation-view-more/allocation-view-more.component';
|
||||||
|
// import { VendorPdAllocationComponent } from '../vendor-pd-allocation/VendorPdAllocationComponent';
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'app-pd-allocation',
|
||||||
|
templateUrl: './pd-allocation.component.html',
|
||||||
|
styleUrls: ['./pd-allocation.component.scss'],
|
||||||
|
encapsulation: ViewEncapsulation.None
|
||||||
|
|
||||||
|
})
|
||||||
|
export class PdAllocationComponent implements OnInit {
|
||||||
|
public pageTitle: string = "Allocation To Credit Manager";
|
||||||
|
public _pdAllocationForm: FormGroup;
|
||||||
|
public pdOfficerList: any = [];
|
||||||
|
errorMessage: any;
|
||||||
|
notifier : NotifierService;
|
||||||
|
selectedItem:any;
|
||||||
|
isDisabled: boolean;
|
||||||
|
|
||||||
|
constructor( notifier: NotifierService,
|
||||||
|
private _fb: FormBuilder,
|
||||||
|
private dialogRef: MatDialogRef<PdAllocationComponent>,
|
||||||
|
private _pd: PdTrigerService, private dialog: MatDialog,
|
||||||
|
@Inject(MAT_DIALOG_DATA) public data: any) {
|
||||||
|
console.log(data)
|
||||||
|
this.notifier=notifier;
|
||||||
|
if(this.data.lender_role_id == '25') {
|
||||||
|
this.pageTitle = "Allocation To Regional Credit Manager"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ngOnInit() {
|
||||||
|
this.isDisabled=true;
|
||||||
|
console.log(this.data)
|
||||||
|
this.getPDOfficerList(this.data.pd_id);
|
||||||
|
|
||||||
|
// this._pdAllocationForm = this._fb.group({
|
||||||
|
// pd_primary_id: [null],
|
||||||
|
// allocation_id: [null],
|
||||||
|
// });
|
||||||
|
}
|
||||||
|
|
||||||
|
// convenience getter for easy access to form fields
|
||||||
|
// get readForm() { return this._pdAllocationForm.controls; }
|
||||||
|
|
||||||
|
// pd officer list
|
||||||
|
getPDOfficerList(pdID:string){
|
||||||
|
let user_type
|
||||||
|
if(this.data.lender_role_id == '25') {
|
||||||
|
user_type = "RCM"
|
||||||
|
}
|
||||||
|
else if(this.data.lender_role_id == '27') {
|
||||||
|
user_type = "CM"
|
||||||
|
}
|
||||||
|
this._pd.getCMUsers(this.data.state_id,user_type).subscribe(
|
||||||
|
data => {
|
||||||
|
if (data.status == 200) {
|
||||||
|
this.pdOfficerList= data.records
|
||||||
|
|
||||||
|
}
|
||||||
|
}, error => this.errorMessage = <any> error);
|
||||||
|
|
||||||
|
}
|
||||||
|
/** To update pd officer*/
|
||||||
|
updatePdOfficer(allocateDetails:any) {
|
||||||
|
if(!allocateDetails){
|
||||||
|
this.notifier.notify('warning', 'Please Choose PD Officer.!');
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
let updateData = {
|
||||||
|
"pd_id":this.data.pd_id,
|
||||||
|
// "fk_pd_allocated_to":allocateDetails.fk_user_id,
|
||||||
|
"fk_pd_allocated_to":allocateDetails.userid,
|
||||||
|
}
|
||||||
|
this._pd.updatePdOfficer(updateData).subscribe(
|
||||||
|
result => {
|
||||||
|
if (result.status == 200) {
|
||||||
|
this.notifier.notify('success', 'PD Allocated.!');
|
||||||
|
this.dialogRef.close(true);
|
||||||
|
}
|
||||||
|
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();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/** For Popup Close Button */
|
||||||
|
closeAllocationComponent(): void {
|
||||||
|
this.dialogRef.close();
|
||||||
|
}
|
||||||
|
// pd officer view more
|
||||||
|
// viewMoreDetails(details:any){
|
||||||
|
// if(Number(details.count) > 0) {
|
||||||
|
// const dialogSchedule = this.dialog.open(AllocationViewMoreComponent, {
|
||||||
|
// data: details,
|
||||||
|
// disableClose: true,
|
||||||
|
// position: { right: '0'},
|
||||||
|
// width:'100%',
|
||||||
|
// // hasBackdrop:false
|
||||||
|
// });
|
||||||
|
// // dialogSchedule.afterClosed()
|
||||||
|
// // .subscribe(dataresult => {
|
||||||
|
// // });
|
||||||
|
// }
|
||||||
|
// else {
|
||||||
|
// this.notifier.notify('warning', 'No PD In Hand');
|
||||||
|
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// pd Vendor officer
|
||||||
|
viewVendorOfficer(){
|
||||||
|
this.dialogRef.close('openvendorallocation');
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -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)
|
constructor(notifier: NotifierService , private pd: PdTrigerService,private dialogRef: MatDialogRef<PdStatusChangeDialogueComponent>,@Inject(MAT_DIALOG_DATA) public data: any)
|
||||||
{
|
{
|
||||||
this.notifier = notifier;
|
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' ? 'Allocate to Self' : this.data.pd_status=='BOUNCED' ? 'PD Reject' : '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 and forwarding for Quality Check ?' : this.data.pd_status=='ALLOCATED' ? 'Do you want to allocate the PD to yourself ?' : this.data.pd_status=='BOUNCED' ? 'Do you want to reject this PD' : '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.enableAddonPD = false;
|
||||||
this.CompletenessCheck = this.data.pd_status=='INPROGRESS' ? true : this.data.pd_status=='COMPLETED' ? false : true;
|
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;
|
this.Loading = this.data.pd_status=='INPROGRESS' ? false : this.data.pd_status=='COMPLETED' ? true : false;
|
||||||
@ -74,7 +74,7 @@ export class PdStatusChangeDialogueComponent implements OnInit {
|
|||||||
this.pd.editPdMasterDetails(update_status, status).subscribe(result => {
|
this.pd.editPdMasterDetails(update_status, status).subscribe(result => {
|
||||||
if (result.status == 200) {
|
if (result.status == 200) {
|
||||||
this.dialogRef.close({update_status:true});
|
this.dialogRef.close({update_status:true});
|
||||||
this.notifier.notify('success', this.data.pd_status=='INPROGRESS' ? 'Discussions Started Successfully' : this.data.pd_status=='COMPLETED' ? 'Discussions Completed Successfully' : this.data.pd_status=='BOUNCED' ? 'PD Rejected Successfully' :'Discussions Updated Successfully');
|
this.notifier.notify('success', this.data.pd_status=='INPROGRESS' ? 'Discussions Started Successfully' : this.data.pd_status=='COMPLETED' ? 'Completed Successfully' : this.data.pd_status=='BOUNCED' ? 'PD Rejected Successfully' :'Discussions Updated Successfully');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
this.dialogRef.close({update_status:false});
|
this.dialogRef.close({update_status:false});
|
||||||
|
|||||||
@ -0,0 +1,75 @@
|
|||||||
|
<h2 mat-dialog-title class="paragraph_change">
|
||||||
|
<div fxFlex="70" style="padding: 1% !important;">
|
||||||
|
Add New Address
|
||||||
|
</div>
|
||||||
|
<div fxFlex="30" align="end" style="padding: 10px !important;">
|
||||||
|
<!-- <button *ngIf="data.fk_pd_type == 2" mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Allocate Vendor" matTooltipPosition="above" (click)="viewVendorOfficer()"><mat-icon>verified_user</mat-icon></button> -->
|
||||||
|
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" mat-dialog-close matTooltip="Close" matTooltipPosition="below"><mat-icon>close</mat-icon></button>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
<mat-dialog-content class="mat-typography" style="border-bottom: 2px solid #e2412f8f;">
|
||||||
|
<form [formGroup]="newAddressForm">
|
||||||
|
<div fxLayout="row wrap" fxLayout.xs="column" fxLayoutGap.xs="0" fxLayoutGap="10px">
|
||||||
|
<mat-form-field [appearance]="field_appearance" fxFlex="100%" >
|
||||||
|
<mat-label>Address</mat-label>
|
||||||
|
<textarea matInput formControlName="address" placeholder="Enter the address"></textarea>
|
||||||
|
<mat-error *ngIf="newAddressForm.get('address').hasError('required')">Required</mat-error>
|
||||||
|
</mat-form-field>
|
||||||
|
<mat-form-field [appearance]="field_appearance" fxFlex="30%" fxFlex.xs="100%">
|
||||||
|
<mat-label>State</mat-label>
|
||||||
|
<mat-select formControlName="state" (selectionChange)="getCityList($event.value.state_id)">
|
||||||
|
<mat-option>
|
||||||
|
<ngx-mat-select-search [formControl]="stateSearch"
|
||||||
|
[placeholderLabel]="'Search State...'"
|
||||||
|
[noEntriesFoundLabel]="'no matching records found'"></ngx-mat-select-search>
|
||||||
|
</mat-option>
|
||||||
|
<mat-option *ngFor="let SL of filteredstateList | async" [value]="SL">
|
||||||
|
{{SL.name}}
|
||||||
|
</mat-option>
|
||||||
|
</mat-select>
|
||||||
|
<mat-error *ngIf="newAddressForm.get('state').hasError('required')">Required</mat-error>
|
||||||
|
</mat-form-field>
|
||||||
|
<mat-form-field [appearance]="field_appearance" fxFlex="45%" fxFlex.xs="100%">
|
||||||
|
<mat-label>City</mat-label>
|
||||||
|
<mat-select formControlName="city">
|
||||||
|
|
||||||
|
<mat-option>
|
||||||
|
<ngx-mat-select-search [formControl]="citySearch"
|
||||||
|
[placeholderLabel]="'Search City...'"
|
||||||
|
[noEntriesFoundLabel]="'no matching records found'"></ngx-mat-select-search>
|
||||||
|
</mat-option>
|
||||||
|
<mat-option *ngFor="let CL of filteredcityList | async" [value]="CL">
|
||||||
|
{{CL.city_name}}
|
||||||
|
</mat-option>
|
||||||
|
</mat-select>
|
||||||
|
<mat-error *ngIf="newAddressForm.get('city').hasError('required')">Required</mat-error>
|
||||||
|
</mat-form-field>
|
||||||
|
<mat-form-field [appearance]="field_appearance" fxFlex="20%" fxFlex.xs="100%">
|
||||||
|
<mat-label>Pincode</mat-label>
|
||||||
|
<mat-select formControlName="pincode">
|
||||||
|
<mat-option>
|
||||||
|
<ngx-mat-select-search [formControl]="pinSearch"
|
||||||
|
[placeholderLabel]="'Search Pincode...'"
|
||||||
|
[noEntriesFoundLabel]="'no matching records found'"></ngx-mat-select-search>
|
||||||
|
</mat-option>
|
||||||
|
<mat-option *ngFor="let PL of filteredpincodeList | async" [value]="PL">{{PL.pincode}}</mat-option>
|
||||||
|
</mat-select>
|
||||||
|
<mat-error *ngIf="newAddressForm.get('pincode').hasError('required')">Required</mat-error>
|
||||||
|
</mat-form-field>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</mat-dialog-content>
|
||||||
|
|
||||||
|
<mat-dialog-actions align="end">
|
||||||
|
<div fxFlex="50" align="left">
|
||||||
|
<p *ngIf="errormsg" style="color: red;">{{errormsg}}</p>
|
||||||
|
</div>
|
||||||
|
<div fxFlex="50" align="right">
|
||||||
|
<!-- <button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" (click)="closeAllocationComponent()" matTooltip="Close" matTooltipPosition="below"><mat-icon>close</mat-icon></button> -->
|
||||||
|
<button mat-raised-button mat-icon-button (click)="addNewAddress()" class="mr-1 mb-1 hover-icon" type="button" matTooltip="Submit" matTooltipPosition="below"><mat-icon>save</mat-icon></button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</mat-dialog-actions>
|
||||||
@ -0,0 +1,76 @@
|
|||||||
|
.example-full-width{
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
::ng-deep { .min-padding > mat-dialog-container {
|
||||||
|
// background: black;
|
||||||
|
padding: 3%;
|
||||||
|
// overflow-y: scroll !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.view_more {
|
||||||
|
cursor: pointer;
|
||||||
|
color: #e00201 !important;
|
||||||
|
// text-decoration-line: underline;
|
||||||
|
// text-decoration-style: dotted;
|
||||||
|
// font-weight: bold;
|
||||||
|
|
||||||
|
}
|
||||||
|
.text_change {
|
||||||
|
color: #e00201 !important;
|
||||||
|
}
|
||||||
|
.cdk-global-overlay-wrapper{
|
||||||
|
justify-content: center !important;
|
||||||
|
}
|
||||||
|
.paragraph_change {
|
||||||
|
color: #fff !important;
|
||||||
|
background-color: #e00201 !important;
|
||||||
|
// padding: 10px !important;
|
||||||
|
}
|
||||||
|
.mat-form-field {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.mat-error {
|
||||||
|
color: #e00201;
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@-webkit-keyframes highlight-fade {
|
||||||
|
0% {
|
||||||
|
background: orange;
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
background: white;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@-moz-keyframes highlight-fade {
|
||||||
|
0% {
|
||||||
|
background: orange;
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
background: white;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@-ms-keyframes highlight-fade {
|
||||||
|
0% {
|
||||||
|
background: orange;
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
background: white;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@keyframes highlight-fade {
|
||||||
|
0% {
|
||||||
|
background: orange;
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
background: white;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.field_highlight {
|
||||||
|
-webkit-animation: highlight-fade 4s ease-out;
|
||||||
|
-moz-animation: highlight-fade 4s ease-out;
|
||||||
|
-o-animation: highlight-fade 4s ease-out;
|
||||||
|
animation: highlight-fade 4s ease-out;
|
||||||
|
// background: blue;
|
||||||
|
}
|
||||||
@ -0,0 +1,25 @@
|
|||||||
|
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
|
import { AnswerOptionCreateDialogComponent } from './answer-option-create-dialog.component';
|
||||||
|
|
||||||
|
describe('AnswerOptionCreateDialogComponent', () => {
|
||||||
|
let component: AnswerOptionCreateDialogComponent;
|
||||||
|
let fixture: ComponentFixture<AnswerOptionCreateDialogComponent>;
|
||||||
|
|
||||||
|
beforeEach(async(() => {
|
||||||
|
TestBed.configureTestingModule({
|
||||||
|
declarations: [ AnswerOptionCreateDialogComponent ]
|
||||||
|
})
|
||||||
|
.compileComponents();
|
||||||
|
}));
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
fixture = TestBed.createComponent(AnswerOptionCreateDialogComponent);
|
||||||
|
component = fixture.componentInstance;
|
||||||
|
fixture.detectChanges();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should create', () => {
|
||||||
|
expect(component).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
||||||
@ -0,0 +1,183 @@
|
|||||||
|
import { Component, Inject, OnInit } from '@angular/core';
|
||||||
|
import { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms';
|
||||||
|
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material';
|
||||||
|
import { PdTrigerService } from 'app/personal-discussion/pd-service/pd-triger.service';
|
||||||
|
import { ReplaySubject } from 'rxjs';
|
||||||
|
import { QuesFormService } from '../dynamic-form/ques-form/ques-form.service';
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'app-answer-option-create-dialog',
|
||||||
|
templateUrl: './answer-option-create-dialog.component.html',
|
||||||
|
styleUrls: ['./answer-option-create-dialog.component.scss']
|
||||||
|
})
|
||||||
|
export class AnswerOptionCreateDialogComponent implements OnInit {
|
||||||
|
stateList:any = []
|
||||||
|
cityList:any = []
|
||||||
|
pincodeList:any = []
|
||||||
|
|
||||||
|
filteredstateList:ReplaySubject<any>= new ReplaySubject<any>(1)
|
||||||
|
filteredcityList:ReplaySubject<any> = new ReplaySubject<any>(1)
|
||||||
|
filteredpincodeList:ReplaySubject<any> = new ReplaySubject<any>(1)
|
||||||
|
|
||||||
|
stateSearch:FormControl = new FormControl('')
|
||||||
|
citySearch:FormControl = new FormControl('')
|
||||||
|
pinSearch:FormControl = new FormControl('')
|
||||||
|
newAddressForm:FormGroup;
|
||||||
|
|
||||||
|
field_appearance="outline"
|
||||||
|
errormsg: string = null;
|
||||||
|
|
||||||
|
constructor(@Inject(MAT_DIALOG_DATA) public data:any, private _pdService:PdTrigerService, private _fb:FormBuilder,
|
||||||
|
private dialogRef:MatDialogRef<AnswerOptionCreateDialogComponent>, private quesService:QuesFormService) {
|
||||||
|
this.newAddressForm = this._fb.group({
|
||||||
|
address:['',Validators.required],
|
||||||
|
state:['',Validators.required],
|
||||||
|
city:['',Validators.required],
|
||||||
|
pincode:['',Validators.required]
|
||||||
|
})
|
||||||
|
console.log(this.data)
|
||||||
|
}
|
||||||
|
|
||||||
|
ngOnInit() {
|
||||||
|
this._pdService.getAllMasterDatas('STATE').subscribe(
|
||||||
|
data => {
|
||||||
|
if (data.status == 200) {
|
||||||
|
this.stateList = data.records.filter(item => item.isactive == 1);
|
||||||
|
this.filteredstateList.next(this.stateList);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.filterList()
|
||||||
|
}
|
||||||
|
filterList() {
|
||||||
|
this.stateSearch.valueChanges.pipe().subscribe(()=>{
|
||||||
|
this.applyFilter(this.stateSearch.value,this.filteredstateList,this.stateList,'name')
|
||||||
|
})
|
||||||
|
this.citySearch.valueChanges.pipe().subscribe(()=>{
|
||||||
|
this.applyFilter(this.citySearch.value,this.filteredcityList,this.cityList,'city_name')
|
||||||
|
})
|
||||||
|
this.pinSearch.valueChanges.pipe().subscribe(()=>{
|
||||||
|
this.applyFilter(this.pinSearch.value,this.filteredpincodeList,this.pincodeList,'pincode')
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
applyFilter(filtered_text,filter_list,raw_list,obj_name) {
|
||||||
|
if (!raw_list) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// get the search keyword
|
||||||
|
let search = filtered_text;
|
||||||
|
if (!search) {
|
||||||
|
filter_list.next(raw_list.slice());
|
||||||
|
return;
|
||||||
|
} else {
|
||||||
|
search = search.toLowerCase();
|
||||||
|
}
|
||||||
|
// filter the banks
|
||||||
|
filter_list.next(
|
||||||
|
raw_list.filter(bank => bank[obj_name].toLowerCase().indexOf(search) > -1)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
//get city list details based on state id
|
||||||
|
getCityList(stateID: string) {
|
||||||
|
this._pdService.getStateWiseCities(stateID).subscribe(data => {
|
||||||
|
if (data.status == 200) {
|
||||||
|
this.cityList = data.records.cities;
|
||||||
|
this.pincodeList = data.records.pincode;
|
||||||
|
this.filteredcityList.next(this.cityList)
|
||||||
|
this.filteredpincodeList.next(this.pincodeList)
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
addNewAddress() {
|
||||||
|
console.log(this.newAddressForm.getRawValue())
|
||||||
|
if(this.newAddressForm.invalid) {
|
||||||
|
this.showMsg("Please Fill all the fields")
|
||||||
|
// this.findInvalidControls()
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
let formValue=this.newAddressForm.getRawValue()
|
||||||
|
let params = {pd_id:this.data.pd_all_details.pdmaster_details.pd_id,file_id:null, addressline:formValue.address, state:formValue.state.state_id, city:formValue.city.city_id, pincode:formValue.pincode.pincode_id}
|
||||||
|
let display_address= formValue.address+ ', '+formValue.state.name+', '+formValue.city.city_name+', '+formValue.pincode.pincode
|
||||||
|
console.log(this.newAddressForm.getRawValue(),display_address)
|
||||||
|
this._pdService.saveNewSMCTempAddresses(params).subscribe(res=>{
|
||||||
|
if(res['dataStatus']) {
|
||||||
|
this._pdService.getSMCTempAddresses(this.data.pd_all_details.pdmaster_details.pd_id).subscribe(rr=>{
|
||||||
|
if(rr && rr['dataStatus'] && rr['records']) {
|
||||||
|
let address_data = this.quesService.convertArrayNames(["display","display"],rr['records'])
|
||||||
|
this.dialogRef.close({update:true, address_for_display:address_data})
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this.dialogRef.close({update:false, error_msg:"Unable to get the address"})
|
||||||
|
}
|
||||||
|
},err=> {
|
||||||
|
this.dialogRef.close({update:false, error_msg:"Network error. Unable to get the address"})
|
||||||
|
})
|
||||||
|
// this.dialogRef.close({update:true, address_for_display:display_address})
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this.showMsg("Something went wrong")
|
||||||
|
}
|
||||||
|
},err=>{
|
||||||
|
this.showMsg("Network Error")
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
showMsg(msg) {
|
||||||
|
this.errormsg = msg
|
||||||
|
setTimeout(()=>{
|
||||||
|
this.errormsg = null
|
||||||
|
}, 3000)
|
||||||
|
}
|
||||||
|
public findInvalidControls() {
|
||||||
|
const invalid = [];
|
||||||
|
|
||||||
|
for (const name in <any>(this.newAddressForm.controls)) {
|
||||||
|
console.log(this.newAddressForm.controls[name],name)
|
||||||
|
if (this.newAddressForm.controls[name].invalid) {
|
||||||
|
invalid.push(name);
|
||||||
|
let invalidFields = [].slice.call(document.getElementsByClassName('ng-invalid'));
|
||||||
|
let firstInvalidField;
|
||||||
|
for(let val in invalidFields){
|
||||||
|
if( invalidFields[val].nodeName == 'MAT-FORM-FIELD' || invalidFields[val].nodeName == 'MAT-SELECT' || invalidFields[val].nodeName == 'TEXTAREA' || invalidFields[val].nodeName == 'MAT-RADIO-GROUP' ){ //INPUT FOR INPUT FIELD
|
||||||
|
firstInvalidField=invalidFields[val]
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(firstInvalidField != undefined){
|
||||||
|
// firstInvalidField.scrollIntoView({behavior: "smooth", block: "end", inline: "nearest"})
|
||||||
|
|
||||||
|
setTimeout(()=>{
|
||||||
|
firstInvalidField.scrollIntoView({block: "start", inline: "nearest"})
|
||||||
|
setTimeout(()=>{
|
||||||
|
firstInvalidField.focus()
|
||||||
|
},0)
|
||||||
|
// firstInvalidField.style.background = 'red'
|
||||||
|
firstInvalidField.classList.remove('field_highlight')
|
||||||
|
setTimeout(()=>{
|
||||||
|
firstInvalidField.classList.add('field_highlight')
|
||||||
|
},300)
|
||||||
|
},300)
|
||||||
|
|
||||||
|
}
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// let business_group_ctrl = formArray.at(2).get('business_group') as FormArray
|
||||||
|
// const controls = this.getQuestionControl().at(1)['controls']
|
||||||
|
// for (const name in controls) {
|
||||||
|
// if (controls[name].invalid) {
|
||||||
|
// invalid.push(name);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
return invalid;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -42,8 +42,81 @@
|
|||||||
[ngStyle.xs]="{'margin-bottom' : (singleQues.field_type == 'numtoword' || singleQues.field_type == 'str&numtoword') ? '5%' : '0' }">
|
[ngStyle.xs]="{'margin-bottom' : (singleQues.field_type == 'numtoword' || singleQues.field_type == 'str&numtoword') ? '5%' : '0' }">
|
||||||
<!-- {{s_i}} -->
|
<!-- {{s_i}} -->
|
||||||
<!-- {{json_answers[parent_ques.group_key][s_i] | json}} -->
|
<!-- {{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"
|
<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>
|
[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>
|
</div>
|
||||||
<br/>
|
<br/>
|
||||||
<div fxLayout="row" fxLayoutAlign="flex-end" fxFlex="100" style="margin-top: 3%;">
|
<div fxLayout="row" fxLayoutAlign="flex-end" fxFlex="100" style="margin-top: 3%;">
|
||||||
|
|||||||
@ -16,6 +16,7 @@ export class DynamicFormComponent implements OnInit {
|
|||||||
@Input() questions_JSON:any;
|
@Input() questions_JSON:any;
|
||||||
@Input() json_answers:any;
|
@Input() json_answers:any;
|
||||||
step: number=0;
|
step: number=0;
|
||||||
|
step_child:number = 0
|
||||||
@ViewChild('mapanel') matExpansionPanel:MatExpansionPanel
|
@ViewChild('mapanel') matExpansionPanel:MatExpansionPanel
|
||||||
@ViewChild('accordion') Accordion: MatAccordion
|
@ViewChild('accordion') Accordion: MatAccordion
|
||||||
constructor(private _fb:FormBuilder,private questionService:QuesFormService) { }
|
constructor(private _fb:FormBuilder,private questionService:QuesFormService) { }
|
||||||
@ -38,9 +39,11 @@ export class DynamicFormComponent implements OnInit {
|
|||||||
if(parent_ques.is_repeatable == '1'){
|
if(parent_ques.is_repeatable == '1'){
|
||||||
if(this.json_answers[parent_ques.group_key] && this.json_answers[parent_ques.group_key].length > this.form_group_name.value[parent_ques.group_key].length) {
|
if(this.json_answers[parent_ques.group_key] && this.json_answers[parent_ques.group_key].length > this.form_group_name.value[parent_ques.group_key].length) {
|
||||||
console.log(this.json_answers[parent_ques.group_key]);
|
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)=>{
|
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){
|
if(g_i != 0){
|
||||||
// let parent_control=this.form_group_name
|
// let parent_control=this.form_group_name
|
||||||
@ -49,6 +52,28 @@ export class DynamicFormComponent implements OnInit {
|
|||||||
this.addData(g_i,parent_ques)
|
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,13 +118,61 @@ export class DynamicFormComponent implements OnInit {
|
|||||||
let control_names:any= {}
|
let control_names:any= {}
|
||||||
let control = this.form_group_name.get(json_obj.group_key) as FormArray
|
let control = this.form_group_name.get(json_obj.group_key) as FormArray
|
||||||
json_obj.question.map(val=>{
|
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] = ''
|
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);
|
json_obj.group_questions.push(json_obj.question);
|
||||||
control.push(this._fb.group(control_names))
|
control.push(this._fb.group(control_names))
|
||||||
|
|
||||||
|
json_obj.question.forEach((group_indi,arr_index)=>{
|
||||||
|
|
||||||
|
|
||||||
|
if(group_indi.is_repeatable == '2' && group_indi.hasOwnProperty('questions_level_two') && group_indi.questions_level_two.length > 0) {
|
||||||
|
group_indi.questions_level_two[0].forEach((child_val,child_index)=> {
|
||||||
|
// console.log("sd",group_indi,arr_index,control.at(control.length-1),control)
|
||||||
|
// debugger;
|
||||||
|
let child_control = control.at(control.length-1).get(group_indi.group_key) as FormArray
|
||||||
|
|
||||||
|
this.questionService.addAdditionalControl(child_val, child_control.controls[child_control.length-1], child_index)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
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();
|
||||||
|
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)=>{
|
json_obj.question.forEach((group_indi,arr_index)=>{
|
||||||
// console.log("sd",childControl)
|
// console.log("sd",childControl)
|
||||||
this.questionService.addAdditionalControl(group_indi, control.controls[control.length-1], arr_index)
|
this.questionService.addAdditionalControl(group_indi, control.controls[control.length-1], arr_index)
|
||||||
@ -107,9 +180,20 @@ export class DynamicFormComponent implements OnInit {
|
|||||||
json_obj.question = JSON.parse(JSON.stringify(json_obj.question))
|
json_obj.question = JSON.parse(JSON.stringify(json_obj.question))
|
||||||
control.updateValueAndValidity();
|
control.updateValueAndValidity();
|
||||||
control.controls[control.length-1].updateValueAndValidity();
|
control.controls[control.length-1].updateValueAndValidity();
|
||||||
this.form_group_name.updateValueAndValidity();
|
parent_group.updateValueAndValidity();
|
||||||
this.step = control.length-1
|
this.step_child = control.length-1
|
||||||
console.log(this.form_group_name.value);
|
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) {
|
removeData(index,json_obj) {
|
||||||
|
|||||||
@ -20,6 +20,7 @@
|
|||||||
align="end" style="font-size: 12px;">{{"₹"}} {{formGroupN.value[parent_ques.question_key] | numberToWords}}
|
align="end" style="font-size: 12px;">{{"₹"}} {{formGroupN.value[parent_ques.question_key] | numberToWords}}
|
||||||
</mat-hint>
|
</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> -->
|
<!-- <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">
|
<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())">
|
<mat-error align="end" *ngIf="formGroupN.get(parent_ques.question_key).hasError(validation.name.toLowerCase())">
|
||||||
{{validation.message}}</mat-error>
|
{{validation.message}}</mat-error>
|
||||||
@ -69,7 +70,8 @@
|
|||||||
<mat-select [formControlName]="parent_ques.question_key" (selectionChange)="onChangeProperty($event,parent_ques,'','','')">
|
<mat-select [formControlName]="parent_ques.question_key" (selectionChange)="onChangeProperty($event,parent_ques,'','','')">
|
||||||
<mat-option>Select</mat-option>
|
<mat-option>Select</mat-option>
|
||||||
<mat-option *ngFor="let val of parent_ques.answers"
|
<mat-option *ngFor="let val of parent_ques.answers"
|
||||||
[value]="val.hasOwnProperty('answer_id') ? val.answer_id : val.answer">{{val.answer}}</mat-option>
|
[value]="val.hasOwnProperty('answer_id') ? val.answer_id : val.answer"
|
||||||
|
(click)="newAnswerCreateDialog(val,parent_ques)" class="large-select-option"><mat-icon *ngIf="val.is_others == '-1'">add_circle_outline</mat-icon> <span>{{val.answer}}</span></mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
<ng-container *ngFor="let validation of parent_ques.validations" ngProjectAs="mat-error">
|
<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())">
|
<mat-error align="end" *ngIf="formGroupN.get(parent_ques.question_key).hasError(validation.name.toLowerCase())">
|
||||||
@ -175,7 +177,8 @@
|
|||||||
|
|
||||||
<mat-option
|
<mat-option
|
||||||
*ngFor="let val of ngxFilteredValue | async"
|
*ngFor="let val of ngxFilteredValue | async"
|
||||||
[value]="val.hasOwnProperty('answer_id') ? val.answer_id : val.answer">{{val.answer}}</mat-option>
|
[value]="val.hasOwnProperty('answer_id') ? val.answer_id : val.answer"
|
||||||
|
(click)="newAnswerCreateDialog(val,parent_ques)" class="large-select-option"><mat-icon *ngIf="val.is_others == '-1'">add_circle_outline</mat-icon> <span>{{val.answer}}</span></mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
<ng-container *ngFor="let validation of parent_ques.validations" ngProjectAs="mat-error">
|
<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())">
|
<mat-error align="end" *ngIf="formGroupN.get(parent_ques.question_key).hasError(validation.name.toLowerCase())">
|
||||||
|
|||||||
@ -79,3 +79,12 @@ mat-form-field {
|
|||||||
::ng-deep .mat-form-field-label{
|
::ng-deep .mat-form-field-label{
|
||||||
white-space: pre-wrap;
|
white-space: pre-wrap;
|
||||||
}
|
}
|
||||||
|
.large-select-option {
|
||||||
|
height: unset !important;
|
||||||
|
line-height: 1.2em !important;
|
||||||
|
padding-top: 0.9em !important;
|
||||||
|
padding-bottom: 0.9em !important;
|
||||||
|
span {
|
||||||
|
white-space: normal;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -3,6 +3,8 @@ import { FormGroup, FormArray, FormControl, FormBuilder } from '@angular/forms';
|
|||||||
import { QuesFormService } from '../ques-form/ques-form.service';
|
import { QuesFormService } from '../ques-form/ques-form.service';
|
||||||
import { startWith, map } from 'rxjs/operators';
|
import { startWith, map } from 'rxjs/operators';
|
||||||
import { Observable, ReplaySubject } from 'rxjs';
|
import { Observable, ReplaySubject } from 'rxjs';
|
||||||
|
import { MatDialog } from '@angular/material';
|
||||||
|
import { AnswerOptionCreateDialogComponent } from '../../answer-option-create-dialog/answer-option-create-dialog.component';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-dynamic-question-template',
|
selector: 'app-dynamic-question-template',
|
||||||
@ -25,7 +27,7 @@ export class DynamicQuestionTemplateComponent implements OnInit {
|
|||||||
autoCompleteAns:Observable<string[]>
|
autoCompleteAns:Observable<string[]>
|
||||||
public commonFilterCtrl:FormControl = new FormControl();
|
public commonFilterCtrl:FormControl = new FormControl();
|
||||||
public ngxFilteredValue:ReplaySubject<any> = new ReplaySubject<any>(1);
|
public ngxFilteredValue:ReplaySubject<any> = new ReplaySubject<any>(1);
|
||||||
constructor(private quesService:QuesFormService,private _fb:FormBuilder) { }
|
constructor(private quesService:QuesFormService,private _fb:FormBuilder, private matDialog:MatDialog) { }
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.parent_ques = this.currFormArrayObj
|
this.parent_ques = this.currFormArrayObj
|
||||||
@ -60,16 +62,25 @@ export class DynamicQuestionTemplateComponent implements OnInit {
|
|||||||
this.generateGroupControls.emit()
|
this.generateGroupControls.emit()
|
||||||
}
|
}
|
||||||
this.json_answers.forEach((value,index)=>{
|
this.json_answers.forEach((value,index)=>{
|
||||||
|
|
||||||
|
|
||||||
let keys= Object.keys(value)
|
let keys= Object.keys(value)
|
||||||
keys.forEach(vv=>{
|
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))
|
// 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]
|
let curr_obj=this.whole_json.filter(vl=>vl.question_key == vv)[0]
|
||||||
this.onChangeProperty({value:value[vv]},curr_obj,'')
|
this.onChangeProperty({value:value[vv]},curr_obj,'')
|
||||||
}
|
}
|
||||||
console.log("Repeatable ques",value,this.parent_ques.question_key)
|
console.log("Repeatable ques",value,this.parent_ques.question_key)
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
})
|
})
|
||||||
// debugger;
|
// debugger;
|
||||||
|
|
||||||
@ -399,8 +410,8 @@ export class DynamicQuestionTemplateComponent implements OnInit {
|
|||||||
// })
|
// })
|
||||||
console.log(expression_value)
|
console.log(expression_value)
|
||||||
let calc_exp=eval(expression_value)
|
let calc_exp=eval(expression_value)
|
||||||
console.log(calc_exp)
|
console.log(calc_exp, (typeof(calc_exp) == 'string' || typeof(calc_exp) == 'number' ))
|
||||||
if(calc_exp){
|
if( (typeof(calc_exp) == 'string' || typeof(calc_exp) == 'number' ) ){
|
||||||
// if(typeof(calc_exp) == 'number'){
|
// if(typeof(calc_exp) == 'number'){
|
||||||
// calc_exp = calc_exp.toFixed(2)
|
// calc_exp = calc_exp.toFixed(2)
|
||||||
// }
|
// }
|
||||||
@ -490,7 +501,7 @@ export class DynamicQuestionTemplateComponent implements OnInit {
|
|||||||
let inserted_control_obj=form_control_obj
|
let inserted_control_obj=form_control_obj
|
||||||
// inserted_control_obj.questions.sort()
|
// inserted_control_obj.questions.sort()
|
||||||
// inserted_control_obj.questions.reverse()
|
// inserted_control_obj.questions.reverse()
|
||||||
console.log("check ddddddddddd",inserted_control_obj.questions.reverse(),inserted_control_obj.questions)
|
console.log("check ddddddddddd",inserted_control_obj.questions)
|
||||||
inserted_control_obj.questions.forEach((val,index)=>{
|
inserted_control_obj.questions.forEach((val,index)=>{
|
||||||
if(val.hasOwnProperty('is_repeatable') && val.is_repeatable == '1') {
|
if(val.hasOwnProperty('is_repeatable') && val.is_repeatable == '1') {
|
||||||
if(options == 1) {
|
if(options == 1) {
|
||||||
@ -506,7 +517,7 @@ export class DynamicQuestionTemplateComponent implements OnInit {
|
|||||||
this.whole_json.splice(question_index_after+1,0,val);
|
this.whole_json.splice(question_index_after+1,0,val);
|
||||||
val.question.forEach(group_val=>{
|
val.question.forEach(group_val=>{
|
||||||
control_names[group_val.question_key] = ''
|
control_names[group_val.question_key] = ''
|
||||||
console.log("check ffffff",inserted_control_obj.questions.reverse(),inserted_control_obj.questions,group_val)
|
// console.log("check ffffff",inserted_control_obj.questions.reverse(),inserted_control_obj.questions,group_val)
|
||||||
this.addOrRemoveControl(group_val,ques_control,question_index_after,options,val)
|
this.addOrRemoveControl(group_val,ques_control,question_index_after,options,val)
|
||||||
})
|
})
|
||||||
const question_temp:any = JSON.parse(JSON.stringify(val.question));
|
const question_temp:any = JSON.parse(JSON.stringify(val.question));
|
||||||
@ -522,7 +533,7 @@ export class DynamicQuestionTemplateComponent implements OnInit {
|
|||||||
// let childControl: any = this.formGroupN.get(val.group_key) as FormArray
|
// let childControl: any = this.formGroupN.get(val.group_key) as FormArray
|
||||||
val.question.forEach(group_val=>{
|
val.question.forEach(group_val=>{
|
||||||
// control_names[group_val.question_key] = ''
|
// control_names[group_val.question_key] = ''
|
||||||
console.log("check ffffff",inserted_control_obj.questions.reverse(),inserted_control_obj.questions,group_val)
|
// console.log("check ffffff",inserted_control_obj.questions.reverse(),inserted_control_obj.questions,group_val)
|
||||||
this.addOrRemoveControl(group_val,ques_control,question_index_after,options,val)
|
this.addOrRemoveControl(group_val,ques_control,question_index_after,options,val)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -678,6 +689,9 @@ export class DynamicQuestionTemplateComponent implements OnInit {
|
|||||||
ques_control=this.whole_json[this.json_index]
|
ques_control=this.whole_json[this.json_index]
|
||||||
console.log(ques_control,this.whole_json,this.json_index)
|
console.log(ques_control,this.whole_json,this.json_index)
|
||||||
let other_control = ques_control
|
let other_control = ques_control
|
||||||
|
if(ques_control.hasOwnProperty('is_repeatable') && ques_control.is_repeatable == '2') {
|
||||||
|
return;
|
||||||
|
}
|
||||||
// =ques_control.filter(val=>{
|
// =ques_control.filter(val=>{
|
||||||
// if(val.question_key == validation_obj.validation_to){
|
// if(val.question_key == validation_obj.validation_to){
|
||||||
// return val
|
// return val
|
||||||
@ -703,6 +717,32 @@ export class DynamicQuestionTemplateComponent implements OnInit {
|
|||||||
this.quesService.settingArrayofValidators({validations:new_validations_obj,question_key:validation_obj.validation_to},this.formGroupN,'')
|
this.quesService.settingArrayofValidators({validations:new_validations_obj,question_key:validation_obj.validation_to},this.formGroupN,'')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
newAnswerCreateDialog(choosed_answer_obj,curr_ques_obj) {
|
||||||
|
console.log(curr_ques_obj,choosed_answer_obj)
|
||||||
|
if(choosed_answer_obj.is_others == '-1') {
|
||||||
|
this.formGroupN.get(curr_ques_obj.question_key).setValue('')
|
||||||
|
let dialog = this.matDialog.open(AnswerOptionCreateDialogComponent,{
|
||||||
|
data:{pd_all_details:this.quesService.pd_all_details},
|
||||||
|
disableClose: true,
|
||||||
|
width: '80vw',
|
||||||
|
maxHeight: '100vh',
|
||||||
|
panelClass:'min-padding'
|
||||||
|
})
|
||||||
|
dialog.afterClosed().subscribe(rr=>{
|
||||||
|
if(rr.update && rr.address_for_display && rr.address_for_display.length > 0) {
|
||||||
|
console.log(curr_ques_obj.answers,curr_ques_obj.answers.length -2,rr.address_for_display)
|
||||||
|
// curr_ques_obj.answers.splice(curr_ques_obj.answers.length -1,0,{answer:rr.address_for_display,answer_id:rr.address_for_display})
|
||||||
|
curr_ques_obj.answers = rr.address_for_display
|
||||||
|
console.log(curr_ques_obj.answers,curr_ques_obj.answers[curr_ques_obj.answers.length-2].answer_id)
|
||||||
|
let lastAddress = curr_ques_obj.answers[curr_ques_obj.answers.length-1].answer_id && curr_ques_obj.answers[curr_ques_obj.answers.length-1].answer_id != null && curr_ques_obj.answers[curr_ques_obj.answers.length-1].is_others != -1 ? curr_ques_obj.answers[curr_ques_obj.answers.length-1].answer_id : curr_ques_obj.answers[curr_ques_obj.answers.length-2].answer_id
|
||||||
|
this.formGroupN.get(curr_ques_obj.question_key).patchValue(lastAddress)
|
||||||
|
}
|
||||||
|
else if(rr.hasOwnProperty('update') && rr.update == false){
|
||||||
|
alert(rr.error_msg ? rr.error_msg : "Something went wrong while getting address")
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
updateValidationMsg(ques_control,validation_obj){
|
updateValidationMsg(ques_control,validation_obj){
|
||||||
console.log("updae msg",ques_control,validation_obj);
|
console.log("updae msg",ques_control,validation_obj);
|
||||||
if(!ques_control) {
|
if(!ques_control) {
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { FormGroup, FormArray, FormBuilder, FormControl, Validators } from '@angular/forms';
|
import { FormGroup, FormArray, FormBuilder, FormControl, Validators } from '@angular/forms';
|
||||||
import { HttpClient } from '@angular/common/http';
|
import { HttpClient, HttpParams } from '@angular/common/http';
|
||||||
import { environment } from 'environments/environment';
|
import { environment } from 'environments/environment';
|
||||||
import { DatePipe } from '@angular/common';
|
import { DatePipe } from '@angular/common';
|
||||||
|
|
||||||
@ -42,32 +42,15 @@ export class QuesFormService {
|
|||||||
ques_data[index].group_questions = []
|
ques_data[index].group_questions = []
|
||||||
ques_data[index].group_questions.push(val.question)
|
ques_data[index].group_questions.push(val.question)
|
||||||
val.group_questions[0].forEach((group_indi, arr_index) => {
|
val.group_questions[0].forEach((group_indi, arr_index) => {
|
||||||
// if(group_indi.api_properties != null && typeof(group_indi.api_properties) == 'object'){
|
// CREATING A FORMARRAY AND CONTROL FOR CHILD REPEATABLE
|
||||||
console.log("api pro", val.api_properties)
|
if(group_indi.is_repeatable == '2') {
|
||||||
// let param
|
this.addLevelTwoControls(group_indi,childControl,val.group_questions[0],val.question,arr_index)
|
||||||
// val.api_properties.forEach(val=>param=val)
|
}
|
||||||
// console.log(param)
|
else {
|
||||||
group_indi.raw_validations = group_indi.validations
|
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] = ''
|
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 != null) {
|
||||||
if(group_indi.api_properties.hasOwnProperty('purpose') && group_indi.api_properties.purpose == 'answer_options_local') {
|
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));
|
const question_temp:any = JSON.parse(JSON.stringify(val.question));
|
||||||
ques_data[index].question = question_temp
|
ques_data[index].question = question_temp
|
||||||
|
}
|
||||||
// else{
|
// else{
|
||||||
// setTimeout(()=>{
|
// setTimeout(()=>{
|
||||||
// sub_childControl.push(this.createValue(group_indi))
|
// sub_childControl.push(this.createValue(group_indi))
|
||||||
@ -98,15 +82,34 @@ export class QuesFormService {
|
|||||||
// }
|
// }
|
||||||
// sub_childControl.push(this.createValue(group_indi))
|
// sub_childControl.push(this.createValue(group_indi))
|
||||||
})
|
})
|
||||||
console.log(control_names);
|
console.log(control_names, childControl.at(0));
|
||||||
|
// debugger
|
||||||
// val.questions[0]=val.question;
|
// val.questions[0]=val.question;
|
||||||
|
if(childControl.value.length == 0) {
|
||||||
|
|
||||||
childControl.push(this._fb.group(control_names))
|
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);
|
console.log(formgroup.value);
|
||||||
// debugger;
|
// debugger;
|
||||||
val.group_questions[0].forEach((group_indi,arr_index)=>{
|
val.group_questions[0].forEach((group_indi,arr_index)=>{
|
||||||
console.log("sd",childControl,group_indi)
|
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[0].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)
|
this.addAdditionalControl(group_indi, childControl.controls[0], arr_index)
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
// }
|
// }
|
||||||
@ -175,7 +178,8 @@ export class QuesFormService {
|
|||||||
// else{
|
// else{
|
||||||
// control.push(this.createValue(val))
|
// control.push(this.createValue(val))
|
||||||
// }
|
// }
|
||||||
console.log(formgroup)
|
console.log(formgroup,ques_data)
|
||||||
|
// debugger;
|
||||||
|
|
||||||
}
|
}
|
||||||
}, err => console.log(err))
|
}, err => console.log(err))
|
||||||
@ -183,6 +187,60 @@ export class QuesFormService {
|
|||||||
}
|
}
|
||||||
// END OF FORM CREATION
|
// 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
|
// FOR CREATING THE FORM CONTROL FOR SPECIFIC FORM ARRAY
|
||||||
createValue(data){
|
createValue(data){
|
||||||
@ -227,6 +285,7 @@ export class QuesFormService {
|
|||||||
if(res['dataStatus']){
|
if(res['dataStatus']){
|
||||||
if(res.hasOwnProperty('records')){
|
if(res.hasOwnProperty('records')){
|
||||||
res=res['records']
|
res=res['records']
|
||||||
|
// res.push({display:"Add New", id:"00",is_others:"-1"})
|
||||||
}
|
}
|
||||||
if(val.api_properties.hasOwnProperty('filter_properties') && val.api_properties.filter_properties && res.length > 0) {
|
if(val.api_properties.hasOwnProperty('filter_properties') && val.api_properties.filter_properties && res.length > 0) {
|
||||||
let filter_properties = val.api_properties.filter_properties
|
let filter_properties = val.api_properties.filter_properties
|
||||||
@ -251,7 +310,19 @@ export class QuesFormService {
|
|||||||
return this.http.post(apiUrl+api_name,params)
|
return this.http.post(apiUrl+api_name,params)
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
return this.http.get(apiUrl+api_name)
|
let httpParams = new HttpParams()
|
||||||
|
if(params) {
|
||||||
|
let keysList = Object.keys(params)
|
||||||
|
if(keysList.length > 0) {
|
||||||
|
keysList.forEach(val=>{
|
||||||
|
if(params[val] == 'VAR_PD_ID') {
|
||||||
|
params[val] = this.pd_all_details.pdmaster_details.pd_id
|
||||||
|
}
|
||||||
|
httpParams = httpParams.set(val,params[val])
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return this.http.get(apiUrl+api_name,{params:httpParams})
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -265,7 +336,7 @@ export class QuesFormService {
|
|||||||
return {
|
return {
|
||||||
"answer_id" : obj[fieldName[0]],
|
"answer_id" : obj[fieldName[0]],
|
||||||
"answer":obj[fieldName[1]],
|
"answer":obj[fieldName[1]],
|
||||||
|
"is_others":obj.is_others ? obj.is_others : '0'
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return modified_json
|
return modified_json
|
||||||
|
|||||||
@ -42,6 +42,7 @@ export class FormComponent implements OnInit {
|
|||||||
private pdTriggerService:PdTrigerService,
|
private pdTriggerService:PdTrigerService,
|
||||||
private awsService:AwsService,private loaderService:LoaderService) {
|
private awsService:AwsService,private loaderService:LoaderService) {
|
||||||
// console.log(this.pd_all_details)
|
// console.log(this.pd_all_details)
|
||||||
|
// debugger;
|
||||||
this.form_id = 24;
|
this.form_id = 24;
|
||||||
this.pd_all_details.pdmaster_details=this.pd_all_details.pdmaster_details[0]
|
this.pd_all_details.pdmaster_details=this.pd_all_details.pdmaster_details[0]
|
||||||
this.parent_pdid = this.pd_all_details.pdmaster_details.parent_pd_id;
|
this.parent_pdid = this.pd_all_details.pdmaster_details.parent_pd_id;
|
||||||
@ -135,10 +136,17 @@ export class FormComponent implements OnInit {
|
|||||||
// this.commonFormGroup.patchValue(formValues)
|
// this.commonFormGroup.patchValue(formValues)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(this.pd_all_details.pdmaster_details.re_uploaded == '1' && this.pd_all_details.is_reupload_data_fetched != '1') {
|
||||||
|
console.log("Reuploaded excel")
|
||||||
|
// let data = {"permanant_employees_person_met":"1","temporary_employees_person_met":"2","permanant_employees_cm":"3","temporary_employees_cm":"45","permanant_employees_salary":"55","temporary_employees_salary":"55","common_remarks":"dummy datas"}
|
||||||
|
// setTimeout(()=>{
|
||||||
|
// this.commonFormGroup.patchValue(data)
|
||||||
|
// },1000)
|
||||||
|
this.getExcelData(1)
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
getExcelData() {
|
getExcelData(re_uploaded?) {
|
||||||
let params = {"pd_id":this.pd_all_details.pdmaster_details.pd_id,"random_string":this.pd_all_details.pdmaster_details.random_string,"form_id":this.pd_all_details.form_id}
|
let params = {"pd_id":this.pd_all_details.pdmaster_details.pd_id,"random_string":this.pd_all_details.pdmaster_details.random_string,"form_id":this.pd_all_details.form_id}
|
||||||
this.pdTriggerService.loadDataFromExcel(params).subscribe(result=>{
|
this.pdTriggerService.loadDataFromExcel(params).subscribe(result=>{
|
||||||
if(result['dataStatus']) {
|
if(result['dataStatus']) {
|
||||||
@ -153,10 +161,15 @@ export class FormComponent implements OnInit {
|
|||||||
// })
|
// })
|
||||||
console.log(formValues)
|
console.log(formValues)
|
||||||
// debugger;
|
// debugger;
|
||||||
|
if(re_uploaded && re_uploaded == '1') {
|
||||||
|
this.commonFormGroup.patchValue(formValues)
|
||||||
|
}
|
||||||
|
else {
|
||||||
this.form_answers= formValues
|
this.form_answers= formValues
|
||||||
setTimeout(()=>{
|
setTimeout(()=>{
|
||||||
this.form_answers = null
|
this.form_answers = null
|
||||||
},2500)
|
},2500)
|
||||||
|
}
|
||||||
// this.commonFormGroup.patchValue(formValues)
|
// this.commonFormGroup.patchValue(formValues)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -278,7 +291,10 @@ export class FormComponent implements OnInit {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.loaderService.showMatSpinnerDialog('')
|
this.loaderService.showMatSpinnerDialog('')
|
||||||
let params = {"fk_pd_id":this.pd_all_details.pdmaster_details.pd_id,"fk_form_id":this.pd_all_details.form_id,"json":this.commonFormGroup.getRawValue(),createdby:''}
|
let params :any = {"fk_pd_id":this.pd_all_details.pdmaster_details.pd_id,"fk_form_id":this.pd_all_details.form_id,"json":this.commonFormGroup.getRawValue(),createdby:''}
|
||||||
|
if(this.pd_all_details.pdmaster_details.re_uploaded == '1') {
|
||||||
|
params.is_reupload_data_fetched = '1'
|
||||||
|
}
|
||||||
this.pdTriggerService.saveSMCCreditPDsection(params).subscribe(result=>{
|
this.pdTriggerService.saveSMCCreditPDsection(params).subscribe(result=>{
|
||||||
if(result['dataStatus']) {
|
if(result['dataStatus']) {
|
||||||
this.notifier.notify("success","Saved successfully..")
|
this.notifier.notify("success","Saved successfully..")
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
import { Component, OnInit, Output, EventEmitter, Input, ElementRef, ViewChild } 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 { CameraService } from 'app/personal-discussion/pd-service/camera.service';
|
||||||
|
import { LoaderService } from 'app/shared/loaderService/loader.service';
|
||||||
import { Ng2ImgMaxService } from 'ng2-img-max';
|
import { Ng2ImgMaxService } from 'ng2-img-max';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@ -11,7 +12,7 @@ export class CaptureBtnComponent implements OnInit {
|
|||||||
@ViewChild('input_file') fileBtn :ElementRef
|
@ViewChild('input_file') fileBtn :ElementRef
|
||||||
@Input() addMoreBtn;
|
@Input() addMoreBtn;
|
||||||
@Output() imageDataEmitter = new EventEmitter
|
@Output() imageDataEmitter = new EventEmitter
|
||||||
constructor(private ng2ImgMax:Ng2ImgMaxService,private cameraService:CameraService) { }
|
constructor(private ng2ImgMax:Ng2ImgMaxService,private loaderService:LoaderService) { }
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
console.log(this.addMoreBtn)
|
console.log(this.addMoreBtn)
|
||||||
@ -20,12 +21,16 @@ export class CaptureBtnComponent implements OnInit {
|
|||||||
// event.stopPropagation()
|
// event.stopPropagation()
|
||||||
console.log(event);
|
console.log(event);
|
||||||
let imageData= event.target.files[0]
|
let imageData= event.target.files[0]
|
||||||
this.ng2ImgMax.resizeImage(imageData, 450, 650).subscribe(
|
this.loaderService.showMatSpinnerDialog("Optimizing image..")
|
||||||
|
this.ng2ImgMax.resizeImage(imageData, 450, 650,true).subscribe(
|
||||||
result => {
|
result => {
|
||||||
|
this.loaderService.closeMatSpinnerDialog();
|
||||||
this.imageDataEmitter.emit(result)
|
this.imageDataEmitter.emit(result)
|
||||||
},
|
},
|
||||||
error => {
|
error => {
|
||||||
|
this.loaderService.closeMatSpinnerDialog();
|
||||||
console.log('😢 Oh no!', error);
|
console.log('😢 Oh no!', error);
|
||||||
|
alert(JSON.stringify(error))
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -97,7 +97,7 @@ export class ImageCaptureComponent implements OnInit {
|
|||||||
// this.router.navigateByUrl('error');
|
// this.router.navigateByUrl('error');
|
||||||
// }
|
// }
|
||||||
addImage(event,index){
|
addImage(event,index){
|
||||||
this.loaderService.showMatSpinnerDialog('');
|
this.loaderService.showMatSpinnerDialog('Processing watermark..');
|
||||||
console.log(event,index);
|
console.log(event,index);
|
||||||
var reader = new FileReader();
|
var reader = new FileReader();
|
||||||
// let imagePath = event;
|
// let imagePath = event;
|
||||||
|
|||||||
@ -22,7 +22,7 @@
|
|||||||
<mat-card-header>
|
<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>
|
<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;">
|
<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>
|
||||||
<!--<div fxFlex="20" align="end">
|
<!--<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>
|
<span style="padding: 2px 9px 3px 9px !important;" class="menu-badge mat-purple ng-star-inserted" align="center">{{quesIndex+1}}</span>
|
||||||
|
|||||||
@ -81,4 +81,9 @@ mat-card .child_mat_card > mat-card {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
.required_star_class
|
||||||
|
{
|
||||||
|
color: red;
|
||||||
|
font-size: 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@ -116,9 +116,10 @@ export class StartPdComponent implements OnInit, OnDestroy {
|
|||||||
// this.categoryFormButtons = Object.keys(data.records.template_forms).map((item)=>data.records.template_forms[item]).filter(item=>item.isAnswerable===true);
|
// this.categoryFormButtons = Object.keys(data.records.template_forms).map((item)=>data.records.template_forms[item]).filter(item=>item.isAnswerable===true);
|
||||||
this.categoryFormButtons = data.records.template_details
|
this.categoryFormButtons = data.records.template_details
|
||||||
// this.categoryFormButtons = this.categoryFormButtons.filter(item=>item.isAnswerable===true);
|
// this.categoryFormButtons = this.categoryFormButtons.filter(item=>item.isAnswerable===true);
|
||||||
this.actualQuestions = this.categoryFormButtons.length;
|
this.actualQuestions = this.categoryFormButtons.filter(item => item.complete_check_enabled == '1').length;
|
||||||
let getAnsweredFormsCount = this.categoryFormButtons.filter(item=>item.is_answered==='1');
|
let getAnsweredFormsCount = this.categoryFormButtons.filter(item=>item.is_answered==='1' && item.complete_check_enabled == '1');
|
||||||
this.answeredQuestions = getAnsweredFormsCount.length;
|
this.answeredQuestions = getAnsweredFormsCount.length;
|
||||||
|
console.log("ans",this.answeredQuestions,this.actualQuestions)
|
||||||
this.pdFullDetails = data.records;
|
this.pdFullDetails = data.records;
|
||||||
// VENDOR FORM ANSWER FETCH STATUS START(SMART PD ONLY)
|
// VENDOR FORM ANSWER FETCH STATUS START(SMART PD ONLY)
|
||||||
// if(this.pdMasterList.fk_pd_type == '2') {
|
// if(this.pdMasterList.fk_pd_type == '2') {
|
||||||
@ -157,6 +158,8 @@ export class StartPdComponent implements OnInit, OnDestroy {
|
|||||||
|
|
||||||
// load pd status change dialogue
|
// load pd status change dialogue
|
||||||
pdStatusDialogue(status: string, checkType: number): void {
|
pdStatusDialogue(status: string, checkType: number): void {
|
||||||
|
// checkType==2 ? this.router.navigate(['../../../../../viewpd', this.startPD,this.randomString], {relativeTo: this.route}) : this.loadTemplates(this.startPD,2,this.randomString);
|
||||||
|
// return;
|
||||||
const dialogRef = this.dialog.open(PdStatusChangeDialogueComponent, {
|
const dialogRef = this.dialog.open(PdStatusChangeDialogueComponent, {
|
||||||
data: { pdid: this.startPD, pd_status: status ,random_string:this.randomString,pd_type:this.pdMasterList.fk_pd_type },
|
data: { pdid: this.startPD, pd_status: status ,random_string:this.randomString,pd_type:this.pdMasterList.fk_pd_type },
|
||||||
disableClose: true,
|
disableClose: true,
|
||||||
@ -166,13 +169,15 @@ export class StartPdComponent implements OnInit, OnDestroy {
|
|||||||
dialogRef.afterClosed()
|
dialogRef.afterClosed()
|
||||||
.subscribe(dataresult => {
|
.subscribe(dataresult => {
|
||||||
if(dataresult.update_status==true){
|
if(dataresult.update_status==true){
|
||||||
checkType==2 ? this.router.navigate(['../../viewpd', this.pdMasterList.parent_pd_id], {relativeTo: this.route}) : this.loadTemplates(this.startPD,2,this.randomString);
|
setTimeout(()=>{
|
||||||
|
checkType==2 ? this.router.navigate(['../../../../../viewpd', this.startPD,this.randomString], {relativeTo: this.route}) : this.loadTemplates(this.startPD,2,this.randomString);
|
||||||
|
},2000)
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
checkType==1 ? this.router.navigate(['../../viewpd', this.pdMasterList.parent_pd_id], {relativeTo: this.route}) : this.loadTemplates(this.startPD,2,this.randomString);
|
checkType==1 ? this.router.navigate(['../../../../../viewpd', this.startPD,this.randomString], {relativeTo: this.route}) : this.loadTemplates(this.startPD,2,this.randomString);
|
||||||
}
|
}
|
||||||
if(checkType == 2){
|
if(checkType == 2){
|
||||||
this.loadTemplates(this.startPD,2,this.randomString);
|
// this.loadTemplates(this.startPD,2,this.randomString);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -196,6 +201,7 @@ export class StartPdComponent implements OnInit, OnDestroy {
|
|||||||
this.pdFullDetails.pdmaster_details.curr_vendor_ans_fetch_status = curr_vendor_ans_fetch_status
|
this.pdFullDetails.pdmaster_details.curr_vendor_ans_fetch_status = curr_vendor_ans_fetch_status
|
||||||
this.pdFullDetails.form_id= this.selectedFormsCategory.fk_form_id
|
this.pdFullDetails.form_id= this.selectedFormsCategory.fk_form_id
|
||||||
this.pdFullDetails.is_answered = this.selectedFormsCategory.is_answered
|
this.pdFullDetails.is_answered = this.selectedFormsCategory.is_answered
|
||||||
|
this.pdFullDetails.is_reupload_data_fetched = this.selectedFormsCategory.is_reupload_data_fetched
|
||||||
console.log(this.pdFullDetails);
|
console.log(this.pdFullDetails);
|
||||||
let componen_name:any = FormComponent
|
let componen_name:any = FormComponent
|
||||||
if(this.pdFullDetails.form_id == '20') {
|
if(this.pdFullDetails.form_id == '20') {
|
||||||
|
|||||||
@ -17,6 +17,7 @@ import { ImageCaptureComponent } from './forms/image-capture/image-capture.compo
|
|||||||
import { CaptureBtnComponent } from './forms/image-capture/capture-btn/capture-btn.component';
|
import { CaptureBtnComponent } from './forms/image-capture/capture-btn/capture-btn.component';
|
||||||
import { Ng2ImgMaxModule } from 'ng2-img-max';
|
import { Ng2ImgMaxModule } from 'ng2-img-max';
|
||||||
import { NgxViewerModule } from 'ngx-viewer';
|
import { NgxViewerModule } from 'ngx-viewer';
|
||||||
|
import { AnswerOptionCreateDialogComponent } from './forms/answer-option-create-dialog/answer-option-create-dialog.component';
|
||||||
|
|
||||||
const pdCustomNotifierOptions: NotifierOptions = {
|
const pdCustomNotifierOptions: NotifierOptions = {
|
||||||
position: {
|
position: {
|
||||||
@ -74,7 +75,7 @@ const pdCustomNotifierOptions: NotifierOptions = {
|
|||||||
Ng2ImgMaxModule,
|
Ng2ImgMaxModule,
|
||||||
NgxViewerModule
|
NgxViewerModule
|
||||||
],
|
],
|
||||||
declarations: [StartPdComponent, FormComponent,DynamicFormComponent,DynamicQuestionTemplateComponent, ImageCaptureComponent,CaptureBtnComponent],
|
declarations: [StartPdComponent, FormComponent,DynamicFormComponent,DynamicQuestionTemplateComponent, ImageCaptureComponent,CaptureBtnComponent, AnswerOptionCreateDialogComponent],
|
||||||
entryComponents:[FormComponent,ImageCaptureComponent]
|
entryComponents:[FormComponent,ImageCaptureComponent,AnswerOptionCreateDialogComponent]
|
||||||
})
|
})
|
||||||
export class StartPdModule { }
|
export class StartPdModule { }
|
||||||
|
|||||||
@ -21,12 +21,16 @@
|
|||||||
<mat-icon>videocam</mat-icon>
|
<mat-icon>videocam</mat-icon>
|
||||||
<strong>Call</strong>
|
<strong>Call</strong>
|
||||||
</button>
|
</button>
|
||||||
|
<button mat-stroked-button class="mr-1 mb-1" color="primary" (click)="openExcelUpload()" *ngIf="master.lender_short_name == 'MWISE' &&(LenderRoleID == '25' || LenderRoleID == '26' || LenderRoleID == '27') && currentPDStatus!=pdStatusCheck.INPROGRESS && currentPDStatus!=pdStatusCheck.COMPLETED" >
|
||||||
|
<mat-icon>upload_file</mat-icon>
|
||||||
|
<strong>Upload Excel</strong>
|
||||||
|
</button>
|
||||||
<button mat-raised-button class="mr-1 mb-1" color="primary" style="cursor: not-allowed !important;">
|
<button mat-raised-button class="mr-1 mb-1" color="primary" style="cursor: not-allowed !important;">
|
||||||
<strong> {{master.pd_status==pdStatusCheck.QC_COMPLETED ? 'QC Completed' : master.pd_status==pdStatusCheck.ADD_ON_PENDING ? 'Addon Pending' : master.pd_status | titlecase}}</strong>
|
<strong> {{master.pd_status==pdStatusCheck.QC_COMPLETED ? 'QC Completed' : master.pd_status==pdStatusCheck.ADD_ON_PENDING ? 'Addon Pending' : master.pd_status | titlecase}}</strong>
|
||||||
</button>
|
</button>
|
||||||
<button *ngIf="roleAccessDetails.trigger && currentPDStatus==pdStatusCheck.DRAFT" mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" (click)="editPdMaster(master)" matTooltipPosition="above" matTooltip="Edit PD Master"><mat-icon>edit</mat-icon></button>
|
<button *ngIf="roleAccessDetails.trigger && (LenderRoleID == '25' && (currentPDStatus==pdStatusCheck.DRAFT || currentPDStatus==pdStatusCheck.TRIGGERED || currentPDStatus==pdStatusCheck.ALLOCATED)) || (currentPDStatus==pdStatusCheck.DRAFT)" mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" (click)="editPdMaster(master)" matTooltipPosition="above" matTooltip="Edit PD Master"><mat-icon>edit</mat-icon></button>
|
||||||
<button *ngIf="roleAccessDetails.trigger && currentPDStatus==pdStatusCheck.DRAFT" mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Trigger" matTooltipPosition="above" (click)="directTriggerPD(mandatoryFieldsValidations,master)"><mat-icon>flash_on</mat-icon></button>
|
<button *ngIf="roleAccessDetails.trigger && currentPDStatus==pdStatusCheck.DRAFT" mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Trigger" matTooltipPosition="above" (click)="directTriggerPD(mandatoryFieldsValidations,master)"><mat-icon>flash_on</mat-icon></button>
|
||||||
<button *ngIf="master.lender_short_name == 'MWISE' && LenderRoleID != '25' && roleAccessDetails.reports && master.pd_type_name && (currentPDStatus==pdStatusCheck.QC_COMPLETED || currentPDStatus==pdStatusCheck.COMPLETED)" mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="PD Report" matTooltipPosition="above" (click)="smcCreditPDReport(viewID)"><mat-icon>ballot</mat-icon></button>
|
<button *ngIf="(master.lender_short_name != 'MWISE' && currentPDStatus==pdStatusCheck.QC_COMPLETED ) || (master.lender_short_name == 'MWISE' && LenderRoleID != '25' && currentPDStatus==pdStatusCheck.COMPLETED) && roleAccessDetails.reports && master.pd_type_name" mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="PD Report" matTooltipPosition="above" (click)="smcCreditPDReport(viewID)"><mat-icon>ballot</mat-icon></button>
|
||||||
<span><button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Close" matTooltipPosition="above" (click)="loadPdListCompoent()"><mat-icon>close</mat-icon></button></span>
|
<span><button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Close" matTooltipPosition="above" (click)="loadPdListCompoent()"><mat-icon>close</mat-icon></button></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -192,9 +196,12 @@
|
|||||||
</div>
|
</div>
|
||||||
<div fxFlex="60" align="right">
|
<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> -->
|
<!-- <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> -->
|
||||||
<span *ngIf="master.lender_short_name == 'MWISE' && LenderRoleID != '25'"> <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>
|
<!-- {{userId == master.fk_pd_allocated_to}} -->
|
||||||
<span *ngIf="master.lender_short_name == 'MWISE' && LenderRoleID != '25'"><button *ngIf="roleAccessDetails.allocate && addresses.assigned_pd && addresses.addtional_pd_data[0].pd_type_name && (currentPDStatus == pdStatusCheck.BOUNCED || currentPDStatus == pdStatusCheck.TRIGGERED)" 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()"><mat-icon>verified_user</mat-icon></button></span>
|
<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 != '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 && 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 == '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_state)"><mat-icon>verified_user</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>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -234,7 +241,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div fxFlex="60" align="right">
|
<div fxFlex="60" align="right">
|
||||||
<span *ngIf="master.lender_short_name == 'MWISE' && LenderRoleID != '25'"> <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 != '25'"> <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 != '25'"><button *ngIf="roleAccessDetails.allocate && addresses.assigned_pd && addresses.addtional_pd_data[0].pd_type_name && (currentPDStatus == pdStatusCheck.BOUNCED || currentPDStatus == pdStatusCheck.TRIGGERED)" 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()"><mat-icon>verified_user</mat-icon></button></span>
|
<span *ngIf="master.lender_short_name == 'MWISE' && LenderRoleID != '25' && LenderRoleID != '26'"><button *ngIf="roleAccessDetails.allocate && addresses.assigned_pd && addresses.addtional_pd_data[0].pd_type_name && (currentPDStatus == pdStatusCheck.BOUNCED || currentPDStatus == pdStatusCheck.TRIGGERED)" 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()"><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="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' && 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 && 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 != '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 && 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>
|
||||||
@ -317,7 +324,7 @@
|
|||||||
<div fxFlex="70" align="left" style="padding: 10px !important;">
|
<div fxFlex="70" align="left" style="padding: 10px !important;">
|
||||||
<mat-card-title>Applicants</mat-card-title>
|
<mat-card-title>Applicants</mat-card-title>
|
||||||
</div>
|
</div>
|
||||||
<div fxFlex="30" align="end" style="padding: 10px !important;" *ngIf="roleAccessDetails.trigger && currentPDStatus==pdStatusCheck.DRAFT ">
|
<div fxFlex="30" align="end" style="padding: 10px !important;" *ngIf="roleAccessDetails.trigger && (LenderRoleID == '25' && (currentPDStatus==pdStatusCheck.DRAFT || currentPDStatus==pdStatusCheck.TRIGGERED || currentPDStatus==pdStatusCheck.ALLOCATED)) || (currentPDStatus==pdStatusCheck.DRAFT)">
|
||||||
<button mat-raised-button mat-button-sm mat-icon-button class="mr-1 mb-1 hover-icon" type="button" (click)="editPdApplicant(pdApplicantData,CustomerSegmentAbbr)"><mat-icon>edit</mat-icon></button>
|
<button mat-raised-button mat-button-sm mat-icon-button class="mr-1 mb-1 hover-icon" type="button" (click)="editPdApplicant(pdApplicantData,CustomerSegmentAbbr)"><mat-icon>edit</mat-icon></button>
|
||||||
</div>
|
</div>
|
||||||
</mat-card-header>
|
</mat-card-header>
|
||||||
|
|||||||
@ -5,9 +5,8 @@ import { MatDialog } from '@angular/material';
|
|||||||
import { DatePipe } from '@angular/common';
|
import { DatePipe } from '@angular/common';
|
||||||
import { NotifierService } from 'angular-notifier';
|
import { NotifierService } from 'angular-notifier';
|
||||||
import { PdTrigerService } from '../../../pd-service/pd-triger.service';
|
import { PdTrigerService } from '../../../pd-service/pd-triger.service';
|
||||||
// import { PdAllocationComponent } from '../pd-allocation/pd-allocation.component';
|
import { PdAllocationComponent } from '../pd-allocation/pd-allocation.component';
|
||||||
import { SmartPdAllocationComponent } from '../smart-pd-allocation/smart-pd-allocation.component';
|
|
||||||
import { TelePdAllocationComponent } from './../tele-pd-allocation/tele-pd-allocation.component';
|
|
||||||
import { ListPdComponent } from '../list-pd.component';
|
import { ListPdComponent } from '../list-pd.component';
|
||||||
// import { SchedulePdComponent } from '../schedule-pd/schedule-pd.component';
|
// import { SchedulePdComponent } from '../schedule-pd/schedule-pd.component';
|
||||||
import { EditPdApplicantComponent } from '../edit-pd-applicant/edit-pd-applicant.component';
|
import { EditPdApplicantComponent } from '../edit-pd-applicant/edit-pd-applicant.component';
|
||||||
@ -20,6 +19,7 @@ import { InitiateAdditionalPdComponent } from './../initiate-additional-pd/initi
|
|||||||
import Swal from 'sweetalert2';
|
import Swal from 'sweetalert2';
|
||||||
import { VideoPlayerComponent } from 'app/video-player/video-player.component';
|
import { VideoPlayerComponent } from 'app/video-player/video-player.component';
|
||||||
import { AwsService } from 'app/AwsService/aws.service';
|
import { AwsService } from 'app/AwsService/aws.service';
|
||||||
|
import { ExcelUploadDialogComponent } from '../add-pd/excel-upload-dialog/excel-upload-dialog.component';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-view-pd',
|
selector: 'app-view-pd',
|
||||||
@ -123,6 +123,7 @@ export class ViewPdComponent implements OnInit, OnDestroy {
|
|||||||
// }
|
// }
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
userId: any;
|
||||||
|
|
||||||
constructor(notifier: NotifierService, private dialog: MatDialog, private _fb: FormBuilder,
|
constructor(notifier: NotifierService, private dialog: MatDialog, private _fb: FormBuilder,
|
||||||
private _pd: PdTrigerService, private route: ActivatedRoute, private router: Router, private ListPdComponent: ListPdComponent,
|
private _pd: PdTrigerService, private route: ActivatedRoute, private router: Router, private ListPdComponent: ListPdComponent,
|
||||||
@ -133,6 +134,7 @@ export class ViewPdComponent implements OnInit, OnDestroy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
this.userId = this._aws.getlocale()
|
||||||
this.ListPdComponent.showListView(false);
|
this.ListPdComponent.showListView(false);
|
||||||
this.route.params.subscribe(params => {
|
this.route.params.subscribe(params => {
|
||||||
this.viewID = params['pdid'];
|
this.viewID = params['pdid'];
|
||||||
@ -284,6 +286,7 @@ export class ViewPdComponent implements OnInit, OnDestroy {
|
|||||||
"pdID": this.viewID,
|
"pdID": this.viewID,
|
||||||
"records": applicantData,
|
"records": applicantData,
|
||||||
"SegmentAbbr":CSAbbr,
|
"SegmentAbbr":CSAbbr,
|
||||||
|
lender_short_name:this.pdMasterData[0].lender_short_name
|
||||||
}
|
}
|
||||||
const dialogApplicant = this.dialog.open(EditPdApplicantComponent, {
|
const dialogApplicant = this.dialog.open(EditPdApplicantComponent, {
|
||||||
data: setPdDetails,
|
data: setPdDetails,
|
||||||
@ -433,10 +436,31 @@ export class ViewPdComponent implements OnInit, OnDestroy {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
downloadPDReport() {
|
||||||
|
let data = {
|
||||||
|
"pd_id": this.viewID,
|
||||||
|
"random_string":this.pdMasterData[0].random_string
|
||||||
|
};
|
||||||
|
this._pd.generatePDReportPDF(data).subscribe(data => {
|
||||||
|
if (data.dataStatus) {
|
||||||
|
window.open(data.records);
|
||||||
|
this.notifier.notify('success', 'Done Successfully..!');
|
||||||
|
} else {
|
||||||
|
this.notifier.notify('warning', data.msg ? data.msg :'Something Went Wrong Try Again.!');
|
||||||
|
}
|
||||||
|
}, err => {
|
||||||
|
this.notifier.notify('error', err.msg ? err.msg :'Something Went Wrong Try Again.! \t\"' + (err.error_type == 2 ? err.error_status + ' ( ' + err.error_text + ' ) ' : ' ( ' + err.error_text + ' ) ') +'\" Error Occur.!');
|
||||||
|
// alert(err.html_format);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
smcCreditPDReport(pd_id) {
|
smcCreditPDReport(pd_id) {
|
||||||
// this.destroyType = 3;
|
// this.destroyType = 3;
|
||||||
// this.router.navigate(['../../../pd_report', pd_id,this.masterRandomString], { relativeTo: this.route });
|
// this.router.navigate(['../../../pd_report', pd_id,this.masterRandomString], { relativeTo: this.route });
|
||||||
|
if(this.pdMasterData[0].lender_short_name != 'MWISE') {
|
||||||
|
this.downloadPDReport()
|
||||||
|
return
|
||||||
|
}
|
||||||
let params = { "pd_id":pd_id,"fk_createdby":"","regenerate":"0"}
|
let params = { "pd_id":pd_id,"fk_createdby":"","regenerate":"0"}
|
||||||
this._pd.smcCreditPDReport(params).subscribe(result=>{
|
this._pd.smcCreditPDReport(params).subscribe(result=>{
|
||||||
if(result.dataStatus) {
|
if(result.dataStatus) {
|
||||||
@ -504,9 +528,24 @@ else {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** To update pd officer*/
|
/** To update pd officer*/
|
||||||
selfAllocation() {
|
selfAllocation(state_id) {
|
||||||
|
if(this.LenderRoleID == '27' || this.LenderRoleID == '25') {
|
||||||
|
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',state_id:state_id, lender_role_id:this.LenderRoleID },
|
||||||
|
disableClose: true,
|
||||||
|
minWidth: '30%',
|
||||||
|
})
|
||||||
|
dialogRef1.afterClosed().subscribe(rr=>{
|
||||||
|
if(rr) {
|
||||||
|
this.viewPdDetails(this.viewID)
|
||||||
|
}
|
||||||
|
// this.notifier.notify("success","Allocated Successfully")
|
||||||
|
})
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
// return;
|
||||||
const dialogRef = this.dialog.open(PdStatusChangeDialogueComponent, {
|
const dialogRef = this.dialog.open(PdStatusChangeDialogueComponent, {
|
||||||
data: { pdid:this.viewID, pd_status: this.pdStatusCheck.ALLOCATED,random_string:this.pdMasterData[0].random_string,dialogType:'actionOnly' },
|
data: { pdid:this.viewID, pd_status: "CM_ALLOCATED",random_string:this.pdMasterData[0].random_string,dialogType:'actionOnly' },
|
||||||
disableClose: true,
|
disableClose: true,
|
||||||
minWidth: '30%',
|
minWidth: '30%',
|
||||||
// maxWidth: '40%',
|
// maxWidth: '40%',
|
||||||
@ -541,9 +580,23 @@ else {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
openExcelUpload() {
|
||||||
|
const dialogRef = this.dialog.open(ExcelUploadDialogComponent,{
|
||||||
|
data:{pd_id:this.viewID},
|
||||||
|
minWidth:'50vw',
|
||||||
|
maxWidth:'75vw'
|
||||||
|
})
|
||||||
|
dialogRef.afterClosed().subscribe(rr=>{
|
||||||
|
if(rr.dataStatus) {
|
||||||
|
this.notifier.notify("success","Uploaded Successuflly")
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
rejectPD() {
|
rejectPD() {
|
||||||
const dialogRef = this.dialog.open(PdStatusChangeDialogueComponent, {
|
const dialogRef = this.dialog.open(PdStatusChangeDialogueComponent, {
|
||||||
data: { pdid: this.viewID, pd_status: this.pdStatusCheck.BOUNCED,random_string:this.pdMasterData[0].random_string },
|
data: { pdid: this.viewID, pd_status: this.pdStatusCheck.BOUNCED,random_string:this.pdMasterData[0].random_string },
|
||||||
@ -559,6 +612,32 @@ else {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
allocateToCpa() {
|
||||||
|
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 lenderMasterArray = { "pd_id": this.viewID,random_string:this.masterRandomString }
|
||||||
|
this._pd.editPdMasterDetails(lenderMasterArray, this.pdStatusCheck.TRIGGERED).subscribe(result => {
|
||||||
|
if (result.status == 200) {
|
||||||
|
this.notifier.notify('success', 'Updated successfully.');
|
||||||
|
this.viewPdDetails(this.viewID);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
|
||||||
|
}
|
||||||
|
}, error => {
|
||||||
|
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// updateViewComponent(editBack:string) {
|
// updateViewComponent(editBack:string) {
|
||||||
|
|||||||
@ -127,6 +127,7 @@ import { ExcelUploadDialogComponent } from './list-pd/add-pd/excel-upload-dialog
|
|||||||
import { SpeedDialFabComponent } from './list-pd/view-pd/speed-dial-fab/speed-dial-fab.component';
|
import { SpeedDialFabComponent } from './list-pd/view-pd/speed-dial-fab/speed-dial-fab.component';
|
||||||
import { VideoPlayerComponent } from 'app/video-player/video-player.component';
|
import { VideoPlayerComponent } from 'app/video-player/video-player.component';
|
||||||
import { MatVideoModule } from 'mat-video';
|
import { MatVideoModule } from 'mat-video';
|
||||||
|
import { PdAllocationComponent } from './list-pd/pd-allocation/pd-allocation.component';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Custom angular notifier options
|
* Custom angular notifier options
|
||||||
@ -174,7 +175,7 @@ const pdCustomNotifierOptions: NotifierOptions = {
|
|||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [TelePdAllocationComponent, ListPdComponent, ManagePdComponent, MapPdViewComponent, AddPdComponent, ViewPdComponent, SmartPdAllocationComponent, EditPdApplicantComponent, EditPdMasterComponent, InprogressPdComponent, AllPdComponent, ScheduledPdComponent, CompletedPdComponent, QcCompletedPdComponent, PdReportComponent, PdRequirementComponent, ModelEditPdReportComponent, DialogChangeCurrentVenrsion, QcReviewComponent, SearchRelationPipe, RupeeCurrencyFormatPipe, DeleteRecordsCountPipe, PdLocatedMapViewDirective, ViewLocationComponent, GetAnswerableFormsPipe,PdStatusChangeDialogueComponent,InitiateAdditionalPdComponent, ExcelUploadDialogComponent,
|
declarations: [TelePdAllocationComponent, ListPdComponent, ManagePdComponent, MapPdViewComponent, AddPdComponent, ViewPdComponent, SmartPdAllocationComponent, EditPdApplicantComponent, EditPdMasterComponent, InprogressPdComponent, AllPdComponent, ScheduledPdComponent, CompletedPdComponent, QcCompletedPdComponent, PdReportComponent, PdRequirementComponent, ModelEditPdReportComponent, DialogChangeCurrentVenrsion, QcReviewComponent, SearchRelationPipe, RupeeCurrencyFormatPipe, DeleteRecordsCountPipe, PdLocatedMapViewDirective, ViewLocationComponent, GetAnswerableFormsPipe,PdStatusChangeDialogueComponent,InitiateAdditionalPdComponent, ExcelUploadDialogComponent,
|
||||||
SpeedDialFabComponent,VideoPlayerComponent],
|
SpeedDialFabComponent,VideoPlayerComponent,PdAllocationComponent],
|
||||||
imports: [
|
imports: [
|
||||||
CommonModule,
|
CommonModule,
|
||||||
ManagePdRoutingModule,
|
ManagePdRoutingModule,
|
||||||
@ -216,7 +217,8 @@ const pdCustomNotifierOptions: NotifierOptions = {
|
|||||||
{provide: DateAdapter, useClass: MomentDateAdapter, deps: [MAT_DATE_LOCALE]},
|
{provide: DateAdapter, useClass: MomentDateAdapter, deps: [MAT_DATE_LOCALE]},
|
||||||
{provide: MAT_DATE_FORMATS, useValue: MAT_MOMENT_DATE_FORMATS}, PdLocatedMapViewDirective],
|
{provide: MAT_DATE_FORMATS, useValue: MAT_MOMENT_DATE_FORMATS}, PdLocatedMapViewDirective],
|
||||||
|
|
||||||
entryComponents: [SmartPdAllocationComponent, EditPdApplicantComponent, EditPdMasterComponent, TelePdAllocationComponent, PdRequirementComponent, ModelEditPdReportComponent, DialogChangeCurrentVenrsion, QcReviewComponent, ViewLocationComponent,PdStatusChangeDialogueComponent,InitiateAdditionalPdComponent,ExcelUploadDialogComponent,VideoPlayerComponent],
|
entryComponents: [SmartPdAllocationComponent, EditPdApplicantComponent, EditPdMasterComponent, TelePdAllocationComponent, PdRequirementComponent, ModelEditPdReportComponent, DialogChangeCurrentVenrsion, QcReviewComponent, ViewLocationComponent,PdStatusChangeDialogueComponent,InitiateAdditionalPdComponent,ExcelUploadDialogComponent,VideoPlayerComponent,
|
||||||
|
PdAllocationComponent],
|
||||||
})
|
})
|
||||||
export class ManagePdModule {
|
export class ManagePdModule {
|
||||||
}
|
}
|
||||||
@ -175,9 +175,9 @@ export class PdTrigerService {
|
|||||||
const Lender:any = entity_id ?
|
const Lender:any = entity_id ?
|
||||||
{ params: new HttpParams().set('lenderid', entity_id) } :
|
{ params: new HttpParams().set('lenderid', entity_id) } :
|
||||||
{ };
|
{ };
|
||||||
if(LenderRoleID == '25') {
|
// if(LenderRoleID == '25') {
|
||||||
Lender.params = Lender.params.set('createdby',userid)
|
Lender.params = Lender && Lender.params ? Lender.params.set('createdby',userid) : {}
|
||||||
}
|
// }
|
||||||
return this._http.get<any>(this.apiUrl + "listLessPDDetails/get",Lender)
|
return this._http.get<any>(this.apiUrl + "listLessPDDetails/get",Lender)
|
||||||
.pipe(
|
.pipe(
|
||||||
catchError(this.handleError('operation', []))
|
catchError(this.handleError('operation', []))
|
||||||
@ -198,9 +198,9 @@ export class PdTrigerService {
|
|||||||
// { params: new HttpParams().set('createdby', userid) };
|
// { params: new HttpParams().set('createdby', userid) };
|
||||||
let paramHttp:any= entity_id && status ?
|
let paramHttp:any= entity_id && status ?
|
||||||
{params : new HttpParams().set('lenderid', entity_id).set('status',status)} : {};
|
{params : new HttpParams().set('lenderid', entity_id).set('status',status)} : {};
|
||||||
if(LenderRoleID == '25') {
|
// if(LenderRoleID == '25') {
|
||||||
paramHttp.params = paramHttp.params.set('createdby',userid)
|
paramHttp.params = paramHttp.params.set('createdby',userid)
|
||||||
}
|
// }
|
||||||
return this._http.get<any[]>(this.apiUrl + "listLessPDDetails/get", paramHttp)
|
return this._http.get<any[]>(this.apiUrl + "listLessPDDetails/get", paramHttp)
|
||||||
.pipe(
|
.pipe(
|
||||||
catchError(this.handleError('operation', []))
|
catchError(this.handleError('operation', []))
|
||||||
@ -656,9 +656,9 @@ export class PdTrigerService {
|
|||||||
overAllSearchFormDetails(searchItem) {
|
overAllSearchFormDetails(searchItem) {
|
||||||
let LenderRoleID : any = localStorage.getItem('LenderRoleID');
|
let LenderRoleID : any = localStorage.getItem('LenderRoleID');
|
||||||
let userid=this._aws.getlocale()
|
let userid=this._aws.getlocale()
|
||||||
if(LenderRoleID == '25') {
|
// if(LenderRoleID == '25') {
|
||||||
searchItem.createdby = userid
|
searchItem.createdby = userid
|
||||||
}
|
// }
|
||||||
let records = { 'records': searchItem };
|
let records = { 'records': searchItem };
|
||||||
return this._http.post(this.apiUrl + 'filterPDList', records).pipe(
|
return this._http.post(this.apiUrl + 'filterPDList', records).pipe(
|
||||||
catchError(this.handleError('operation', []))
|
catchError(this.handleError('operation', []))
|
||||||
@ -813,8 +813,12 @@ checkExistPDDetails(datas,entity_id){
|
|||||||
return this._http.post(this.apiUrl+'checkExistPDDetails',{records:datas,client:entity_id})
|
return this._http.post(this.apiUrl+'checkExistPDDetails',{records:datas,client:entity_id})
|
||||||
.pipe(catchError(this.handleError("checkExistPDDetails",[])))
|
.pipe(catchError(this.handleError("checkExistPDDetails",[])))
|
||||||
}
|
}
|
||||||
uploadSMCDataFile(file) {
|
uploadSMCDataFile(file,pd_id ?) {
|
||||||
let records = {"rand_key":"qwerty1234"}
|
// let records = {"rand_key":"qwerty1234"}
|
||||||
|
let records :any= {}
|
||||||
|
if(pd_id) {
|
||||||
|
records.fk_pd_id = pd_id
|
||||||
|
}
|
||||||
let formData= new FormData()
|
let formData= new FormData()
|
||||||
formData.append("pd_excel_data",file)
|
formData.append("pd_excel_data",file)
|
||||||
formData.append("records",JSON.stringify(records))
|
formData.append("records",JSON.stringify(records))
|
||||||
@ -882,6 +886,17 @@ loadTemplate(form_id) {
|
|||||||
return this._http.post(this.apiUrl+'updateTwlioVideoStatus',params)
|
return this._http.post(this.apiUrl+'updateTwlioVideoStatus',params)
|
||||||
.pipe(catchError(this.handleError("updateTwlioVideoStatus",[])))
|
.pipe(catchError(this.handleError("updateTwlioVideoStatus",[])))
|
||||||
}
|
}
|
||||||
|
getCMUsers(state_id,user_type):Observable<any> {
|
||||||
|
let param = new HttpParams().set('state_id',state_id).set('usertype',user_type)
|
||||||
|
return this._http.get(this.apiUrl+"getCMUsers",{params:param})
|
||||||
|
}
|
||||||
|
saveNewSMCTempAddresses(params) {
|
||||||
|
params = {records:params}
|
||||||
|
return this._http.post(this.apiUrl+'saveNewSMCTempAddresses',params)
|
||||||
|
}
|
||||||
|
getSMCTempAddresses(pd_id) {
|
||||||
|
let params = new HttpParams().set("pdid",pd_id)
|
||||||
|
return this._http.get(this.apiUrl+'getSMCTempAddresses',{params})
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -20,6 +20,7 @@ export class LoaderService {
|
|||||||
this.loaderSubject.next(<LoaderState>{ show: false });
|
this.loaderSubject.next(<LoaderState>{ show: false });
|
||||||
}
|
}
|
||||||
showMatSpinnerDialog(message ?:String) {
|
showMatSpinnerDialog(message ?:String) {
|
||||||
|
this.closeMatSpinnerDialog();
|
||||||
this.spinnerdialogRef = this.dialog.open(ProgressSpineerDialogComponent, {
|
this.spinnerdialogRef = this.dialog.open(ProgressSpineerDialogComponent, {
|
||||||
data:message,
|
data:message,
|
||||||
panelClass: 'transparent',
|
panelClass: 'transparent',
|
||||||
|
|||||||
@ -90,6 +90,33 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"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":[
|
||||||
|
{
|
||||||
|
"name":"pattern",
|
||||||
|
"isactive":"1",
|
||||||
|
"validator":"[0-9]{10}",
|
||||||
|
"message":"Mobile number should be 10 digit",
|
||||||
|
"value":null
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"is_repeatable":"2",
|
||||||
|
"group_key":"mobile_numbers",
|
||||||
|
"group_title":"Mobile Number"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"question":"Entity Type",
|
"question":"Entity Type",
|
||||||
"question_key":"entity_type",
|
"question_key":"entity_type",
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -31,13 +31,7 @@
|
|||||||
"parent_question_key":"supplier_info_available",
|
"parent_question_key":"supplier_info_available",
|
||||||
"answers":null,
|
"answers":null,
|
||||||
"validations":[
|
"validations":[
|
||||||
{
|
|
||||||
"name":"required",
|
|
||||||
"isactive":"1",
|
|
||||||
"validator":"Validators.required",
|
|
||||||
"message":"Field required",
|
|
||||||
"value":null
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
} ] } ] },
|
} ] } ] },
|
||||||
{
|
{
|
||||||
@ -63,13 +57,7 @@
|
|||||||
"parent_question_key":"supplier_info_available",
|
"parent_question_key":"supplier_info_available",
|
||||||
"answers":null,
|
"answers":null,
|
||||||
"validations":[
|
"validations":[
|
||||||
{
|
|
||||||
"name":"required",
|
|
||||||
"isactive":"1",
|
|
||||||
"validator":"Validators.required",
|
|
||||||
"message":"Field required",
|
|
||||||
"value":null
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -84,13 +72,7 @@
|
|||||||
"parent_question_key":"supplier_info_available",
|
"parent_question_key":"supplier_info_available",
|
||||||
"answers":null,
|
"answers":null,
|
||||||
"validations":[
|
"validations":[
|
||||||
{
|
|
||||||
"name":"required",
|
|
||||||
"isactive":"1",
|
|
||||||
"validator":"Validators.required",
|
|
||||||
"message":"Field required",
|
|
||||||
"value":null
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -105,13 +87,7 @@
|
|||||||
"parent_question_key":"supplier_info_available",
|
"parent_question_key":"supplier_info_available",
|
||||||
"answers":null,
|
"answers":null,
|
||||||
"validations":[
|
"validations":[
|
||||||
{
|
|
||||||
"name":"required",
|
|
||||||
"isactive":"1",
|
|
||||||
"validator":"Validators.required",
|
|
||||||
"message":"Field required",
|
|
||||||
"value":null
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -151,13 +127,13 @@
|
|||||||
"parent_question_key":"supplier_info_available",
|
"parent_question_key":"supplier_info_available",
|
||||||
"answers":null,
|
"answers":null,
|
||||||
"validations":[
|
"validations":[
|
||||||
{
|
{
|
||||||
"name":"pattern",
|
"name":"pattern",
|
||||||
"isactive":"1",
|
"isactive":"1",
|
||||||
"validator":"[0-9]{10,12}",
|
"validator":"[0-9]{10,12}",
|
||||||
"message":"Mobile number should be 10-12 digit",
|
"message":"Mobile number should be 10-12 digit",
|
||||||
"value":null
|
"value":null
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -174,13 +150,13 @@
|
|||||||
"parent_question_key":"supplier_info_available",
|
"parent_question_key":"supplier_info_available",
|
||||||
"answers":null,
|
"answers":null,
|
||||||
"validations":[
|
"validations":[
|
||||||
{
|
{
|
||||||
"name":"pattern",
|
"name":"pattern",
|
||||||
"isactive":"1",
|
"isactive":"1",
|
||||||
"validator":"[0-9]{3,5}",
|
"validator":"[0-9]{3,5}",
|
||||||
"message":"Maximum 5 digit allowed",
|
"message":"Maximum 5 digit allowed",
|
||||||
"value":null
|
"value":null
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -196,13 +172,13 @@
|
|||||||
"parent_question_key":"supplier_info_available",
|
"parent_question_key":"supplier_info_available",
|
||||||
"answers":null,
|
"answers":null,
|
||||||
"validations":[
|
"validations":[
|
||||||
{
|
{
|
||||||
"name":"pattern",
|
"name":"pattern",
|
||||||
"isactive":"1",
|
"isactive":"1",
|
||||||
"validator":"[0-9]{6,8}",
|
"validator":"[0-9]{6,8}",
|
||||||
"message":"Maximum 8 digit allowed",
|
"message":"Maximum 8 digit allowed",
|
||||||
"value":null
|
"value":null
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -244,13 +220,7 @@
|
|||||||
"parent_question_key":"payment_type",
|
"parent_question_key":"payment_type",
|
||||||
"answers":null,
|
"answers":null,
|
||||||
"validations":[
|
"validations":[
|
||||||
{
|
|
||||||
"name":"required",
|
|
||||||
"isactive":"1",
|
|
||||||
"validator":"Validators.required",
|
|
||||||
"message":"Field required",
|
|
||||||
"value":null
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -266,13 +236,7 @@
|
|||||||
"parent_question_key":"payment_type",
|
"parent_question_key":"payment_type",
|
||||||
"answers":null,
|
"answers":null,
|
||||||
"validations":[
|
"validations":[
|
||||||
{
|
|
||||||
"name":"required",
|
|
||||||
"isactive":"1",
|
|
||||||
"validator":"Validators.required",
|
|
||||||
"message":"Field required",
|
|
||||||
"value":null
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name":"max",
|
"name":"max",
|
||||||
"isactive":"1",
|
"isactive":"1",
|
||||||
@ -289,13 +253,7 @@
|
|||||||
"parent_question_key":"payment_type",
|
"parent_question_key":"payment_type",
|
||||||
"answers":null,
|
"answers":null,
|
||||||
"validations":[
|
"validations":[
|
||||||
{
|
|
||||||
"name":"required",
|
|
||||||
"isactive":"1",
|
|
||||||
"validator":"Validators.required",
|
|
||||||
"message":"Field required",
|
|
||||||
"value":null
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -323,13 +281,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"validations":[
|
"validations":[
|
||||||
{
|
|
||||||
"name":"required",
|
|
||||||
"isactive":"1",
|
|
||||||
"validator":"Validators.required",
|
|
||||||
"message":"Field required",
|
|
||||||
"value":null
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@ -352,13 +304,7 @@
|
|||||||
"answer_id":"No"
|
"answer_id":"No"
|
||||||
}],
|
}],
|
||||||
"validations":[
|
"validations":[
|
||||||
{
|
|
||||||
"name":"required",
|
|
||||||
"isactive":"1",
|
|
||||||
"validator":"Validators.required",
|
|
||||||
"message":"Field required",
|
|
||||||
"value":null
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@ -31,13 +31,7 @@
|
|||||||
"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
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
} ] } ] },
|
} ] } ] },
|
||||||
{
|
{
|
||||||
@ -63,13 +57,7 @@
|
|||||||
"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
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -84,13 +72,7 @@
|
|||||||
"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
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -105,13 +87,7 @@
|
|||||||
"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
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -244,13 +220,7 @@
|
|||||||
"parent_question_key":"payment_type",
|
"parent_question_key":"payment_type",
|
||||||
"answers":null,
|
"answers":null,
|
||||||
"validations":[
|
"validations":[
|
||||||
{
|
|
||||||
"name":"required",
|
|
||||||
"isactive":"1",
|
|
||||||
"validator":"Validators.required",
|
|
||||||
"message":"Field required",
|
|
||||||
"value":null
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -266,13 +236,7 @@
|
|||||||
"parent_question_key":"payment_type",
|
"parent_question_key":"payment_type",
|
||||||
"answers":null,
|
"answers":null,
|
||||||
"validations":[
|
"validations":[
|
||||||
{
|
|
||||||
"name":"required",
|
|
||||||
"isactive":"1",
|
|
||||||
"validator":"Validators.required",
|
|
||||||
"message":"Field required",
|
|
||||||
"value":null
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name":"max",
|
"name":"max",
|
||||||
"isactive":"1",
|
"isactive":"1",
|
||||||
@ -289,13 +253,7 @@
|
|||||||
"parent_question_key":"payment_type",
|
"parent_question_key":"payment_type",
|
||||||
"answers":null,
|
"answers":null,
|
||||||
"validations":[
|
"validations":[
|
||||||
{
|
|
||||||
"name":"required",
|
|
||||||
"isactive":"1",
|
|
||||||
"validator":"Validators.required",
|
|
||||||
"message":"Field required",
|
|
||||||
"value":null
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -323,13 +281,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"validations":[
|
"validations":[
|
||||||
{
|
|
||||||
"name":"required",
|
|
||||||
"isactive":"1",
|
|
||||||
"validator":"Validators.required",
|
|
||||||
"message":"Field required",
|
|
||||||
"value":null
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@ -352,13 +304,7 @@
|
|||||||
"answer_id":"No"
|
"answer_id":"No"
|
||||||
}],
|
}],
|
||||||
"validations":[
|
"validations":[
|
||||||
{
|
|
||||||
"name":"required",
|
|
||||||
"isactive":"1",
|
|
||||||
"validator":"Validators.required",
|
|
||||||
"message":"Field required",
|
|
||||||
"value":null
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@ -32,13 +32,7 @@
|
|||||||
"parent_question_key": "stock_info_available",
|
"parent_question_key": "stock_info_available",
|
||||||
"answers": null,
|
"answers": null,
|
||||||
"validations": [
|
"validations": [
|
||||||
{
|
|
||||||
"name": "required",
|
|
||||||
"isactive": "1",
|
|
||||||
"validator": "Validators.required",
|
|
||||||
"message": "Field required",
|
|
||||||
"value": null
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@ -80,13 +74,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"validations": [
|
"validations": [
|
||||||
{
|
|
||||||
"name": "required",
|
|
||||||
"isactive": "1",
|
|
||||||
"validator": "Validators.required",
|
|
||||||
"message": "Field required",
|
|
||||||
"value": null
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@ -125,13 +113,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"validations": [
|
"validations": [
|
||||||
{
|
|
||||||
"name": "required",
|
|
||||||
"isactive": "1",
|
|
||||||
"validator": "Validators.required",
|
|
||||||
"message": "Field required",
|
|
||||||
"value": null
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -145,13 +127,7 @@
|
|||||||
"is_repeatable": null,
|
"is_repeatable": null,
|
||||||
"field_type": "string",
|
"field_type": "string",
|
||||||
"validations": [
|
"validations": [
|
||||||
{
|
|
||||||
"name": "required",
|
|
||||||
"isactive": "1",
|
|
||||||
"validator": "Validators.required",
|
|
||||||
"message": "Required",
|
|
||||||
"value": null
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -171,13 +147,7 @@
|
|||||||
],
|
],
|
||||||
"is_repeatable": null,
|
"is_repeatable": null,
|
||||||
"validations": [
|
"validations": [
|
||||||
{
|
|
||||||
"name": "required",
|
|
||||||
"isactive": "1",
|
|
||||||
"validator": "Validators.required",
|
|
||||||
"message": "Required",
|
|
||||||
"value": null
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
"onchange_properties": [
|
"onchange_properties": [
|
||||||
{
|
{
|
||||||
@ -222,13 +192,7 @@
|
|||||||
"parent_question_key": "provider_observed",
|
"parent_question_key": "provider_observed",
|
||||||
"answers": null,
|
"answers": null,
|
||||||
"validations": [
|
"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": [
|
"validations": [
|
||||||
{
|
|
||||||
"name": "required",
|
|
||||||
"isactive": "1",
|
|
||||||
"validator": "Validators.required",
|
|
||||||
"message": "Field required",
|
|
||||||
"value": null
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@ -37,14 +37,24 @@
|
|||||||
"is_pd_done_on_initiated_address"
|
"is_pd_done_on_initiated_address"
|
||||||
],
|
],
|
||||||
"questions":[
|
"questions":[
|
||||||
{
|
{
|
||||||
"question":"Enter actual PD address",
|
"question":"Choose the actual PD address",
|
||||||
"question_key":"alternative_address",
|
"question_key":"alternative_address",
|
||||||
"place_holder":"",
|
"place_holder":"",
|
||||||
"field_type":"string",
|
"field_type":"string",
|
||||||
"type":"7",
|
"type":"3",
|
||||||
"field_width":"100",
|
"field_width":"100",
|
||||||
"api_properties":null,
|
"api_properties":{
|
||||||
|
"api":"getSMCTempAddresses",
|
||||||
|
"api_method":"GET",
|
||||||
|
"params":{
|
||||||
|
"pdid":"VAR_PD_ID"
|
||||||
|
},
|
||||||
|
"fields":[
|
||||||
|
"display",
|
||||||
|
"display"
|
||||||
|
]
|
||||||
|
},
|
||||||
"onchange_properties":null,
|
"onchange_properties":null,
|
||||||
"is_repeatable":null,
|
"is_repeatable":null,
|
||||||
"is_subfield":"1",
|
"is_subfield":"1",
|
||||||
@ -90,7 +100,7 @@
|
|||||||
"question":"Type of PD address",
|
"question":"Type of PD address",
|
||||||
"question_key":"address_type",
|
"question_key":"address_type",
|
||||||
"type":"3",
|
"type":"3",
|
||||||
"field_width":"45",
|
"field_width":"90",
|
||||||
"api_properties":{
|
"api_properties":{
|
||||||
"api":"getListOfMaster",
|
"api":"getListOfMaster",
|
||||||
"api_method":"POST",
|
"api_method":"POST",
|
||||||
|
|||||||
@ -36,13 +36,7 @@
|
|||||||
"parent_question_key":"total_fund_requirement",
|
"parent_question_key":"total_fund_requirement",
|
||||||
"answers":null,
|
"answers":null,
|
||||||
"validations":[
|
"validations":[
|
||||||
{
|
|
||||||
"name":"required",
|
|
||||||
"isactive":"1",
|
|
||||||
"validator":"Validators.required",
|
|
||||||
"message":"Field required",
|
|
||||||
"value":null
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@ -51,13 +45,7 @@
|
|||||||
],
|
],
|
||||||
"is_repeatable":null,
|
"is_repeatable":null,
|
||||||
"validations":[
|
"validations":[
|
||||||
{
|
|
||||||
"name":"required",
|
|
||||||
"isactive":"1",
|
|
||||||
"validator":"Validators.required",
|
|
||||||
"message":"Field Required",
|
|
||||||
"value":null
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -71,13 +59,7 @@
|
|||||||
"answers":null,
|
"answers":null,
|
||||||
"is_repeatable":null,
|
"is_repeatable":null,
|
||||||
"validations":[
|
"validations":[
|
||||||
{
|
|
||||||
"name":"required",
|
|
||||||
"isactive":"1",
|
|
||||||
"validator":"Validators.required",
|
|
||||||
"message":"Field Required",
|
|
||||||
"value":null
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -100,13 +82,7 @@
|
|||||||
"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
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -119,13 +95,7 @@
|
|||||||
"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
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -161,13 +131,7 @@
|
|||||||
"parent_question_key":"total_fund_requirement",
|
"parent_question_key":"total_fund_requirement",
|
||||||
"answers":null,
|
"answers":null,
|
||||||
"validations":[
|
"validations":[
|
||||||
{
|
|
||||||
"name":"required",
|
|
||||||
"isactive":"1",
|
|
||||||
"validator":"Validators.required",
|
|
||||||
"message":"Field required",
|
|
||||||
"value":null
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@ -175,13 +139,7 @@
|
|||||||
}],
|
}],
|
||||||
"is_repeatable":null,
|
"is_repeatable":null,
|
||||||
"validations":[
|
"validations":[
|
||||||
{
|
|
||||||
"name":"required",
|
|
||||||
"isactive":"1",
|
|
||||||
"validator":"Validators.required",
|
|
||||||
"message":"Field Required",
|
|
||||||
"value":null
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -224,13 +182,7 @@
|
|||||||
"parent_question_key":"is_transfer",
|
"parent_question_key":"is_transfer",
|
||||||
"answers":null,
|
"answers":null,
|
||||||
"validations":[
|
"validations":[
|
||||||
{
|
|
||||||
"name":"required",
|
|
||||||
"isactive":"1",
|
|
||||||
"validator":"Validators.required",
|
|
||||||
"message":"Field required",
|
|
||||||
"value":null
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -253,13 +205,7 @@
|
|||||||
"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
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -273,13 +219,7 @@
|
|||||||
"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
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@ -288,13 +228,7 @@
|
|||||||
}],
|
}],
|
||||||
"is_repeatable":null,
|
"is_repeatable":null,
|
||||||
"validations":[
|
"validations":[
|
||||||
{
|
|
||||||
"name":"required",
|
|
||||||
"isactive":"1",
|
|
||||||
"validator":"Validators.required",
|
|
||||||
"message":"Field Required",
|
|
||||||
"value":null
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -307,13 +241,7 @@
|
|||||||
"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
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -331,13 +259,7 @@
|
|||||||
"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
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -371,13 +293,7 @@
|
|||||||
"parent_question_key":"construction_status",
|
"parent_question_key":"construction_status",
|
||||||
"answers":null,
|
"answers":null,
|
||||||
"validations":[
|
"validations":[
|
||||||
{
|
|
||||||
"name":"required",
|
|
||||||
"isactive":"1",
|
|
||||||
"validator":"Validators.required",
|
|
||||||
"message":"Field required",
|
|
||||||
"value":null
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@ -386,13 +302,7 @@
|
|||||||
],
|
],
|
||||||
"is_repeatable":null,
|
"is_repeatable":null,
|
||||||
"validations":[
|
"validations":[
|
||||||
{
|
|
||||||
"name":"required",
|
|
||||||
"isactive":"1",
|
|
||||||
"validator":"Validators.required",
|
|
||||||
"message":"Field Required",
|
|
||||||
"value":null
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -407,13 +317,7 @@
|
|||||||
"is_repeatable":null,
|
"is_repeatable":null,
|
||||||
"answers":null,
|
"answers":null,
|
||||||
"validations":[
|
"validations":[
|
||||||
{
|
|
||||||
"name":"required",
|
|
||||||
"isactive":"1",
|
|
||||||
"validator":"Validators.required",
|
|
||||||
"message":"Field required",
|
|
||||||
"value":null
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -428,114 +332,33 @@
|
|||||||
"is_repeatable":null,
|
"is_repeatable":null,
|
||||||
"answers":null,
|
"answers":null,
|
||||||
"validations":[
|
"validations":[
|
||||||
{
|
|
||||||
"name":"required",
|
|
||||||
"isactive":"1",
|
|
||||||
"validator":"Validators.required",
|
|
||||||
"message":"Field required",
|
|
||||||
"value":null
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"question":"Address of the proposed property",
|
"question":"Address of the proposed property",
|
||||||
"question_key":"address",
|
"question_key":"address",
|
||||||
"place_holder":"Enter door no,street",
|
"place_holder":"",
|
||||||
"type":"7",
|
"field_type":"string",
|
||||||
"answers":null,
|
"type":"3",
|
||||||
"api_properties":null,
|
"field_width":"100",
|
||||||
"onchange_properties":null,
|
"api_properties":{
|
||||||
"is_repeatable":null,
|
"api":"getSMCTempAddresses",
|
||||||
"field_type":"string",
|
"api_method":"GET",
|
||||||
"validations":[
|
"params":{
|
||||||
{
|
"pdid":"VAR_PD_ID"
|
||||||
"name":"required",
|
},
|
||||||
"isactive":"1",
|
"fields":[
|
||||||
"validator":"Validators.required",
|
"display",
|
||||||
"message":"Address Required",
|
"display"
|
||||||
"value":null
|
]
|
||||||
}
|
},
|
||||||
]
|
"onchange_properties":null,
|
||||||
},
|
"is_repeatable":null,
|
||||||
{
|
"answers":null,
|
||||||
"question":"State",
|
"validations":[
|
||||||
"question_key":"state",
|
]
|
||||||
"type":"8",
|
},
|
||||||
"field_width":"45",
|
|
||||||
"answers":null,
|
|
||||||
"api_properties":{
|
|
||||||
"api":"getListOfMaster",
|
|
||||||
"api_method":"POST",
|
|
||||||
"params":{
|
|
||||||
"master_name":"STATE"
|
|
||||||
},
|
|
||||||
"fields":[
|
|
||||||
"state_id",
|
|
||||||
"name"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"onchange_properties":[
|
|
||||||
{
|
|
||||||
"purpose":"api",
|
|
||||||
"api":"getListOfStatesAndCities",
|
|
||||||
"api_method":"POST",
|
|
||||||
"params":"{records:{state_id:'value_of_answer'}}",
|
|
||||||
"fields":[
|
|
||||||
"state_id",
|
|
||||||
"name"
|
|
||||||
],
|
|
||||||
"local_variable":"local_city"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"is_repeatable":null,
|
|
||||||
"validations":[
|
|
||||||
{
|
|
||||||
"name":"required",
|
|
||||||
"isactive":"1",
|
|
||||||
"validator":"Validators.required",
|
|
||||||
"message":"State Required",
|
|
||||||
"value":null
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"question":"City",
|
|
||||||
"question_key":"city",
|
|
||||||
"type":"8",
|
|
||||||
"field_width":"45",
|
|
||||||
"answers":null,
|
|
||||||
"api_properties":"local_city",
|
|
||||||
"onchange_properties":null,
|
|
||||||
"is_repeatable":null,
|
|
||||||
"validations":[
|
|
||||||
{
|
|
||||||
"name":"required",
|
|
||||||
"isactive":"1",
|
|
||||||
"validator":"Validators.required",
|
|
||||||
"message":"CIty Required",
|
|
||||||
"value":null
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"question":"Pincode",
|
|
||||||
"question_key":"pincode",
|
|
||||||
"type":"8",
|
|
||||||
"field_width":"45",
|
|
||||||
"answers":null,
|
|
||||||
"api_properties":"local_pincode",
|
|
||||||
"onchange_properties":null,
|
|
||||||
"is_repeatable":null,
|
|
||||||
"validations":[
|
|
||||||
{
|
|
||||||
"name":"required",
|
|
||||||
"isactive":"1",
|
|
||||||
"validator":"Validators.required",
|
|
||||||
"message":"Pincode Required",
|
|
||||||
"value":null
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"question":"Property Usage",
|
"question":"Property Usage",
|
||||||
"question_key":"property_usage",
|
"question_key":"property_usage",
|
||||||
@ -548,13 +371,7 @@
|
|||||||
"is_repeatable":null,
|
"is_repeatable":null,
|
||||||
"answers":null,
|
"answers":null,
|
||||||
"validations":[
|
"validations":[
|
||||||
{
|
|
||||||
"name":"required",
|
|
||||||
"isactive":"1",
|
|
||||||
"validator":"Validators.required",
|
|
||||||
"message":"Field required",
|
|
||||||
"value":null
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -569,13 +386,7 @@
|
|||||||
"is_repeatable":null,
|
"is_repeatable":null,
|
||||||
"answers":null,
|
"answers":null,
|
||||||
"validations":[
|
"validations":[
|
||||||
{
|
|
||||||
"name":"required",
|
|
||||||
"isactive":"1",
|
|
||||||
"validator":"Validators.required",
|
|
||||||
"message":"Field required",
|
|
||||||
"value":null
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@ -96,6 +96,29 @@
|
|||||||
"seasonality"
|
"seasonality"
|
||||||
],
|
],
|
||||||
"questions":[
|
"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_key":"low_sale_month",
|
||||||
"question":"Months in which sales/services is low?",
|
"question":"Months in which sales/services is low?",
|
||||||
@ -167,30 +190,8 @@
|
|||||||
"value":null
|
"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
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@ -13,13 +13,7 @@
|
|||||||
"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
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -47,6 +41,22 @@
|
|||||||
"is_business_address"
|
"is_business_address"
|
||||||
],
|
],
|
||||||
"questions":[
|
"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",
|
"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)",
|
"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",
|
"parent_question_key":"is_business_address",
|
||||||
"answers":null,
|
"answers":null,
|
||||||
"validations":[
|
"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":"Was any business activities seen during visit?",
|
||||||
"question_key":"business_is_pd_visited",
|
"question_key":"business_is_pd_visited",
|
||||||
@ -120,13 +108,7 @@
|
|||||||
"parent_question_key":"business_is_pd_visited",
|
"parent_question_key":"business_is_pd_visited",
|
||||||
"answers":null,
|
"answers":null,
|
||||||
"validations":[
|
"validations":[
|
||||||
{
|
|
||||||
"name":"required",
|
|
||||||
"isactive":"1",
|
|
||||||
"validator":"Validators.required",
|
|
||||||
"message":"Field required",
|
|
||||||
"value":null
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@ -144,13 +126,7 @@
|
|||||||
"answer_id":"No"
|
"answer_id":"No"
|
||||||
}],
|
}],
|
||||||
"validations":[
|
"validations":[
|
||||||
{
|
|
||||||
"name":"required",
|
|
||||||
"isactive":"1",
|
|
||||||
"validator":"Validators.required",
|
|
||||||
"message":"Field required",
|
|
||||||
"value":null
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -186,13 +162,7 @@
|
|||||||
"parent_question_key":"business_ownership_type",
|
"parent_question_key":"business_ownership_type",
|
||||||
"answers":null,
|
"answers":null,
|
||||||
"validations":[
|
"validations":[
|
||||||
{
|
|
||||||
"name":"required",
|
|
||||||
"isactive":"1",
|
|
||||||
"validator":"Validators.required",
|
|
||||||
"message":"Field required",
|
|
||||||
"value":null
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -212,13 +182,7 @@
|
|||||||
"parent_question_key":"business_ownership_type",
|
"parent_question_key":"business_ownership_type",
|
||||||
"answers":null,
|
"answers":null,
|
||||||
"validations":[
|
"validations":[
|
||||||
{
|
|
||||||
"name":"required",
|
|
||||||
"isactive":"1",
|
|
||||||
"validator":"Validators.required",
|
|
||||||
"message":"Field required",
|
|
||||||
"value":null
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -293,13 +257,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"validations":[
|
"validations":[
|
||||||
{
|
|
||||||
"name":"required",
|
|
||||||
"isactive":"1",
|
|
||||||
"validator":"Validators.required",
|
|
||||||
"message":"Field required",
|
|
||||||
"value":null
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@ -331,13 +289,7 @@
|
|||||||
"parent_question_key":"business_ownership_type",
|
"parent_question_key":"business_ownership_type",
|
||||||
"answers":null,
|
"answers":null,
|
||||||
"validations":[
|
"validations":[
|
||||||
{
|
|
||||||
"name":"required",
|
|
||||||
"isactive":"1",
|
|
||||||
"validator":"Validators.required",
|
|
||||||
"message":"Field required",
|
|
||||||
"value":null
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@ -359,13 +311,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"validations":[
|
"validations":[
|
||||||
{
|
|
||||||
"name":"required",
|
|
||||||
"isactive":"1",
|
|
||||||
"validator":"Validators.required",
|
|
||||||
"message":"Field required",
|
|
||||||
"value":null
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@ -375,13 +321,7 @@
|
|||||||
],
|
],
|
||||||
"is_repeatable":null,
|
"is_repeatable":null,
|
||||||
"validations":[
|
"validations":[
|
||||||
{
|
|
||||||
"name":"required",
|
|
||||||
"isactive":"1",
|
|
||||||
"validator":"Validators.required",
|
|
||||||
"message":"Field Required",
|
|
||||||
"value":null
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -466,22 +406,25 @@
|
|||||||
"question_key":"property_address",
|
"question_key":"property_address",
|
||||||
"place_holder":"",
|
"place_holder":"",
|
||||||
"field_type":"string",
|
"field_type":"string",
|
||||||
"type":"7",
|
"type":"3",
|
||||||
"field_width":"45",
|
"field_width":"100",
|
||||||
"api_properties":null,
|
"api_properties":{
|
||||||
|
"api":"getSMCTempAddresses",
|
||||||
|
"api_method":"GET",
|
||||||
|
"params":{
|
||||||
|
"pdid":"VAR_PD_ID"
|
||||||
|
},
|
||||||
|
"fields":[
|
||||||
|
"display",
|
||||||
|
"display"
|
||||||
|
]
|
||||||
|
},
|
||||||
"onchange_properties":null,
|
"onchange_properties":null,
|
||||||
"is_repeatable":null,
|
"is_repeatable":null,
|
||||||
"is_subfield":"1",
|
"is_subfield":"1",
|
||||||
"parent_question_key":"property_type",
|
"parent_question_key":"property_type",
|
||||||
"answers":null,
|
"answers":null,
|
||||||
"validations":[
|
"validations":[
|
||||||
{
|
|
||||||
"name":"required",
|
|
||||||
"isactive":"1",
|
|
||||||
"validator":"Validators.required",
|
|
||||||
"message":"Field required",
|
|
||||||
"value":null
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@ -508,13 +451,7 @@
|
|||||||
"parent_question_key":"property_type",
|
"parent_question_key":"property_type",
|
||||||
"answers":null,
|
"answers":null,
|
||||||
"validations":[
|
"validations":[
|
||||||
{
|
|
||||||
"name":"required",
|
|
||||||
"isactive":"1",
|
|
||||||
"validator":"Validators.required",
|
|
||||||
"message":"Field required",
|
|
||||||
"value":null
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@ -526,13 +463,7 @@
|
|||||||
"parent_question_key":"business_assets_mode",
|
"parent_question_key":"business_assets_mode",
|
||||||
"answers":null,
|
"answers":null,
|
||||||
"validations":[
|
"validations":[
|
||||||
{
|
|
||||||
"name":"required",
|
|
||||||
"isactive":"1",
|
|
||||||
"validator":"Validators.required",
|
|
||||||
"message":"Field required",
|
|
||||||
"value":null
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@ -588,13 +519,7 @@
|
|||||||
"parent_question_key":"vehicle_type",
|
"parent_question_key":"vehicle_type",
|
||||||
"answers":null,
|
"answers":null,
|
||||||
"validations":[
|
"validations":[
|
||||||
{
|
|
||||||
"name":"required",
|
|
||||||
"isactive":"1",
|
|
||||||
"validator":"Validators.required",
|
|
||||||
"message":"Field required",
|
|
||||||
"value":null
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@ -606,13 +531,7 @@
|
|||||||
"parent_question_key":"business_assets_mode",
|
"parent_question_key":"business_assets_mode",
|
||||||
"answers":null,
|
"answers":null,
|
||||||
"validations":[
|
"validations":[
|
||||||
{
|
|
||||||
"name":"required",
|
|
||||||
"isactive":"1",
|
|
||||||
"validator":"Validators.required",
|
|
||||||
"message":"Field required",
|
|
||||||
"value":null
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@ -623,13 +542,7 @@
|
|||||||
"is_repeatable":null,
|
"is_repeatable":null,
|
||||||
"answers":null,
|
"answers":null,
|
||||||
"validations":[
|
"validations":[
|
||||||
{
|
|
||||||
"name":"required",
|
|
||||||
"isactive":"1",
|
|
||||||
"validator":"Validators.required",
|
|
||||||
"message":"Field required",
|
|
||||||
"value":null
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -676,13 +589,7 @@
|
|||||||
"parent_question_key":"business_ownership_type",
|
"parent_question_key":"business_ownership_type",
|
||||||
"answers":null,
|
"answers":null,
|
||||||
"validations":[
|
"validations":[
|
||||||
{
|
|
||||||
"name":"required",
|
|
||||||
"isactive":"1",
|
|
||||||
"validator":"Validators.required",
|
|
||||||
"message":"Field required",
|
|
||||||
"value":null
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -702,13 +609,7 @@
|
|||||||
"parent_question_key":"business_ownership_type",
|
"parent_question_key":"business_ownership_type",
|
||||||
"answers":null,
|
"answers":null,
|
||||||
"validations":[
|
"validations":[
|
||||||
{
|
|
||||||
"name":"required",
|
|
||||||
"isactive":"1",
|
|
||||||
"validator":"Validators.required",
|
|
||||||
"message":"Field required",
|
|
||||||
"value":null
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -785,13 +686,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"validations":[
|
"validations":[
|
||||||
{
|
|
||||||
"name":"required",
|
|
||||||
"isactive":"1",
|
|
||||||
"validator":"Validators.required",
|
|
||||||
"message":"Field required",
|
|
||||||
"value":null
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@ -822,13 +717,7 @@
|
|||||||
"parent_question_key":"business_ownership_type",
|
"parent_question_key":"business_ownership_type",
|
||||||
"answers":null,
|
"answers":null,
|
||||||
"validations":[
|
"validations":[
|
||||||
{
|
|
||||||
"name":"required",
|
|
||||||
"isactive":"1",
|
|
||||||
"validator":"Validators.required",
|
|
||||||
"message":"Field required",
|
|
||||||
"value":null
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@ -850,13 +739,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"validations":[
|
"validations":[
|
||||||
{
|
|
||||||
"name":"required",
|
|
||||||
"isactive":"1",
|
|
||||||
"validator":"Validators.required",
|
|
||||||
"message":"Field required",
|
|
||||||
"value":null
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
}],
|
}],
|
||||||
"is_repeatable":"1",
|
"is_repeatable":"1",
|
||||||
@ -878,13 +761,7 @@
|
|||||||
"answer_id":"No"
|
"answer_id":"No"
|
||||||
}],
|
}],
|
||||||
"validations":[
|
"validations":[
|
||||||
{
|
|
||||||
"name":"required",
|
|
||||||
"isactive":"1",
|
|
||||||
"validator":"Validators.required",
|
|
||||||
"message":"Field required",
|
|
||||||
"value":null
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,143 +1,117 @@
|
|||||||
{
|
{
|
||||||
"section_id": "9",
|
"section_id": "9",
|
||||||
"section_name": "Business and Personal Banking Details",
|
"section_name": "Business and Personal Banking Details",
|
||||||
"onsubmit": [],
|
"onsubmit": [],
|
||||||
"questions": [
|
"questions": [
|
||||||
{
|
{
|
||||||
"question": [
|
"question": [
|
||||||
{
|
{
|
||||||
"question": "Account holder name",
|
"question": "Account holder name",
|
||||||
"question_key": "applicant_name",
|
"question_key": "applicant_name",
|
||||||
"type": "1",
|
"type": "1",
|
||||||
"api_properties": {
|
"api_properties": {
|
||||||
"purpose": "answer_options_local",
|
"purpose": "answer_options_local",
|
||||||
"master_name": "pd_applicants",
|
"master_name": "pd_applicants",
|
||||||
"fields": [
|
"fields": [
|
||||||
"pd_co_applicant_id",
|
"pd_co_applicant_id",
|
||||||
"applicant_name"
|
"applicant_name"
|
||||||
]
|
]
|
||||||
},
|
|
||||||
"answers": null,
|
|
||||||
"onchange_properties": null,
|
|
||||||
"is_repeatable": null,
|
|
||||||
"field_type": "string",
|
|
||||||
"validations": [
|
|
||||||
{
|
|
||||||
"name": "required",
|
|
||||||
"isactive": "1",
|
|
||||||
"validator": "Validators.required",
|
|
||||||
"message": "Required",
|
|
||||||
"value": null
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"question": "Bank Name",
|
|
||||||
"question_key": "bank_name",
|
|
||||||
"type": "1",
|
|
||||||
"field_width": "45",
|
|
||||||
"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": "Account type",
|
|
||||||
"question_key": "account_type",
|
|
||||||
"type": "3",
|
|
||||||
"field_width": "45",
|
|
||||||
"api_properties":null,
|
|
||||||
"answers": [
|
|
||||||
{
|
|
||||||
"answer":"Savings",
|
|
||||||
"answer_id":"Savings"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"answer":"OD",
|
|
||||||
"answer_id":"OD"
|
|
||||||
},
|
},
|
||||||
{
|
"answers": null,
|
||||||
"answer":"Current",
|
"onchange_properties": null,
|
||||||
"answer_id":"Current"
|
"is_repeatable": null,
|
||||||
},
|
"field_type": "string",
|
||||||
{
|
"validations": [
|
||||||
"answer":"CC",
|
]
|
||||||
"answer_id":"CC"
|
},
|
||||||
}
|
{
|
||||||
],
|
"question": "Bank Name",
|
||||||
"onchange_properties": [
|
"question_key": "bank_name",
|
||||||
{
|
"type": "1",
|
||||||
"purpose":"FORM_CTRL",
|
"field_width": "45",
|
||||||
"form_controls":[{
|
"api_properties": null,
|
||||||
"insert_index":"account_type",
|
"answers": null,
|
||||||
"expression":"(String('account_type').toLowerCase() != String('savings') && String('account_type').toLowerCase() != String('current'))",
|
"onchange_properties": null,
|
||||||
"value_keys":[
|
"is_repeatable": null,
|
||||||
"account_type"
|
"validations": [
|
||||||
],
|
]
|
||||||
"questions":[
|
},
|
||||||
|
{
|
||||||
|
"question": "Account type",
|
||||||
|
"question_key": "account_type",
|
||||||
|
"type": "3",
|
||||||
|
"field_width": "45",
|
||||||
|
"api_properties": null,
|
||||||
|
"answers": [
|
||||||
|
{
|
||||||
|
"answer": "Savings",
|
||||||
|
"answer_id": "Savings"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"answer": "OD",
|
||||||
|
"answer_id": "OD"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"answer": "Current",
|
||||||
|
"answer_id": "Current"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"answer": "CC",
|
||||||
|
"answer_id": "CC"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"onchange_properties": [
|
||||||
|
{
|
||||||
|
"purpose": "FORM_CTRL",
|
||||||
|
"form_controls": [
|
||||||
{
|
{
|
||||||
"question": "OD/CC Limit",
|
"insert_index": "account_type",
|
||||||
"question_key": "cc_limit",
|
"expression": "(String('account_type').toLowerCase() != String('savings') && String('account_type').toLowerCase() != String('current'))",
|
||||||
"type": "1",
|
"value_keys": [
|
||||||
"field_width": "45",
|
"account_type"
|
||||||
"field_type": "num",
|
],
|
||||||
"api_properties": null,
|
"questions": [
|
||||||
"answers": null,
|
|
||||||
"onchange_properties": null,
|
|
||||||
"is_repeatable": null,
|
|
||||||
"validations": [
|
|
||||||
{
|
{
|
||||||
"name": "required",
|
"question": "OD/CC Limit",
|
||||||
"isactive": "1",
|
"question_key": "cc_limit",
|
||||||
"validator": "Validators.required",
|
"type": "1",
|
||||||
"message": "Field Required",
|
"field_width": "45",
|
||||||
"value": null
|
"field_type": "num",
|
||||||
|
"api_properties": null,
|
||||||
|
"answers": null,
|
||||||
|
"onchange_properties": null,
|
||||||
|
"is_repeatable": null,
|
||||||
|
"validations": [
|
||||||
|
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}]
|
}
|
||||||
}
|
],
|
||||||
],
|
"is_repeatable": null,
|
||||||
"is_repeatable": null,
|
"validations": [
|
||||||
"validations": [
|
|
||||||
{
|
|
||||||
"name": "required",
|
|
||||||
"isactive": "1",
|
|
||||||
"validator": "Validators.required",
|
|
||||||
"message": "Field Required",
|
|
||||||
"value": null
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
],
|
]
|
||||||
"is_repeatable": "1",
|
}
|
||||||
"group_title": "Banking Details",
|
],
|
||||||
"group_key": "banking_details"
|
"is_repeatable": "1",
|
||||||
},
|
"group_title": "Banking Details",
|
||||||
{
|
"group_key": "banking_details"
|
||||||
"question_key":"common_remarks",
|
},
|
||||||
"question":"Remarks",
|
{
|
||||||
"place_holder":"Enter the text",
|
"question_key": "common_remarks",
|
||||||
"type":"7",
|
"question": "Remarks",
|
||||||
"api_properties":null,
|
"place_holder": "Enter the text",
|
||||||
"answers":null,
|
"type": "7",
|
||||||
"onchange_properties":null,
|
"api_properties": null,
|
||||||
"is_repeatable":null,
|
"answers": null,
|
||||||
"field_type":"string",
|
"onchange_properties": null,
|
||||||
"field_width":"45",
|
"is_repeatable": null,
|
||||||
"validations":[
|
"field_type": "string",
|
||||||
]
|
"field_width": "45",
|
||||||
}
|
"validations": []
|
||||||
]
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
@ -36,13 +36,7 @@
|
|||||||
"parent_question_key":"total_fund_requirement",
|
"parent_question_key":"total_fund_requirement",
|
||||||
"answers":null,
|
"answers":null,
|
||||||
"validations":[
|
"validations":[
|
||||||
{
|
|
||||||
"name":"required",
|
|
||||||
"isactive":"1",
|
|
||||||
"validator":"Validators.required",
|
|
||||||
"message":"Field required",
|
|
||||||
"value":null
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@ -51,13 +45,7 @@
|
|||||||
],
|
],
|
||||||
"is_repeatable":null,
|
"is_repeatable":null,
|
||||||
"validations":[
|
"validations":[
|
||||||
{
|
|
||||||
"name":"required",
|
|
||||||
"isactive":"1",
|
|
||||||
"validator":"Validators.required",
|
|
||||||
"message":"Field Required",
|
|
||||||
"value":null
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -71,13 +59,7 @@
|
|||||||
"answers":null,
|
"answers":null,
|
||||||
"is_repeatable":null,
|
"is_repeatable":null,
|
||||||
"validations":[
|
"validations":[
|
||||||
{
|
|
||||||
"name":"required",
|
|
||||||
"isactive":"1",
|
|
||||||
"validator":"Validators.required",
|
|
||||||
"message":"Field Required",
|
|
||||||
"value":null
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -90,13 +72,7 @@
|
|||||||
"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
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -132,13 +108,7 @@
|
|||||||
"parent_question_key":"total_fund_requirement",
|
"parent_question_key":"total_fund_requirement",
|
||||||
"answers":null,
|
"answers":null,
|
||||||
"validations":[
|
"validations":[
|
||||||
{
|
|
||||||
"name":"required",
|
|
||||||
"isactive":"1",
|
|
||||||
"validator":"Validators.required",
|
|
||||||
"message":"Field required",
|
|
||||||
"value":null
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@ -146,13 +116,7 @@
|
|||||||
}],
|
}],
|
||||||
"is_repeatable":null,
|
"is_repeatable":null,
|
||||||
"validations":[
|
"validations":[
|
||||||
{
|
|
||||||
"name":"required",
|
|
||||||
"isactive":"1",
|
|
||||||
"validator":"Validators.required",
|
|
||||||
"message":"Field Required",
|
|
||||||
"value":null
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user