QC Report edit changes : ps

This commit is contained in:
venbatechnologies@gmail.com 2019-05-24 19:38:24 +05:30
parent af541a358d
commit 1e2e7912e4
18 changed files with 233 additions and 85 deletions

View File

@ -57,6 +57,15 @@ export class TokenInterceptor implements HttpInterceptor{
localStorage.clear(); localStorage.clear();
this.router.navigate(['/authentication/login']); this.router.navigate(['/authentication/login']);
} }
else if(error.status == 404){
this.router.navigate(['/error/404']);
}
else if(error.status == 503){
this.router.navigate(['/error/503']);
}
else if(error.status == 0){
this.router.navigate(['/error/404']);
}
else{ else{
let errorMessage = ''; let errorMessage = '';
let type : number; let type : number;
@ -69,7 +78,6 @@ export class TokenInterceptor implements HttpInterceptor{
errorMessage = `Error Code: ${error.status}\nMessage: ${error.message}`; errorMessage = `Error Code: ${error.status}\nMessage: ${error.message}`;
type = 2; type = 2;
} }
// window.alert(errorMessage);
return throwError({error_status :type == 2 ? error.status : '', return throwError({error_status :type == 2 ? error.status : '',
error_message:error.message, error_message:error.message,
error_text :type == 2 ? error.statusText : '', error_text :type == 2 ? error.statusText : '',

View File

@ -1,5 +1,10 @@
<div class="relative"> <div class="relative">
<div class="form-bg"> <div class="form-bg">
<h3 class="page-title"><img [src]="'http://ssa.sineedge.com/sparqapi/logo/sineedge_red.png'" style="height: 50px;;"> <span> SINEEDGE </span>
</h3>
<div class="relative error-wrapper"> <div class="relative error-wrapper">
<h1> <h1>
Oops!</h1> Oops!</h1>
@ -10,7 +15,7 @@
<p> Sorry, an error has occured, Requested page not found!</p> <p> Sorry, an error has occured, Requested page not found!</p>
</div> </div>
<div class="error-actions"> <div class="error-actions">
<button class="mat-blue" mat-raised-button>Take me to home</button> <button class="mat-blue" mat-raised-button (click)="takeMeToHome()">Take me to Home</button>
</div> </div>
</div> </div>
</div> </div>

View File

@ -0,0 +1,9 @@
.form-bg {
//background-image:url('http://www.ssa.sineedge.com/beta/assets/images/login.jpg') !important;
//background-image: url(../../../assets/images/login_o.jpg);
//background-color: #F44336;
background: url(../../../assets/images/bg.png) repeat-x 0 0 #ffffff;
height: 100vh !important;
background-position: center !important;
// min-height: calc(90vh + 90px) !important;
}

View File

@ -1,4 +1,5 @@
import { Component, OnInit,ViewEncapsulation } from '@angular/core'; import { Component, OnInit,ViewEncapsulation } from '@angular/core';
import { Router } from '@angular/router';
@Component({ @Component({
selector: 'ms-error-404', selector: 'ms-error-404',
@ -8,11 +9,13 @@ import { Component, OnInit,ViewEncapsulation } from '@angular/core';
}) })
export class ErrorOneComponent implements OnInit { export class ErrorOneComponent implements OnInit {
constructor() {} constructor(private router: Router) {}
ngOnInit() { ngOnInit() {}
} takeMeToHome() {
this.router.navigate(['/home']);
}
} }

View File

@ -1,5 +1,11 @@
<div class="relative"> <div class="relative">
<div class="form-bg"> <div class="form-bg">
<div fxLayout="row" fxLayoutAlign="center" class="pt-2">
<!-- <p>SINEEDGE Login Details</p> -->
<h3 class="page-title"><img [src]="'http://ssa.sineedge.com/sparqapi/logo/sineedge_red.png'" style="height: 50px;;"> <span> SINEEDGE </span>
</h3>
</div>
<div class="relative error-wrapper"> <div class="relative error-wrapper">
<h1> <h1>
Error!</h1> Error!</h1>
@ -10,7 +16,7 @@
<p>Sorry, but the page you were trying to view does not exist</p> <p>Sorry, but the page you were trying to view does not exist</p>
</div> </div>
<div class="error-actions"> <div class="error-actions">
<button class="mat-blue" mat-raised-button>Take me to home</button> <button class="mat-blue" mat-raised-button (click)="takeMeToHome()">Take me to Home</button>
</div> </div>
</div> </div>
</div> </div>

View File

@ -0,0 +1,9 @@
.form-bg {
//background-image:url('http://www.ssa.sineedge.com/beta/assets/images/login.jpg') !important;
//background-image: url(../../../assets/images/login_o.jpg);
//background-color: #F44336;
background: url(../../../assets/images/bg.png) repeat-x 0 0 #ffffff;
height: 100vh !important;
background-position: center !important;
// min-height: calc(90vh + 90px) !important;
}

View File

@ -1,4 +1,5 @@
import { Component, OnInit,ViewEncapsulation } from '@angular/core'; import { Component, OnInit,ViewEncapsulation } from '@angular/core';
import { Router } from '@angular/router';
@Component({ @Component({
selector: 'ms-error-503', selector: 'ms-error-503',
@ -8,13 +9,15 @@ import { Component, OnInit,ViewEncapsulation } from '@angular/core';
}) })
export class ErrorTwoComponent implements OnInit { export class ErrorTwoComponent implements OnInit {
constructor() {} constructor(private router: Router) {}
ngOnInit() { ngOnInit() {
} }
takeMeToHome() {
this.router.navigate(['/home']);
}
} }

View File

@ -69,7 +69,7 @@
</mat-list-item> </mat-list-item>
<mat-list-item role="listitem" *ngIf="master.loan_amount"> <mat-list-item role="listitem" *ngIf="master.loan_amount">
<div fxFlex="70" fxFlexOffset="30" style="text-align:justify"> <div fxFlex="70" fxFlexOffset="30">
<div style="font-size:0.9rem !important;">{{master.loan_amount | numberToWords}} Only</div> <div style="font-size:0.9rem !important;">{{master.loan_amount | numberToWords}} Only</div>
<!-- <div style="font-size:0.9rem !important;">{{ 9999999999 | numberToWords}} Only</div> --> <!-- <div style="font-size:0.9rem !important;">{{ 9999999999 | numberToWords}} Only</div> -->
</div> </div>

View File

@ -56,8 +56,9 @@ export class ModelEditPdReportComponent implements OnInit {
}); });
this.showEditor = true; this.showEditor = true;
} }
},err => { }, err => {
this.notifier.notify('error', 'Something Wents Wrong Try Again.! \t\"' + (err.error_type == 2 ? err.error_status + ' ( ' + err.error_text + ' ) ' : ' ( ' + err.error_text + ' ) ') +'\" Error Occur.!');
// alert(err.html_format);
}); });
this.ckeConfig = { this.ckeConfig = {
// allowedContent: false, // allowedContent: false,
@ -91,8 +92,8 @@ export class ModelEditPdReportComponent implements OnInit {
} }
); );
}, err => { }, err => {
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!'); this.notifier.notify('error', 'Something Wents Wrong Try Again.! \t\"' + (err.error_type == 2 ? err.error_status + ' ( ' + err.error_text + ' ) ' : ' ( ' + err.error_text + ' ) ') +'\" Error Occur.!');
// alert(err.html_format);
}) });
} }
} }

