url-random string changes
This commit is contained in:
parent
8100012549
commit
83dc38377e
@ -1,10 +1,11 @@
|
|||||||
<div class="pad-wrap" [style.minHeight]="'100%'">
|
<div class="pad-wrap" [style.minHeight]="'100%'">
|
||||||
<div fxFlex.gt-sm="100" fxFlex.gt-xs="100" fxFlex="100">
|
<div fxFlex.gt-sm="100" fxFlex.gt-xs="100" fxFlex="100">
|
||||||
<mat-card>
|
<mat-card *ngIf="access; else unauthorized;">
|
||||||
<mat-card-title style="background-color:#e00201;padding: 23px;">
|
<mat-card-title style="background-color:#e00201;padding: 23px;">
|
||||||
{{dashboardTitle}}
|
{{dashboardTitle}}
|
||||||
</mat-card-title>
|
</mat-card-title>
|
||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
|
<!-- -->
|
||||||
<div fxFlex="row">
|
<div fxFlex="row">
|
||||||
<div fxFlex="100">
|
<div fxFlex="100">
|
||||||
<div fxFlex="50" align="center" *ngIf="total1 != 0">
|
<div fxFlex="50" align="center" *ngIf="total1 != 0">
|
||||||
@ -156,10 +157,24 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
</mat-card>
|
</mat-card>
|
||||||
|
<ng-template #unauthorized>
|
||||||
|
<div class="relative">
|
||||||
|
<div class="form-back">
|
||||||
|
<div class="relative error-wrapper">
|
||||||
|
<mat-icon class="error-icon" style="color:red;">notification_important</mat-icon>
|
||||||
|
<h1 style="color:red;"> Permissions Deined! </h1>
|
||||||
|
<span class="error-text" style="color:red;">401</span>
|
||||||
|
<h2 style="color:red;"> Unauthorized access </h2>
|
||||||
|
<div class="error-details" style="color:red;">
|
||||||
|
<p>Sorry, but the page you were trying to view does not exist</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ng-template>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@ -13,4 +13,24 @@ mat-card-content{
|
|||||||
width: 125px;
|
width: 125px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin: 1px;
|
margin: 1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Error Text Font Size*/
|
||||||
|
.error-text{
|
||||||
|
font-size: 6rem !important;
|
||||||
|
}
|
||||||
|
.error-wrapper{
|
||||||
|
padding-top: 2rem !important;//default is 5 rem
|
||||||
|
}
|
||||||
|
.error-icon{
|
||||||
|
width: 100px;
|
||||||
|
font-size: 79px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-back{
|
||||||
|
background-position: top center;
|
||||||
|
min-height: calc(100vh + 100px);
|
||||||
|
height: auto;
|
||||||
|
background-color: #fff !important;
|
||||||
|
color:red !important;
|
||||||
|
}
|
||||||
@ -15,7 +15,8 @@ import { BaseChartDirective } from 'ng2-charts/ng2-charts';
|
|||||||
|
|
||||||
export class DashboardComponent {
|
export class DashboardComponent {
|
||||||
|
|
||||||
dashboardTitle = 'PD Status';
|
dashboardTitle : any = 'PD Status';
|
||||||
|
access : boolean;
|
||||||
|
|
||||||
/** Declaration Part Of Doughnut Chart */
|
/** Declaration Part Of Doughnut Chart */
|
||||||
doughnutChartLabels: string[] = ['Triggered','Allocated','Scheduled','InProgress','Completed','QC Completed'];
|
doughnutChartLabels: string[] = ['Triggered','Allocated','Scheduled','InProgress','Completed','QC Completed'];
|
||||||
@ -31,6 +32,8 @@ export class DashboardComponent {
|
|||||||
total1: number = 0;
|
total1: number = 0;
|
||||||
total2: number = 0;
|
total2: number = 0;
|
||||||
total3: number = 0;
|
total3: number = 0;
|
||||||
|
|
||||||
|
public userRoleID = +localStorage.getItem('user_role');
|
||||||
|
|
||||||
// doughnutChartColors: any[] = [{
|
// doughnutChartColors: any[] = [{
|
||||||
// backgroundColor: ['#c1c1c1','#f44336','#ffa500','#ffeb3b','#3f51b5','#00ff00','#4caf50']
|
// backgroundColor: ['#c1c1c1','#f44336','#ffa500','#ffeb3b','#3f51b5','#00ff00','#4caf50']
|
||||||
@ -42,7 +45,8 @@ export class DashboardComponent {
|
|||||||
|
|
||||||
ngOnInit(){
|
ngOnInit(){
|
||||||
// console.clear();
|
// console.clear();
|
||||||
this.getDoughnutChartData();
|
this.access = this.userRoleID == 3 || this.userRoleID == 4 || this.userRoleID == 6 ? false : true;
|
||||||
|
this.getDoughnutChartData();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -33,7 +33,7 @@
|
|||||||
</a>-->
|
</a>-->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<mat-nav-list appAccordion class="navigation relative">
|
<mat-nav-list appAccordion class="navigation relative" *ngIf="permissionDeined">
|
||||||
|
|
||||||
<mat-list-item appAccordionLink *ngFor="let menuitem of menuItems.getAll() | roleMenuItems:'2'">
|
<mat-list-item appAccordionLink *ngFor="let menuitem of menuItems.getAll() | roleMenuItems:'2'">
|
||||||
<a appAccordionToggle class="relative" mat-ripple [routerLink]="['/', menuitem.state]" *ngIf="menuitem.type === 'link'">
|
<a appAccordionToggle class="relative" mat-ripple [routerLink]="['/', menuitem.state]" *ngIf="menuitem.type === 'link'">
|
||||||
@ -215,7 +215,7 @@
|
|||||||
Calendar Settings
|
Calendar Settings
|
||||||
</button>
|
</button>
|
||||||
</mat-menu> -->
|
</mat-menu> -->
|
||||||
<button (click)="end.toggle()" matTooltip="Notifications" matTooltipPosition="below" mat-icon-button class="ml-xs overflow-visible">
|
<button *ngIf="permissionDeined" (click)="end.toggle()" matTooltip="Notifications" matTooltipPosition="below" mat-icon-button class="ml-xs overflow-visible">
|
||||||
<mat-icon>notifications</mat-icon>
|
<mat-icon>notifications</mat-icon>
|
||||||
<!-- <span class="notification-label">2</span> -->
|
<!-- <span class="notification-label">2</span> -->
|
||||||
<span *ngIf="alertCount != 0" style = "width:23px" class="notification-label">{{alertCount}}</span>
|
<span *ngIf="alertCount != 0" style = "width:23px" class="notification-label">{{alertCount}}</span>
|
||||||
@ -306,7 +306,7 @@
|
|||||||
Calendar Settings
|
Calendar Settings
|
||||||
</button>
|
</button>
|
||||||
</mat-menu> -->
|
</mat-menu> -->
|
||||||
<button (click)="end.toggle()" mat-icon-button class="ml-xs overflow-visible">
|
<button *ngIf="permissionDeined" (click)="end.toggle()" mat-icon-button class="ml-xs overflow-visible">
|
||||||
<mat-icon>notifications</mat-icon>
|
<mat-icon>notifications</mat-icon>
|
||||||
<span *ngIf="alertCount != 0" style = "width:23px" class="notification-label" >{{alertCount}}</span>
|
<span *ngIf="alertCount != 0" style = "width:23px" class="notification-label" >{{alertCount}}</span>
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@ -50,7 +50,9 @@ export class AdminLayoutComponent implements OnInit, OnDestroy {
|
|||||||
alertMsgTriggerType : any[];
|
alertMsgTriggerType : any[];
|
||||||
alertMsgAllocateType : any[];
|
alertMsgAllocateType : any[];
|
||||||
alertCount: any;
|
alertCount: any;
|
||||||
userRoleType: String;
|
userRoleType: String;
|
||||||
|
permissionDeined : boolean;
|
||||||
|
|
||||||
constructor(private router: Router, public menuItems: MenuItems, public horizontalMenuItems : HorizontalMenuItems, public translate: TranslateService,public aws:AwsService,public users:UserService,private _dashboardService: DashboardService) {
|
constructor(private router: Router, public menuItems: MenuItems, public horizontalMenuItems : HorizontalMenuItems, public translate: TranslateService,public aws:AwsService,public users:UserService,private _dashboardService: DashboardService) {
|
||||||
const browserLang: string = translate.getBrowserLang();
|
const browserLang: string = translate.getBrowserLang();
|
||||||
translate.use(browserLang.match(/en|fr/) ? browserLang : 'en');
|
translate.use(browserLang.match(/en|fr/) ? browserLang : 'en');
|
||||||
@ -106,6 +108,7 @@ export class AdminLayoutComponent implements OnInit, OnDestroy {
|
|||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
this.userRoleType=localStorage.getItem('user_role');
|
this.userRoleType=localStorage.getItem('user_role');
|
||||||
|
this.permissionDeined = this.userRoleType == '3' || this.userRoleType == '4' || this.userRoleType == '6' ? false : true;
|
||||||
// console.clear();
|
// console.clear();
|
||||||
const elemSidebar = <HTMLElement>document.querySelector('.sidebar-container ');
|
const elemSidebar = <HTMLElement>document.querySelector('.sidebar-container ');
|
||||||
|
|
||||||
|
|||||||
@ -11,14 +11,17 @@ export class RoleMenuItemsPipe implements PipeTransform {
|
|||||||
switch(localStorage.getItem('user_role')){
|
switch(localStorage.getItem('user_role')){
|
||||||
case '1': return value.filter(val=>val.state!="settings" && val.state!="quality_check_discussion");
|
case '1': return value.filter(val=>val.state!="settings" && val.state!="quality_check_discussion");
|
||||||
case '2': return value.filter(val=>val.state!="settings" && val.state!="quality_check_discussion");
|
case '2': return value.filter(val=>val.state!="settings" && val.state!="quality_check_discussion");
|
||||||
case '3': return value.filter(val=>val.state!="settings" && val.state!="quality_check_discussion");
|
case '3': return;
|
||||||
case '4': return value.filter(val=>val.state!="settings" && val.state!="quality_check_discussion" && val.state!="reports");
|
case '4': return;
|
||||||
case '5': return value.filter(val=>val.state!="settings" && val.state!="quality_check_discussion" && val.state!="reports");
|
case '5': return value.filter(val=>val.state!="settings" && val.state!="quality_check_discussion" && val.state!="reports");
|
||||||
case '6': return value.filter(val=>val.state!="settings" && val.state!="personal_discussion" && val.state!="reports");
|
case '6': return;
|
||||||
case '7': return value.filter(val=>val.state!="settings" && val.state!="personal_discussion" && val.state!="reports");
|
case '7': return value.filter(val=>val.state!="settings" && val.state!="personal_discussion" && val.state!="reports");
|
||||||
case '8': return value.filter(val=>val.state!="settings" && val.state!="quality_check_discussion");
|
case '8': return value.filter(val=>val.state!="settings" && val.state!="quality_check_discussion");
|
||||||
case '9': return value.filter(val=>val.state!="settings" && val.state!="quality_check_discussion");
|
case '9': return value.filter(val=>val.state!="settings" && val.state!="quality_check_discussion");
|
||||||
case '10': return value;
|
case '10': return value;
|
||||||
|
// case '3': return value.filter(val=>val.state!="settings" && val.state!="quality_check_discussion");
|
||||||
|
// case '4': return value.filter(val=>val.state!="settings" && val.state!="quality_check_discussion" && val.state!="reports");
|
||||||
|
// case '6': return value.filter(val=>val.state!="settings" && val.state!="personal_discussion" && val.state!="reports");
|
||||||
// default: return value.filter(val=>val.state!="setting" && val.state!="quality_check_discussion");
|
// default: return value.filter(val=>val.state!="setting" && val.state!="quality_check_discussion");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -130,7 +130,7 @@
|
|||||||
<mat-icon>my_location</mat-icon>
|
<mat-icon>my_location</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
</a>
|
</a>
|
||||||
<button mat-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" color="primary" (click)="viewPD(details.is_child == 0 ? details.pd_id : details.parent_pd_id)"
|
<button mat-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" color="primary" (click)="viewPD(details.is_child == 0 ? details.pd_id : details.parent_pd_id,details.random_string)"
|
||||||
matTooltip="View" matTooltipPosition="above">
|
matTooltip="View" matTooltipPosition="above">
|
||||||
<mat-icon>visibility</mat-icon>
|
<mat-icon>visibility</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@ -35,7 +35,8 @@ export class AllPdComponent implements OnInit, OnChanges {
|
|||||||
|
|
||||||
@Input() bindFilterValue: string;
|
@Input() bindFilterValue: string;
|
||||||
|
|
||||||
@Output() loadPdView = new EventEmitter<string>();
|
// @Output() loadPdView = new EventEmitter<string>();
|
||||||
|
@Output() loadPdView = new EventEmitter<any>();
|
||||||
|
|
||||||
// data source variable details
|
// data source variable details
|
||||||
PdListData:any[] = [];
|
PdListData:any[] = [];
|
||||||
@ -105,9 +106,11 @@ export class AllPdComponent implements OnInit, OnChanges {
|
|||||||
pageChange(e) {
|
pageChange(e) {
|
||||||
console.log(e);
|
console.log(e);
|
||||||
}
|
}
|
||||||
viewPD(pdid:string){
|
viewPD(pdid:string,randomString){
|
||||||
this.loadPdView.next(pdid);
|
console.log(pdid,randomString);
|
||||||
|
let pdidwithRandomString = {'id':pdid,'string': randomString};
|
||||||
|
console.log(pdidwithRandomString);
|
||||||
|
this.loadPdView.emit(pdidwithRandomString);
|
||||||
}
|
}
|
||||||
|
|
||||||
titleCaseWord(word:string) {
|
titleCaseWord(word:string) {
|
||||||
|
|||||||
@ -111,7 +111,8 @@
|
|||||||
</ng-container>
|
</ng-container>
|
||||||
<ng-container matColumnDef="Action">
|
<ng-container matColumnDef="Action">
|
||||||
<mat-cell class="cell center" *matCellDef="let details;">
|
<mat-cell class="cell center" *matCellDef="let details;">
|
||||||
<button mat-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" (click)="viewPD(details.is_child == 0 ? details.pd_id : details.parent_pd_id)" matTooltip="View"
|
<!-- <button mat-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" (click)="viewPD(details.is_child == 0 ? details.pd_id : details.parent_pd_id)" -->
|
||||||
|
<button mat-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" (click)="viewPD(details.is_child == 0 ? details.pd_id : details.parent_pd_id,details.random_string)" matTooltip="View"
|
||||||
matTooltipPosition="above" color="primary"><mat-icon>visibility</mat-icon></button>
|
matTooltipPosition="above" color="primary"><mat-icon>visibility</mat-icon></button>
|
||||||
</mat-cell>
|
</mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|||||||
@ -35,7 +35,8 @@ export class CompletedPdComponent implements OnInit, OnChanges {
|
|||||||
@ViewChild(MatSort) sort: MatSort;
|
@ViewChild(MatSort) sort: MatSort;
|
||||||
|
|
||||||
@Input() bindFilterValue: string;
|
@Input() bindFilterValue: string;
|
||||||
@Output() loadPdView = new EventEmitter<string>();
|
@Output() loadPdView = new EventEmitter<any>();
|
||||||
|
|
||||||
|
|
||||||
// data source variable details
|
// data source variable details
|
||||||
completedPdListData:any[] = [];
|
completedPdListData:any[] = [];
|
||||||
@ -108,9 +109,15 @@ export class CompletedPdComponent implements OnInit, OnChanges {
|
|||||||
pageChange(e) {
|
pageChange(e) {
|
||||||
console.log(e);
|
console.log(e);
|
||||||
}
|
}
|
||||||
viewPD(pdid:string){
|
// viewPD(pdid:string){
|
||||||
this.loadPdView.next(pdid);
|
// this.loadPdView.next(pdid);
|
||||||
|
|
||||||
|
// }
|
||||||
|
viewPD(pdid:string,randomString){
|
||||||
|
console.log(pdid,randomString);
|
||||||
|
let pdidwithRandomString = {'id':pdid,'string': randomString};
|
||||||
|
console.log(pdidwithRandomString);
|
||||||
|
this.loadPdView.emit(pdidwithRandomString);
|
||||||
}
|
}
|
||||||
|
|
||||||
titleCaseWord(word:string) {
|
titleCaseWord(word:string) {
|
||||||
|
|||||||
@ -5,6 +5,7 @@ import { CustomValidators } from 'ng2-validation';
|
|||||||
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 { TitleCasePipe } from '@angular/common';
|
import { TitleCasePipe } from '@angular/common';
|
||||||
|
import { getRandomString } from 'selenium-webdriver/safari';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-edit-pd-master',
|
selector: 'app-edit-pd-master',
|
||||||
@ -42,6 +43,8 @@ export class EditPdMasterComponent implements OnInit {
|
|||||||
public _EditPDtriggerForm:FormGroup;
|
public _EditPDtriggerForm:FormGroup;
|
||||||
public notifier: NotifierService;
|
public notifier: NotifierService;
|
||||||
addresses: FormArray;
|
addresses: FormArray;
|
||||||
|
public masterRandomString : string;
|
||||||
|
|
||||||
|
|
||||||
// create values for status check
|
// create values for status check
|
||||||
pdStatusCheck :any={
|
pdStatusCheck :any={
|
||||||
@ -62,6 +65,7 @@ export class EditPdMasterComponent implements OnInit {
|
|||||||
this.notifier=notifier
|
this.notifier=notifier
|
||||||
this.currentPDStatus = data.records.pd_status;
|
this.currentPDStatus = data.records.pd_status;
|
||||||
this.pdid = data.records.pd_id;
|
this.pdid = data.records.pd_id;
|
||||||
|
this.masterRandomString = data.records.random_string;
|
||||||
this.disableAfterSubmit = false;
|
this.disableAfterSubmit = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -573,7 +577,8 @@ export class EditPdMasterComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.disableAfterSubmit = true;
|
this.disableAfterSubmit = true;
|
||||||
this._pd.editPdMasterDetails(lenderMasterArray, updateStatus).subscribe(result => {
|
console.log('this.masterRandomString',this.masterRandomString);
|
||||||
|
this._pd.editPdMasterDetails(lenderMasterArray, updateStatus,this.masterRandomString).subscribe(result => {
|
||||||
if (result.status == 200) {
|
if (result.status == 200) {
|
||||||
this.disableAfterSubmit = false;
|
this.disableAfterSubmit = false;
|
||||||
this._pd.updatePDAddress(my_array.addresses).subscribe(result => {
|
this._pd.updatePDAddress(my_array.addresses).subscribe(result => {
|
||||||
|
|||||||
@ -15,11 +15,13 @@ export class InitiateAdditionalPdComponent implements OnInit {
|
|||||||
additionalPDForm:FormGroup;
|
additionalPDForm:FormGroup;
|
||||||
customerSegmentList: any=[];
|
customerSegmentList: any=[];
|
||||||
applicantList: any =[];
|
applicantList: any =[];
|
||||||
|
MasterRandomString : string;
|
||||||
constructor(notifier: NotifierService,private _fb: FormBuilder, private _pd: PdTrigerService, @Inject(MAT_DIALOG_DATA) public data: any, private dialogRef: MatDialogRef<InitiateAdditionalPdComponent>) {
|
constructor(notifier: NotifierService,private _fb: FormBuilder, private _pd: PdTrigerService, @Inject(MAT_DIALOG_DATA) public data: any, private dialogRef: MatDialogRef<InitiateAdditionalPdComponent>) {
|
||||||
this.notifier = notifier;
|
this.notifier = notifier;
|
||||||
this.pageTitle="Choose customer segment For this PD address"
|
this.pageTitle="Choose customer segment For this PD address"
|
||||||
this.applicantList = this.data.applicants_details;
|
this.applicantList = this.data.applicants_details;
|
||||||
this.applicantList = this.applicantList.filter(appt => appt.applicant_type != 2 && appt.applicant_type != 3);
|
this.applicantList = this.applicantList.filter(appt => appt.applicant_type != 2 && appt.applicant_type != 3);
|
||||||
|
this.MasterRandomString = this.data.random_string;
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
@ -85,7 +87,8 @@ submitDetails(values: any) {
|
|||||||
"pd_status":"TRIGGERED",
|
"pd_status":"TRIGGERED",
|
||||||
"parent_pd_id":values.parent_pd_id,
|
"parent_pd_id":values.parent_pd_id,
|
||||||
"fk_customer_segment":values.fk_customer_segment ,
|
"fk_customer_segment":values.fk_customer_segment ,
|
||||||
"fk_primary_address_id":values.fk_address_id};
|
"fk_primary_address_id":values.fk_address_id,
|
||||||
|
"random_string":this.MasterRandomString};
|
||||||
}
|
}
|
||||||
|
|
||||||
this._pd.initiateAddressPdProcess(update_details).subscribe(data => {
|
this._pd.initiateAddressPdProcess(update_details).subscribe(data => {
|
||||||
|
|||||||
@ -108,7 +108,7 @@
|
|||||||
</ng-container>
|
</ng-container>
|
||||||
<ng-container matColumnDef="Action">
|
<ng-container matColumnDef="Action">
|
||||||
<mat-cell class="cell center" *matCellDef="let details;">
|
<mat-cell class="cell center" *matCellDef="let details;">
|
||||||
<button mat-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" (click)="viewPD(details.is_child == 0 ? details.pd_id : details.parent_pd_id)" matTooltip="View" matTooltipPosition="above" color="primary"><mat-icon>visibility</mat-icon></button>
|
<button mat-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" (click)="viewPD(details.is_child == 0 ? details.pd_id : details.parent_pd_id,details.random_string)" matTooltip="View" matTooltipPosition="above" color="primary"><mat-icon>visibility</mat-icon></button>
|
||||||
</mat-cell>
|
</mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<mat-row style="align-items: normal !important;" *matRowDef="let row; columns: displayedColumns;">
|
<mat-row style="align-items: normal !important;" *matRowDef="let row; columns: displayedColumns;">
|
||||||
|
|||||||
@ -33,7 +33,7 @@ export class InprogressPdComponent implements OnInit, OnChanges {
|
|||||||
@ViewChild(MatSort) sort: MatSort;
|
@ViewChild(MatSort) sort: MatSort;
|
||||||
|
|
||||||
@Input() bindFilterValue: string;
|
@Input() bindFilterValue: string;
|
||||||
@Output() loadPdView = new EventEmitter<string>();
|
@Output() loadPdView = new EventEmitter<any>();
|
||||||
|
|
||||||
// data source variable details
|
// data source variable details
|
||||||
progressPdListData:any[] = [];
|
progressPdListData:any[] = [];
|
||||||
@ -101,10 +101,18 @@ export class InprogressPdComponent implements OnInit, OnChanges {
|
|||||||
pageChange(e) {
|
pageChange(e) {
|
||||||
console.log(e);
|
console.log(e);
|
||||||
}
|
}
|
||||||
viewPD(pdid:string){
|
// viewPD(pdid:string){
|
||||||
this.loadPdView.next(pdid);
|
// this.loadPdView.next(pdid);
|
||||||
|
|
||||||
|
// }
|
||||||
|
|
||||||
|
viewPD(pdid:string,randomString){
|
||||||
|
console.log(pdid,randomString);
|
||||||
|
let pdidwithRandomString = {'id':pdid,'string': randomString};
|
||||||
|
console.log(pdidwithRandomString);
|
||||||
|
this.loadPdView.emit(pdidwithRandomString);
|
||||||
}
|
}
|
||||||
|
|
||||||
titleCaseWord(word:string) {
|
titleCaseWord(word:string) {
|
||||||
if (!word) return word;
|
if (!word) return word;
|
||||||
return word[0].toUpperCase() + word.substr(1).toLowerCase();
|
return word[0].toUpperCase() + word.substr(1).toLowerCase();
|
||||||
|
|||||||
@ -77,16 +77,19 @@ export class ListPdComponent implements OnInit, OnDestroy {
|
|||||||
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();
|
||||||
|
|
||||||
}
|
}
|
||||||
viewPDDetails(pdid:string){
|
viewPDDetails(event){
|
||||||
|
console.log('after clicking view icon',event)
|
||||||
|
let pdid = event.id;
|
||||||
|
let rdmstr = event.string;
|
||||||
|
console.log("pdid = " + event.id);
|
||||||
|
console.log("randomString = " + event.string);
|
||||||
this.viewPdList = !this.viewPdList;
|
this.viewPdList = !this.viewPdList;
|
||||||
this.router.navigate([ '../pdlist/viewpd',pdid], { relativeTo: this.route });
|
this.router.navigate([ '../pdlist/viewpd',pdid,rdmstr], { relativeTo: this.route });
|
||||||
|
|
||||||
}
|
}
|
||||||
//get tab changes
|
//get tab changes
|
||||||
onTabClick(event: MatTabChangeEvent) {
|
onTabClick(event: MatTabChangeEvent) {
|
||||||
this.getTabIndex=event.index;
|
this.getTabIndex=event.index;
|
||||||
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();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnDestroy(): void {
|
ngOnDestroy(): void {
|
||||||
|
|||||||
@ -35,6 +35,7 @@ export class PdReportComponent implements OnInit {
|
|||||||
public generateBtn: Boolean = false;
|
public generateBtn: Boolean = false;
|
||||||
public reGenerateBtn: Boolean = false;
|
public reGenerateBtn: Boolean = false;
|
||||||
public pdReportVersionList = [];
|
public pdReportVersionList = [];
|
||||||
|
public masterRandomString : string;
|
||||||
// public src;
|
// public src;
|
||||||
pdReportRecords: any;
|
pdReportRecords: any;
|
||||||
latestPDDetails: any;
|
latestPDDetails: any;
|
||||||
@ -45,6 +46,7 @@ export class PdReportComponent implements OnInit {
|
|||||||
private router: Router, public pdTrigerService: PdTrigerService, private listPDComponent: ListPdComponent,
|
private router: Router, public pdTrigerService: PdTrigerService, private listPDComponent: ListPdComponent,
|
||||||
private dialog: MatDialog, private sanitizer: DomSanitizer) {
|
private dialog: MatDialog, private sanitizer: DomSanitizer) {
|
||||||
this.startPD = this.route.snapshot.params['pdid'];
|
this.startPD = this.route.snapshot.params['pdid'];
|
||||||
|
this.masterRandomString = this.route.snapshot.params['rdmstr'];
|
||||||
this.notifier = notifier;
|
this.notifier = notifier;
|
||||||
// this.src = 'https://lender7.s3.ap-south-1.amazonaws.com/pd1/pd_report_original_version.pdf?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAJ3QDSPT3LDSWRYUQ%2F20181210%2Fap-south-1%2Fs3%2Faws4_request&X-Amz-Date=20181210T073026Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Signature=35aa183cbbfc835f96719a5e9aa552c79b3a1b7d8bca043f7d738d730755dcbb';
|
// this.src = 'https://lender7.s3.ap-south-1.amazonaws.com/pd1/pd_report_original_version.pdf?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAJ3QDSPT3LDSWRYUQ%2F20181210%2Fap-south-1%2Fs3%2Faws4_request&X-Amz-Date=20181210T073026Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Signature=35aa183cbbfc835f96719a5e9aa552c79b3a1b7d8bca043f7d738d730755dcbb';
|
||||||
// this.src = this.sanitizer.bypassSecurityTrustResourceUrl("https://lender7.s3.ap-south-1.amazonaws.com/pd1/pd_report_original_version.pdf?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAJ3QDSPT3LDSWRYUQ%2F20181210%2Fap-south-1%2Fs3%2Faws4_request&X-Amz-Date=20181210T053116Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Signature=6e25703a1e339dd5f081fa8aca5b8b2d81ba161d8cfd708759de899abf72146b");
|
// this.src = this.sanitizer.bypassSecurityTrustResourceUrl("https://lender7.s3.ap-south-1.amazonaws.com/pd1/pd_report_original_version.pdf?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAJ3QDSPT3LDSWRYUQ%2F20181210%2Fap-south-1%2Fs3%2Faws4_request&X-Amz-Date=20181210T053116Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Signature=6e25703a1e339dd5f081fa8aca5b8b2d81ba161d8cfd708759de899abf72146b");
|
||||||
@ -94,7 +96,8 @@ export class PdReportComponent implements OnInit {
|
|||||||
reGeneratePFReport() {
|
reGeneratePFReport() {
|
||||||
let data = {
|
let data = {
|
||||||
"pd_id": this.startPD,
|
"pd_id": this.startPD,
|
||||||
"regenerate": "1"
|
"regenerate": "1",
|
||||||
|
// "random_string":this.masterRandomString,
|
||||||
};
|
};
|
||||||
this.pdTrigerService.getPDReportFinalDocument(data).subscribe(data => {
|
this.pdTrigerService.getPDReportFinalDocument(data).subscribe(data => {
|
||||||
if (data.dataStatus) {
|
if (data.dataStatus) {
|
||||||
@ -109,7 +112,8 @@ export class PdReportComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
generateNewPDReport() {
|
generateNewPDReport() {
|
||||||
let data = {
|
let data = {
|
||||||
"pd_id": this.startPD
|
"pd_id": this.startPD,
|
||||||
|
// "random_string":this.masterRandomString,
|
||||||
};
|
};
|
||||||
this.pdTrigerService.getPDReportFinalDocument(data).subscribe(data => {
|
this.pdTrigerService.getPDReportFinalDocument(data).subscribe(data => {
|
||||||
if (data.dataStatus) {
|
if (data.dataStatus) {
|
||||||
@ -145,7 +149,7 @@ export class PdReportComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getPdReportDetails() {
|
getPdReportDetails() {
|
||||||
this.pdTrigerService.getPdFinalReportDetails(this.startPD).subscribe(data => {
|
this.pdTrigerService.getPdFinalReportDetails(this.startPD,this.masterRandomString).subscribe(data => {
|
||||||
if (data.status == 200) {
|
if (data.status == 200) {
|
||||||
// this.pdReportRecords = data.records.question_answers;
|
// this.pdReportRecords = data.records.question_answers;
|
||||||
this.pdReportRecords = data.records;
|
this.pdReportRecords = data.records;
|
||||||
@ -190,7 +194,7 @@ export class PdReportComponent implements OnInit {
|
|||||||
|
|
||||||
reportReview(status): void {
|
reportReview(status): void {
|
||||||
const dialogRef = this.dialog.open(QcReviewComponent, {
|
const dialogRef = this.dialog.open(QcReviewComponent, {
|
||||||
data: { startId: this.startPD, data_status: status },
|
data: { startId: this.startPD, data_status: status ,random_string:this.masterRandomString},
|
||||||
disableClose: true
|
disableClose: true
|
||||||
});
|
});
|
||||||
dialogRef.afterClosed()
|
dialogRef.afterClosed()
|
||||||
|
|||||||
@ -84,6 +84,7 @@ export class QcReviewComponent implements OnInit {
|
|||||||
myClick(): void {
|
myClick(): void {
|
||||||
let template = this.ngForm.value;
|
let template = this.ngForm.value;
|
||||||
template.pd_id = this.data.startId;
|
template.pd_id = this.data.startId;
|
||||||
|
template.random_String = this.data.random_string;
|
||||||
this.pdTrigerService.pdReviewStatusUpdate(template).subscribe(data=>{
|
this.pdTrigerService.pdReviewStatusUpdate(template).subscribe(data=>{
|
||||||
this.notifier.notify('success', 'Your Changes Updated.!');
|
this.notifier.notify('success', 'Your Changes Updated.!');
|
||||||
this.dialogRef.close({
|
this.dialogRef.close({
|
||||||
|
|||||||
@ -20,6 +20,7 @@ export class PdStatusChangeDialogueComponent implements OnInit {
|
|||||||
CompletenessCheck: boolean;
|
CompletenessCheck: boolean;
|
||||||
addonStatus: string ="ADD_ON_PENDING";
|
addonStatus: string ="ADD_ON_PENDING";
|
||||||
public Loading: boolean;
|
public Loading: boolean;
|
||||||
|
public masterRandomString : string;
|
||||||
|
|
||||||
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)
|
||||||
{
|
{
|
||||||
@ -29,6 +30,7 @@ export class PdStatusChangeDialogueComponent implements OnInit {
|
|||||||
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;
|
||||||
|
this.masterRandomString = this.data.random_string;
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
@ -61,7 +63,7 @@ export class PdStatusChangeDialogueComponent implements OnInit {
|
|||||||
let update_status = {
|
let update_status = {
|
||||||
"pd_id":this.data.pdid,
|
"pd_id":this.data.pdid,
|
||||||
};
|
};
|
||||||
this.pd.editPdMasterDetails(update_status, status).subscribe(result => {
|
this.pd.editPdMasterDetails(update_status, status,this.masterRandomString).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' : 'Discussions Updated Successfully');
|
this.notifier.notify('success', this.data.pd_status=='INPROGRESS' ? 'Discussions Started Successfully' : this.data.pd_status=='COMPLETED' ? 'Discussions Completed Successfully' : 'Discussions Updated Successfully');
|
||||||
|
|||||||
@ -110,7 +110,8 @@
|
|||||||
</ng-container>
|
</ng-container>
|
||||||
<ng-container matColumnDef="Action">
|
<ng-container matColumnDef="Action">
|
||||||
<mat-cell class="cell center" *matCellDef="let details;">
|
<mat-cell class="cell center" *matCellDef="let details;">
|
||||||
<button mat-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" (click)="viewPD(details.is_child == 0 ? details.pd_id : details.parent_pd_id)" matTooltip="View" matTooltipPosition="above" color="primary"><mat-icon>visibility</mat-icon></button>
|
<!-- <button mat-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" (click)="viewPD(details.is_child == 0 ? details.pd_id : details.parent_pd_id)" matTooltip="View" matTooltipPosition="above" color="primary"><mat-icon>visibility</mat-icon></button> -->
|
||||||
|
<button mat-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" (click)="viewPD(details.is_child == 0 ? details.pd_id : details.parent_pd_id,details.random_string)" color="primary" matTooltip="View" matTooltipPosition="above"><mat-icon>visibility</mat-icon></button>
|
||||||
</mat-cell>
|
</mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<mat-row style="align-items: normal !important;" *matRowDef="let row; columns: displayedColumns;">
|
<mat-row style="align-items: normal !important;" *matRowDef="let row; columns: displayedColumns;">
|
||||||
|
|||||||
@ -35,7 +35,7 @@ export class QcCompletedPdComponent implements OnInit, OnChanges {
|
|||||||
@ViewChild(MatSort) sort: MatSort;
|
@ViewChild(MatSort) sort: MatSort;
|
||||||
|
|
||||||
@Input() bindFilterValue: string;
|
@Input() bindFilterValue: string;
|
||||||
@Output() loadPdView = new EventEmitter<string>();
|
@Output() loadPdView = new EventEmitter<any>();
|
||||||
|
|
||||||
// data source variable details
|
// data source variable details
|
||||||
qcCompletedPdListData: any[] = [];
|
qcCompletedPdListData: any[] = [];
|
||||||
@ -110,9 +110,15 @@ export class QcCompletedPdComponent implements OnInit, OnChanges {
|
|||||||
pageChange(e) {
|
pageChange(e) {
|
||||||
console.log(e);
|
console.log(e);
|
||||||
}
|
}
|
||||||
viewPD(pdid: string) {
|
// viewPD(pdid: string) {
|
||||||
this.loadPdView.next(pdid);
|
// this.loadPdView.next(pdid);
|
||||||
|
|
||||||
|
// }
|
||||||
|
viewPD(pdid:string,randomString){
|
||||||
|
console.log(pdid,randomString);
|
||||||
|
let pdidwithRandomString = {'id':pdid,'string': randomString};
|
||||||
|
console.log(pdidwithRandomString);
|
||||||
|
this.loadPdView.emit(pdidwithRandomString);
|
||||||
}
|
}
|
||||||
titleCaseWord(word: string) {
|
titleCaseWord(word: string) {
|
||||||
if (!word) return word;
|
if (!word) return word;
|
||||||
|
|||||||
@ -111,7 +111,7 @@
|
|||||||
</ng-container>
|
</ng-container>
|
||||||
<ng-container matColumnDef="Action">
|
<ng-container matColumnDef="Action">
|
||||||
<mat-cell class="cell center" *matCellDef="let details;">
|
<mat-cell class="cell center" *matCellDef="let details;">
|
||||||
<button mat-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" (click)="viewPD(details.is_child == 0 ? details.pd_id : details.parent_pd_id)" color="primary" matTooltip="View" matTooltipPosition="above"><mat-icon>visibility</mat-icon></button>
|
<button mat-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" (click)="viewPD(details.is_child == 0 ? details.pd_id : details.parent_pd_id,details.random_string)" color="primary" matTooltip="View" matTooltipPosition="above"><mat-icon>visibility</mat-icon></button>
|
||||||
</mat-cell>
|
</mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<mat-row style="align-items: normal !important;" *matRowDef="let row; columns: displayedColumns;">
|
<mat-row style="align-items: normal !important;" *matRowDef="let row; columns: displayedColumns;">
|
||||||
|
|||||||
@ -34,7 +34,7 @@ export class ScheduledPdComponent implements OnInit, OnChanges {
|
|||||||
@ViewChild(MatSort) sort: MatSort;
|
@ViewChild(MatSort) sort: MatSort;
|
||||||
|
|
||||||
@Input() bindFilterValue: string;
|
@Input() bindFilterValue: string;
|
||||||
@Output() loadPdView = new EventEmitter<string>();
|
@Output() loadPdView = new EventEmitter<any>();
|
||||||
|
|
||||||
// data source variable details
|
// data source variable details
|
||||||
scheduledPdListData:any[] = [];
|
scheduledPdListData:any[] = [];
|
||||||
@ -108,10 +108,13 @@ export class ScheduledPdComponent implements OnInit, OnChanges {
|
|||||||
pageChange(e) {
|
pageChange(e) {
|
||||||
console.log(e);
|
console.log(e);
|
||||||
}
|
}
|
||||||
viewPD(pdid:string){
|
viewPD(pdid:string,randomString){
|
||||||
this.loadPdView.next(pdid);
|
console.log(pdid,randomString);
|
||||||
|
let pdidwithRandomString = {'id':pdid,'string': randomString};
|
||||||
|
console.log(pdidwithRandomString);
|
||||||
|
this.loadPdView.emit(pdidwithRandomString);
|
||||||
}
|
}
|
||||||
|
|
||||||
titleCaseWord(word:string) {
|
titleCaseWord(word:string) {
|
||||||
if (!word) return word;
|
if (!word) return word;
|
||||||
return word[0].toUpperCase() + word.substr(1).toLowerCase();
|
return word[0].toUpperCase() + word.substr(1).toLowerCase();
|
||||||
|
|||||||
@ -597,7 +597,7 @@ export class BusinessInfoComponent implements OnInit {
|
|||||||
// this.lender_short_name == 'CLIX' || this.product_abbr == 'LAEP' ? this.businessForm.addControl('fire_noc', new FormControl('', Validators.required)) : this.businessForm.removeControl('fire_noc');
|
// this.lender_short_name == 'CLIX' || this.product_abbr == 'LAEP' ? this.businessForm.addControl('fire_noc', new FormControl('', Validators.required)) : this.businessForm.removeControl('fire_noc');
|
||||||
if(data.records.gst_Regn_cert =='yes'){ this.businessForm.addControl('gst_Regn_cert_pic', new FormControl('')); }else{ this.businessForm.removeControl('gst_Regn_cert_pic');}
|
if(data.records.gst_Regn_cert =='yes'){ this.businessForm.addControl('gst_Regn_cert_pic', new FormControl('')); }else{ this.businessForm.removeControl('gst_Regn_cert_pic');}
|
||||||
if(data.records.factory_cert =='yes'){ this.businessForm.addControl('factory_cert_pic', new FormControl('')); }else{ this.businessForm.removeControl('factory_cert_pic');}
|
if(data.records.factory_cert =='yes'){ this.businessForm.addControl('factory_cert_pic', new FormControl('')); }else{ this.businessForm.removeControl('factory_cert_pic');}
|
||||||
if(data.records.practice_cert_cert =='yes'){ this.businessForm.addControl('practice_cert_pic', new FormControl('')); }else{ this.businessForm.removeControl('practice_cert_pic');}
|
if(data.records.practice_cert =='yes'){ this.businessForm.addControl('practice_cert_pic', new FormControl('')); }else{ this.businessForm.removeControl('practice_cert_pic');}
|
||||||
if(data.records.shop_eat_act_cert =='yes'){ this.businessForm.addControl('shop_eat_act_cert_pic', new FormControl('')); }else{ this.businessForm.removeControl('shop_eat_act_cert_pic');}
|
if(data.records.shop_eat_act_cert =='yes'){ this.businessForm.addControl('shop_eat_act_cert_pic', new FormControl('')); }else{ this.businessForm.removeControl('shop_eat_act_cert_pic');}
|
||||||
if(data.records.pf_regn =='yes'){ this.businessForm.addControl('pf_regn_pic', new FormControl('')); }else{ this.businessForm.removeControl('pf_regn_pic');}
|
if(data.records.pf_regn =='yes'){ this.businessForm.addControl('pf_regn_pic', new FormControl('')); }else{ this.businessForm.removeControl('pf_regn_pic');}
|
||||||
if(data.records.esic_regn =='yes'){ this.businessForm.addControl('esic_regn_pic', new FormControl('')); }else{ this.businessForm.removeControl('esic_regn_pic');}
|
if(data.records.esic_regn =='yes'){ this.businessForm.addControl('esic_regn_pic', new FormControl('')); }else{ this.businessForm.removeControl('esic_regn_pic');}
|
||||||
|
|||||||
@ -194,7 +194,7 @@
|
|||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
<mat-form-field style="width:46%;">
|
<mat-form-field style="width:46%;">
|
||||||
<mat-select multiple placeholder="Name of the Owner" formControlName="owner_name"
|
<mat-select multiple placeholder="Name of the proposed owner" formControlName="owner_name"
|
||||||
[compareWith]="compareObjects">
|
[compareWith]="compareObjects">
|
||||||
<mat-optgroup *ngFor="let group of mergeCompanyApplicant" [label]="group.groupName">
|
<mat-optgroup *ngFor="let group of mergeCompanyApplicant" [label]="group.groupName">
|
||||||
<mat-option *ngFor="let val of group.groupValues" [value]="val">
|
<mat-option *ngFor="let val of group.groupValues" [value]="val">
|
||||||
@ -243,6 +243,49 @@
|
|||||||
<mat-hint align="start" style="font-size:90%" *ngIf="loanDetailsForm.controls['emv_per_customer'].value != ''">{{"₹"}} {{ loanDetailsForm.controls['emv_per_customer'].value | numberToWords }} Only</mat-hint>
|
<mat-hint align="start" style="font-size:90%" *ngIf="loanDetailsForm.controls['emv_per_customer'].value != ''">{{"₹"}} {{ loanDetailsForm.controls['emv_per_customer'].value | numberToWords }} Only</mat-hint>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
|
<mat-form-field *ngIf="productAbbr !== 'LAP'" style="width:96%;">
|
||||||
|
<input matInput placeholder="Name of current owner(s)/ Seller(s) of the property" formControlName="property_seller"
|
||||||
|
autocomplete="off">
|
||||||
|
</mat-form-field>
|
||||||
|
|
||||||
|
<mat-form-field style="width:96%;">
|
||||||
|
<input matInput
|
||||||
|
placeholder="Address"
|
||||||
|
formControlName="address"
|
||||||
|
required autocomplete="off">
|
||||||
|
</mat-form-field>
|
||||||
|
|
||||||
|
<mat-form-field style="width:46%;">
|
||||||
|
<mat-select placeholder="State" formControlName="state"
|
||||||
|
(selectionChange)="getCityAndPincodeDetails($event.value)">
|
||||||
|
<mat-option>Select</mat-option>
|
||||||
|
<mat-option *ngFor="let SL of m_stateLists" [value]="SL.state_id">{{SL.name}}</mat-option>
|
||||||
|
</mat-select>
|
||||||
|
</mat-form-field>
|
||||||
|
|
||||||
|
<mat-form-field style="width:46%;">
|
||||||
|
<mat-select placeholder="City" formControlName="city">
|
||||||
|
<mat-option> Select </mat-option>
|
||||||
|
<mat-option *ngFor="let CL of m_cityList"
|
||||||
|
[value]="CL.city_id">{{CL.city_name}}</mat-option>
|
||||||
|
</mat-select>
|
||||||
|
</mat-form-field>
|
||||||
|
|
||||||
|
<mat-form-field style="width:46%;">
|
||||||
|
<mat-select placeholder="Pincode" formControlName="pincode">
|
||||||
|
<mat-option>Select</mat-option>
|
||||||
|
<mat-option *ngFor="let PL of m_pincodeList"
|
||||||
|
[value]="PL.pincode_id">{{PL.pincode}}</mat-option>
|
||||||
|
</mat-select>
|
||||||
|
</mat-form-field>
|
||||||
|
|
||||||
|
<mat-form-field style="width:46%;" *ngIf="loanDetailsForm.controls['pincode'].value == 1">
|
||||||
|
<input matInput autocomplete="off"
|
||||||
|
placeholder="Specify Pincode *"
|
||||||
|
formControlName="other_pincode" OnlyNumber type="text">
|
||||||
|
<mat-error *ngIf="loanDetailsForm.controls['other_pincode'].hasError('required')">Pincode Required</mat-error>
|
||||||
|
</mat-form-field>
|
||||||
|
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
</mat-card>
|
</mat-card>
|
||||||
</mat-card>
|
</mat-card>
|
||||||
|
|||||||
@ -70,6 +70,9 @@ export class LoanDetailsComponent implements OnInit {
|
|||||||
m_statusofCunstruction = [];
|
m_statusofCunstruction = [];
|
||||||
m_btLenderList = [];
|
m_btLenderList = [];
|
||||||
m_endUseOFTopUpList = [];
|
m_endUseOFTopUpList = [];
|
||||||
|
m_stateLists= [];
|
||||||
|
m_cityList= [];
|
||||||
|
m_pincodeList= [];
|
||||||
// existCompanyList: any =[];
|
// existCompanyList: any =[];
|
||||||
CompanyApplicantGroupList: any = [];
|
CompanyApplicantGroupList: any = [];
|
||||||
CompanyApplicantGroupList2: any = [];
|
CompanyApplicantGroupList2: any = [];
|
||||||
@ -124,6 +127,7 @@ export class LoanDetailsComponent implements OnInit {
|
|||||||
this.getM_StatusofCunstruction();
|
this.getM_StatusofCunstruction();
|
||||||
this.getM_BTLenderList();
|
this.getM_BTLenderList();
|
||||||
this.getM_EndUseofTopUpList();
|
this.getM_EndUseofTopUpList();
|
||||||
|
this.getM_State();
|
||||||
|
|
||||||
// note : Details of Property being Mortgaged section, In Name of the owner drop down list currently show all names (Applicants & In Person Met) need to change show Applicant names only.
|
// note : Details of Property being Mortgaged section, In Name of the owner drop down list currently show all names (Applicants & In Person Met) need to change show Applicant names only.
|
||||||
let param: any = {};
|
let param: any = {};
|
||||||
@ -291,6 +295,14 @@ export class LoanDetailsComponent implements OnInit {
|
|||||||
// this.emvAmtInWords = this._pd.convertNumberToWords(value.records.emv_per_customer);
|
// this.emvAmtInWords = this._pd.convertNumberToWords(value.records.emv_per_customer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.loanDetailsForm.controls['property_seller'].setValue(this.productAbbr != 'LAP' ? value.records.property_seller || null : '');
|
||||||
|
this.loanDetailsForm.controls['address'].setValue(value.records.address || null);
|
||||||
|
this.loanDetailsForm.controls['state'].setValue(value.records.state || null );
|
||||||
|
if(value.records.state != ''){this.getCityAndPincodeDetails(value.records.state);}
|
||||||
|
this.loanDetailsForm.controls['city'].setValue(value.records.city || null);
|
||||||
|
this.loanDetailsForm.controls['pincode'].setValue(value.records.pincode || null);
|
||||||
|
this.loanDetailsForm.controls['other_pincode'].setValue(value.records.other_pincode || null);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.loanDetailsForm.controls['loandetails_remarks'].setValue(value.records.loandetails_remarks);
|
this.loanDetailsForm.controls['loandetails_remarks'].setValue(value.records.loandetails_remarks);
|
||||||
@ -307,7 +319,7 @@ export class LoanDetailsComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
if (this.productAbbr == 'BL' || this.productAbbr == 'PL' || this.productAbbr == 'LL' || this.productAbbr == 'LAEP') {
|
if (this.productAbbr == 'BL' || this.productAbbr == 'PL' || this.productAbbr == 'LAEP') {
|
||||||
this.mortageCardAccess = false;
|
this.mortageCardAccess = false;
|
||||||
this.loanDetailsForm.controls['owner_name'].setValue('');
|
this.loanDetailsForm.controls['owner_name'].setValue('');
|
||||||
this.loanDetailsForm.controls['owner_name'].clearValidators();
|
this.loanDetailsForm.controls['owner_name'].clearValidators();
|
||||||
@ -406,6 +418,13 @@ export class LoanDetailsComponent implements OnInit {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getM_State() {
|
||||||
|
this._pd.getAllMasterDatas('STATE').subscribe(
|
||||||
|
data => {
|
||||||
|
this.m_stateLists = data.records.filter(data => data.is_active == 1);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
/** Loan Form Elements */
|
/** Loan Form Elements */
|
||||||
public initloanDetailsForm(): void {
|
public initloanDetailsForm(): void {
|
||||||
this.loanDetailsForm = this.fb.group({
|
this.loanDetailsForm = this.fb.group({
|
||||||
@ -433,6 +452,12 @@ export class LoanDetailsComponent implements OnInit {
|
|||||||
owner_name: [''],
|
owner_name: [''],
|
||||||
construction_status: [''],
|
construction_status: [''],
|
||||||
emv_per_customer: [''],
|
emv_per_customer: [''],
|
||||||
|
property_seller:[''],
|
||||||
|
address: [''],
|
||||||
|
state: [''],
|
||||||
|
city: [''],
|
||||||
|
pincode: [''],
|
||||||
|
other_pincode:[''],
|
||||||
loandetails_remarks: [''],
|
loandetails_remarks: [''],
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -682,6 +707,16 @@ export class LoanDetailsComponent implements OnInit {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getCityAndPincodeDetails(stateID: string) {
|
||||||
|
|
||||||
|
this._pd.getStateWiseCities(stateID).subscribe(data => {
|
||||||
|
if (data.status == 200) {
|
||||||
|
this.m_cityList = data.records.cities;
|
||||||
|
this.m_pincodeList = data.records.pincode;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
/** To save Loan FOrm Details */
|
/** To save Loan FOrm Details */
|
||||||
submitLoanDetails() {
|
submitLoanDetails() {
|
||||||
|
|
||||||
|
|||||||
@ -38,6 +38,7 @@ import {RentalVerificationComponent} from './forms/rental-verification/rental-ve
|
|||||||
export class StartPdComponent implements OnInit, OnDestroy {
|
export class StartPdComponent implements OnInit, OnDestroy {
|
||||||
public startPD: string;
|
public startPD: string;
|
||||||
public mainApplicantName: string;
|
public mainApplicantName: string;
|
||||||
|
public randomString: string;
|
||||||
//public remarks: string;
|
//public remarks: string;
|
||||||
errorMessage: any;
|
errorMessage: any;
|
||||||
selectedCategory: any = [];
|
selectedCategory: any = [];
|
||||||
@ -68,6 +69,9 @@ export class StartPdComponent implements OnInit, OnDestroy {
|
|||||||
private router: Router,
|
private router: Router,
|
||||||
private listPDComponent: ListPdComponent, private _pd: PdTrigerService,) {
|
private listPDComponent: ListPdComponent, private _pd: PdTrigerService,) {
|
||||||
this.startPD = this.route.snapshot.params['pdid'];
|
this.startPD = this.route.snapshot.params['pdid'];
|
||||||
|
this.randomString = this.route.snapshot.params['rdmstr'];
|
||||||
|
console.log(this.route.snapshot.params['pdid'],this.route.snapshot.params['rdmstr']);
|
||||||
|
console.log('this.randomString',this.randomString);
|
||||||
this.notifier = notifier;
|
this.notifier = notifier;
|
||||||
this.currentPDStatus = false;
|
this.currentPDStatus = false;
|
||||||
}
|
}
|
||||||
@ -84,7 +88,7 @@ export class StartPdComponent implements OnInit, OnDestroy {
|
|||||||
// Ps.initialize(elemSidebar, { wheelSpeed: 2, suppressScrollX: true });
|
// Ps.initialize(elemSidebar, { wheelSpeed: 2, suppressScrollX: true });
|
||||||
// Ps.initialize(elemContent, { wheelSpeed: 2, suppressScrollX: true });
|
// Ps.initialize(elemContent, { wheelSpeed: 2, suppressScrollX: true });
|
||||||
}
|
}
|
||||||
this.loadTemplates(this.startPD,1);
|
this.loadTemplates(this.startPD,1,this.randomString);
|
||||||
}
|
}
|
||||||
|
|
||||||
isMac(): boolean {
|
isMac(): boolean {
|
||||||
@ -101,9 +105,11 @@ export class StartPdComponent implements OnInit, OnDestroy {
|
|||||||
|
|
||||||
|
|
||||||
// load templates details
|
// load templates details
|
||||||
loadTemplates(startID:string,type:number){
|
loadTemplates(startID:string,type:number,randomString:string){
|
||||||
this._pd.loadPDTemplates(startID).subscribe(
|
console.log('start pd component inside - loadTemplates params are,',startID,type,randomString);
|
||||||
|
this._pd.loadPDTemplates(startID,randomString).subscribe(
|
||||||
data => {
|
data => {
|
||||||
|
console.log("after reponse = ", data);
|
||||||
if (data.status == 200) {
|
if (data.status == 200) {
|
||||||
this.pdMasterList=data.records.pdmaster_details;
|
this.pdMasterList=data.records.pdmaster_details;
|
||||||
// this.categoryList=data.records.question_answers;
|
// this.categoryList=data.records.question_answers;
|
||||||
@ -134,7 +140,7 @@ 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 {
|
||||||
const dialogRef = this.dialog.open(PdStatusChangeDialogueComponent, {
|
const dialogRef = this.dialog.open(PdStatusChangeDialogueComponent, {
|
||||||
data: { pdid: this.startPD, pd_status: status },
|
data: { pdid: this.startPD, pd_status: status ,random_string:this.randomString },
|
||||||
disableClose: true,
|
disableClose: true,
|
||||||
minWidth:'30%',
|
minWidth:'30%',
|
||||||
maxWidth:'40%',
|
maxWidth:'40%',
|
||||||
@ -142,10 +148,10 @@ 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);
|
checkType==2 ? this.router.navigate(['../../viewpd', this.pdMasterList.parent_pd_id], {relativeTo: this.route}) : this.loadTemplates(this.startPD,2,this.randomString);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
checkType==1 ? this.router.navigate(['../../viewpd', this.pdMasterList.parent_pd_id], {relativeTo: this.route}) : this.loadTemplates(this.startPD,2);
|
checkType==1 ? this.router.navigate(['../../viewpd', this.pdMasterList.parent_pd_id], {relativeTo: this.route}) : this.loadTemplates(this.startPD,2,this.randomString);
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
@ -170,7 +176,7 @@ export class StartPdComponent implements OnInit, OnDestroy {
|
|||||||
dialogRef.afterClosed()
|
dialogRef.afterClosed()
|
||||||
.subscribe(dataresult => {
|
.subscribe(dataresult => {
|
||||||
// this.notifier.notify('success', 'Successfully allocated.!');
|
// this.notifier.notify('success', 'Successfully allocated.!');
|
||||||
this.loadTemplates(this.startPD,2);
|
this.loadTemplates(this.startPD,2,this.randomString);
|
||||||
});
|
});
|
||||||
}else
|
}else
|
||||||
if(this.selectedFormsCategory.form_id==2){
|
if(this.selectedFormsCategory.form_id==2){
|
||||||
@ -186,7 +192,7 @@ export class StartPdComponent implements OnInit, OnDestroy {
|
|||||||
dialogRef.afterClosed()
|
dialogRef.afterClosed()
|
||||||
.subscribe(dataresult => {
|
.subscribe(dataresult => {
|
||||||
// this.notifier.notify('success', 'Successfully allocated.!');
|
// this.notifier.notify('success', 'Successfully allocated.!');
|
||||||
this.loadTemplates(this.startPD,2);
|
this.loadTemplates(this.startPD,2,this.randomString);
|
||||||
});
|
});
|
||||||
}else
|
}else
|
||||||
if(this.selectedFormsCategory.form_id==3){
|
if(this.selectedFormsCategory.form_id==3){
|
||||||
@ -202,7 +208,7 @@ export class StartPdComponent implements OnInit, OnDestroy {
|
|||||||
dialogRef.afterClosed()
|
dialogRef.afterClosed()
|
||||||
.subscribe(dataresult => {
|
.subscribe(dataresult => {
|
||||||
// this.notifier.notify('success', 'Successfully allocated.!');
|
// this.notifier.notify('success', 'Successfully allocated.!');
|
||||||
this.loadTemplates(this.startPD,2);
|
this.loadTemplates(this.startPD,2,this.randomString);
|
||||||
});
|
});
|
||||||
}else
|
}else
|
||||||
if(this.selectedFormsCategory.form_id==4){
|
if(this.selectedFormsCategory.form_id==4){
|
||||||
@ -218,7 +224,7 @@ export class StartPdComponent implements OnInit, OnDestroy {
|
|||||||
dialogRef.afterClosed()
|
dialogRef.afterClosed()
|
||||||
.subscribe(dataresult => {
|
.subscribe(dataresult => {
|
||||||
// this.notifier.notify('success', 'Successfully allocated.!');
|
// this.notifier.notify('success', 'Successfully allocated.!');
|
||||||
this.loadTemplates(this.startPD,2);
|
this.loadTemplates(this.startPD,2,this.randomString);
|
||||||
});
|
});
|
||||||
}else
|
}else
|
||||||
if(this.selectedFormsCategory.form_id==5){
|
if(this.selectedFormsCategory.form_id==5){
|
||||||
@ -234,7 +240,7 @@ export class StartPdComponent implements OnInit, OnDestroy {
|
|||||||
dialogRef.afterClosed()
|
dialogRef.afterClosed()
|
||||||
.subscribe(dataresult => {
|
.subscribe(dataresult => {
|
||||||
// this.notifier.notify('success', 'Successfully allocated.!');
|
// this.notifier.notify('success', 'Successfully allocated.!');
|
||||||
this.loadTemplates(this.startPD,2);
|
this.loadTemplates(this.startPD,2,this.randomString);
|
||||||
});
|
});
|
||||||
}else
|
}else
|
||||||
if(this.selectedFormsCategory.form_id==6){
|
if(this.selectedFormsCategory.form_id==6){
|
||||||
@ -250,7 +256,7 @@ export class StartPdComponent implements OnInit, OnDestroy {
|
|||||||
dialogRef.afterClosed()
|
dialogRef.afterClosed()
|
||||||
.subscribe(dataresult => {
|
.subscribe(dataresult => {
|
||||||
// this.notifier.notify('success', 'Successfully allocated.!');
|
// this.notifier.notify('success', 'Successfully allocated.!');
|
||||||
this.loadTemplates(this.startPD,2);
|
this.loadTemplates(this.startPD,2,this.randomString);
|
||||||
});
|
});
|
||||||
}else
|
}else
|
||||||
if(this.selectedFormsCategory.form_id==7){
|
if(this.selectedFormsCategory.form_id==7){
|
||||||
@ -266,7 +272,7 @@ export class StartPdComponent implements OnInit, OnDestroy {
|
|||||||
dialogRef.afterClosed()
|
dialogRef.afterClosed()
|
||||||
.subscribe(dataresult => {
|
.subscribe(dataresult => {
|
||||||
// this.notifier.notify('success', 'Successfully allocated.!');
|
// this.notifier.notify('success', 'Successfully allocated.!');
|
||||||
this.loadTemplates(this.startPD,2);
|
this.loadTemplates(this.startPD,2,this.randomString);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -283,7 +289,7 @@ export class StartPdComponent implements OnInit, OnDestroy {
|
|||||||
dialogRef.afterClosed()
|
dialogRef.afterClosed()
|
||||||
.subscribe(dataresult => {
|
.subscribe(dataresult => {
|
||||||
// this.notifier.notify('success', 'Successfully allocated.!');
|
// this.notifier.notify('success', 'Successfully allocated.!');
|
||||||
this.loadTemplates(this.startPD,2);
|
this.loadTemplates(this.startPD,2,this.randomString);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -300,7 +306,7 @@ export class StartPdComponent implements OnInit, OnDestroy {
|
|||||||
dialogRef.afterClosed()
|
dialogRef.afterClosed()
|
||||||
.subscribe(dataresult => {
|
.subscribe(dataresult => {
|
||||||
// this.notifier.notify('success', 'Successfully allocated.!');
|
// this.notifier.notify('success', 'Successfully allocated.!');
|
||||||
this.loadTemplates(this.startPD,2);
|
this.loadTemplates(this.startPD,2,this.randomString);
|
||||||
});
|
});
|
||||||
}else
|
}else
|
||||||
if(this.selectedFormsCategory.form_id==10){
|
if(this.selectedFormsCategory.form_id==10){
|
||||||
@ -316,7 +322,7 @@ export class StartPdComponent implements OnInit, OnDestroy {
|
|||||||
dialogRef.afterClosed()
|
dialogRef.afterClosed()
|
||||||
.subscribe(dataresult => {
|
.subscribe(dataresult => {
|
||||||
// this.notifier.notify('success', 'Successfully allocated.!');
|
// this.notifier.notify('success', 'Successfully allocated.!');
|
||||||
this.loadTemplates(this.startPD,2);
|
this.loadTemplates(this.startPD,2,this.randomString);
|
||||||
});
|
});
|
||||||
}else
|
}else
|
||||||
if(this.selectedFormsCategory.form_id==11){
|
if(this.selectedFormsCategory.form_id==11){
|
||||||
@ -332,7 +338,7 @@ export class StartPdComponent implements OnInit, OnDestroy {
|
|||||||
dialogRef.afterClosed()
|
dialogRef.afterClosed()
|
||||||
.subscribe(dataresult => {
|
.subscribe(dataresult => {
|
||||||
// this.notifier.notify('success', 'Successfully allocated.!');
|
// this.notifier.notify('success', 'Successfully allocated.!');
|
||||||
this.loadTemplates(this.startPD,2);
|
this.loadTemplates(this.startPD,2,this.randomString);
|
||||||
});
|
});
|
||||||
}else
|
}else
|
||||||
if(this.selectedFormsCategory.form_id==12){
|
if(this.selectedFormsCategory.form_id==12){
|
||||||
@ -348,7 +354,7 @@ export class StartPdComponent implements OnInit, OnDestroy {
|
|||||||
dialogRef.afterClosed()
|
dialogRef.afterClosed()
|
||||||
.subscribe(dataresult => {
|
.subscribe(dataresult => {
|
||||||
// this.notifier.notify('success', 'Successfully allocated.!');
|
// this.notifier.notify('success', 'Successfully allocated.!');
|
||||||
this.loadTemplates(this.startPD,2);
|
this.loadTemplates(this.startPD,2,this.randomString);
|
||||||
});
|
});
|
||||||
}else
|
}else
|
||||||
if(this.selectedFormsCategory.form_id==13){
|
if(this.selectedFormsCategory.form_id==13){
|
||||||
@ -364,7 +370,7 @@ export class StartPdComponent implements OnInit, OnDestroy {
|
|||||||
dialogRef.afterClosed()
|
dialogRef.afterClosed()
|
||||||
.subscribe(dataresult => {
|
.subscribe(dataresult => {
|
||||||
// this.notifier.notify('success', 'Successfully allocated.!');
|
// this.notifier.notify('success', 'Successfully allocated.!');
|
||||||
this.loadTemplates(this.startPD,2);
|
this.loadTemplates(this.startPD,2,this.randomString);
|
||||||
});
|
});
|
||||||
}else
|
}else
|
||||||
if(this.selectedFormsCategory.form_id==14){
|
if(this.selectedFormsCategory.form_id==14){
|
||||||
@ -380,7 +386,7 @@ export class StartPdComponent implements OnInit, OnDestroy {
|
|||||||
dialogRef.afterClosed()
|
dialogRef.afterClosed()
|
||||||
.subscribe(dataresult => {
|
.subscribe(dataresult => {
|
||||||
// this.notifier.notify('success', 'Successfully allocated.!');
|
// this.notifier.notify('success', 'Successfully allocated.!');
|
||||||
this.loadTemplates(this.startPD,2);
|
this.loadTemplates(this.startPD,2,this.randomString);
|
||||||
});
|
});
|
||||||
}else
|
}else
|
||||||
if(this.selectedFormsCategory.form_id==15){
|
if(this.selectedFormsCategory.form_id==15){
|
||||||
@ -396,7 +402,7 @@ export class StartPdComponent implements OnInit, OnDestroy {
|
|||||||
dialogRef.afterClosed()
|
dialogRef.afterClosed()
|
||||||
.subscribe(dataresult => {
|
.subscribe(dataresult => {
|
||||||
// this.notifier.notify('success', 'Successfully allocated.!');
|
// this.notifier.notify('success', 'Successfully allocated.!');
|
||||||
this.loadTemplates(this.startPD,2);
|
this.loadTemplates(this.startPD,2,this.randomString);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -413,7 +419,7 @@ export class StartPdComponent implements OnInit, OnDestroy {
|
|||||||
dialogRef.afterClosed()
|
dialogRef.afterClosed()
|
||||||
.subscribe(dataresult => {
|
.subscribe(dataresult => {
|
||||||
// this.notifier.notify('success', 'Successfully allocated.!');
|
// this.notifier.notify('success', 'Successfully allocated.!');
|
||||||
this.loadTemplates(this.startPD,2);
|
this.loadTemplates(this.startPD,2,this.randomString);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else if(this.selectedFormsCategory.form_id==18){
|
else if(this.selectedFormsCategory.form_id==18){
|
||||||
@ -429,7 +435,7 @@ export class StartPdComponent implements OnInit, OnDestroy {
|
|||||||
generaldialogRef.afterClosed()
|
generaldialogRef.afterClosed()
|
||||||
.subscribe(dataresult => {
|
.subscribe(dataresult => {
|
||||||
// this.notifier.notify('success', 'Successfully allocated.!');
|
// this.notifier.notify('success', 'Successfully allocated.!');
|
||||||
this.loadTemplates(this.startPD,2);
|
this.loadTemplates(this.startPD,2,this.randomString);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else if(this.selectedFormsCategory.form_id==19){
|
else if(this.selectedFormsCategory.form_id==19){
|
||||||
@ -445,7 +451,7 @@ export class StartPdComponent implements OnInit, OnDestroy {
|
|||||||
generaldialogRef.afterClosed()
|
generaldialogRef.afterClosed()
|
||||||
.subscribe(dataresult => {
|
.subscribe(dataresult => {
|
||||||
// this.notifier.notify('success', 'Successfully allocated.!');
|
// this.notifier.notify('success', 'Successfully allocated.!');
|
||||||
this.loadTemplates(this.startPD,2);
|
this.loadTemplates(this.startPD,2,this.randomString);
|
||||||
});
|
});
|
||||||
}else if(this.selectedFormsCategory.form_id==20){
|
}else if(this.selectedFormsCategory.form_id==20){
|
||||||
const generaldialogRef = this.dialog.open(FinalRemarksComponent, {
|
const generaldialogRef = this.dialog.open(FinalRemarksComponent, {
|
||||||
@ -460,7 +466,7 @@ export class StartPdComponent implements OnInit, OnDestroy {
|
|||||||
generaldialogRef.afterClosed()
|
generaldialogRef.afterClosed()
|
||||||
.subscribe(dataresult => {
|
.subscribe(dataresult => {
|
||||||
// this.notifier.notify('success', 'Successfully allocated.!');
|
// this.notifier.notify('success', 'Successfully allocated.!');
|
||||||
this.loadTemplates(this.startPD,2);
|
this.loadTemplates(this.startPD,2,this.randomString);
|
||||||
});
|
});
|
||||||
}else
|
}else
|
||||||
if(this.selectedFormsCategory.form_id==22){
|
if(this.selectedFormsCategory.form_id==22){
|
||||||
@ -476,7 +482,7 @@ export class StartPdComponent implements OnInit, OnDestroy {
|
|||||||
dialogRef.afterClosed()
|
dialogRef.afterClosed()
|
||||||
.subscribe(dataresult => {
|
.subscribe(dataresult => {
|
||||||
// this.notifier.notify('success', 'Successfully allocated.!');
|
// this.notifier.notify('success', 'Successfully allocated.!');
|
||||||
this.loadTemplates(this.startPD,2);
|
this.loadTemplates(this.startPD,2,this.randomString);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -486,7 +492,7 @@ export class StartPdComponent implements OnInit, OnDestroy {
|
|||||||
}
|
}
|
||||||
// load pd view component
|
// load pd view component
|
||||||
loadPdViewCompoent() {
|
loadPdViewCompoent() {
|
||||||
this.router.navigate(['../../viewpd', this.pdMasterList.parent_pd_id], {relativeTo: this.route});
|
this.router.navigate(['../../../viewpd', this.pdMasterList.parent_pd_id,this.randomString], {relativeTo: this.route});
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -81,6 +81,7 @@ export class ViewPdComponent implements OnInit, OnDestroy {
|
|||||||
|
|
||||||
// roles checks for enables events
|
// roles checks for enables events
|
||||||
roleAccessDetails:any;
|
roleAccessDetails:any;
|
||||||
|
masterRandomString: string;
|
||||||
|
|
||||||
|
|
||||||
// @Input() childData: string;
|
// @Input() childData: string;
|
||||||
@ -97,19 +98,25 @@ export class ViewPdComponent implements OnInit, OnDestroy {
|
|||||||
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'];
|
||||||
|
this.masterRandomString = params['rdmstr'];
|
||||||
|
console.log('View PD COmponet Random String',this.viewID,this.masterRandomString);
|
||||||
});
|
});
|
||||||
this.viewPdDetails(this.viewID);
|
// this.viewID = this.route.snapshot.params['pdid'];
|
||||||
|
// this.masterRandomString = this.route.snapshot.params['rdmstr'];
|
||||||
|
this.viewPdDetails(this.viewID,this.masterRandomString);
|
||||||
}
|
}
|
||||||
pd_QC_Rating: Number;
|
pd_QC_Rating: Number;
|
||||||
|
|
||||||
viewPdDetails(editID: string) {
|
viewPdDetails(editID: string,masterRandomString : string) {
|
||||||
|
console.log('inside Function',masterRandomString);
|
||||||
this.pdMasterData = [];
|
this.pdMasterData = [];
|
||||||
this._pd.editPdDetails(editID).subscribe(
|
this._pd.editPdDetails(editID,masterRandomString).subscribe(
|
||||||
data => {
|
data => {
|
||||||
|
|
||||||
if (data.status == 200) {
|
if (data.status == 200) {
|
||||||
let masterData: any = data.records.pd_master_details;
|
let masterData: any = data.records.pd_master_details;
|
||||||
this.pdMasterData.push(masterData[0]);
|
this.pdMasterData.push(masterData[0]);
|
||||||
this.mandatoryFieldsValidations = masterData[1].mandatory_fields;
|
// this.mandatoryFieldsValidations = masterData[1].mandatory_fields;
|
||||||
this.pd_QC_Rating = Number(this.pdMasterData.qc_rating);
|
this.pd_QC_Rating = Number(this.pdMasterData.qc_rating);
|
||||||
this.pdApplicantData = data.records.applicants_details;
|
this.pdApplicantData = data.records.applicants_details;
|
||||||
this.pdApplicantData = this.pdApplicantData.filter(appt => appt.applicant_type != 2);
|
this.pdApplicantData = this.pdApplicantData.filter(appt => appt.applicant_type != 2);
|
||||||
@ -140,12 +147,14 @@ export class ViewPdComponent implements OnInit, OnDestroy {
|
|||||||
this.enableStartPD = false;
|
this.enableStartPD = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, error => this.errorMessage = <any>error);
|
}, error => {
|
||||||
|
console.log('%c Something Went Wrong Try Again.! \t\"' + (error.error_type == 2 ? error.error_status + ' ( ' + error.error_text + ' ) ' : ' ( ' + error.error_text + ' ) ') +'\" Error Occur.!', 'font-weight: bold; font-size: 50px;color: red; ');
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
loadPdListCompoent() {
|
loadPdListCompoent() {
|
||||||
this.destroyType = 2;
|
this.destroyType = 2;
|
||||||
this.router.navigate(['../../'], { relativeTo: this.route });
|
this.router.navigate(['../../../'], { relativeTo: this.route });
|
||||||
this.ListPdComponent.pdListLoad(true);
|
this.ListPdComponent.pdListLoad(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -200,7 +209,8 @@ export class ViewPdComponent implements OnInit, OnDestroy {
|
|||||||
editPdMaster(masterData: any, flag) {
|
editPdMaster(masterData: any, flag) {
|
||||||
let record = {
|
let record = {
|
||||||
"records": masterData,
|
"records": masterData,
|
||||||
"applicantLength": this.pdApplicantData.length
|
"applicantLength": this.pdApplicantData.length,
|
||||||
|
"random_string":this.masterRandomString
|
||||||
}
|
}
|
||||||
const dialogPDMaster = this.dialog.open(EditPdMasterComponent, {
|
const dialogPDMaster = this.dialog.open(EditPdMasterComponent, {
|
||||||
data: record,
|
data: record,
|
||||||
@ -233,7 +243,7 @@ export class ViewPdComponent implements OnInit, OnDestroy {
|
|||||||
});
|
});
|
||||||
dialogPDMaster.afterClosed().subscribe(dataresult => {
|
dialogPDMaster.afterClosed().subscribe(dataresult => {
|
||||||
|
|
||||||
this.viewPdDetails(this.viewID)
|
this.viewPdDetails(this.viewID,this.masterRandomString)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
editPdApplicant(applicantData: any,CSAbbr : any) {
|
editPdApplicant(applicantData: any,CSAbbr : any) {
|
||||||
@ -251,7 +261,7 @@ export class ViewPdComponent implements OnInit, OnDestroy {
|
|||||||
dialogApplicant.afterClosed()
|
dialogApplicant.afterClosed()
|
||||||
.subscribe(dataresult => {
|
.subscribe(dataresult => {
|
||||||
// this.notifier.notify('success', 'Successfully allocated.!');
|
// this.notifier.notify('success', 'Successfully allocated.!');
|
||||||
this.viewPdDetails(this.viewID)
|
this.viewPdDetails(this.viewID,this.masterRandomString)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
// edit pd addtional requirements
|
// edit pd addtional requirements
|
||||||
@ -269,7 +279,7 @@ export class ViewPdComponent implements OnInit, OnDestroy {
|
|||||||
dialogRequirement.afterClosed()
|
dialogRequirement.afterClosed()
|
||||||
.subscribe(dataresult => {
|
.subscribe(dataresult => {
|
||||||
// this.notifier.notify('success', 'Successfully allocated.!');
|
// this.notifier.notify('success', 'Successfully allocated.!');
|
||||||
this.viewPdDetails(this.viewID)
|
this.viewPdDetails(this.viewID,this.masterRandomString)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
// pd allocation to
|
// pd allocation to
|
||||||
@ -285,7 +295,7 @@ export class ViewPdComponent implements OnInit, OnDestroy {
|
|||||||
dialogRef.afterClosed()
|
dialogRef.afterClosed()
|
||||||
.subscribe(dataresult => {
|
.subscribe(dataresult => {
|
||||||
// this.notifier.notify('success', 'Successfully allocated.!');
|
// this.notifier.notify('success', 'Successfully allocated.!');
|
||||||
this.viewPdDetails(this.viewID)
|
this.viewPdDetails(this.viewID,this.masterRandomString)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else if (pdData.fk_pd_type == 2) {
|
else if (pdData.fk_pd_type == 2) {
|
||||||
@ -299,7 +309,7 @@ export class ViewPdComponent implements OnInit, OnDestroy {
|
|||||||
.subscribe(dataresult => {
|
.subscribe(dataresult => {
|
||||||
// this.notifier.notify('success', 'Successfully allocated.!');
|
// this.notifier.notify('success', 'Successfully allocated.!');
|
||||||
|
|
||||||
this.viewPdDetails(this.viewID)
|
this.viewPdDetails(this.viewID,this.masterRandomString)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else if (pdData.fk_pd_type == 3) {
|
else if (pdData.fk_pd_type == 3) {
|
||||||
@ -313,7 +323,7 @@ export class ViewPdComponent implements OnInit, OnDestroy {
|
|||||||
.subscribe(dataresult => {
|
.subscribe(dataresult => {
|
||||||
// this.notifier.notify('success', 'Successfully allocated.!');
|
// this.notifier.notify('success', 'Successfully allocated.!');
|
||||||
|
|
||||||
this.viewPdDetails(this.viewID)
|
this.viewPdDetails(this.viewID,this.masterRandomString)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -330,7 +340,7 @@ export class ViewPdComponent implements OnInit, OnDestroy {
|
|||||||
dialogSchedule.afterClosed()
|
dialogSchedule.afterClosed()
|
||||||
.subscribe(dataresult => {
|
.subscribe(dataresult => {
|
||||||
// this.notifier.notify('success', 'Successfully allocated.!');
|
// this.notifier.notify('success', 'Successfully allocated.!');
|
||||||
this.viewPdDetails(this.viewID)
|
this.viewPdDetails(this.viewID,this.masterRandomString)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -339,7 +349,7 @@ export class ViewPdComponent implements OnInit, OnDestroy {
|
|||||||
this.destroyType = 3;
|
this.destroyType = 3;
|
||||||
if (status == this.pdStatusCheck.ALLOCATED || status == this.pdStatusCheck.SCHEDULED) {
|
if (status == this.pdStatusCheck.ALLOCATED || status == this.pdStatusCheck.SCHEDULED) {
|
||||||
const dialogRef = this.dialog.open(PdStatusChangeDialogueComponent, {
|
const dialogRef = this.dialog.open(PdStatusChangeDialogueComponent, {
|
||||||
data: { pdid: pdDetails.assigned_pd, pd_status: this.pdStatusCheck.INPROGRESS },
|
data: { pdid: pdDetails.assigned_pd, pd_status: this.pdStatusCheck.INPROGRESS ,random_string:this.masterRandomString},
|
||||||
disableClose: true,
|
disableClose: true,
|
||||||
minWidth: '30%',
|
minWidth: '30%',
|
||||||
maxWidth: '40%',
|
maxWidth: '40%',
|
||||||
@ -347,18 +357,20 @@ export class ViewPdComponent implements OnInit, OnDestroy {
|
|||||||
dialogRef.afterClosed()
|
dialogRef.afterClosed()
|
||||||
.subscribe(dataresult => {
|
.subscribe(dataresult => {
|
||||||
if (dataresult.update_status == true) {
|
if (dataresult.update_status == true) {
|
||||||
this.router.navigate(['../../startpd',pdDetails.assigned_pd], { relativeTo: this.route });
|
this.router.navigate(['../../../startpd',pdDetails.assigned_pd,this.masterRandomString], { relativeTo: this.route });
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
this.router.navigate(['../../startpd', pdDetails.assigned_pd], { relativeTo: this.route });
|
this.router.navigate(['../../../startpd', pdDetails.assigned_pd,this.masterRandomString], { relativeTo: this.route });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
getPDIDReport(pdID: any) {
|
getPDIDReport(pdID: any) {
|
||||||
|
console.log('getPDIDReport',pdID);
|
||||||
|
console.log('getPDIDReport',this.masterRandomString);
|
||||||
this.destroyType = 3;
|
this.destroyType = 3;
|
||||||
this.router.navigate(['../../pd_report', pdID], { relativeTo: this.route });
|
this.router.navigate(['../../../pd_report', pdID,this.masterRandomString], { relativeTo: this.route });
|
||||||
}
|
}
|
||||||
|
|
||||||
// // direct trigger the pd
|
// // direct trigger the pd
|
||||||
@ -382,7 +394,7 @@ export class ViewPdComponent implements OnInit, OnDestroy {
|
|||||||
// this._pd.editPdMasterDetails(lenderMasterArray, this.pdStatusCheck.TRIGGERED).subscribe(result => {
|
// this._pd.editPdMasterDetails(lenderMasterArray, this.pdStatusCheck.TRIGGERED).subscribe(result => {
|
||||||
// if (result.status == 200) {
|
// if (result.status == 200) {
|
||||||
// this.notifier.notify('success', 'PD Status Updated.');
|
// this.notifier.notify('success', 'PD Status Updated.');
|
||||||
// this.viewPdDetails(this.viewID);
|
// this.viewPdDetails(this.viewID,this.masterRandomString);
|
||||||
// }
|
// }
|
||||||
// else {
|
// else {
|
||||||
// this.notifier.notify('warning', 'Something Went Wrong Try Again.!');
|
// this.notifier.notify('warning', 'Something Went Wrong Try Again.!');
|
||||||
@ -411,10 +423,10 @@ export class ViewPdComponent implements OnInit, OnDestroy {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
let lenderMasterArray = { "pd_id": pdid }
|
let lenderMasterArray = { "pd_id": pdid }
|
||||||
this._pd.editPdMasterDetails(lenderMasterArray, this.pdStatusCheck.TRIGGERED).subscribe(result => {
|
this._pd.editPdMasterDetails(lenderMasterArray, this.pdStatusCheck.TRIGGERED,this.masterRandomString).subscribe(result => {
|
||||||
if (result.status == 200) {
|
if (result.status == 200) {
|
||||||
this.notifier.notify('success', 'PD Status Updated.');
|
this.notifier.notify('success', 'PD Status Updated.');
|
||||||
this.viewPdDetails(this.viewID);
|
this.viewPdDetails(this.viewID,this.masterRandomString);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
this.notifier.notify('warning', 'Something Went Wrong Try Again.!');
|
this.notifier.notify('warning', 'Something Went Wrong Try Again.!');
|
||||||
@ -432,7 +444,7 @@ export class ViewPdComponent implements OnInit, OnDestroy {
|
|||||||
if(parentData.main_applicant){
|
if(parentData.main_applicant){
|
||||||
masterApplicantID = this.pdApplicantData.filter(appt => appt.applicant_name == parentData.main_applicant)[0].pd_co_applicant_id;}
|
masterApplicantID = this.pdApplicantData.filter(appt => appt.applicant_name == parentData.main_applicant)[0].pd_co_applicant_id;}
|
||||||
const dialogRef = this.dialog.open(InitiateAdditionalPdComponent, {
|
const dialogRef = this.dialog.open(InitiateAdditionalPdComponent, {
|
||||||
data: { "type":type,"pd_id":parentData.pd_id,"fk_customer_segment":parentData.fk_customer_segment, "pd_status":parentData.pd_status, "pd_address_id": childData.pd_address_id,"applicant_id":masterApplicantID,"applicants_details":this.pdApplicantData},
|
data: { "type":type,"pd_id":parentData.pd_id,"fk_customer_segment":parentData.fk_customer_segment, "pd_status":parentData.pd_status, "pd_address_id": childData.pd_address_id,"applicant_id":masterApplicantID,"applicants_details":this.pdApplicantData,"random_string":this.masterRandomString},
|
||||||
disableClose: true,
|
disableClose: true,
|
||||||
// position: { right: '0' },
|
// position: { right: '0' },
|
||||||
minWidth: '40%',
|
minWidth: '40%',
|
||||||
@ -441,7 +453,7 @@ export class ViewPdComponent implements OnInit, OnDestroy {
|
|||||||
dialogRef.afterClosed()
|
dialogRef.afterClosed()
|
||||||
.subscribe(dataresult => {
|
.subscribe(dataresult => {
|
||||||
if (dataresult.update_status == true) {
|
if (dataresult.update_status == true) {
|
||||||
this.viewPdDetails(this.viewID)
|
this.viewPdDetails(this.viewID,this.masterRandomString)
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@ -32,15 +32,15 @@ const routes: Routes = [
|
|||||||
component: AddPdComponent,
|
component: AddPdComponent,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'viewpd/:pdid',
|
path: 'viewpd/:pdid/:rdmstr',
|
||||||
component: ViewPdComponent,
|
component: ViewPdComponent,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'startpd/:pdid',
|
path: 'startpd/:pdid/:rdmstr',
|
||||||
component: StartPdComponent,
|
component: StartPdComponent,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'pd_report/:pdid',
|
path: 'pd_report/:pdid/:rdmstr',
|
||||||
component: PdReportComponent,
|
component: PdReportComponent,
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@ -185,8 +185,11 @@ export class PdTrigerService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// get edit row pd details
|
// get edit row pd details
|
||||||
editPdDetails(editId: string): Observable<any> {
|
editPdDetails(editId: string,randomString): Observable<any> {
|
||||||
|
// { pdid:100, randon_string:'aTeWbidm451' }
|
||||||
let httpParams = new HttpParams().set('pdid', editId);
|
let httpParams = new HttpParams().set('pdid', editId);
|
||||||
|
httpParams = httpParams.append('random_string',randomString);
|
||||||
|
|
||||||
return this._http.post<any>(this.apiUrl + "getFullPDDetails", httpParams)
|
return this._http.post<any>(this.apiUrl + "getFullPDDetails", httpParams)
|
||||||
.pipe(
|
.pipe(
|
||||||
catchError(this.handleError('operation', []))
|
catchError(this.handleError('operation', []))
|
||||||
@ -194,10 +197,13 @@ export class PdTrigerService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// update pd master details
|
// update pd master details
|
||||||
editPdMasterDetails(editData: any, status: string): Observable<any> {
|
editPdMasterDetails(editData: any, status: string,randomString): Observable<any> {
|
||||||
editData.pd_status = status;
|
editData.pd_status = status;
|
||||||
editData.fk_updatedby = this._aws.getlocale();
|
editData.fk_updatedby = this._aws.getlocale();
|
||||||
|
editData.random_string = randomString;
|
||||||
|
// editData.random_string = 'qRanHRk8mngFPRqU';
|
||||||
// editData.updatedon = currentdate;
|
// editData.updatedon = currentdate;
|
||||||
|
console.log('pd Trigger edit data',editData);
|
||||||
return this._http.post<any>(this.apiUrl + "updatePDMaster", { records: editData })
|
return this._http.post<any>(this.apiUrl + "updatePDMaster", { records: editData })
|
||||||
|
|
||||||
.pipe(
|
.pipe(
|
||||||
@ -255,9 +261,11 @@ export class PdTrigerService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//load pd template details
|
//load pd template details
|
||||||
loadPDTemplates(pdId: string): Observable<any> {
|
loadPDTemplates(pdId: string,randomString): Observable<any> {
|
||||||
const options = pdId ?
|
let httpParams = new HttpParams().set('pd_id', pdId);
|
||||||
{ params: new HttpParams().set('pd_id', pdId) } : {};
|
httpParams = httpParams.append('random_string',randomString);
|
||||||
|
// console.log('loadFullTemplate api load httpParams are',httpParams);
|
||||||
|
const options = pdId ? { params: httpParams } : {};
|
||||||
return this._http.get<any[]>(this.apiUrl + "loadFullTemplate", options)
|
return this._http.get<any[]>(this.apiUrl + "loadFullTemplate", options)
|
||||||
.pipe(
|
.pipe(
|
||||||
catchError(this.handleError('operation', []))
|
catchError(this.handleError('operation', []))
|
||||||
@ -346,8 +354,8 @@ export class PdTrigerService {
|
|||||||
|
|
||||||
// get Pd Final report Question Answer
|
// get Pd Final report Question Answer
|
||||||
|
|
||||||
getPdFinalReportDetails(pdId: number): Observable<any> {
|
getPdFinalReportDetails(pdId: number,random:string): Observable<any> {
|
||||||
return this._http.post<any>(this.apiUrl + "getFinalPDReportQuestions", { "pd_id": pdId })
|
return this._http.post<any>(this.apiUrl + "getFinalPDReportQuestions", {"pd_id":pdId,'random_string':random})
|
||||||
.pipe(
|
.pipe(
|
||||||
catchError(this.handleError('operation', []))
|
catchError(this.handleError('operation', []))
|
||||||
)
|
)
|
||||||
|
|||||||
@ -53,10 +53,19 @@ export class QcListComponent implements OnInit {
|
|||||||
this.getTabIndex==0 ? this.completedTabC.loadPDDetails() : this.qcCompletedTabC.loadPDDetails();
|
this.getTabIndex==0 ? this.completedTabC.loadPDDetails() : this.qcCompletedTabC.loadPDDetails();
|
||||||
|
|
||||||
}
|
}
|
||||||
viewPDDetails(pdid:string){
|
// viewPDDetails(pdid:string){
|
||||||
this.viewPdList = !this.viewPdList;
|
// this.viewPdList = !this.viewPdList;
|
||||||
this.router.navigate([ '../qclist/viewpd',pdid], { relativeTo: this.route });
|
// this.router.navigate([ '../qclist/viewpd',pdid], { relativeTo: this.route });
|
||||||
|
|
||||||
|
// }
|
||||||
|
|
||||||
|
viewPDDetails(event){
|
||||||
|
let pdid = event.id;
|
||||||
|
let rdmstr = event.string;
|
||||||
|
// console.log("pdid = " + event.id);
|
||||||
|
// console.log("randomString = " + event.string);
|
||||||
|
this.viewPdList = !this.viewPdList;
|
||||||
|
this.router.navigate([ '../qclist/viewpd',pdid,rdmstr], { relativeTo: this.route });
|
||||||
}
|
}
|
||||||
//get tab changes
|
//get tab changes
|
||||||
onTabClick(event: MatTabChangeEvent) {
|
onTabClick(event: MatTabChangeEvent) {
|
||||||
|
|||||||
@ -42,7 +42,7 @@ export class QcPdReportComponent implements OnInit {
|
|||||||
selectedIndex: Number;
|
selectedIndex: Number;
|
||||||
urlSafe: SafeResourceUrl;
|
urlSafe: SafeResourceUrl;
|
||||||
apiUrl:string = environment.apiEndpoint;
|
apiUrl:string = environment.apiEndpoint;
|
||||||
randomString : string;
|
reportRandomString : string;
|
||||||
arra:any;
|
arra:any;
|
||||||
|
|
||||||
private notifier: NotifierService;
|
private notifier: NotifierService;
|
||||||
@ -50,7 +50,8 @@ export class QcPdReportComponent implements OnInit {
|
|||||||
private router: Router, public pdTrigerService: QcService, private listPDComponent: QcListComponent,
|
private router: Router, public pdTrigerService: QcService, private listPDComponent: QcListComponent,
|
||||||
private dialog: MatDialog, private sanitizer: DomSanitizer) {
|
private dialog: MatDialog, private sanitizer: DomSanitizer) {
|
||||||
this.startPD = this.route.snapshot.params['pdid'];
|
this.startPD = this.route.snapshot.params['pdid'];
|
||||||
this.randomString = this.apiUrl+'getPDReportHTML/'+atob(this.route.snapshot.params['string']);
|
let encryptReportRandomString = atob(this.route.snapshot.params['string']);
|
||||||
|
this.reportRandomString = this.apiUrl+'getPDReportHTML/'+encryptReportRandomString+'/'+this.startPD;
|
||||||
this.notifier = notifier;
|
this.notifier = notifier;
|
||||||
// this.src = 'https://lender7.s3.ap-south-1.amazonaws.com/pd1/pd_report_original_version.pdf?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAJ3QDSPT3LDSWRYUQ%2F20181210%2Fap-south-1%2Fs3%2Faws4_request&X-Amz-Date=20181210T073026Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Signature=35aa183cbbfc835f96719a5e9aa552c79b3a1b7d8bca043f7d738d730755dcbb';
|
// this.src = 'https://lender7.s3.ap-south-1.amazonaws.com/pd1/pd_report_original_version.pdf?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAJ3QDSPT3LDSWRYUQ%2F20181210%2Fap-south-1%2Fs3%2Faws4_request&X-Amz-Date=20181210T073026Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Signature=35aa183cbbfc835f96719a5e9aa552c79b3a1b7d8bca043f7d738d730755dcbb';
|
||||||
// this.src = this.sanitizer.bypassSecurityTrustResourceUrl("https://lender7.s3.ap-south-1.amazonaws.com/pd1/pd_report_original_version.pdf?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAJ3QDSPT3LDSWRYUQ%2F20181210%2Fap-south-1%2Fs3%2Faws4_request&X-Amz-Date=20181210T053116Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Signature=6e25703a1e339dd5f081fa8aca5b8b2d81ba161d8cfd708759de899abf72146b");
|
// this.src = this.sanitizer.bypassSecurityTrustResourceUrl("https://lender7.s3.ap-south-1.amazonaws.com/pd1/pd_report_original_version.pdf?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAJ3QDSPT3LDSWRYUQ%2F20181210%2Fap-south-1%2Fs3%2Faws4_request&X-Amz-Date=20181210T053116Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Signature=6e25703a1e339dd5f081fa8aca5b8b2d81ba161d8cfd708759de899abf72146b");
|
||||||
@ -80,7 +81,7 @@ export class QcPdReportComponent implements OnInit {
|
|||||||
// this.loadTemplates(this.startPD);
|
// this.loadTemplates(this.startPD);
|
||||||
// this.next = 1;
|
// this.next = 1;
|
||||||
// this.previous = 2;
|
// this.previous = 2;
|
||||||
this.urlSafe= this.sanitizer.bypassSecurityTrustResourceUrl(this.randomString);
|
this.urlSafe= this.sanitizer.bypassSecurityTrustResourceUrl(this.reportRandomString);
|
||||||
}
|
}
|
||||||
|
|
||||||
getFrameContent(content: any)
|
getFrameContent(content: any)
|
||||||
@ -91,7 +92,7 @@ export class QcPdReportComponent implements OnInit {
|
|||||||
|
|
||||||
// console.log('Dat is value');
|
// console.log('Dat is value');
|
||||||
|
|
||||||
this.pdTrigerService.setHTMLContent(this.startPD,getItem).subscribe(data => {
|
this.pdTrigerService.setHTMLContent(this.startPD,getItem,atob(this.route.snapshot.params['string'])).subscribe(data => {
|
||||||
if (data.status == 200) {
|
if (data.status == 200) {
|
||||||
localStorage.removeItem('userEdits');
|
localStorage.removeItem('userEdits');
|
||||||
this.notifier.notify('success', 'Your Changes Updated.!');
|
this.notifier.notify('success', 'Your Changes Updated.!');
|
||||||
@ -146,7 +147,7 @@ export class QcPdReportComponent implements OnInit {
|
|||||||
|
|
||||||
generateNewPDReport() {
|
generateNewPDReport() {
|
||||||
let data = {
|
let data = {
|
||||||
"pd_id": this.startPD
|
"pd_id": this.startPD,
|
||||||
};
|
};
|
||||||
this.pdTrigerService.getPDReportFinalDocument(data).subscribe(data => {
|
this.pdTrigerService.getPDReportFinalDocument(data).subscribe(data => {
|
||||||
if (data.dataStatus) {
|
if (data.dataStatus) {
|
||||||
@ -165,6 +166,7 @@ export class QcPdReportComponent implements OnInit {
|
|||||||
downloadPDReport(){
|
downloadPDReport(){
|
||||||
let data = {
|
let data = {
|
||||||
"pd_id": this.startPD,
|
"pd_id": this.startPD,
|
||||||
|
"random_string":atob(this.route.snapshot.params['string'])
|
||||||
};
|
};
|
||||||
this.pdTrigerService.generatePDReportPDF(data).subscribe(data => {
|
this.pdTrigerService.generatePDReportPDF(data).subscribe(data => {
|
||||||
if (data.dataStatus) {
|
if (data.dataStatus) {
|
||||||
@ -182,7 +184,8 @@ export class QcPdReportComponent implements OnInit {
|
|||||||
archivePDImages(){
|
archivePDImages(){
|
||||||
let data = {
|
let data = {
|
||||||
"pd_id": this.startPD,
|
"pd_id": this.startPD,
|
||||||
"form_id":""
|
"form_id":"",
|
||||||
|
"random_string":atob(this.route.snapshot.params['string'])
|
||||||
};
|
};
|
||||||
this.pdTrigerService.archivePDImages(data).subscribe(data => {
|
this.pdTrigerService.archivePDImages(data).subscribe(data => {
|
||||||
if (data.dataStatus) {
|
if (data.dataStatus) {
|
||||||
@ -222,7 +225,7 @@ export class QcPdReportComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getPdReportDetails() {
|
getPdReportDetails() {
|
||||||
this.pdTrigerService.getPdFinalReportDetails(this.startPD).subscribe(data => {
|
this.pdTrigerService.getPdFinalReportDetails(this.startPD,atob(this.route.snapshot.params['string'])).subscribe(data => {
|
||||||
if (data.status == 200) {
|
if (data.status == 200) {
|
||||||
// console.log('getPdReportDetails',data);
|
// console.log('getPdReportDetails',data);
|
||||||
this.pdReportRecords = data.records;
|
this.pdReportRecords = data.records;
|
||||||
@ -282,7 +285,7 @@ export class QcPdReportComponent implements OnInit {
|
|||||||
|
|
||||||
reportReview(status): void {
|
reportReview(status): void {
|
||||||
const dialogRef = this.dialog.open(QcReviewComponent, {
|
const dialogRef = this.dialog.open(QcReviewComponent, {
|
||||||
data: { startId: this.startPD, data_status: status },
|
data: { startId: this.startPD, data_status: status,random_string : atob(this.route.snapshot.params['string']) },
|
||||||
disableClose: true
|
disableClose: true
|
||||||
});
|
});
|
||||||
dialogRef.afterClosed()
|
dialogRef.afterClosed()
|
||||||
|
|||||||
@ -86,6 +86,7 @@ export class QcReviewComponent implements OnInit {
|
|||||||
myClick(): void {
|
myClick(): void {
|
||||||
let template = this.ngForm.value;
|
let template = this.ngForm.value;
|
||||||
template.pd_id = this.data.startId;
|
template.pd_id = this.data.startId;
|
||||||
|
template.random_String = this.data.random_string;
|
||||||
this.pdTrigerService.pdReviewStatusUpdate(template).subscribe(data=>{
|
this.pdTrigerService.pdReviewStatusUpdate(template).subscribe(data=>{
|
||||||
this.notifier.notify('success', 'Your Changes Updated.!');
|
this.notifier.notify('success', 'Your Changes Updated.!');
|
||||||
this.dialogRef.close({
|
this.dialogRef.close({
|
||||||
|
|||||||
@ -40,6 +40,7 @@ import {FuturePlansAndBusinessEnvironmentComponent} from './../../../personal-d
|
|||||||
export class QcStartComponent implements OnInit, OnDestroy {
|
export class QcStartComponent implements OnInit, OnDestroy {
|
||||||
public startPD: string;
|
public startPD: string;
|
||||||
public mainApplicantName: string;
|
public mainApplicantName: string;
|
||||||
|
public randomString: string;
|
||||||
//public remarks: string;
|
//public remarks: string;
|
||||||
errorMessage: any;
|
errorMessage: any;
|
||||||
selectedCategory: any = [];
|
selectedCategory: any = [];
|
||||||
@ -71,6 +72,7 @@ export class QcStartComponent implements OnInit, OnDestroy {
|
|||||||
private router: Router,
|
private router: Router,
|
||||||
private listPDComponent: QcListComponent, private _pd: QcService,) {
|
private listPDComponent: QcListComponent, private _pd: QcService,) {
|
||||||
this.startPD = this.route.snapshot.params['pdid'];
|
this.startPD = this.route.snapshot.params['pdid'];
|
||||||
|
this.randomString = this.route.snapshot.params['rdmstr'];
|
||||||
this.notifier = notifier;
|
this.notifier = notifier;
|
||||||
this.currentPDStatus = false;
|
this.currentPDStatus = false;
|
||||||
}
|
}
|
||||||
@ -87,7 +89,7 @@ export class QcStartComponent implements OnInit, OnDestroy {
|
|||||||
// Ps.initialize(elemSidebar, { wheelSpeed: 2, suppressScrollX: true });
|
// Ps.initialize(elemSidebar, { wheelSpeed: 2, suppressScrollX: true });
|
||||||
// Ps.initialize(elemContent, { wheelSpeed: 2, suppressScrollX: true });
|
// Ps.initialize(elemContent, { wheelSpeed: 2, suppressScrollX: true });
|
||||||
}
|
}
|
||||||
this.loadTemplates(this.startPD,1);
|
this.loadTemplates(this.startPD,1,this.randomString);
|
||||||
}
|
}
|
||||||
|
|
||||||
isMac(): boolean {
|
isMac(): boolean {
|
||||||
@ -104,8 +106,8 @@ export class QcStartComponent implements OnInit, OnDestroy {
|
|||||||
|
|
||||||
|
|
||||||
// load templates details
|
// load templates details
|
||||||
loadTemplates(startID:string,type:number){
|
loadTemplates(startID:string,type:number,randomString:string){
|
||||||
this._pd.loadPDTemplates(startID).subscribe(
|
this._pd.loadPDTemplates(startID,randomString).subscribe(
|
||||||
data => {
|
data => {
|
||||||
if (data.status == 200) {
|
if (data.status == 200) {
|
||||||
this.pdMasterList=data.records.pdmaster_details;
|
this.pdMasterList=data.records.pdmaster_details;
|
||||||
@ -150,7 +152,7 @@ export class QcStartComponent implements OnInit, OnDestroy {
|
|||||||
dialogRef.afterClosed()
|
dialogRef.afterClosed()
|
||||||
.subscribe(dataresult => {
|
.subscribe(dataresult => {
|
||||||
if(dataresult.update_status==true){
|
if(dataresult.update_status==true){
|
||||||
this.loadTemplates(this.startPD,2);
|
this.loadTemplates(this.startPD,2,this.randomString);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -171,7 +173,7 @@ export class QcStartComponent implements OnInit, OnDestroy {
|
|||||||
});
|
});
|
||||||
dialogRef.afterClosed()
|
dialogRef.afterClosed()
|
||||||
.subscribe(dataresult => {
|
.subscribe(dataresult => {
|
||||||
this.loadTemplates(this.startPD,2);
|
this.loadTemplates(this.startPD,2,this.randomString);
|
||||||
});
|
});
|
||||||
}else
|
}else
|
||||||
if(this.selectedFormsCategory.form_id==2){
|
if(this.selectedFormsCategory.form_id==2){
|
||||||
@ -185,7 +187,7 @@ export class QcStartComponent implements OnInit, OnDestroy {
|
|||||||
});
|
});
|
||||||
dialogRef.afterClosed()
|
dialogRef.afterClosed()
|
||||||
.subscribe(dataresult => {
|
.subscribe(dataresult => {
|
||||||
this.loadTemplates(this.startPD,2);
|
this.loadTemplates(this.startPD,2,this.randomString);
|
||||||
});
|
});
|
||||||
}else
|
}else
|
||||||
if(this.selectedFormsCategory.form_id==3){
|
if(this.selectedFormsCategory.form_id==3){
|
||||||
@ -199,7 +201,7 @@ export class QcStartComponent implements OnInit, OnDestroy {
|
|||||||
});
|
});
|
||||||
dialogRef.afterClosed()
|
dialogRef.afterClosed()
|
||||||
.subscribe(dataresult => {
|
.subscribe(dataresult => {
|
||||||
this.loadTemplates(this.startPD,2);
|
this.loadTemplates(this.startPD,2,this.randomString);
|
||||||
});
|
});
|
||||||
}else
|
}else
|
||||||
if(this.selectedFormsCategory.form_id==4){
|
if(this.selectedFormsCategory.form_id==4){
|
||||||
@ -213,7 +215,7 @@ export class QcStartComponent implements OnInit, OnDestroy {
|
|||||||
});
|
});
|
||||||
dialogRef.afterClosed()
|
dialogRef.afterClosed()
|
||||||
.subscribe(dataresult => {
|
.subscribe(dataresult => {
|
||||||
this.loadTemplates(this.startPD,2);
|
this.loadTemplates(this.startPD,2,this.randomString);
|
||||||
});
|
});
|
||||||
}else
|
}else
|
||||||
if(this.selectedFormsCategory.form_id==5){
|
if(this.selectedFormsCategory.form_id==5){
|
||||||
@ -227,7 +229,7 @@ export class QcStartComponent implements OnInit, OnDestroy {
|
|||||||
});
|
});
|
||||||
dialogRef.afterClosed()
|
dialogRef.afterClosed()
|
||||||
.subscribe(dataresult => {
|
.subscribe(dataresult => {
|
||||||
this.loadTemplates(this.startPD,2);
|
this.loadTemplates(this.startPD,2,this.randomString);
|
||||||
});
|
});
|
||||||
}else
|
}else
|
||||||
if(this.selectedFormsCategory.form_id==6){
|
if(this.selectedFormsCategory.form_id==6){
|
||||||
@ -241,7 +243,7 @@ export class QcStartComponent implements OnInit, OnDestroy {
|
|||||||
});
|
});
|
||||||
dialogRef.afterClosed()
|
dialogRef.afterClosed()
|
||||||
.subscribe(dataresult => {
|
.subscribe(dataresult => {
|
||||||
this.loadTemplates(this.startPD,2);
|
this.loadTemplates(this.startPD,2,this.randomString);
|
||||||
});
|
});
|
||||||
}else
|
}else
|
||||||
if(this.selectedFormsCategory.form_id==7){
|
if(this.selectedFormsCategory.form_id==7){
|
||||||
@ -255,7 +257,7 @@ export class QcStartComponent implements OnInit, OnDestroy {
|
|||||||
});
|
});
|
||||||
dialogRef.afterClosed()
|
dialogRef.afterClosed()
|
||||||
.subscribe(dataresult => {
|
.subscribe(dataresult => {
|
||||||
this.loadTemplates(this.startPD,2);
|
this.loadTemplates(this.startPD,2,this.randomString);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -270,7 +272,7 @@ export class QcStartComponent implements OnInit, OnDestroy {
|
|||||||
});
|
});
|
||||||
dialogRef.afterClosed()
|
dialogRef.afterClosed()
|
||||||
.subscribe(dataresult => {
|
.subscribe(dataresult => {
|
||||||
this.loadTemplates(this.startPD,2);
|
this.loadTemplates(this.startPD,2,this.randomString);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -285,7 +287,7 @@ export class QcStartComponent implements OnInit, OnDestroy {
|
|||||||
});
|
});
|
||||||
dialogRef.afterClosed()
|
dialogRef.afterClosed()
|
||||||
.subscribe(dataresult => {
|
.subscribe(dataresult => {
|
||||||
this.loadTemplates(this.startPD,2);
|
this.loadTemplates(this.startPD,2,this.randomString);
|
||||||
});
|
});
|
||||||
}else
|
}else
|
||||||
if(this.selectedFormsCategory.form_id==10){
|
if(this.selectedFormsCategory.form_id==10){
|
||||||
@ -299,7 +301,7 @@ export class QcStartComponent implements OnInit, OnDestroy {
|
|||||||
});
|
});
|
||||||
dialogRef.afterClosed()
|
dialogRef.afterClosed()
|
||||||
.subscribe(dataresult => {
|
.subscribe(dataresult => {
|
||||||
this.loadTemplates(this.startPD,2);
|
this.loadTemplates(this.startPD,2,this.randomString);
|
||||||
});
|
});
|
||||||
}else
|
}else
|
||||||
if(this.selectedFormsCategory.form_id==11){
|
if(this.selectedFormsCategory.form_id==11){
|
||||||
@ -313,7 +315,7 @@ export class QcStartComponent implements OnInit, OnDestroy {
|
|||||||
});
|
});
|
||||||
dialogRef.afterClosed()
|
dialogRef.afterClosed()
|
||||||
.subscribe(dataresult => {
|
.subscribe(dataresult => {
|
||||||
this.loadTemplates(this.startPD,2);
|
this.loadTemplates(this.startPD,2,this.randomString);
|
||||||
});
|
});
|
||||||
}else
|
}else
|
||||||
if(this.selectedFormsCategory.form_id==12){
|
if(this.selectedFormsCategory.form_id==12){
|
||||||
@ -328,7 +330,7 @@ export class QcStartComponent implements OnInit, OnDestroy {
|
|||||||
dialogRef.afterClosed()
|
dialogRef.afterClosed()
|
||||||
.subscribe(dataresult => {
|
.subscribe(dataresult => {
|
||||||
// this.notifier.notify('success', 'Successfully allocated.!');
|
// this.notifier.notify('success', 'Successfully allocated.!');
|
||||||
this.loadTemplates(this.startPD,2);
|
this.loadTemplates(this.startPD,2,this.randomString);
|
||||||
});
|
});
|
||||||
}else
|
}else
|
||||||
if(this.selectedFormsCategory.form_id==13){
|
if(this.selectedFormsCategory.form_id==13){
|
||||||
@ -342,7 +344,7 @@ export class QcStartComponent implements OnInit, OnDestroy {
|
|||||||
});
|
});
|
||||||
dialogRef.afterClosed()
|
dialogRef.afterClosed()
|
||||||
.subscribe(dataresult => {
|
.subscribe(dataresult => {
|
||||||
this.loadTemplates(this.startPD,2);
|
this.loadTemplates(this.startPD,2,this.randomString);
|
||||||
});
|
});
|
||||||
}else
|
}else
|
||||||
if(this.selectedFormsCategory.form_id==14){
|
if(this.selectedFormsCategory.form_id==14){
|
||||||
@ -356,7 +358,7 @@ export class QcStartComponent implements OnInit, OnDestroy {
|
|||||||
});
|
});
|
||||||
dialogRef.afterClosed()
|
dialogRef.afterClosed()
|
||||||
.subscribe(dataresult => {
|
.subscribe(dataresult => {
|
||||||
this.loadTemplates(this.startPD,2);
|
this.loadTemplates(this.startPD,2,this.randomString);
|
||||||
});
|
});
|
||||||
}else
|
}else
|
||||||
if(this.selectedFormsCategory.form_id==15){
|
if(this.selectedFormsCategory.form_id==15){
|
||||||
@ -370,7 +372,7 @@ export class QcStartComponent implements OnInit, OnDestroy {
|
|||||||
});
|
});
|
||||||
dialogRef.afterClosed()
|
dialogRef.afterClosed()
|
||||||
.subscribe(dataresult => {
|
.subscribe(dataresult => {
|
||||||
this.loadTemplates(this.startPD,2);
|
this.loadTemplates(this.startPD,2,this.randomString);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -385,7 +387,7 @@ export class QcStartComponent implements OnInit, OnDestroy {
|
|||||||
});
|
});
|
||||||
dialogRef.afterClosed()
|
dialogRef.afterClosed()
|
||||||
.subscribe(dataresult => {
|
.subscribe(dataresult => {
|
||||||
this.loadTemplates(this.startPD,2);
|
this.loadTemplates(this.startPD,2,this.randomString);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else if(this.selectedFormsCategory.form_id==18){
|
else if(this.selectedFormsCategory.form_id==18){
|
||||||
@ -399,7 +401,7 @@ export class QcStartComponent implements OnInit, OnDestroy {
|
|||||||
});
|
});
|
||||||
generaldialogRef.afterClosed()
|
generaldialogRef.afterClosed()
|
||||||
.subscribe(dataresult => {
|
.subscribe(dataresult => {
|
||||||
this.loadTemplates(this.startPD,2);
|
this.loadTemplates(this.startPD,2,this.randomString);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else if(this.selectedFormsCategory.form_id==19){
|
else if(this.selectedFormsCategory.form_id==19){
|
||||||
@ -413,7 +415,7 @@ export class QcStartComponent implements OnInit, OnDestroy {
|
|||||||
});
|
});
|
||||||
generaldialogRef.afterClosed()
|
generaldialogRef.afterClosed()
|
||||||
.subscribe(dataresult => {
|
.subscribe(dataresult => {
|
||||||
this.loadTemplates(this.startPD,2);
|
this.loadTemplates(this.startPD,2,this.randomString);
|
||||||
});
|
});
|
||||||
}else if(this.selectedFormsCategory.form_id==20){
|
}else if(this.selectedFormsCategory.form_id==20){
|
||||||
const generaldialogRef = this.dialog.open(FinalRemarksComponent, {
|
const generaldialogRef = this.dialog.open(FinalRemarksComponent, {
|
||||||
@ -426,7 +428,7 @@ export class QcStartComponent implements OnInit, OnDestroy {
|
|||||||
});
|
});
|
||||||
generaldialogRef.afterClosed()
|
generaldialogRef.afterClosed()
|
||||||
.subscribe(dataresult => {
|
.subscribe(dataresult => {
|
||||||
this.loadTemplates(this.startPD,2);
|
this.loadTemplates(this.startPD,2,this.randomString);
|
||||||
});
|
});
|
||||||
}else
|
}else
|
||||||
if(this.selectedFormsCategory.form_id==22){
|
if(this.selectedFormsCategory.form_id==22){
|
||||||
@ -440,7 +442,7 @@ export class QcStartComponent implements OnInit, OnDestroy {
|
|||||||
});
|
});
|
||||||
dialogRef.afterClosed()
|
dialogRef.afterClosed()
|
||||||
.subscribe(dataresult => {
|
.subscribe(dataresult => {
|
||||||
this.loadTemplates(this.startPD,2);
|
this.loadTemplates(this.startPD,2,this.randomString);
|
||||||
});
|
});
|
||||||
}else
|
}else
|
||||||
if((this.lender_short_name == 'CLIX' || this.product_abbr == 'LAEP') && this.selectedFormsCategory.form_id==23){
|
if((this.lender_short_name == 'CLIX' || this.product_abbr == 'LAEP') && this.selectedFormsCategory.form_id==23){
|
||||||
@ -454,7 +456,7 @@ export class QcStartComponent implements OnInit, OnDestroy {
|
|||||||
});
|
});
|
||||||
dialogRef.afterClosed()
|
dialogRef.afterClosed()
|
||||||
.subscribe(dataresult => {
|
.subscribe(dataresult => {
|
||||||
this.loadTemplates(this.startPD,2);
|
this.loadTemplates(this.startPD,2,this.randomString);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -466,8 +468,8 @@ export class QcStartComponent implements OnInit, OnDestroy {
|
|||||||
}
|
}
|
||||||
// load pd view component
|
// load pd view component
|
||||||
loadPdViewCompoent() {
|
loadPdViewCompoent() {
|
||||||
this.router.navigate(['../../viewpd', this.startPD], {relativeTo: this.route});
|
// this.router.navigate(['../../viewpd', this.startPD], {relativeTo: this.route});
|
||||||
|
this.router.navigate(['../../../viewpd', this.pdMasterList.parent_pd_id,this.randomString], {relativeTo: this.route});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -38,6 +38,7 @@ export class QcViewComponent implements OnInit, OnDestroy {
|
|||||||
pdAdditionalReqData: any=[];
|
pdAdditionalReqData: any=[];
|
||||||
enableStartPD: boolean;
|
enableStartPD: boolean;
|
||||||
reportRandomString: string;
|
reportRandomString: string;
|
||||||
|
masterRandomString: string;
|
||||||
public userRoleID = +localStorage.getItem('user_role');
|
public userRoleID = +localStorage.getItem('user_role');
|
||||||
// create values for status check
|
// create values for status check
|
||||||
pdStatusCheck :any={
|
pdStatusCheck :any={
|
||||||
@ -62,19 +63,20 @@ export class QcViewComponent implements OnInit, OnDestroy {
|
|||||||
this.QcListComponent.showListView(false);
|
this.QcListComponent.showListView(false);
|
||||||
this.route.params.subscribe(params => {
|
this.route.params.subscribe(params => {
|
||||||
this.viewID = params['pdid'];
|
this.viewID = params['pdid'];
|
||||||
|
this.masterRandomString = params['rdmstr'];
|
||||||
});
|
});
|
||||||
|
|
||||||
this.viewPdDetails(this.viewID);
|
this.viewPdDetails(this.viewID,this.masterRandomString);
|
||||||
}
|
}
|
||||||
viewPdDetails(editID:string){
|
viewPdDetails(editID:string,randomString:string){
|
||||||
this.pdMasterData = [];
|
this.pdMasterData = [];
|
||||||
this._qc.editPdDetails(editID).subscribe(
|
this._qc.editPdDetails(editID,randomString).subscribe(
|
||||||
data => {
|
data => {
|
||||||
if (data.status == 200) {
|
if (data.status == 200) {
|
||||||
let masterData: any = data.records.pd_master_details;
|
let masterData: any = data.records.pd_master_details;
|
||||||
this.pdMasterData.push(masterData[0]);
|
this.pdMasterData.push(masterData[0]);
|
||||||
this.reportRandomString = btoa(masterData[0].random_string);
|
this.reportRandomString = btoa(masterData[0].random_string);
|
||||||
this.pd_QC_Rating = Number(this.pdMasterData.qc_rating);
|
this.pd_QC_Rating = Number(this.pdMasterData.qc_rating);
|
||||||
this.pdApplicantData= data.records.applicants_details;
|
this.pdApplicantData= data.records.applicants_details;
|
||||||
this.pdApplicantData = this.pdApplicantData.filter(appt => appt.applicant_type != 2);
|
this.pdApplicantData = this.pdApplicantData.filter(appt => appt.applicant_type != 2);
|
||||||
this.pdDocumentsData=data.records.pd_documnets;
|
this.pdDocumentsData=data.records.pd_documnets;
|
||||||
@ -105,14 +107,15 @@ export class QcViewComponent implements OnInit, OnDestroy {
|
|||||||
|
|
||||||
loadPdListCompoent() {
|
loadPdListCompoent() {
|
||||||
this.destroyType=2;
|
this.destroyType=2;
|
||||||
this.router.navigate([ '../../' ], { relativeTo: this.route });
|
this.router.navigate([ '../../../' ], { relativeTo: this.route });
|
||||||
this.QcListComponent.pdListLoad(true);
|
this.QcListComponent.pdListLoad(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
editPdMaster(masterData:any){
|
editPdMaster(masterData:any){
|
||||||
let record = {
|
let record = {
|
||||||
"records":masterData,
|
"records":masterData,
|
||||||
"applicantLength": this.pdApplicantData.length
|
"applicantLength": this.pdApplicantData.length,
|
||||||
|
"random_string":this.masterRandomString
|
||||||
}
|
}
|
||||||
const dialogPDMaster = this.dialog.open(EditPdMasterComponent, {
|
const dialogPDMaster = this.dialog.open(EditPdMasterComponent, {
|
||||||
data: record,
|
data: record,
|
||||||
@ -123,7 +126,7 @@ export class QcViewComponent implements OnInit, OnDestroy {
|
|||||||
dialogPDMaster.afterClosed()
|
dialogPDMaster.afterClosed()
|
||||||
.subscribe(dataresult => {
|
.subscribe(dataresult => {
|
||||||
// this.notifier.notify('success', 'Successfully allocated.!');
|
// this.notifier.notify('success', 'Successfully allocated.!');
|
||||||
this.viewPdDetails(this.viewID)
|
this.viewPdDetails(this.viewID,this.masterRandomString)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
editPdApplicant(applicantData:any){
|
editPdApplicant(applicantData:any){
|
||||||
@ -140,7 +143,7 @@ export class QcViewComponent implements OnInit, OnDestroy {
|
|||||||
dialogApplicant.afterClosed()
|
dialogApplicant.afterClosed()
|
||||||
.subscribe(dataresult => {
|
.subscribe(dataresult => {
|
||||||
// this.notifier.notify('success', 'Successfully allocated.!');
|
// this.notifier.notify('success', 'Successfully allocated.!');
|
||||||
this.viewPdDetails(this.viewID)
|
this.viewPdDetails(this.viewID,this.masterRandomString)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
// edit pd addtional requirements
|
// edit pd addtional requirements
|
||||||
@ -158,7 +161,7 @@ export class QcViewComponent implements OnInit, OnDestroy {
|
|||||||
dialogRequirement.afterClosed()
|
dialogRequirement.afterClosed()
|
||||||
.subscribe(dataresult => {
|
.subscribe(dataresult => {
|
||||||
// this.notifier.notify('success', 'Successfully allocated.!');
|
// this.notifier.notify('success', 'Successfully allocated.!');
|
||||||
this.viewPdDetails(this.viewID)
|
this.viewPdDetails(this.viewID,this.masterRandomString)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
// pd allocation to
|
// pd allocation to
|
||||||
@ -174,7 +177,7 @@ export class QcViewComponent implements OnInit, OnDestroy {
|
|||||||
dialogRef.afterClosed()
|
dialogRef.afterClosed()
|
||||||
.subscribe(dataresult => {
|
.subscribe(dataresult => {
|
||||||
// this.notifier.notify('success', 'Successfully allocated.!');
|
// this.notifier.notify('success', 'Successfully allocated.!');
|
||||||
this.viewPdDetails(this.viewID)
|
this.viewPdDetails(this.viewID,this.masterRandomString)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else if(pdData.fk_pd_type == 2){
|
else if(pdData.fk_pd_type == 2){
|
||||||
@ -188,7 +191,7 @@ export class QcViewComponent implements OnInit, OnDestroy {
|
|||||||
.subscribe(dataresult => {
|
.subscribe(dataresult => {
|
||||||
// this.notifier.notify('success', 'Successfully allocated.!');
|
// this.notifier.notify('success', 'Successfully allocated.!');
|
||||||
|
|
||||||
this.viewPdDetails(this.viewID)
|
this.viewPdDetails(this.viewID,this.masterRandomString)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else if(pdData.fk_pd_type == 3){
|
else if(pdData.fk_pd_type == 3){
|
||||||
@ -202,7 +205,7 @@ export class QcViewComponent implements OnInit, OnDestroy {
|
|||||||
.subscribe(dataresult => {
|
.subscribe(dataresult => {
|
||||||
// this.notifier.notify('success', 'Successfully allocated.!');
|
// this.notifier.notify('success', 'Successfully allocated.!');
|
||||||
|
|
||||||
this.viewPdDetails(this.viewID)
|
this.viewPdDetails(this.viewID,this.masterRandomString)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -219,14 +222,15 @@ export class QcViewComponent implements OnInit, OnDestroy {
|
|||||||
dialogSchedule.afterClosed()
|
dialogSchedule.afterClosed()
|
||||||
.subscribe(dataresult => {
|
.subscribe(dataresult => {
|
||||||
// this.notifier.notify('success', 'Successfully allocated.!');
|
// this.notifier.notify('success', 'Successfully allocated.!');
|
||||||
this.viewPdDetails(this.viewID)
|
this.viewPdDetails(this.viewID,this.masterRandomString)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// this is for initiate additional pd
|
// this is for initiate additional pd
|
||||||
initiateAddtionalPD(parentData: any, childData: any, type: boolean){
|
initiateAddtionalPD(parentData: any, childData: any, type: boolean){
|
||||||
const dialogRef = this.dialog.open(InitiateAdditionalPdComponent, {
|
const dialogRef = this.dialog.open(InitiateAdditionalPdComponent, {
|
||||||
data: { "type":type,"pd_id":parentData.pd_id,"fk_customer_segment":parentData.fk_customer_segment, "pd_status":parentData.pd_status, "pd_address_id": childData.pd_address_id},
|
data: { "type":type,"pd_id":parentData.pd_id,"fk_customer_segment":parentData.fk_customer_segment, "pd_status":parentData.pd_status, "pd_address_id": childData.pd_address_id,"random_string":this.masterRandomString},
|
||||||
|
|
||||||
disableClose: true,
|
disableClose: true,
|
||||||
// position: { right: '0' },
|
// position: { right: '0' },
|
||||||
minWidth: '40%',
|
minWidth: '40%',
|
||||||
@ -235,7 +239,7 @@ export class QcViewComponent implements OnInit, OnDestroy {
|
|||||||
dialogRef.afterClosed()
|
dialogRef.afterClosed()
|
||||||
.subscribe(dataresult => {
|
.subscribe(dataresult => {
|
||||||
if (dataresult.update_status == true) {
|
if (dataresult.update_status == true) {
|
||||||
this.viewPdDetails(this.viewID)
|
this.viewPdDetails(this.viewID,this.masterRandomString)
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -246,12 +250,12 @@ export class QcViewComponent implements OnInit, OnDestroy {
|
|||||||
// console.log('childData',childData);
|
// console.log('childData',childData);
|
||||||
// return;
|
// return;
|
||||||
this.destroyType=3;
|
this.destroyType=3;
|
||||||
this.router.navigate([ '../../startpd',pdID], { relativeTo: this.route });
|
this.router.navigate([ '../../startpd',pdID,this.masterRandomString], { relativeTo: this.route });
|
||||||
}
|
}
|
||||||
// pd report
|
// pd report
|
||||||
getPDIDReport(pdID:any) {
|
getPDIDReport(pdID:any) {
|
||||||
this.destroyType=3;
|
this.destroyType=3;
|
||||||
this.router.navigate([ '../../pd_report',pdID,this.reportRandomString], { relativeTo: this.route });
|
this.router.navigate([ '../../../pd_report',pdID,this.reportRandomString], { relativeTo: this.route });
|
||||||
}
|
}
|
||||||
ngOnDestroy(): void {
|
ngOnDestroy(): void {
|
||||||
if(this.destroyType==1){
|
if(this.destroyType==1){
|
||||||
|
|||||||
@ -142,8 +142,9 @@ export class QcService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// get edit row pd details
|
// get edit row pd details
|
||||||
editPdDetails(editId: string): Observable<any> {
|
editPdDetails(editId: string,randomString): Observable<any> {
|
||||||
let httpParams = new HttpParams().set('pdid', editId);
|
let httpParams = new HttpParams().set('pdid', editId);
|
||||||
|
httpParams = httpParams.append('random_string',randomString);
|
||||||
return this._http.post<any>(this.apiUrl + "getFullPDDetails", httpParams)
|
return this._http.post<any>(this.apiUrl + "getFullPDDetails", httpParams)
|
||||||
.pipe(
|
.pipe(
|
||||||
catchError(this.handleError('operation', []))
|
catchError(this.handleError('operation', []))
|
||||||
@ -151,9 +152,10 @@ export class QcService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// update pd master details
|
// update pd master details
|
||||||
editPdMasterDetails(editData: any, status: string): Observable<any> {
|
editPdMasterDetails(editData: any, status: string,randomString): Observable<any> {
|
||||||
editData.pd_status = status;
|
editData.pd_status = status;
|
||||||
editData.fk_updatedby = this._aws.getlocale();
|
editData.fk_updatedby = this._aws.getlocale();
|
||||||
|
editData.random_string = randomString;
|
||||||
// editData.updatedon = currentdate;
|
// editData.updatedon = currentdate;
|
||||||
return this._http.post<any>(this.apiUrl + "updatePDMaster", { records: editData })
|
return this._http.post<any>(this.apiUrl + "updatePDMaster", { records: editData })
|
||||||
|
|
||||||
@ -212,9 +214,11 @@ export class QcService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//load pd template details
|
//load pd template details
|
||||||
loadPDTemplates(pdId: string): Observable<any> {
|
loadPDTemplates(pdId: string,randomString :string): Observable<any> {
|
||||||
|
let httpParams = new HttpParams().set('pd_id', pdId);
|
||||||
|
httpParams = httpParams.append('random_string',randomString);
|
||||||
const options = pdId ?
|
const options = pdId ?
|
||||||
{ params: new HttpParams().set('pd_id', pdId) } : {};
|
{ params: httpParams } : {};
|
||||||
return this._http.get<any[]>(this.apiUrl + "loadFullTemplate", options)
|
return this._http.get<any[]>(this.apiUrl + "loadFullTemplate", options)
|
||||||
.pipe(
|
.pipe(
|
||||||
catchError(this.handleError('operation', []))
|
catchError(this.handleError('operation', []))
|
||||||
@ -303,8 +307,11 @@ export class QcService {
|
|||||||
|
|
||||||
// get Pd Final report Question Answer
|
// get Pd Final report Question Answer
|
||||||
|
|
||||||
getPdFinalReportDetails(pdId: number): Observable<any> {
|
getPdFinalReportDetails(pdId: number,randomString: string): Observable<any> {
|
||||||
return this._http.post<any>(this.apiUrl + "getFinalPDReportQuestions", { "pd_id": pdId })
|
// getPdFinalReportDetails(pdId: number,random:string): Observable<any> {
|
||||||
|
|
||||||
|
|
||||||
|
return this._http.post<any>(this.apiUrl + "getFinalPDReportQuestions", {"pd_id":pdId,'random_string':randomString})
|
||||||
.pipe(
|
.pipe(
|
||||||
catchError(this.handleError('operation', []))
|
catchError(this.handleError('operation', []))
|
||||||
)
|
)
|
||||||
@ -607,8 +614,8 @@ export class QcService {
|
|||||||
return this._http.post<any>(this.apiUrl+"getHTMLContent", {"pd_id":id});
|
return this._http.post<any>(this.apiUrl+"getHTMLContent", {"pd_id":id});
|
||||||
}
|
}
|
||||||
|
|
||||||
setHTMLContent(id:any,content:any): Observable<any> {
|
setHTMLContent(id:any,content:any,randomString : any): Observable<any> {
|
||||||
let records = { 'records': { "pdid":id,"content":content,"fk_createdby":this._aws.getlocale()}};
|
let records = { 'records': { "pdid":id,"content":content,"fk_createdby":this._aws.getlocale(),'random_string':randomString}};
|
||||||
return this._http.post<any>(this.apiUrl+"saveHTMLReport", records);
|
return this._http.post<any>(this.apiUrl+"saveHTMLReport", records);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -20,11 +20,11 @@ const routes: Routes =[
|
|||||||
component: QcListComponent,
|
component: QcListComponent,
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: 'viewpd/:pdid',
|
path: 'viewpd/:pdid/:rdmstr',
|
||||||
component: QcViewComponent,
|
component: QcViewComponent,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'startpd/:pdid',
|
path: 'startpd/:pdid/:rdmstr',
|
||||||
component: QcStartComponent,
|
component: QcStartComponent,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@ -30,9 +30,9 @@
|
|||||||
<button mat-raised-button mat-icon-button type="button" matTooltip="Change Password" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" data-scribe-element="profile_edit_button" (click)="changePassword()">
|
<button mat-raised-button mat-icon-button type="button" matTooltip="Change Password" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" data-scribe-element="profile_edit_button" (click)="changePassword()">
|
||||||
<mat-icon>https</mat-icon>
|
<mat-icon>https</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
<button mat-raised-button mat-icon-button type="button" matTooltip="Edit Profile" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" data-scribe-element="profile_edit_button" (click)="editprofile()">
|
<span *ngIf="userRoleID == '10'"><button mat-raised-button mat-icon-button type="button" matTooltip="Edit Profile" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" data-scribe-element="profile_edit_button" (click)="editprofile()">
|
||||||
<mat-icon>edit</mat-icon>
|
<mat-icon>edit</mat-icon>
|
||||||
</button>
|
</button></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@ -25,16 +25,13 @@ export class UserProfileComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
userDetails:any=[];
|
userDetails:any=[];
|
||||||
|
public userRoleID = +localStorage.getItem('user_role');
|
||||||
|
|
||||||
constructor(public AWS:AwsService,public dialog: MatDialog,public users:UserService,public router:Router ) {
|
constructor(public AWS:AwsService,public dialog: MatDialog,public users:UserService,public router:Router ) {
|
||||||
this.getuser();
|
this.getuser();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
getuser(){
|
getuser(){
|
||||||
//console.log(this.AWS.getUser());
|
//console.log(this.AWS.getUser());
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user