for download excel
This commit is contained in:
parent
2efb81840c
commit
3ec65571f1
@ -41,9 +41,11 @@
|
||||
<button *ngIf="roleAccessDetails.trigger && currentPDStatus==pdStatusCheck.DRAFT" mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Trigger" matTooltipPosition="above" (click)="directTriggerPD(mandatoryFieldsValidations,master)"><mat-icon>flash_on</mat-icon></button>
|
||||
<span *ngIf="is_agency_logged_in ==false">
|
||||
<button *ngIf="(master.lender_short_name != 'MWISE') || (master.lender_short_name == 'MWISE' && LenderRoleID != '25' && currentPDStatus==pdStatusCheck.COMPLETED ||currentVendorStatus=='QC COMPLETED'||currentVendorStatus=='COMPLETED') && roleAccessDetails.reports && master.pd_type_name" mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="PD Report" matTooltipPosition="above" (click)="smcCreditPDReport(viewID)"><mat-icon>ballot</mat-icon></button>
|
||||
</span>
|
||||
<button *ngIf="(master.lender_short_name != 'MWISE') || (master.lender_short_name == 'MWISE' && LenderRoleID != '25' && currentPDStatus==pdStatusCheck.COMPLETED ||currentVendorStatus=='QC COMPLETED'||currentVendorStatus=='COMPLETED') && roleAccessDetails.reports && master.pd_type_name" mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Download Excel" matTooltipPosition="above" (click)="downloadExcel(viewID)"><mat-icon>download</mat-icon></button>
|
||||
</span>
|
||||
<span *ngIf="is_agency_logged_in ==true">
|
||||
<button *ngIf="master.lender_short_name == 'MWISE' && (LenderRoleID == '28' || LenderRoleID == '30') && (currentVendorStatus=='COMPLETED'||currentVendorStatus=='QC COMPLETED') && roleAccessDetails.reports && master.pd_type_name" mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="PD Report" matTooltipPosition="above" (click)="smcCreditPDReport(viewID)"><mat-icon>ballot</mat-icon></button>
|
||||
<button *ngIf="master.lender_short_name == 'MWISE' && (LenderRoleID == '28' || LenderRoleID == '30') && (currentVendorStatus=='COMPLETED'||currentVendorStatus=='QC COMPLETED') && roleAccessDetails.reports && master.pd_type_name" mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Download Excel" matTooltipPosition="above" (click)="downloadExcel(viewID)"><mat-icon>download</mat-icon></button>
|
||||
</span>
|
||||
<span><button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Close" matTooltipPosition="above" (click)="loadPdListCompoent()"><mat-icon>close</mat-icon></button></span>
|
||||
</div>
|
||||
|
||||
@ -217,6 +217,22 @@ export class ViewPdComponent implements OnInit, OnDestroy {
|
||||
}
|
||||
}, error => this.errorMessage = <any>error);
|
||||
}
|
||||
downloadExcel(pdid)
|
||||
{
|
||||
|
||||
this._pd.downloadExcelFile(pdid).subscribe(
|
||||
data => {
|
||||
|
||||
if (data.status == 200) {
|
||||
window.open(data.records)
|
||||
}
|
||||
else {
|
||||
this.notifier.notify('warning', 'Something Went Wrong Try Again.!');
|
||||
this.errorMessage = "Something Went Wrong Try Again.!";
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
loadPdListCompoent() {
|
||||
this.destroyType = 2;
|
||||
|
||||
@ -1051,6 +1051,11 @@ loadTemplate(form_id) {
|
||||
let params = new HttpParams().set("pdid",pd_id)
|
||||
return this._http.get(this.apiUrl+'getSMCTempAddresses',{params})
|
||||
}
|
||||
downloadExcelFile(pdid):Observable<any> {
|
||||
|
||||
// let headers = this.createAuthorizationHeader()
|
||||
return this._http.get(this.apiUrl+'downloadSMCExcelFile/'+pdid);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user