QC Report edit changes : ps
This commit is contained in:
parent
af541a358d
commit
1e2e7912e4
@ -57,6 +57,15 @@ export class TokenInterceptor implements HttpInterceptor{
|
||||
localStorage.clear();
|
||||
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{
|
||||
let errorMessage = '';
|
||||
let type : number;
|
||||
@ -69,7 +78,6 @@ export class TokenInterceptor implements HttpInterceptor{
|
||||
errorMessage = `Error Code: ${error.status}\nMessage: ${error.message}`;
|
||||
type = 2;
|
||||
}
|
||||
// window.alert(errorMessage);
|
||||
return throwError({error_status :type == 2 ? error.status : '',
|
||||
error_message:error.message,
|
||||
error_text :type == 2 ? error.statusText : '',
|
||||
|
||||
@ -1,5 +1,10 @@
|
||||
<div class="relative">
|
||||
<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">
|
||||
<h1>
|
||||
Oops!</h1>
|
||||
@ -10,7 +15,7 @@
|
||||
<p> Sorry, an error has occured, Requested page not found!</p>
|
||||
</div>
|
||||
<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>
|
||||
|
||||
@ -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;
|
||||
}
|
||||
@ -1,4 +1,5 @@
|
||||
import { Component, OnInit,ViewEncapsulation } from '@angular/core';
|
||||
import { Router } from '@angular/router';
|
||||
|
||||
@Component({
|
||||
selector: 'ms-error-404',
|
||||
@ -8,10 +9,12 @@ import { Component, OnInit,ViewEncapsulation } from '@angular/core';
|
||||
})
|
||||
export class ErrorOneComponent implements OnInit {
|
||||
|
||||
constructor() {}
|
||||
constructor(private router: Router) {}
|
||||
|
||||
ngOnInit() {
|
||||
ngOnInit() {}
|
||||
|
||||
takeMeToHome() {
|
||||
this.router.navigate(['/home']);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -1,5 +1,11 @@
|
||||
<div class="relative">
|
||||
<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">
|
||||
<h1>
|
||||
Error!</h1>
|
||||
@ -10,7 +16,7 @@
|
||||
<p>Sorry, but the page you were trying to view does not exist</p>
|
||||
</div>
|
||||
<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>
|
||||
|
||||
@ -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;
|
||||
}
|
||||
@ -1,4 +1,5 @@
|
||||
import { Component, OnInit,ViewEncapsulation } from '@angular/core';
|
||||
import { Router } from '@angular/router';
|
||||
|
||||
@Component({
|
||||
selector: 'ms-error-503',
|
||||
@ -8,13 +9,15 @@ import { Component, OnInit,ViewEncapsulation } from '@angular/core';
|
||||
})
|
||||
export class ErrorTwoComponent implements OnInit {
|
||||
|
||||
constructor() {}
|
||||
constructor(private router: Router) {}
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
}
|
||||
|
||||
|
||||
takeMeToHome() {
|
||||
this.router.navigate(['/home']);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -69,7 +69,7 @@
|
||||
</mat-list-item>
|
||||
|
||||
<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;">{{ 9999999999 | numberToWords}} Only</div> -->
|
||||
</div>
|
||||
|
||||
@ -57,7 +57,8 @@ export class ModelEditPdReportComponent implements OnInit {
|
||||
this.showEditor = true;
|
||||
}
|
||||
}, 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 = {
|
||||
// allowedContent: false,
|
||||
@ -91,8 +92,8 @@ export class ModelEditPdReportComponent implements OnInit {
|
||||
}
|
||||
);
|
||||
}, 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);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@ -5,12 +5,12 @@
|
||||
<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">
|
||||
<!-- <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)">
|
||||
<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">
|
||||
<a target="_blank" href = {{pd.doc_uri}}> <mat-icon>get_app</mat-icon> </a>
|
||||
</button>
|
||||
@ -18,48 +18,55 @@
|
||||
</a>
|
||||
|
||||
|
||||
</mat-nav-list>
|
||||
</mat-nav-list> -->
|
||||
|
||||
|
||||
</mat-sidenav>
|
||||
<mat-toolbar color="primary">
|
||||
<!-- 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>
|
||||
</button>
|
||||
<span class="mr-1 ml-1">View More</span>
|
||||
</mat-toolbar>
|
||||
</button> -->
|
||||
<!-- <span class="mr-1 ml-1">View More</span> -->
|
||||
<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">
|
||||
<!--{{qcStatus}}-->
|
||||
<figure style="min-height: 240px;">
|
||||
|
||||
<div *ngIf="latestPDDetails">
|
||||
|
||||
<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">
|
||||
<pdf-viewer [src]="latestPDDetails.doc_uri" [original-size]="false" [page]="1">
|
||||
</pdf-viewer>
|
||||
<!-- <pdf-viewer [src]="latestPDDetails.doc_uri" [original-size]="false" [page]="1">
|
||||
</pdf-viewer> -->
|
||||
<iframe width="100%" frameBorder="0" [src]="urlSafe" #IFrameContent id="iframeId" style="height: -webkit-fill-available;" seamless></iframe>
|
||||
|
||||
<!-- latestPDDetails.doc_uri -->
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</figure>
|
||||
</div>
|
||||
<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="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>
|
||||
|
||||
</mat-sidenav-container>
|
||||
@ -68,7 +75,7 @@
|
||||
<div fxLayout="row wrap">
|
||||
<div class="container" fxLayout fxLayout.xs="column" fxLayoutAlign="center" fxLayoutGap="10px" fxLayoutGap.xs="0" style="padding: 10%;">
|
||||
<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;">
|
||||
<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>
|
||||
@ -83,27 +90,28 @@
|
||||
</ng-container>
|
||||
<!-- this is for qc completed pd report -->
|
||||
<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">
|
||||
<!--{{qcStatus}}-->
|
||||
{{qcStatus}}
|
||||
<figure style="min-height: 240px;">
|
||||
|
||||
<ng-container *ngIf="latestPDDetails">
|
||||
<!-- <ng-container *ngIf="latestPDDetails"> -->
|
||||
<div style="margin: 12px;">
|
||||
|
||||
<div *ngIf="reGenerateBtn">
|
||||
<pdf-viewer [src]="latestPDDetails.doc_uri" [original-size]="false" [page]="1">
|
||||
</pdf-viewer>
|
||||
<div *ngIf="s">
|
||||
<!-- <pdf-viewer [src]="latestPDDetails.doc_uri" [original-size]="false" [page]="1">
|
||||
</pdf-viewer> -->
|
||||
<iframe width="100%" height="300" frameBorder="0" [src]="urlSafe" id="iframeId" seamless></iframe>
|
||||
<!-- latestPDDetails.doc_uri -->
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</ng-container>
|
||||
<!-- </ng-container> -->
|
||||
|
||||
</figure>
|
||||
</div>
|
||||
<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>
|
||||
|
||||
</ng-container>
|
||||
|
||||
@ -126,3 +126,6 @@ $product-bg-color-hover: rgba(103, 58, 183, 0.7);
|
||||
bottom: 2%;
|
||||
right: 2%;
|
||||
}
|
||||
.empty-spacer {
|
||||
flex: 1 1 auto;
|
||||
}
|
||||
@ -16,6 +16,7 @@ import {
|
||||
import { ModelEditPdReportComponent } from './model-edit-pd-report/model-edit-pd-report.component';
|
||||
import { QcReviewComponent } from './qc-review/qc-review.component';
|
||||
import { HttpResponse } from "@angular/common/http";
|
||||
import { environment } from 'environments/environment';
|
||||
|
||||
@Component({
|
||||
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;
|
||||
public document;
|
||||
|
||||
public generateBtn: Boolean = false;
|
||||
public reGenerateBtn: Boolean = false;
|
||||
public pdReportVersionList = [];
|
||||
@ -38,12 +40,17 @@ export class QcPdReportComponent implements OnInit {
|
||||
latestPDDetails: any;
|
||||
message: any;
|
||||
selectedIndex: Number;
|
||||
urlSafe: SafeResourceUrl;
|
||||
apiUrl:string = environment.apiEndpoint;
|
||||
randomString : string;
|
||||
arra:any;
|
||||
|
||||
private notifier: NotifierService;
|
||||
constructor(notifier: NotifierService, private fb: FormBuilder, private route: ActivatedRoute,
|
||||
private router: Router, public pdTrigerService: QcService, private listPDComponent: QcListComponent,
|
||||
private dialog: MatDialog, private sanitizer: DomSanitizer) {
|
||||
this.startPD = this.route.snapshot.params['pdid'];
|
||||
this.randomString = this.apiUrl+'getPDReportHTML/'+atob(this.route.snapshot.params['string']);
|
||||
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 = 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() {
|
||||
this.listPDComponent.showListView(false);
|
||||
this.getPdReportDetails();
|
||||
this.getPdReportVersionList();
|
||||
// this.getPdReportVersionList();
|
||||
this.generateBtn = true;
|
||||
// start
|
||||
|
||||
// end
|
||||
@ -72,8 +80,35 @@ export class QcPdReportComponent implements OnInit {
|
||||
// this.loadTemplates(this.startPD);
|
||||
// this.next = 1;
|
||||
// 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 {
|
||||
let bool = false;
|
||||
@ -93,33 +128,55 @@ export class QcPdReportComponent implements OnInit {
|
||||
reGeneratePFReport() {
|
||||
let data = {
|
||||
"pd_id": this.startPD,
|
||||
"regenerate": "1"
|
||||
// "regenerate": "1"
|
||||
};
|
||||
this.pdTrigerService.getPDReportFinalDocument(data).subscribe(data => {
|
||||
if (data.dataStatus) {
|
||||
this.notifier.notify('success', 'Your Changes Updated.!');
|
||||
this.getPdReportVersionList();
|
||||
// this.getPdReportVersionList();
|
||||
} else {
|
||||
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
|
||||
}
|
||||
}, 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() {
|
||||
let data = {
|
||||
"pd_id": this.startPD
|
||||
};
|
||||
this.pdTrigerService.getPDReportFinalDocument(data).subscribe(data => {
|
||||
if (data.dataStatus) {
|
||||
console.log(data.records);
|
||||
this.notifier.notify('success', 'Your Changes Updated.!');
|
||||
this.getPdReportVersionList();
|
||||
} 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);
|
||||
});
|
||||
}
|
||||
|
||||
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 = '';
|
||||
@ -141,27 +198,40 @@ export class QcPdReportComponent implements OnInit {
|
||||
this.message = data.msg;
|
||||
}
|
||||
}, 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() {
|
||||
this.pdTrigerService.getPdFinalReportDetails(this.startPD).subscribe(data => {
|
||||
if (data.status == 200) {
|
||||
// this.pdReportRecords = data.records.question_answers;
|
||||
console.log('getPdReportDetails',data);
|
||||
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 => {
|
||||
|
||||
})
|
||||
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
|
||||
loadPdViewCompoent() {
|
||||
this.router.navigate(['../../viewpd', this.startPD], { relativeTo: this.route });
|
||||
this.router.navigate(['../../../viewpd',this.startPD], { relativeTo: this.route });
|
||||
}
|
||||
|
||||
// add questions popup model call
|
||||
@ -186,12 +256,10 @@ export class QcPdReportComponent implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
changeVersion(pd: any,selIndex: Number): void {
|
||||
this.latestPDDetails = pd;
|
||||
this.selectedIndex = selIndex;
|
||||
}
|
||||
|
||||
|
||||
// changeVersion(pd: any,selIndex: Number): void {
|
||||
// this.latestPDDetails = pd;
|
||||
// this.selectedIndex = selIndex;
|
||||
// }
|
||||
|
||||
reportReview(status): void {
|
||||
const dialogRef = this.dialog.open(QcReviewComponent, {
|
||||
@ -231,8 +299,9 @@ export class QcPdReportComponent implements OnInit {
|
||||
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
|
||||
}
|
||||
}, 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 {
|
||||
}
|
||||
});
|
||||
@ -289,8 +358,9 @@ export class QcPdReportComponent implements OnInit {
|
||||
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
|
||||
}
|
||||
}, 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);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -55,7 +55,8 @@ export class QcReviewComponent implements OnInit {
|
||||
this.showForm = true;
|
||||
}
|
||||
}, 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') {
|
||||
type = 'QC';
|
||||
@ -70,7 +71,8 @@ export class QcReviewComponent implements OnInit {
|
||||
this.showForm = true;
|
||||
}
|
||||
}, 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 {
|
||||
}
|
||||
@ -90,9 +92,9 @@ export class QcReviewComponent implements OnInit {
|
||||
status:true
|
||||
});
|
||||
}, 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);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -129,6 +129,9 @@ export class QcStartComponent implements OnInit, OnDestroy {
|
||||
}
|
||||
// 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);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@ -71,12 +71,12 @@
|
||||
</div>
|
||||
</div>
|
||||
</mat-list-item>
|
||||
<mat-list-item role="listitem" *ngIf="master.loan_amount">
|
||||
<div fxFlex="70" fxFlexOffset="30" style="text-align:justify">
|
||||
<!-- <mat-list-item role="listitem" *ngIf="master.loan_amount">
|
||||
<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;">{{ 9999999999 | numberToWords}} Only</div> -->
|
||||
!-- <div style="font-size:0.9rem !important;">{{ 9999999999 | numberToWords}} Only</div> --
|
||||
</div>
|
||||
</mat-list-item>
|
||||
</mat-list-item> -->
|
||||
</mat-list>
|
||||
<div>
|
||||
<mat-card-title style="color:#e00201;">Lender Contact Details</mat-card-title>
|
||||
|
||||
@ -37,6 +37,7 @@ export class QcViewComponent implements OnInit, OnDestroy {
|
||||
currentPDStatus:string;
|
||||
pdAdditionalReqData: any=[];
|
||||
enableStartPD: boolean;
|
||||
reportRandomString: string;
|
||||
public userRoleID = +localStorage.getItem('user_role');
|
||||
// create values for status check
|
||||
pdStatusCheck :any={
|
||||
@ -72,6 +73,7 @@ export class QcViewComponent implements OnInit, OnDestroy {
|
||||
if (data.status == 200) {
|
||||
let masterData: any = data.records.pd_master_details;
|
||||
this.pdMasterData.push(masterData[0]);
|
||||
this.reportRandomString = btoa(masterData[0].random_string);
|
||||
this.pd_QC_Rating = Number(this.pdMasterData.qc_rating);
|
||||
this.pdApplicantData= data.records.applicants_details;
|
||||
this.pdApplicantData = this.pdApplicantData.filter(appt => appt.applicant_type != 2);
|
||||
@ -246,7 +248,7 @@ export class QcViewComponent implements OnInit, OnDestroy {
|
||||
// pd report
|
||||
getPDIDReport(pdID:any) {
|
||||
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 {
|
||||
if(this.destroyType==1){
|
||||
|
||||
@ -311,6 +311,7 @@ export class QcService {
|
||||
}
|
||||
|
||||
getPDReportFinalDocument(pdId: any): Observable<any> {
|
||||
console.log('datas');
|
||||
pdId.fk_createdby = this._aws.getlocale();
|
||||
return this._http.post<any>(this.apiUrl + "generatePDReport", { "records": pdId })
|
||||
.pipe(
|
||||
@ -592,4 +593,19 @@ export class QcService {
|
||||
let response2 = this._http.get<any[]>(this.apiUrl + "listLessPDDetails/get", secondStatus);
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
@ -28,7 +28,7 @@ const routes: Routes =[
|
||||
component: QcStartComponent,
|
||||
},
|
||||
{
|
||||
path: 'pd_report/:pdid',
|
||||
path: 'pd_report/:pdid/:string',
|
||||
component: QcPdReportComponent,
|
||||
},
|
||||
]
|
||||
|
||||
Loading…
Reference in New Issue
Block a user