View File

@ -5,12 +5,12 @@
<mat-sidenav-container class="app-inner background-none shadow-none mail-db"> <mat-sidenav-container class="app-inner background-none shadow-none mail-db">
<mat-sidenav #mailnav [mode]="isOver() ? 'over' : 'side'" [opened]="!isOver()" class="mail-sidebar pl-xs pr-xs"> <mat-sidenav #mailnav [mode]="isOver() ? 'over' : 'side'" [opened]="!isOver()" class="mail-sidebar pl-xs pr-xs">
<!-- <button _ngcontent-c21="" [disabled]="currentPDStatus !=pdStatusCheck.COMPLETED || actualQuestions!=answeredQuestions" class="compose-btn mat-warn mat-raised-button mb-1" (click)="changePDStatus(pdStatusCheck.QC_COMPLETED);"> <span>{{currentPDStatus==pdStatusCheck.COMPLETED ? 'QC OK':(currentPDStatus==pdStatusCheck.QC_COMPLETED ? 'QC COMPLETED' : currentPDStatus )}}</span></button> --> <!-- <button _ngcontent-c21="" [disabled]="currentPDStatus !=pdStatusCheck.COMPLETED || actualQuestions!=answeredQuestions" class="compose-btn mat-warn mat-raised-button mb-1" (click)="changePDStatus(pdStatusCheck.QC_COMPLETED);"> <span>{{currentPDStatus==pdStatusCheck.COMPLETED ? 'QC OK':(currentPDStatus==pdStatusCheck.QC_COMPLETED ? 'QC COMPLETED' : currentPDStatus )}}</span></button> -->
<button class="compose-btn mat-warn mat-raised-button mb-1" type="button" [disabled]="reGenerateBtn===false" (click)="reGeneratePFReport()"><b>Re-generate Report</b></button> <!-- <button class="compose-btn mat-warn mat-raised-button mb-1" type="button" [disabled]="reGenerateBtn===false" (click)="reGeneratePFReport()"><b>Re-generate Report</b></button> -->
<mat-nav-list style="background-color: white !important"> <!-- <mat-nav-list style="background-color: white !important">
<a mat-list-item *ngFor="let pd of pdReportVersionList; let itemIndex = index;" (click)="changeVersion(pd, itemIndex)"> <a mat-list-item *ngFor="let pd of pdReportVersionList; let itemIndex = index;" (click)="changeVersion(pd, itemIndex)">
<h4 mat-line [ngStyle]="{'color':pd.is_latest == 1 && itemIndex == selectedIndex ? '#e00201' : pd.is_latest == 1 && itemIndex != selectedIndex ? 'green' : pd.is_latest !=1 && itemIndex == selectedIndex ? '#e00201' : 'rgba(0, 0, 0, 0.87)' }">{{ pd.doc_name }}</h4> <h4 mat-line [ngStyle]="{'color':pd.is_latest == 1 && itemIndex == selectedIndex ? '#e00201' : pd.is_latest == 1 && itemIndex != selectedIndex ? 'green' : pd.is_latest !=1 && itemIndex == selectedIndex ? '#e00201' : 'rgba(0, 0, 0, 0.87)' }">{{ pd.doc_name }}</h4>
<!-- <h4 mat-line>{{ pd.doc_name }}</h4> --> !-- <h4 mat-line>{{ pd.doc_name }}</h4> --
<button mat-icon-button color="warn" aria-label="Example icon-button with a heart icon"> <button mat-icon-button color="warn" aria-label="Example icon-button with a heart icon">
<a target="_blank" href = {{pd.doc_uri}}> <mat-icon>get_app</mat-icon> </a> <a target="_blank" href = {{pd.doc_uri}}> <mat-icon>get_app</mat-icon> </a>
</button> </button>
@ -18,57 +18,64 @@
</a> </a>
</mat-nav-list> </mat-nav-list> -->
</mat-sidenav> </mat-sidenav>
<mat-toolbar color="primary"> <mat-toolbar color="primary">
<!-- fxHide="false" fxHide.gt-sm --> <!-- fxHide="false" fxHide.gt-sm -->
<button (click)="mailnav.toggle()" mat-icon-button> <!-- <button (click)="mailnav.toggle()" mat-icon-button>
<mat-icon style="color: white;">short_text</mat-icon> <mat-icon style="color: white;">short_text</mat-icon>
</button> </button> -->
<span class="mr-1 ml-1">View More</span> <!-- <span class="mr-1 ml-1">View More</span> -->
</mat-toolbar> <span class="mr-1 ml-1">PD Report</span>
<span class="empty-spacer"></span>
<button *ngIf="pdReportRecords.pd_status!='QC_COMPLETED'" mat-raised-button mat-icon-button class="mr-1 ml-1 hover-icon" type="button" matTooltip="Save" matTooltipPosition="above" (click)="getFrameContent(IFrameContent)" style="margin-right: 2px;"><mat-icon>save</mat-icon></button>
<button *ngIf="pdReportRecords.pd_status!='QC_COMPLETED'" mat-raised-button mat-icon-button class="mr-1 ml-1 hover-icon" type="button" matTooltip="Notes" matTooltipPosition="above" (click)="reportReview('REMARKS')" style="margin-right: 2px;"><mat-icon>notes</mat-icon></button>
<button *ngIf="pdReportRecords.pd_status!='QC_COMPLETED'" mat-raised-button mat-icon-button class="mr-1 ml-1 hover-icon" type="button" matTooltip="QC Complete" matTooltipPosition="above" (click)="reportReview('COMPLETE')" style="margin-right: 2px;"><mat-icon>done_all</mat-icon></button>
<button *ngIf="pdReportRecords.pd_status!='QC_COMPLETED'" mat-raised-button mat-icon-button class="mr-1 ml-1 hover-icon" type="button" matTooltip="Re-generate Report" matTooltipPosition="above" (click)="reGeneratePFReport()"><mat-icon>autorenew</mat-icon></button>
<button mat-raised-button mat-icon-button class="mr-1 ml-1 hover-icon" type="button" matTooltip="Download PD Report" matTooltipPosition="above" (click)="downloadPDReport()"><mat-icon>get_app</mat-icon></button>
<button mat-raised-button mat-icon-button class="mr-1 ml-1 hover-icon" type="button" matTooltip="Close" matTooltipPosition="above" (click)="loadPdViewCompoent()" style="margin-right: 2px;"><mat-icon>close</mat-icon></button>
</mat-toolbar>
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100"> <div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100">
<!--{{qcStatus}}--> <!--{{qcStatus}}-->
<figure style="min-height: 240px;"> <figure style="min-height: 240px;">
<div *ngIf="latestPDDetails">
<div style="margin: 12px;"> <div style="margin: 12px;">
<!-- background: #ddd;
padding: 8px;" -->
<div style="text-align: right" class="mb-1">
<button mat-raised-button mat-icon-button class="hover-icon " type="button" matTooltip="Edit" matTooltipPosition="above"
*ngIf="latestPDDetails.is_latest == 1 && qcStatus !== 'QC_COMPLETED'" (click)="addNewQuestion()"><mat-icon>edit</mat-icon></button>
<button mat-stroked-button *ngIf="latestPDDetails.is_latest == 0 && qcStatus !== 'QC_COMPLETED'" type="button" (click)="changeDocumentEdit()">Restore</button>
</div>
<div *ngIf="reGenerateBtn"> <div *ngIf="reGenerateBtn">
<pdf-viewer [src]="latestPDDetails.doc_uri" [original-size]="false" [page]="1"> <!-- <pdf-viewer [src]="latestPDDetails.doc_uri" [original-size]="false" [page]="1">
</pdf-viewer> </pdf-viewer> -->
<iframe width="100%" frameBorder="0" [src]="urlSafe" #IFrameContent id="iframeId" style="height: -webkit-fill-available;" seamless></iframe>
<!-- latestPDDetails.doc_uri --> <!-- latestPDDetails.doc_uri -->
</div> </div>
</div> </div>
</div>
</figure> </figure>
</div> </div>
<div class="footer"> <div class="footer">
<!-- <button mat-raised-button color="blue" type="button" (click)="getFrameContent(IFrameContent)" style="margin-right: 2px;">Save</button>
<button mat-raised-button color="blue" type="button" (click)="reportReview('REMARKS')" style="margin-right: 2px;">Notes</button> <button mat-raised-button color="blue" type="button" (click)="reportReview('REMARKS')" style="margin-right: 2px;">Notes</button>
<button mat-raised-button color="primary" type="button" (click)="reportReview('COMPLETE')" style="margin-right: 2px;">QC Complete</button> <button mat-raised-button color="primary" type="button" (click)="reportReview('COMPLETE')" style="margin-right: 2px;">QC Complete</button>
<button mat-raised-button color="primary" type="button" (click)="loadPdViewCompoent()" style="margin-right: 2px;">Close</button> <button mat-raised-button color="primary" type="button" (click)="loadPdViewCompoent()" style="margin-right: 2px;">Close</button> -->
</div> </div>
</mat-sidenav-container> </mat-sidenav-container>
</div> </div>
<div *ngIf="generateBtn"> <div *ngIf="generateBtn">
<div fxLayout="row wrap"> <div fxLayout="row wrap">
<div class="container" fxLayout fxLayout.xs="column" fxLayoutAlign="center" fxLayoutGap="10px" fxLayoutGap.xs="0" style="padding: 10%;"> <div class="container" fxLayout fxLayout.xs="column" fxLayoutAlign="center" fxLayoutGap="10px" fxLayoutGap.xs="0" style="padding: 10%;">
<div fxFlex="100"> <div fxFlex="100">
<h5 style="text-align:center;color: black;"> {{message}}</h5> <h5 style="text-align:center;color: black;">PD report Not Generated</h5>
<div style="text-align:center;"> <div style="text-align:center;">
<button mat-raised-button color="primary" type="button" *ngIf="generateBtn" (click)="generateNewPDReport()" style="margin-right: 2px;">Generate Report</button> <button mat-raised-button color="primary" type="button" *ngIf="generateBtn" (click)="generateNewPDReport()" style="margin-right: 2px;">Generate Report</button>
<button mat-raised-button color="primary" type="button" (click)="loadPdViewCompoent()" style="margin-right: 2px;">Close</button> <button mat-raised-button color="primary" type="button" (click)="loadPdViewCompoent()" style="margin-right: 2px;">Close</button>
@ -83,27 +90,28 @@
</ng-container> </ng-container>
<!-- this is for qc completed pd report --> <!-- this is for qc completed pd report -->
<ng-container *ngIf="pdReportRecords && pdReportRecords.pd_status=='QC_COMPLETED'"> <ng-container *ngIf="pdReportRecords && pdReportRecords.pd_status=='QC_COMPLETED'">
{{pdReportRecords.pd_status}}
<div *ngIf="reGenerateBtn" fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100"> <div *ngIf="reGenerateBtn" fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100">
<!--{{qcStatus}}--> {{qcStatus}}
<figure style="min-height: 240px;"> <figure style="min-height: 240px;">
<ng-container *ngIf="latestPDDetails"> <!-- <ng-container *ngIf="latestPDDetails"> -->
<div style="margin: 12px;"> <div style="margin: 12px;">
<div *ngIf="reGenerateBtn"> <div *ngIf="s">
<pdf-viewer [src]="latestPDDetails.doc_uri" [original-size]="false" [page]="1"> <!-- <pdf-viewer [src]="latestPDDetails.doc_uri" [original-size]="false" [page]="1">
</pdf-viewer> </pdf-viewer> -->
<iframe width="100%" height="300" frameBorder="0" [src]="urlSafe" id="iframeId" seamless></iframe>
<!-- latestPDDetails.doc_uri --> <!-- latestPDDetails.doc_uri -->
</div> </div>
</div> </div>
</ng-container> <!-- </ng-container> -->
</figure> </figure>
</div> </div>
<div class="footer"> <div class="footer">
<button mat-raised-button color="primary" type="button" (click)="loadPdViewCompoent()" style="margin-right: 2px;">Close</button> <!-- <button mat-raised-button color="primary" type="button" (click)="loadPdViewCompoent()" style="margin-right: 2px;">Close</button> -->
</div> </div>
</ng-container> </ng-container>

