PDreport download option
This commit is contained in:
parent
f4089a1282
commit
c47aee2a68
@ -3,7 +3,16 @@
|
||||
<button ion-button menuToggle>
|
||||
<ion-icon name="menu"></ion-icon>
|
||||
</button>
|
||||
<ion-title style="font-size: 14px !important;" *ngIf="!viewchange">{{pdFullDetails.lender_applicant_id}}</ion-title>
|
||||
<ion-row>
|
||||
<ion-col col-10>
|
||||
<ion-title style="font-size: 14px !important;" *ngIf="!viewchange">{{pdFullDetails.lender_applicant_id}}</ion-title>
|
||||
</ion-col>
|
||||
<ion-col col-2>
|
||||
<button mat-raised-button mat-icon-button class="hover-icon" type="button"><ion-icon ios="ios-download" md="md-download" (click)="downloadPDReport()"></ion-icon></button>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- <ion-buttons end>
|
||||
|
||||
@ -82,4 +82,17 @@ pdDetailLender:any = [];
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
downloadPDReport(){
|
||||
let data = {
|
||||
"pd_id": this.pdFullDetails.pd_id,
|
||||
"random_string":this.pdFullDetails.random_string,
|
||||
};
|
||||
this.pddetails.generatePDReportPDF(data).subscribe(data => {
|
||||
console.log(data);
|
||||
if (data.dataStatus) {
|
||||
window.open(data.records);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
import { HttpClient } from '@angular/common/http';
|
||||
import { Injectable } from '@angular/core';
|
||||
import {ConstantsProvider} from '../constants/constants';
|
||||
import { Observable } from 'rxjs';
|
||||
import { AwsServiceProvider } from '../aws-service/aws-service';
|
||||
|
||||
/*
|
||||
Generated class for the PdtriggerProvider provider.
|
||||
@ -13,7 +15,7 @@ import {ConstantsProvider} from '../constants/constants';
|
||||
@Injectable()
|
||||
export class PdtriggerProvider {
|
||||
apiurl:any;
|
||||
constructor(public http: HttpClient,public constants:ConstantsProvider) {
|
||||
constructor(public http: HttpClient,public constants:ConstantsProvider,private aws:AwsServiceProvider) {
|
||||
this.apiurl = constants.environment();
|
||||
this.apiurl=this.apiurl.url
|
||||
console.log('Hello PdtriggerProvider Provider');
|
||||
@ -137,5 +139,9 @@ getLenderContactPersons(datas){
|
||||
getEntityPreferences(entity_id){
|
||||
return this.http.get(this.apiurl+'getEntityPreferences/'+entity_id);
|
||||
}
|
||||
generatePDReportPDF(pdId: any): Observable<any> {
|
||||
pdId.fk_createdby = this.aws.getlocale();
|
||||
return this.http.post<any>(this.apiurl + "generatePDReportPDF", { "records": pdId });
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user