PluginProbe
Bookit — Booking & Appointment Calendar / 2.6.0.5
Bookit — Booking & Appointment Calendar v2.6.0.5
2.6.0.5 2.6.0.4 2.6.0.3 2.6.0.2 2.6.0.1 2.6.0 trunk 1.2 1.2.2 1.2.3 2.0.0 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 2.0.7 2.0.8 2.0.9 2.1.0 2.1.1 2.1.2 2.1.3 2.1.4 All 62 releases
bookit / assets / src / dashboard / app.js

app.js in Bookit — Booking & Appointment Calendar 2.6.0.5, at assets/src/dashboard/app.js

58 lines 1.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import Vue from 'vue'
2 import Axios from 'axios'
3 import VueAxios from 'vue-axios'
4 import Toasted from 'vue-toasted'
5 import moment from 'moment-timezone'
6 import mixin from '@dashboard-mixins/index'
7 import store from '@dashboard-store/index'
8 import Appointments from '@dashboard-components/appointments'
9 import Services from '@dashboard-components/services'
10 import Staff from '@dashboard-components/staff'
11 import Customers from '@dashboard-components/customers'
12 import Settings from '@dashboard-components/settings'
13 import { VuejsDatatableFactory } from 'vuejs-datatable'
14 import VueInputAutowidth from 'vue-input-autowidth'
15 import Calendar from '@dashboard-components/calendar'
16 /**
17 * Init Moment
18 */
19 moment.tz.setDefault('GMT');
20 Vue.prototype.moment = moment;
21 Vue.filter('moment', function (date, format) {
22 return moment(date).format(format);
23 });
24
25 VuejsDatatableFactory.useDefaultType( false )
26 .registerTableType( 'datatable', tableType => tableType.mergeSettings( {
27 table: {
28 class: 'bookit-table',
29 sorting: {
30 sortAsc: '',
31 sortDesc: '',
32 sortNone: '<span class="arrow-up-down"></span>',
33 },
34 }
35 } ) );
36
37 window.addEventListener('load', () => {
38 Vue.use( VuejsDatatableFactory );
39 Vue.use( VueInputAutowidth );
40 Vue.use( VueAxios, Axios );
41 Vue.use( Toasted, {
42 duration: 2000
43 } );
44 Vue.mixin( mixin );
45
46 new Vue({
47 store, // render vuex
48 el: '#bookit-dashboard-app', // selector
49 components: {
50 'bookit-appointments': Appointments,
51 'bookit-services': Services,
52 'bookit-staff': Staff,
53 'bookit-customers': Customers,
54 'bookit-settings': Settings,
55 'bookit': Calendar,
56 },
57 });
58 });