View File

@ -125,4 +125,7 @@ $product-bg-color-hover: rgba(103, 58, 183, 0.7);
position: fixed; position: fixed;
bottom: 2%; bottom: 2%;
right: 2%; right: 2%;
}
.empty-spacer {
flex: 1 1 auto;
} }

View File

@ -16,6 +16,7 @@ import {
import { ModelEditPdReportComponent } from './model-edit-pd-report/model-edit-pd-report.component'; import { ModelEditPdReportComponent } from './model-edit-pd-report/model-edit-pd-report.component';
import { QcReviewComponent } from './qc-review/qc-review.component'; import { QcReviewComponent } from './qc-review/qc-review.component';
import { HttpResponse } from "@angular/common/http"; import { HttpResponse } from "@angular/common/http";
import { environment } from 'environments/environment';
@Component({ @Component({
selector: 'app-qc-pd-report', selector: 'app-qc-pd-report',
@ -30,6 +31,7 @@ export class QcPdReportComponent implements OnInit {
// public 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=20181210T053116Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Signature=6e25703a1e339dd5f081fa8aca5b8b2d81ba161d8cfd708759de899abf72146b'; // public 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=20181210T053116Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Signature=6e25703a1e339dd5f081fa8aca5b8b2d81ba161d8cfd708759de899abf72146b';
public src; public src;
public document; public document;
public generateBtn: Boolean = false; public generateBtn: Boolean = false;
public reGenerateBtn: Boolean = false; public reGenerateBtn: Boolean = false;
public pdReportVersionList = []; public pdReportVersionList = [];
@ -38,12 +40,17 @@ export class QcPdReportComponent implements OnInit {
latestPDDetails: any; latestPDDetails: any;
message: any; message: any;
selectedIndex: Number; selectedIndex: Number;
urlSafe: SafeResourceUrl;
apiUrl:string = environment.apiEndpoint;
randomString : string;
arra:any;
private notifier: NotifierService; private notifier: NotifierService;
constructor(notifier: NotifierService, private fb: FormBuilder, private route: ActivatedRoute, constructor(notifier: NotifierService, private fb: FormBuilder, private route: ActivatedRoute,
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']);
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");
@ -57,7 +64,8 @@ export class QcPdReportComponent implements OnInit {
ngOnInit() { ngOnInit() {
this.listPDComponent.showListView(false); this.listPDComponent.showListView(false);
this.getPdReportDetails(); this.getPdReportDetails();
this.getPdReportVersionList(); // this.getPdReportVersionList();
this.generateBtn = true;
// start // start
// end // end
@ -72,8 +80,35 @@ 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);
} }
getFrameContent(content: any)
{
let getItem = localStorage.getItem('userEdits');
if(getItem !== null){
console.log('Dat is value');
this.pdTrigerService.setHTMLContent(this.startPD,getItem).subscribe(data => {
if (data.status == 200) {
localStorage.removeItem('userEdits');
this.notifier.notify('success', 'Your Changes Updated.!');
}
else {
this.notifier.notify('warning', 'Something Wents Wrong Try Again.! \t\"' + data.status +'\" Error Occur.!');
}
}, err => {
this.notifier.notify('error', 'Something Wents Wrong Try Again.! \t\"' + (err.error_type == 2 ? err.error_status + ' ( ' + err.error_text + ' ) ' : ' ( ' + err.error_text + ' ) ') +'\" Error Occur.!');
// alert(err.html_format);
});
}
else{
this.notifier.notify('warning', 'You didn`t Change Anything in Document. Please Change Something and Save Again.!');
}
}
isMac(): boolean { isMac(): boolean {
let bool = false; let bool = false;
@ -93,33 +128,55 @@ export class QcPdReportComponent implements OnInit {
reGeneratePFReport() { reGeneratePFReport() {
let data = { let data = {
"pd_id": this.startPD, "pd_id": this.startPD,
"regenerate": "1" // "regenerate": "1"
}; };
this.pdTrigerService.getPDReportFinalDocument(data).subscribe(data => { this.pdTrigerService.getPDReportFinalDocument(data).subscribe(data => {
if (data.dataStatus) { if (data.dataStatus) {
this.notifier.notify('success', 'Your Changes Updated.!'); this.notifier.notify('success', 'Your Changes Updated.!');
this.getPdReportVersionList(); // this.getPdReportVersionList();
} else { } else {
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!'); this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
} }
}, err => { }, err => {
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!'); this.notifier.notify('error', 'Something Wents Wrong Try Again.! \t\"' + (err.error_type == 2 ? err.error_status + ' ( ' + err.error_text + ' ) ' : ' ( ' + err.error_text + ' ) ') +'\" Error Occur.!');
}) // alert(err.html_format);
});
} }
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) {
console.log(data.records);
this.notifier.notify('success', 'Your Changes Updated.!'); this.notifier.notify('success', 'Your Changes Updated.!');
this.getPdReportVersionList(); this.getPdReportVersionList();
} else { } else {
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!'); this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
} }
}, err => { }, err => {
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!'); this.notifier.notify('error', 'Something Wents Wrong Try Again.! \t\"' + (err.error_type == 2 ? err.error_status + ' ( ' + err.error_text + ' ) ' : ' ( ' + err.error_text + ' ) ') +'\" Error Occur.!');
}) // alert(err.html_format);
});
}
downloadPDReport(){
let data = {
"pd_id": this.startPD,
};
this.pdTrigerService.generatePDReportPDF(data).subscribe(data => {
if (data.dataStatus) {
window.open(data.records);
this.notifier.notify('success', 'Your Changes Updated.!');
} else {
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
}
}, err => {
this.notifier.notify('error', 'Something Wents Wrong Try Again.! \t\"' + (err.error_type == 2 ? err.error_status + ' ( ' + err.error_text + ' ) ' : ' ( ' + err.error_text + ' ) ') +'\" Error Occur.!');
// alert(err.html_format);
});
} }
public qcStatus: string = ''; public qcStatus: string = '';
@ -141,27 +198,40 @@ export class QcPdReportComponent implements OnInit {
this.message = data.msg; this.message = data.msg;
} }
}, err => { }, err => {
this.notifier.notify('error', 'Something Wents Wrong Try Again.! \t\"' + (err.error_type == 2 ? err.error_status + ' ( ' + err.error_text + ' ) ' : ' ( ' + err.error_text + ' ) ') +'\" Error Occur.!');
}) // alert(err.html_format);
});
} }
getPdReportDetails() { getPdReportDetails() {
this.pdTrigerService.getPdFinalReportDetails(this.startPD).subscribe(data => { this.pdTrigerService.getPdFinalReportDetails(this.startPD).subscribe(data => {
if (data.status == 200) { if (data.status == 200) {
// this.pdReportRecords = data.records.question_answers; console.log('getPdReportDetails',data);
this.pdReportRecords = data.records; this.pdReportRecords = data.records;
// this.pdReportRecords = data.records.qu; this.qcStatus = data.records.pdstatus;
console.log(this.qcStatus);
this.generateBtn = data.records.is_original_report_created == 0 ? true : false;
console.log(this.generateBtn);
this.reGenerateBtn = data.records.is_original_report_created == 1 ? true : false;
console.log(this.reGenerateBtn);
}
else{
this.generateBtn = true;
console.log('else',this.generateBtn);
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
} }
}, err => { }, err => {
this.notifier.notify('error', 'Something Wents Wrong Try Again.! \t\"' + (err.error_type == 2 ? err.error_status + ' ( ' + err.error_text + ' ) ' : ' ( ' + err.error_text + ' ) ') +'\" Error Occur.!');
}) // alert(err.html_format);
});
} }
// 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 });
} }
// add questions popup model call // add questions popup model call
@ -185,13 +255,11 @@ export class QcPdReportComponent implements OnInit {
// this.isPopupOpened = false; // this.isPopupOpened = false;
}); });
} }
changeVersion(pd: any,selIndex: Number): void { // changeVersion(pd: any,selIndex: Number): void {
this.latestPDDetails = pd; // this.latestPDDetails = pd;
this.selectedIndex = selIndex; // this.selectedIndex = selIndex;
} // }
reportReview(status): void { reportReview(status): void {
const dialogRef = this.dialog.open(QcReviewComponent, { const dialogRef = this.dialog.open(QcReviewComponent, {
@ -231,8 +299,9 @@ export class QcPdReportComponent implements OnInit {
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!'); this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
} }
}, err => { }, err => {
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!'); this.notifier.notify('error', 'Something Wents Wrong Try Again.! \t\"' + (err.error_type == 2 ? err.error_status + ' ( ' + err.error_text + ' ) ' : ' ( ' + err.error_text + ' ) ') +'\" Error Occur.!');
}) // alert(err.html_format);
});
} else { } else {
} }
}); });
@ -289,8 +358,9 @@ export class QcPdReportComponent implements OnInit {
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!'); this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
} }
}, err => { }, err => {
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!'); this.notifier.notify('error', 'Something Wents Wrong Try Again.! \t\"' + (err.error_type == 2 ? err.error_status + ' ( ' + err.error_text + ' ) ' : ' ( ' + err.error_text + ' ) ') +'\" Error Occur.!');
}) // alert(err.html_format);
});
} }
} }

