mirror of
https://github.com/crater-invoice/crater.git
synced 2025-10-27 11:41:09 -04:00
refactor templates and reports
This commit is contained in:
@ -48,7 +48,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>
|
||||
@ -179,6 +179,11 @@ export default {
|
||||
setRangeToCustom () {
|
||||
this.selectedRange = 'Custom'
|
||||
},
|
||||
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()
|
||||
|
||||
@ -48,7 +48,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>
|
||||
@ -184,6 +184,11 @@ export default {
|
||||
setRangeToCustom () {
|
||||
this.selectedRange = 'Custom'
|
||||
},
|
||||
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()
|
||||
|
||||
@ -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()
|
||||
|
||||
@ -48,7 +48,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>
|
||||
@ -179,6 +179,11 @@ export default {
|
||||
setRangeToCustom () {
|
||||
this.selectedRange = 'Custom'
|
||||
},
|
||||
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()
|
||||
|
||||
6
resources/assets/sass/pages/reports.scss
vendored
6
resources/assets/sass/pages/reports.scss
vendored
@ -21,6 +21,7 @@
|
||||
|
||||
.report-view-button {
|
||||
display: none;
|
||||
color: $btn-secondary-color;
|
||||
}
|
||||
|
||||
.report-fields-container {
|
||||
@ -61,8 +62,13 @@
|
||||
display: none;
|
||||
}
|
||||
|
||||
.report-submit-button-container {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.report-view-button {
|
||||
display: flex;
|
||||
color: $btn-secondary-color !important;
|
||||
justify-content: center
|
||||
}
|
||||
|
||||
|
||||
@ -330,6 +330,32 @@
|
||||
margin-top:7px;
|
||||
color:rgba(0, 0, 0, 0.85);
|
||||
}
|
||||
|
||||
.notes {
|
||||
font-family: 'Roboto', sans-serif;
|
||||
font-style: normal;
|
||||
font-weight: 300;
|
||||
font-size: 12px;
|
||||
color: #595959;
|
||||
margin-top: 15px;
|
||||
margin-left: 30px;
|
||||
width: 442px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.notes-label {
|
||||
font-family: 'Roboto', sans-serif;
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
font-size: 15px;
|
||||
line-height: 22px;
|
||||
letter-spacing: 0.05em;
|
||||
color: #040405;
|
||||
width: 108px;
|
||||
height: 19.87px;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
@ -386,6 +412,7 @@
|
||||
<div style="clear: both;"></div>
|
||||
</div>
|
||||
@include('app.pdf.estimate.partials.table')
|
||||
@include('app.pdf.estimate.partials.notes')
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@ -358,6 +358,32 @@
|
||||
margin-bottom:1px;
|
||||
margin-top:0;
|
||||
}
|
||||
|
||||
.notes {
|
||||
font-family: 'Roboto', sans-serif;
|
||||
font-style: normal;
|
||||
font-weight: 300;
|
||||
font-size: 12px;
|
||||
color: #595959;
|
||||
margin-top: 15px;
|
||||
margin-left: 30px;
|
||||
width: 442px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.notes-label {
|
||||
font-family: 'Roboto', sans-serif;
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
font-size: 15px;
|
||||
line-height: 22px;
|
||||
letter-spacing: 0.05em;
|
||||
color: #040405;
|
||||
width: 108px;
|
||||
height: 19.87px;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
@ -399,6 +425,7 @@
|
||||
</div>
|
||||
</div>
|
||||
@include('app.pdf.estimate.partials.table')
|
||||
@include('app.pdf.estimate.partials.notes')
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@ -366,6 +366,32 @@
|
||||
border-bottom:1px solid #E8E8E8;
|
||||
border-top:1px solid #E8E8E8;
|
||||
}
|
||||
|
||||
.notes {
|
||||
font-family: 'Roboto', sans-serif;
|
||||
font-style: normal;
|
||||
font-weight: 300;
|
||||
font-size: 12px;
|
||||
color: #595959;
|
||||
margin-top: 15px;
|
||||
margin-left: 30px;
|
||||
width: 442px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.notes-label {
|
||||
font-family: 'Roboto', sans-serif;
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
font-size: 15px;
|
||||
line-height: 22px;
|
||||
letter-spacing: 0.05em;
|
||||
color: #040405;
|
||||
width: 108px;
|
||||
height: 19.87px;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
@ -423,6 +449,7 @@
|
||||
</div>
|
||||
</div>
|
||||
@include('app.pdf.estimate.partials.table')
|
||||
@include('app.pdf.estimate.partials.notes')
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@ -0,0 +1,6 @@
|
||||
<div class="notes">
|
||||
<div class="notes-label">
|
||||
Notes
|
||||
</div>
|
||||
{{$estimate->notes}}
|
||||
</div>
|
||||
@ -336,6 +336,30 @@
|
||||
color:rgba(0, 0, 0, 0.85);
|
||||
}
|
||||
|
||||
.notes {
|
||||
font-family: 'Roboto', sans-serif;
|
||||
font-style: normal;
|
||||
font-weight: 300;
|
||||
font-size: 12px;
|
||||
color: #595959;
|
||||
margin-top: 15px;
|
||||
margin-left: 30px;
|
||||
width: 442px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.notes-label {
|
||||
font-family: 'Roboto', sans-serif;
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
font-size: 15px;
|
||||
line-height: 22px;
|
||||
letter-spacing: 0.05em;
|
||||
color: #040405;
|
||||
width: 108px;
|
||||
height: 19.87px;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
@ -393,7 +417,10 @@
|
||||
</div>
|
||||
<div style="clear: both;"></div>
|
||||
</div>
|
||||
<div style="position:relative">
|
||||
@include('app.pdf.invoice.partials.table')
|
||||
</div>
|
||||
@include('app.pdf.invoice.partials.notes')
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@ -368,6 +368,32 @@
|
||||
margin-bottom:1px;
|
||||
margin-top:0;
|
||||
}
|
||||
|
||||
.notes {
|
||||
font-family: 'Roboto', sans-serif;
|
||||
font-style: normal;
|
||||
font-weight: 300;
|
||||
font-size: 12px;
|
||||
color: #595959;
|
||||
margin-top: 15px;
|
||||
margin-left: 30px;
|
||||
width: 442px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.notes-label {
|
||||
font-family: 'Roboto', sans-serif;
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
font-size: 15px;
|
||||
line-height: 22px;
|
||||
letter-spacing: 0.05em;
|
||||
color: #040405;
|
||||
width: 108px;
|
||||
height: 19.87px;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
@ -410,6 +436,7 @@
|
||||
</div>
|
||||
</div>
|
||||
@include('app.pdf.invoice.partials.table')
|
||||
@include('app.pdf.invoice.partials.notes')
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@ -377,6 +377,32 @@
|
||||
border-bottom:1px solid #E8E8E8;
|
||||
border-top:1px solid #E8E8E8;
|
||||
}
|
||||
|
||||
.notes {
|
||||
font-family: 'Roboto', sans-serif;
|
||||
font-style: normal;
|
||||
font-weight: 300;
|
||||
font-size: 12px;
|
||||
color: #595959;
|
||||
margin-top: 15px;
|
||||
margin-left: 30px;
|
||||
width: 442px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.notes-label {
|
||||
font-family: 'Roboto', sans-serif;
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
font-size: 15px;
|
||||
line-height: 22px;
|
||||
letter-spacing: 0.05em;
|
||||
color: #040405;
|
||||
width: 108px;
|
||||
height: 19.87px;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
@ -434,6 +460,7 @@
|
||||
</div>
|
||||
</div>
|
||||
@include('app.pdf.invoice.partials.table')
|
||||
@include('app.pdf.invoice.partials.notes')
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
6
resources/views/app/pdf/invoice/partials/notes.blade.php
Normal file
6
resources/views/app/pdf/invoice/partials/notes.blade.php
Normal file
@ -0,0 +1,6 @@
|
||||
<div class="notes">
|
||||
<div class="notes-label">
|
||||
Notes
|
||||
</div>
|
||||
{{$invoice->notes}}
|
||||
</div>
|
||||
Reference in New Issue
Block a user