akaunting 3.0 (the last dance)
This commit is contained in:
30
resources/assets/js/views/common/reports.js
vendored
30
resources/assets/js/views/common/reports.js
vendored
@@ -22,7 +22,7 @@ const app = new Vue({
|
||||
el: '#app',
|
||||
|
||||
mixins: [
|
||||
Global
|
||||
Global,
|
||||
],
|
||||
|
||||
data: function () {
|
||||
@@ -30,13 +30,7 @@ const app = new Vue({
|
||||
form: new Form('report'),
|
||||
bulk_action: new BulkAction('reports'),
|
||||
report_fields: '',
|
||||
reports_total: [],
|
||||
}
|
||||
},
|
||||
|
||||
created() {
|
||||
if (typeof reports_total !== 'undefined' && reports_total) {
|
||||
this.reports_total = reports_total;
|
||||
showPreferences: false,
|
||||
}
|
||||
},
|
||||
|
||||
@@ -46,15 +40,20 @@ const app = new Vue({
|
||||
params: {
|
||||
class: class_name
|
||||
}
|
||||
})
|
||||
})
|
||||
.then(response => {
|
||||
if (class_name) {
|
||||
this.showPreferences = true;
|
||||
} else {
|
||||
this.showPreferences = false;
|
||||
}
|
||||
|
||||
let form = this.form;
|
||||
let html = response.data.html;
|
||||
|
||||
this.report_fields = Vue.component('add-new-component', (resolve, reject) => {
|
||||
resolve({
|
||||
template : '<div id="report-fields" class="row col-md-12">' + html + '</div>',
|
||||
|
||||
template : '<div id="report-fields" class="grid sm:grid-cols-6 sm:col-span-6 gap-x-8 gap-y-6 my-3.5">' + html + '</div>',
|
||||
mixins: [
|
||||
Global
|
||||
],
|
||||
@@ -84,14 +83,5 @@ const app = new Vue({
|
||||
onChangeReportFields(event) {
|
||||
this.form = event;
|
||||
},
|
||||
|
||||
onRefreshTotal(report_id) {
|
||||
axios.get(url + '/common/reports/' + report_id + '/clear')
|
||||
.then(response => {
|
||||
this.reports_total[report_id] = response.data.data;
|
||||
})
|
||||
.catch(error => {
|
||||
});
|
||||
},
|
||||
}
|
||||
});
|
||||
|
Reference in New Issue
Block a user