View File

@ -54,8 +54,9 @@ export class QcReviewComponent implements OnInit {
}) })
this.showForm = true; this.showForm = true;
} }
},err => { }, err => {
this.notifier.notify('error', 'Something Wents Wrong Try Again.! \t\"' + (err.error_type == 2 ? err.error_status + ' ( ' + err.error_text + ' ) ' : ' ( ' + err.error_text + ' ) ') +'\" Error Occur.!');
// alert(err.html_format);
}); });
} else if(this.showStatus === 'COMPLETE') { } else if(this.showStatus === 'COMPLETE') {
type = 'QC'; type = 'QC';
@ -69,8 +70,9 @@ export class QcReviewComponent implements OnInit {
}) })
this.showForm = true; this.showForm = true;
} }
},err => { }, err => {
this.notifier.notify('error', 'Something Wents Wrong Try Again.! \t\"' + (err.error_type == 2 ? err.error_status + ' ( ' + err.error_text + ' ) ' : ' ( ' + err.error_text + ' ) ') +'\" Error Occur.!');
// alert(err.html_format);
}); });
} else { } else {
} }
@ -90,9 +92,9 @@ export class QcReviewComponent implements OnInit {
status:true status:true
}); });
}, err => { }, err => {
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!'); this.notifier.notify('error', 'Something Wents Wrong Try Again.! \t\"' + (err.error_type == 2 ? err.error_status + ' ( ' + err.error_text + ' ) ' : ' ( ' + err.error_text + ' ) ') +'\" Error Occur.!');
// alert(err.html_format);
}) });
} }

