routes.ts 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. // Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. import type { RouteRecordRaw } from 'vue-router'
  3. const route: RouteRecordRaw[] = [
  4. {
  5. path: '/',
  6. name: 'Home',
  7. props: true,
  8. component: () => import('./views/Home.vue'),
  9. beforeEnter(to) {
  10. const location = to.hash && to.hash.slice(1)
  11. if (!location) return true
  12. const route = Router.resolve(location)
  13. const path = route.name === 'Error' ? '/' : `/${location}`
  14. return { path, replace: true }
  15. },
  16. meta: {
  17. title: __('Home'),
  18. requiresAuth: true,
  19. requiredPermission: ['*'],
  20. hasBottomNavigation: true,
  21. level: 1,
  22. },
  23. },
  24. {
  25. path: '/favorite/ticket-overviews/edit',
  26. props: true,
  27. name: 'TicketOverviews',
  28. component: () => import('./views/FavoriteTicketOverviewsEdit.vue'),
  29. meta: {
  30. title: __('Ticket Overview'),
  31. requiresAuth: true,
  32. requiredPermission: ['ticket.agent', 'ticket.customer'],
  33. hasBottomNavigation: true,
  34. hasHeader: true,
  35. level: 2,
  36. },
  37. },
  38. ]
  39. export default route