Sales PDF download option enabled
This commit is contained in:
parent
48569627ca
commit
5bee29aa2f
@ -19,9 +19,9 @@
|
|||||||
<ion-content padding>
|
<ion-content padding>
|
||||||
<ion-list >
|
<ion-list >
|
||||||
<ion-grid class="fadeIn">
|
<ion-grid class="fadeIn">
|
||||||
<mat-card class="md-box" reorder="true" >
|
<mat-card class="md-box" reorder="true">
|
||||||
<ion-list style="margin-top: 5px;">
|
<ion-list style="margin-top: 5px;">
|
||||||
<ion-item *ngFor="let val of sales_displayValue">
|
<ion-item *ngFor="let val of sales_displayValue" (click)="presentActionSheet(val.sales_pd_id)">
|
||||||
<!-- <p item-start class="lettericon">{{val.abbr}}</p> -->
|
<!-- <p item-start class="lettericon">{{val.abbr}}</p> -->
|
||||||
<!-- <ion-icon style="font-size:90%" item-start="" class="lettericon" [style.background]="bgColor[i]" *ngIf="progess.applicat_details ===undefined || progess.applicat_details[0].applicant_name ==null">{{progess.pd_id}}</ion-icon> -->
|
<!-- <ion-icon style="font-size:90%" item-start="" class="lettericon" [style.background]="bgColor[i]" *ngIf="progess.applicat_details ===undefined || progess.applicat_details[0].applicant_name ==null">{{progess.pd_id}}</ion-icon> -->
|
||||||
<ion-row>
|
<ion-row>
|
||||||
@ -47,7 +47,6 @@
|
|||||||
<ion-col text-right>
|
<ion-col text-right>
|
||||||
<div style="font-size: 13px;">
|
<div style="font-size: 13px;">
|
||||||
<h6>{{val.abbr}}</h6>
|
<h6>{{val.abbr}}</h6>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</ion-col>
|
</ion-col>
|
||||||
</ion-row>
|
</ion-row>
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { Component } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
import { IonicPage, NavController, NavParams } from 'ionic-angular';
|
import { IonicPage, NavController, NavParams, ActionSheetController } from 'ionic-angular';
|
||||||
import { SalesPdProvider } from '../../providers/sales-pd/sales-pd';
|
import { SalesPdProvider } from '../../providers/sales-pd/sales-pd';
|
||||||
import { HomePage, Section1 } from '../home/home';
|
import { HomePage, Section1 } from '../home/home';
|
||||||
import { ToastProvider } from '../../../../providers/common-provider/toast';
|
import { ToastProvider } from '../../../../providers/common-provider/toast';
|
||||||
@ -19,7 +19,7 @@ import { ToastProvider } from '../../../../providers/common-provider/toast';
|
|||||||
export class SalesPDlistPage {
|
export class SalesPDlistPage {
|
||||||
sales_displayValue: any=[];
|
sales_displayValue: any=[];
|
||||||
|
|
||||||
constructor(public navCtrl: NavController, public navParams: NavParams,private salesPDService:SalesPdProvider,private toastProvider:ToastProvider) {
|
constructor(public actionSheetCtrl: ActionSheetController,public navCtrl: NavController, public navParams: NavParams,private salesPDService:SalesPdProvider,private toastProvider:ToastProvider) {
|
||||||
}
|
}
|
||||||
|
|
||||||
ionViewDidLoad() {
|
ionViewDidLoad() {
|
||||||
@ -48,6 +48,20 @@ export class SalesPDlistPage {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
salesPDpdf(pdfdetail){
|
||||||
|
this.salesPDService.getSalesPdpdf(pdfdetail)
|
||||||
|
.subscribe(
|
||||||
|
data => {
|
||||||
|
if (data.status == 200) {
|
||||||
|
// window.open(data.records);
|
||||||
|
// window.location.href=data.records;
|
||||||
|
window.open(data.records, '_blank');
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
alertDecision(){
|
alertDecision(){
|
||||||
let btns={button1:'FreshPD',button2:'Continue'}
|
let btns={button1:'FreshPD',button2:'Continue'}
|
||||||
let alert = this.toastProvider.setAlertWithButtons("<small>You have one Incomplete PD<small>", "<strong>Are You Continue with that or Start with Fresh PD<br/><small>Note:Starting Fresh PD will Delete the existing one.</small></strong>",btns)
|
let alert = this.toastProvider.setAlertWithButtons("<small>You have one Incomplete PD<small>", "<strong>Are You Continue with that or Start with Fresh PD<br/><small>Note:Starting Fresh PD will Delete the existing one.</small></strong>",btns)
|
||||||
@ -66,4 +80,29 @@ export class SalesPDlistPage {
|
|||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
presentActionSheet(pdfdownlond) {
|
||||||
|
let actionSheet = this.actionSheetCtrl.create({
|
||||||
|
title: 'Select Option',
|
||||||
|
buttons: [
|
||||||
|
{
|
||||||
|
text: 'PDF Download',
|
||||||
|
role: 'destructive',
|
||||||
|
handler: () => {
|
||||||
|
this.salesPDpdf(pdfdownlond);
|
||||||
|
// console.log('pdf check',this.salesPDpdf);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: 'Cancel',
|
||||||
|
role: 'cancel',
|
||||||
|
handler: () => {
|
||||||
|
console.log('Cancel clicked');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
});
|
||||||
|
|
||||||
|
actionSheet.present();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -131,4 +131,9 @@ current_section:any;
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getSalesPdpdf(pdfdetail): Observable<any> {
|
||||||
|
return this.http.get<any[]>(this.apiUrl + "downloadSalesPDReport/" + pdfdetail)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user