View File

@ -129,6 +129,9 @@ export class QcStartComponent implements OnInit, OnDestroy {
} }
// this.getAnswers(serachQuestions); // this.getAnswers(serachQuestions);
}, err => {
this.notifier.notify('error', 'Something Wents Wrong Try Again.! \t\"' + (err.error_type == 2 ? err.error_status + ' ( ' + err.error_text + ' ) ' : ' ( ' + err.error_text + ' ) ') +'\" Error Occur.!');
// alert(err.html_format);
}); });
} }

View File

@ -71,12 +71,12 @@
</div> </div>
</div> </div>
</mat-list-item> </mat-list-item>
<mat-list-item role="listitem" *ngIf="master.loan_amount"> <!-- <mat-list-item role="listitem" *ngIf="master.loan_amount">
<div fxFlex="70" fxFlexOffset="30" style="text-align:justify"> <div fxFlex="70" fxFlexOffset="30" >
<div style="font-size:0.9rem !important;">{{master.loan_amount | numberToWords}} Only</div> <div style="font-size:0.9rem !important;">{{master.loan_amount | numberToWords}} Only</div>
<!-- <div style="font-size:0.9rem !important;">{{ 9999999999 | numberToWords}} Only</div> --> !-- <div style="font-size:0.9rem !important;">{{ 9999999999 | numberToWords}} Only</div> --
</div> </div>
</mat-list-item> </mat-list-item> -->
</mat-list> </mat-list>
<div> <div>
<mat-card-title style="color:#e00201;">Lender Contact Details</mat-card-title> <mat-card-title style="color:#e00201;">Lender Contact Details</mat-card-title>

