2019-11-16 10:21:14 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* First we will load all of this project's JavaScript dependencies which
|
|
|
|
* includes Vue and other libraries. It is a great starting point when
|
|
|
|
* building robust, powerful web applications using Vue and Laravel.
|
|
|
|
*/
|
|
|
|
|
|
|
|
require('./../../bootstrap');
|
|
|
|
|
|
|
|
import Vue from 'vue';
|
|
|
|
|
2020-01-03 12:10:07 +03:00
|
|
|
import DashboardPlugin from './../../plugins/dashboard-plugin';
|
|
|
|
|
2019-11-16 10:21:14 +03:00
|
|
|
import Global from './../../mixins/global';
|
2021-06-04 16:21:05 +03:00
|
|
|
import {getQueryVariable} from './../../plugins/functions';
|
|
|
|
import {DatePicker, Tooltip} from 'element-ui';
|
2019-11-16 10:21:14 +03:00
|
|
|
|
2021-06-04 16:21:05 +03:00
|
|
|
Vue.use(DatePicker, Tooltip);
|
2020-01-02 13:08:50 +03:00
|
|
|
|
2020-01-03 12:10:07 +03:00
|
|
|
// plugin setup
|
2021-06-04 16:21:05 +03:00
|
|
|
Vue.use(DashboardPlugin, DatePicker, Tooltip);
|
2020-01-03 12:10:07 +03:00
|
|
|
|
2019-11-16 10:21:14 +03:00
|
|
|
const app = new Vue({
|
2021-06-04 16:21:05 +03:00
|
|
|
el: '#main-body',
|
2019-11-16 10:21:14 +03:00
|
|
|
|
2020-01-02 13:08:50 +03:00
|
|
|
components: {
|
2021-06-04 16:21:05 +03:00
|
|
|
[DatePicker.name]: DatePicker,
|
2020-01-02 13:08:50 +03:00
|
|
|
[Tooltip.name]: Tooltip,
|
|
|
|
},
|
|
|
|
|
2019-11-16 10:21:14 +03:00
|
|
|
mixins: [
|
|
|
|
Global
|
|
|
|
],
|
2021-06-04 16:21:05 +03:00
|
|
|
|
|
|
|
data: function () {
|
|
|
|
return {
|
|
|
|
filter_date: [],
|
|
|
|
};
|
|
|
|
},
|
|
|
|
|
|
|
|
mounted() {
|
|
|
|
let start_date = getQueryVariable('start_date');
|
|
|
|
|
|
|
|
if (start_date) {
|
|
|
|
let end_date = getQueryVariable('end_date');
|
|
|
|
|
|
|
|
this.filter_date.push(start_date);
|
|
|
|
this.filter_date.push(end_date);
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
methods: {
|
|
|
|
// Global filter change date column
|
|
|
|
onChangeFilterDate() {
|
|
|
|
if (this.filter_date) {
|
|
|
|
window.location.href = url + '/portal?start_date=' + this.filter_date[0] + '&end_date=' + this.filter_date[1];
|
|
|
|
} else {
|
|
|
|
window.location.href = url + '/portal';
|
|
|
|
}
|
|
|
|
},
|
|
|
|
}
|
2019-11-16 10:21:14 +03:00
|
|
|
});
|