app.js 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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 Dashboard from './views/Dashboard'
  14. //import WorkOrder from './views/WorkOrder'
  15. import Login from './views/Login'
  16. import Home from './views/Welcome'
  17. const router = new VueRouter({
  18. mode: 'history',
  19. routes: [
  20. {
  21. path: '/',
  22. name: 'home',
  23. component: Home
  24. },
  25. {
  26. path: '/login',
  27. name: 'login',
  28. component: Login,
  29. },
  30. {
  31. path: '/dashboard',
  32. name: 'dashboard',
  33. component: Dashboard,
  34. },
  35. /* {
  36. path: '/workorders/:id',
  37. name: 'workorders',
  38. component: WorkOrder,
  39. } */
  40. ],
  41. })
  42. const app = new Vue({
  43. el: '#app',
  44. components: { App },
  45. router,
  46. })
  47. $(function () {
  48. $('[data-toggle="tooltip"]').tooltip()
  49. });
  50. var clipboard = new Clipboard('.btn-clip');
  51. clipboard.on('success', function(e) {
  52. $('#' + e.trigger.getAttribute('id')).notify('Copied to Clipboard', {position:"right", className:'success'});
  53. e.clearSelection();
  54. });