Dashboard date filter development start..

This commit is contained in:
Cüneyt Şentürk
2019-12-26 15:15:24 +03:00
parent 91dcb3877f
commit 4168a40cbb
2 changed files with 49 additions and 4 deletions

View File

@ -13,13 +13,15 @@ import Global from './../../mixins/global';
import AkauntingDashboard from './../../components/AkauntingDashboard';
import AkauntingWidget from './../../components/AkauntingWidget';
import Form from './../../plugins/form';
import BulkAction from './../../plugins/bulk-action';
import {DatePicker} from 'element-ui';
const app = new Vue({
Vue.use(DatePicker);
const dashboard = new Vue({
el: '#main-body',
components: {
[DatePicker.name]: DatePicker,
AkauntingDashboard,
AkauntingWidget
},
@ -46,7 +48,35 @@ const app = new Vue({
action: 'create',
sort: 0,
widget_id: 0
}
},
pickerOptions: {
shortcuts: [{
text: 'Last week',
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
picker.$emit('pick', [start, end]);
}
}, {
text: 'Last month',
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
picker.$emit('pick', [start, end]);
}
}, {
text: 'Last 3 months',
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
picker.$emit('pick', [start, end]);
}
}]
},
value2: ''
};
},