pdf and zip icon added
This commit is contained in:
parent
a7f76deeaa
commit
ac7b38ed7d
@ -47,6 +47,36 @@
|
||||
<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>
|
||||
|
||||
<button *ngIf="(userId == '342' || userId == '343' || userId == '392')" mat-raised-button mat-icon-button class="mr-1 ml-1 hover-icon" type="button" matTooltip="Download PD Pictures" matTooltipPosition="above" [matMenuTriggerFor]="menu1">
|
||||
<mat-icon>save_alt</mat-icon>
|
||||
</button>
|
||||
<mat-menu #menu1="matMenu">
|
||||
<button mat-menu-item (click)="archivePDImages(1)">
|
||||
<mat-icon>donut_large</mat-icon>
|
||||
<span>Re-Generate</span>
|
||||
</button>
|
||||
|
||||
<button mat-menu-item (click)="archivePDImages(0)">
|
||||
<mat-icon>cloud_download</mat-icon>
|
||||
<span>Download</span>
|
||||
</button>
|
||||
</mat-menu>
|
||||
|
||||
<button *ngIf="(userId == '342' || userId == '343' || userId == '392')" mat-raised-button mat-icon-button class="mr-1 ml-1 hover-icon" type="button" matTooltip="Download PD Pictures (PDF)" matTooltipPosition="above" [matMenuTriggerFor]="menu2">
|
||||
<mat-icon>picture_as_pdf</mat-icon></button>
|
||||
<mat-menu #menu2="matMenu">
|
||||
<button mat-menu-item (click)="downloadPDImagesPDF(1)">
|
||||
<mat-icon>donut_large</mat-icon>
|
||||
<span>Re-Generate</span>
|
||||
</button>
|
||||
|
||||
<button mat-menu-item (click)="downloadPDImagesPDF(0)">
|
||||
<mat-icon>cloud_download</mat-icon>
|
||||
<span>Download</span>
|
||||
</button>
|
||||
</mat-menu>
|
||||
|
||||
<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>
|
||||
</div>
|
||||
|
||||
@ -807,4 +807,50 @@ dialogRef1.afterClosed().subscribe(rr=>{
|
||||
|
||||
}
|
||||
|
||||
archivePDImages(a){
|
||||
console.log(this.pdMasterData[0].random_string)
|
||||
let data = {
|
||||
"pd_id": this.viewID,
|
||||
"form_id":"",
|
||||
"regenerate":a,
|
||||
"random_string":this.pdMasterData[0].random_string
|
||||
};
|
||||
this._pd.archivePDImages(data).subscribe(data => {
|
||||
if (data.dataStatus) {
|
||||
window.open(data.records);
|
||||
this.notifier.notify('success', 'Downloaded Successfully..!');
|
||||
} else {
|
||||
this.notifier.notify('warning', 'Something Went Wrong Try Again.!');
|
||||
}
|
||||
}, err => {
|
||||
this.notifier.notify('error', 'Something Went Wrong Try Again.! \t\"' + (err.error_type == 2 ? err.error_status + ' ( ' + err.error_text + ' ) ' : ' ( ' + err.error_text + ' ) ') +'\" Error Occur.!');
|
||||
// alert(err.html_format);
|
||||
});
|
||||
}
|
||||
|
||||
downloadPDImagesPDF(a){
|
||||
// this.spinner_access=true
|
||||
console.log(this.pdMasterData[0].random_string)
|
||||
|
||||
let data = {
|
||||
"pd_id": this.viewID,
|
||||
"regenerate":a,
|
||||
"random_string":this.pdMasterData[0].random_string
|
||||
};
|
||||
this.notifier.notify("info","Processing please wait..")
|
||||
this._pd.photoPDFDownload(data).subscribe(data => {
|
||||
if (data.dataStatus) {
|
||||
window.open(data.records);
|
||||
this.notifier.notify('success', 'Done Successfully..!');
|
||||
} else {
|
||||
this.notifier.notify('warning', 'Something Went Wrong Try Again.!');
|
||||
}
|
||||
// this.spinner_access=false
|
||||
}, err => {
|
||||
// this.spinner_access=false
|
||||
this.notifier.notify('error', 'Something Went Wrong Try Again.! \t\"' + (err.error_type == 2 ? err.error_status + ' ( ' + err.error_text + ' ) ' : ' ( ' + err.error_text + ' ) ') +'\" Error Occur.!');
|
||||
// alert(err.html_format);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
@ -945,6 +945,9 @@ generatePDReportPDF(pdId: any): Observable<any> {
|
||||
archivePDImages(Dtl : any): Observable<any> {
|
||||
return this._http.post<any>(this.apiUrl + "archivePDImages", { "records": Dtl });
|
||||
}
|
||||
photoPDFDownload(params:any): Observable<any>{
|
||||
return this._http.post<any>(this.apiUrl + "photoPDFDownload", { "records": params });
|
||||
}
|
||||
checkExistPDDetails(datas,entity_id){
|
||||
return this._http.post(this.apiUrl+'checkExistPDDetails',{records:datas,client:entity_id})
|
||||
.pipe(catchError(this.handleError("checkExistPDDetails",[])))
|
||||
|
||||
Loading…
Reference in New Issue
Block a user