merge : kms
This commit is contained in:
parent
56166f6076
commit
6ddda9ec50
@ -82,19 +82,23 @@ export class ModelEditPdReportComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
myClick(): void {
|
myClick(): void {
|
||||||
// let template = this.ngForm.controls['mycontent'].value;
|
let template = this.ngForm.controls['content'].value;
|
||||||
// let data = {
|
// alert(template);
|
||||||
// template: template,
|
let data = {
|
||||||
// template_id: this.questionId
|
content: template,
|
||||||
// }
|
pd_id: this.data.startId
|
||||||
|
}
|
||||||
|
|
||||||
|
// alert(JSON.stringify(data));
|
||||||
// var formValues = this.ngForm.value;
|
// var formValues = this.ngForm.value;
|
||||||
// Object.keys(formValues).forEach((key) => (formValues[key] == null) && delete formValues[key]);
|
// Object.keys(formValues).forEach((key) => (formValues[key] == null) && delete formValues[key]);
|
||||||
|
|
||||||
// this.templatesService.addPDReportModelTemplate(formValues).subscribe(data=>{
|
this.pdTrigerService.updatePDReportDetails(data).subscribe(data=>{
|
||||||
// this.notifier.notify('success', 'Your Changes Updated.!');
|
this.notifier.notify('success', 'Your Changes Updated.!');
|
||||||
// }, err => {
|
this.dialogRef.close();
|
||||||
// this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
|
}, err => {
|
||||||
|
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
|
||||||
|
|
||||||
// })
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -44,12 +44,18 @@
|
|||||||
</mat-tab>
|
</mat-tab>
|
||||||
<mat-tab label="PD Report With Template">
|
<mat-tab label="PD Report With Template">
|
||||||
<div>
|
<div>
|
||||||
<button (click)="addNewQuestion()">Edit</button>
|
<div style="text-align: right;" class="mb-1">
|
||||||
|
<button mat-raised-button mat-icon-button class="hover-icon " type="button" matTooltip="Edit" matTooltipPosition="above"
|
||||||
|
(click)="addNewQuestion()"><mat-icon>edit</mat-icon></button>
|
||||||
|
</div>
|
||||||
<hr>
|
<hr>
|
||||||
<pdf-viewer [src]="src"
|
<div style="margin: 12px;
|
||||||
[original-size]="false">
|
background: #ddd;
|
||||||
|
padding: 8px;">
|
||||||
|
<pdf-viewer [src]="src" [original-size]="false">
|
||||||
</pdf-viewer>
|
</pdf-viewer>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</mat-tab>
|
</mat-tab>
|
||||||
</mat-tab-group>
|
</mat-tab-group>
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
|
|||||||
@ -17,18 +17,27 @@ import { ModelEditPdReportComponent} from './model-edit-pd-report/model-edit-pd-
|
|||||||
export class PdReportComponent implements OnInit {
|
export class PdReportComponent implements OnInit {
|
||||||
Url : SafeUrl;
|
Url : SafeUrl;
|
||||||
startPD: any;
|
startPD: any;
|
||||||
public src = 'https://vadimdez.github.io/ng2-pdf-viewer/assets/pdf-test.pdf';
|
// public src = 'https://vadimdez.github.io/ng2-pdf-viewer/assets/pdf-test.pdf';
|
||||||
// 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%2F20181207%2Fap-south-1%2Fs3%2Faws4_request&X-Amz-Date=20181207T122031Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Signature=fac718f35d195ecb45d1dc7049fbaf0fa3158f237deeedac3bae60f8ec22e822';
|
// 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 src;
|
// public src;
|
||||||
pdReportRecords:any;
|
pdReportRecords: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: 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.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 = 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");
|
||||||
|
// alert(JSON.stringify(this.src));
|
||||||
|
// this.document = { name: 'Angular 2',
|
||||||
|
// description: 'An amazing Angular 2 pdf',
|
||||||
|
// url: { url: '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', withCredentials: true } };
|
||||||
// this.Url = 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%2F20181207%2Fap-south-1%2Fs3%2Faws4_request&X-Amz-Date=20181207T122031Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Signature=fac718f35d195ecb45d1dc7049fbaf0fa3158f237deeedac3bae60f8ec22e822");
|
// this.Url = 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%2F20181207%2Fap-south-1%2Fs3%2Faws4_request&X-Amz-Date=20181207T122031Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Signature=fac718f35d195ecb45d1dc7049fbaf0fa3158f237deeedac3bae60f8ec22e822");
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -55,7 +64,7 @@ export class PdReportComponent implements OnInit {
|
|||||||
this.pdTrigerService.getPDReportFinalDocument(this.startPD).subscribe(data => {
|
this.pdTrigerService.getPDReportFinalDocument(this.startPD).subscribe(data => {
|
||||||
if (data.status == 200) {
|
if (data.status == 200) {
|
||||||
// this.pdReportRecords = data.records.question_answers;
|
// this.pdReportRecords = data.records.question_answers;
|
||||||
// this.src = data.records.pd_report_uri;
|
this.src = data.records.pd_report_uri;
|
||||||
// alert(this.src);
|
// alert(this.src);
|
||||||
// this.pdReportRecords = data.records.qu;
|
// this.pdReportRecords = data.records.qu;
|
||||||
}
|
}
|
||||||
@ -78,6 +87,7 @@ export class PdReportComponent implements OnInit {
|
|||||||
});
|
});
|
||||||
dialogRef.afterClosed()
|
dialogRef.afterClosed()
|
||||||
.subscribe(dataresult => {
|
.subscribe(dataresult => {
|
||||||
|
this.getPdReportFinalTemplateDetails();
|
||||||
// this.getQuestionsMasters();
|
// this.getQuestionsMasters();
|
||||||
// this.getBranch();
|
// this.getBranch();
|
||||||
// this.isPopupOpened = false;
|
// this.isPopupOpened = false;
|
||||||
|
|||||||
@ -303,6 +303,13 @@ getPDFormDetailsWithID(pdID, formID ):Observable<any> {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
updatePDReportDetails(records: any){
|
||||||
|
return this._http.post<any>(this.apiUrl+"saveNewVersionOfPDReport ",{"records": records})
|
||||||
|
.pipe(
|
||||||
|
catchError(this.handleError('operation', []))
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// inWords(num) {
|
// inWords(num) {
|
||||||
// let a : any = ['','one ','two ','three ','four ', 'five ','six ','seven ','eight ','nine ','ten ','eleven ','twelve ','thirteen ','fourteen ','fifteen ','sixteen ','seventeen ','eighteen ','nineteen '];
|
// let a : any = ['','one ','two ','three ','four ', 'five ','six ','seven ','eight ','nine ','ten ','eleven ','twelve ','thirteen ','fourteen ','fifteen ','sixteen ','seventeen ','eighteen ','nineteen '];
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user