diff --git a/ng6-seed/src/app/_guard/token.interceptor.ts b/ng6-seed/src/app/_guard/token.interceptor.ts
index 2691fe140..aa0e7ae44 100755
--- a/ng6-seed/src/app/_guard/token.interceptor.ts
+++ b/ng6-seed/src/app/_guard/token.interceptor.ts
@@ -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 : '',
diff --git a/ng6-seed/src/app/error/404/error-404-component.html b/ng6-seed/src/app/error/404/error-404-component.html
index a4166c1a8..393d8b84a 100755
--- a/ng6-seed/src/app/error/404/error-404-component.html
+++ b/ng6-seed/src/app/error/404/error-404-component.html
@@ -1,5 +1,10 @@
diff --git a/ng6-seed/src/app/error/404/error-404-component.scss b/ng6-seed/src/app/error/404/error-404-component.scss
index e69de29bb..b497071a9 100755
--- a/ng6-seed/src/app/error/404/error-404-component.scss
+++ b/ng6-seed/src/app/error/404/error-404-component.scss
@@ -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;
+}
\ No newline at end of file
diff --git a/ng6-seed/src/app/error/404/error-404.component.ts b/ng6-seed/src/app/error/404/error-404.component.ts
index 3aac1d447..2aa58af8f 100755
--- a/ng6-seed/src/app/error/404/error-404.component.ts
+++ b/ng6-seed/src/app/error/404/error-404.component.ts
@@ -1,4 +1,5 @@
import { Component, OnInit,ViewEncapsulation } from '@angular/core';
+import { Router } from '@angular/router';
@Component({
selector: 'ms-error-404',
@@ -8,11 +9,13 @@ import { Component, OnInit,ViewEncapsulation } from '@angular/core';
})
export class ErrorOneComponent implements OnInit {
- constructor() {}
+ constructor(private router: Router) {}
- ngOnInit() {
-
- }
+ ngOnInit() {}
+
+ takeMeToHome() {
+ this.router.navigate(['/home']);
+ }
}
diff --git a/ng6-seed/src/app/error/503/error-503-component.html b/ng6-seed/src/app/error/503/error-503-component.html
index aaa5953d6..e24b6d7a5 100755
--- a/ng6-seed/src/app/error/503/error-503-component.html
+++ b/ng6-seed/src/app/error/503/error-503-component.html
@@ -1,5 +1,11 @@
-
diff --git a/ng6-seed/src/app/error/503/error-503-component.scss b/ng6-seed/src/app/error/503/error-503-component.scss
index e69de29bb..ebc348e1a 100755
--- a/ng6-seed/src/app/error/503/error-503-component.scss
+++ b/ng6-seed/src/app/error/503/error-503-component.scss
@@ -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;
+ }
\ No newline at end of file
diff --git a/ng6-seed/src/app/error/503/error-503.component.ts b/ng6-seed/src/app/error/503/error-503.component.ts
index d21ae0725..b40446635 100755
--- a/ng6-seed/src/app/error/503/error-503.component.ts
+++ b/ng6-seed/src/app/error/503/error-503.component.ts
@@ -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']);
+ }
}
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.html
index a65207aa9..250dec2c2 100755
--- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.html
+++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.html
@@ -69,7 +69,7 @@
-
+
{{master.loan_amount | numberToWords}} Only
diff --git a/ng6-seed/src/app/quality-check/qc-list/qc-pd-report/model-edit-pd-report/model-edit-pd-report.component.ts b/ng6-seed/src/app/quality-check/qc-list/qc-pd-report/model-edit-pd-report/model-edit-pd-report.component.ts
index c1fc032ca..bcba582cc 100755
--- a/ng6-seed/src/app/quality-check/qc-list/qc-pd-report/model-edit-pd-report/model-edit-pd-report.component.ts
+++ b/ng6-seed/src/app/quality-check/qc-list/qc-pd-report/model-edit-pd-report/model-edit-pd-report.component.ts
@@ -56,8 +56,9 @@ export class ModelEditPdReportComponent implements OnInit {
});
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 = {
// 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);
+ });
}
}
diff --git a/ng6-seed/src/app/quality-check/qc-list/qc-pd-report/qc-pd-report.component.html b/ng6-seed/src/app/quality-check/qc-list/qc-pd-report/qc-pd-report.component.html
index 77805c45e..87c613c06 100644
--- a/ng6-seed/src/app/quality-check/qc-list/qc-pd-report/qc-pd-report.component.html
+++ b/ng6-seed/src/app/quality-check/qc-list/qc-pd-report/qc-pd-report.component.html
@@ -5,12 +5,12 @@
-
+
-
-
+
-
-
- edit
- Restore
-
+
+
-
+
-
+
-
{{message}}
+
PD report Not Generated
Generate Report
Close
@@ -83,27 +90,28 @@
-
+ {{pdReportRecords.pd_status}}
-
+ {{qcStatus}}
-
+
diff --git a/ng6-seed/src/app/quality-check/qc-list/qc-pd-report/qc-pd-report.component.scss b/ng6-seed/src/app/quality-check/qc-list/qc-pd-report/qc-pd-report.component.scss
index cb94a35c0..293864e96 100644
--- a/ng6-seed/src/app/quality-check/qc-list/qc-pd-report/qc-pd-report.component.scss
+++ b/ng6-seed/src/app/quality-check/qc-list/qc-pd-report/qc-pd-report.component.scss
@@ -125,4 +125,7 @@ $product-bg-color-hover: rgba(103, 58, 183, 0.7);
position: fixed;
bottom: 2%;
right: 2%;
+}
+.empty-spacer {
+ flex: 1 1 auto;
}
\ No newline at end of file
diff --git a/ng6-seed/src/app/quality-check/qc-list/qc-pd-report/qc-pd-report.component.ts b/ng6-seed/src/app/quality-check/qc-list/qc-pd-report/qc-pd-report.component.ts
index 8775e7f43..f417ded17 100644
--- a/ng6-seed/src/app/quality-check/qc-list/qc-pd-report/qc-pd-report.component.ts
+++ b/ng6-seed/src/app/quality-check/qc-list/qc-pd-report/qc-pd-report.component.ts
@@ -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('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 = '';
@@ -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
@@ -185,13 +255,11 @@ export class QcPdReportComponent implements OnInit {
// this.isPopupOpened = false;
});
}
-
- 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);
+ });
}
}
diff --git a/ng6-seed/src/app/quality-check/qc-list/qc-pd-report/qc-review/qc-review.component.ts b/ng6-seed/src/app/quality-check/qc-list/qc-pd-report/qc-review/qc-review.component.ts
index 77f1818f4..73e88e2d3 100755
--- a/ng6-seed/src/app/quality-check/qc-list/qc-pd-report/qc-review/qc-review.component.ts
+++ b/ng6-seed/src/app/quality-check/qc-list/qc-pd-report/qc-review/qc-review.component.ts
@@ -54,8 +54,9 @@ export class QcReviewComponent implements OnInit {
})
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') {
type = 'QC';
@@ -69,8 +70,9 @@ export class QcReviewComponent implements OnInit {
})
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 {
}
@@ -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);
+ });
}
diff --git a/ng6-seed/src/app/quality-check/qc-list/qc-start/qc-start.component.ts b/ng6-seed/src/app/quality-check/qc-list/qc-start/qc-start.component.ts
index 3c6f80f71..b4817df36 100755
--- a/ng6-seed/src/app/quality-check/qc-list/qc-start/qc-start.component.ts
+++ b/ng6-seed/src/app/quality-check/qc-list/qc-start/qc-start.component.ts
@@ -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);
});
}
diff --git a/ng6-seed/src/app/quality-check/qc-list/qc-view/qc-view.component.html b/ng6-seed/src/app/quality-check/qc-list/qc-view/qc-view.component.html
index 9c67bd3ca..69268336c 100755
--- a/ng6-seed/src/app/quality-check/qc-list/qc-view/qc-view.component.html
+++ b/ng6-seed/src/app/quality-check/qc-list/qc-view/qc-view.component.html
@@ -71,12 +71,12 @@
-
-
+
+ !--
{{ 9999999999 | numberToWords}} Only
--
-
+ -->
Lender Contact Details
diff --git a/ng6-seed/src/app/quality-check/qc-list/qc-view/qc-view.component.ts b/ng6-seed/src/app/quality-check/qc-list/qc-view/qc-view.component.ts
index 9a77dcbbc..12695e016 100755
--- a/ng6-seed/src/app/quality-check/qc-list/qc-view/qc-view.component.ts
+++ b/ng6-seed/src/app/quality-check/qc-list/qc-view/qc-view.component.ts
@@ -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){
diff --git a/ng6-seed/src/app/quality-check/qc-service/qc.service.ts b/ng6-seed/src/app/quality-check/qc-service/qc.service.ts
index 3805f3c3f..c8f77387a 100755
--- a/ng6-seed/src/app/quality-check/qc-service/qc.service.ts
+++ b/ng6-seed/src/app/quality-check/qc-service/qc.service.ts
@@ -311,6 +311,7 @@ export class QcService {
}
getPDReportFinalDocument(pdId: any): Observable
{
+ console.log('datas');
pdId.fk_createdby = this._aws.getlocale();
return this._http.post(this.apiUrl + "generatePDReport", { "records": pdId })
.pipe(
@@ -592,4 +593,19 @@ export class QcService {
let response2 = this._http.get(this.apiUrl + "listLessPDDetails/get", secondStatus);
return forkJoin([response1, response2]);
}
+
+ generatePDReportPDF(pdId: any): Observable {
+ pdId.fk_createdby = this._aws.getlocale();
+ return this._http.post(this.apiUrl + "generatePDReportPDF", { "records": pdId });
+ }
+
+
+ getHTMLContent(id:any): Observable {
+ return this._http.post(this.apiUrl+"getHTMLContent", {"pd_id":id});
+ }
+
+ setHTMLContent(id:any,content:any): Observable {
+ let records = { 'records': { "pdid":id,"content":content,"fk_createdby":this._aws.getlocale()}};
+ return this._http.post(this.apiUrl+"saveHTMLReport", records);
+ }
}
diff --git a/ng6-seed/src/app/quality-check/quality-check-routing.module.ts b/ng6-seed/src/app/quality-check/quality-check-routing.module.ts
index 2503be06b..40979d5d7 100755
--- a/ng6-seed/src/app/quality-check/quality-check-routing.module.ts
+++ b/ng6-seed/src/app/quality-check/quality-check-routing.module.ts
@@ -28,7 +28,7 @@ const routes: Routes =[
component: QcStartComponent,
},
{
- path: 'pd_report/:pdid',
+ path: 'pd_report/:pdid/:string',
component: QcPdReportComponent,
},
]