app.js 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /**
  2. * First we will load all of this project's JavaScript dependencies which
  3. * includes Vue and other libraries. It is a great starting point when
  4. * building robust, powerful web applications using Vue and Laravel.
  5. */
  6. require('./bootstrap');
  7. window.Clipboard = require('clipboard');
  8. require('./notify.min.js');
  9. import Vue from 'vue'
  10. import VueRouter from 'vue-router'
  11. Vue.use(VueRouter)
  12. import App from './views/App'
  13. // import WorkOrder from './views/WorkOrder'
  14. import Login from './views/Login'
  15. import Home from './views/Welcome'
  16. const router = new VueRouter({
  17. mode: 'history',
  18. routes: [
  19. {
  20. path: '/',
  21. name: 'home',
  22. component: Home
  23. },
  24. {
  25. path: '/login',
  26. name: 'login',
  27. component: Login,
  28. },
  29. /* {
  30. path: '/workorders',
  31. name: 'workorders',
  32. component: WorkOrder,
  33. } */
  34. ],
  35. })
  36. const app = new Vue({
  37. el: '#app',
  38. components: { App },
  39. router,
  40. })
  41. $(function () {
  42. $('[data-toggle="tooltip"]').tooltip()
  43. });
  44. var clipboard = new Clipboard('.btn-clip');
  45. clipboard.on('success', function(e) {
  46. $('#' + e.trigger.getAttribute('id')).notify('Copied to Clipboard', {position:"right", className:'success'});
  47. e.clearSelection();
  48. });