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 / frontend / app.js

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

47 lines 965 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import Vue from 'vue'
2 import Vuex from 'vuex'
3 import Axios from 'axios'
4 import VueAxios from 'vue-axios'
5 import Toasted from 'vue-toasted'
6 import mixin from '@mixins/index'
7 import moment from 'moment-timezone'
8 import Bookit from '@views/bookit'
9 import store from '@store/index'
10 const _ = require('lodash')
11 const $ = require('jquery')
12
13 /**
14 * Init Moment
15 */
16 moment.tz.setDefault('GMT');
17 Vue.prototype.moment = moment;
18 Vue.filter('moment', function (date, format) {
19 return moment(date).format(format);
20 });
21 Vue.use(Vuex)
22
23
24 $( document ).ready(() => {
25 Vue.use( VueAxios, Axios );
26 Vue.mixin( mixin );
27 Vue.use( Toasted);
28
29 $('.bookit-app').each(function () {
30 new Vue({
31 el: $(this)[0],// selector
32 beforeCreate() {
33 this.$store = createStore(_.cloneDeep(store));
34 },
35 components: {
36 'bookit': Bookit, // Frontend main component
37 },
38 });
39 });
40
41 });
42
43 function createStore (store) {
44 return new Vuex.Store(store);
45 }
46
47