View File

@ -37,6 +37,7 @@ export class QcViewComponent implements OnInit, OnDestroy {
currentPDStatus:string; currentPDStatus:string;
pdAdditionalReqData: any=[]; pdAdditionalReqData: any=[];
enableStartPD: boolean; enableStartPD: boolean;
reportRandomString: 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={
@ -72,6 +73,7 @@ export class QcViewComponent implements OnInit, OnDestroy {
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.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);
@ -246,7 +248,7 @@ export class QcViewComponent implements OnInit, OnDestroy {
// pd report // pd report
getPDIDReport(pdID:any) { getPDIDReport(pdID:any) {
this.destroyType=3; this.destroyType=3;
this.router.navigate([ '../../pd_report',pdID], { 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){

View File

@ -311,6 +311,7 @@ export class QcService {
} }
getPDReportFinalDocument(pdId: any): Observable<any> { getPDReportFinalDocument(pdId: any): Observable<any> {
console.log('datas');
pdId.fk_createdby = this._aws.getlocale(); pdId.fk_createdby = this._aws.getlocale();
return this._http.post<any>(this.apiUrl + "generatePDReport", { "records": pdId }) return this._http.post<any>(this.apiUrl + "generatePDReport", { "records": pdId })
.pipe( .pipe(
@ -592,4 +593,19 @@ export class QcService {
let response2 = this._http.get<any[]>(this.apiUrl + "listLessPDDetails/get", secondStatus); let response2 = this._http.get<any[]>(this.apiUrl + "listLessPDDetails/get", secondStatus);
return forkJoin([response1, response2]); return forkJoin([response1, response2]);
} }
generatePDReportPDF(pdId: any): Observable<any> {
pdId.fk_createdby = this._aws.getlocale();
return this._http.post<any>(this.apiUrl + "generatePDReportPDF", { "records": pdId });
}
getHTMLContent(id:any): Observable<any> {
return this._http.post<any>(this.apiUrl+"getHTMLContent", {"pd_id":id});
}
setHTMLContent(id:any,content:any): Observable<any> {
let records = { 'records': { "pdid":id,"content":content,"fk_createdby":this._aws.getlocale()}};
return this._http.post<any>(this.apiUrl+"saveHTMLReport", records);
}
} }

View File

@ -28,7 +28,7 @@ const routes: Routes =[
component: QcStartComponent, component: QcStartComponent,
}, },
{ {
path: 'pd_report/:pdid', path: 'pd_report/:pdid/:string',
component: QcPdReportComponent, component: QcPdReportComponent,
}, },
] ]