mirror of
https://github.com/crater-invoice/crater.git
synced 2025-10-28 04:01:10 -04:00
refactor templates and reports
This commit is contained in:
@ -70,7 +70,7 @@
|
||||
</div>
|
||||
<div class="col-sm-8 reports-tab-container">
|
||||
<iframe :src="getReportUrl" class="reports-frame-style"/>
|
||||
<a :href="getReportUrl" class="base-button btn btn-primary btn-lg report-view-button" target="_blank">
|
||||
<a class="base-button btn btn-primary btn-lg report-view-button" @click="viewReportsPDF">
|
||||
<font-awesome-icon icon="file-pdf" class="vue-icon icon-left svg-inline--fa fa-download fa-w-16 mr-2" /> <span>{{ $t('reports.view_pdf') }}</span>
|
||||
</a>
|
||||
</div>
|
||||
@ -217,6 +217,11 @@ export default {
|
||||
this.url = `${this.itemsSiteURL}?from_date=${moment(this.formData.from_date).format('DD/MM/YYYY')}&to_date=${moment(this.formData.to_date).format('DD/MM/YYYY')}`
|
||||
return true
|
||||
},
|
||||
async viewReportsPDF () {
|
||||
let data = await this.getReports()
|
||||
window.open(this.getReportUrl, '_blank')
|
||||
return data
|
||||
},
|
||||
async getReports (isDownload = false) {
|
||||
this.$v.range.$touch()
|
||||
this.$v.formData.$touch()
|
||||
|
||||
Reference in New Issue
Block a user