Completed
Push — dev5 ( d45a54...be76cd )
by Ron
09:51
created

resources/js/app.js   A

Complexity

Total Complexity 2
Complexity/F 1

Size

Lines of Code 19
Function Count 2

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 10
mnd 0
bc 0
fnc 2
dl 0
loc 19
rs 10
bpm 0
cpm 1
noi 1
c 0
b 0
f 0
1
/*
2
*   Non Vue Javascript for Template
3
*/
4
window.expandNav = function () {
5
    var el = document.getElementById('sidebar');
6
    el.classList.toggle('active');
7
}
8
9
window.expandProfile = function () {
10
    var el = document.getElementById('profileDropdownDiv');
11
    el.classList.toggle('show');
12
    return false;
13
}
14
15
/*
16
*   File Imports
17
*/
18
import Vue from 'vue';
19
import BootstrapVue from 'bootstrap-vue';
20
import VueGoodTablePlugin from 'vue-good-table';
21
import route from 'ziggy';
22
import { Ziggy } from '../assets/js/ziggy';
23
24
/*
25
*   Vue, Bootstrap and third party libraries
26
*/
27
window.axios = require('axios');
28
Vue.use(VueGoodTablePlugin);
29
Vue.use(BootstrapVue);
30
31
Vue.mixin({
32
    methods: {
33
        route: (name, params, absolute) => route(name, params, absolute, Ziggy),
34
    },
35
    data: function () {
36
        return {
37
            dashify: require('dashify'),
38
        }
39
    }
40
});
41
42
/*
43
*   Vue File Link Components
44
*/
45
Vue.component('list-file-links', require('./components/fileLinks/ListFileLinks.vue').default);
46
//Vue.component('new-file-link',     require('./components/fileLinks/NewFileLink.vue').default);
47
//Vue.component('link-details',      require('./components/fileLinks/LinkDetails.vue').default);
48
//Vue.component('link-instructions', require('./components/fileLinks/LinkInstructions.vue').default);
49
//Vue.component('link-files',        require('./components/fileLinks/LinkFiles.vue').default);
50
//Vue.component('user-upload',       require('./components/fileLinks/UserFileUpload.vue').default);
51
52
53
/*
54
*   Include CSRF toden in all axios headers
55
*/
56
window.axios.defaults.headers.common = {
57
   'X-Requested-With': 'XMLHttpRequest',
58
   'X-CSRF-TOKEN': window.techBench.csrfToken
59
}
60
61
/*
62
*   Initialize app
63
*/
64
window.onload = function () {
65
    const app = new Vue({
66
        el: '#app'
67
    });
68
}
69