routes.ts 814 B

1234567891011121314151617181920212223242526272829
  1. // Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. import { usePersonalSettingStore } from './stores/personalSetting.ts'
  3. import { personalSettingRoutes } from './views/PersonalSetting/plugins/index.ts'
  4. import type { RouteRecordRaw } from 'vue-router'
  5. const route: RouteRecordRaw[] = [
  6. {
  7. path: '/personal-setting',
  8. name: 'PersonalSettings',
  9. component: () => import('./views/PersonalSetting.vue'),
  10. meta: {
  11. title: __('Profile'),
  12. icon: 'person-gear',
  13. requiresAuth: true,
  14. requiredPermission: ['*'],
  15. level: 2,
  16. pageKey: 'personal-setting',
  17. permanentItem: true,
  18. },
  19. children: personalSettingRoutes,
  20. redirect: () => ({
  21. path: usePersonalSettingStore().previousPersonalSettingPath,
  22. }),
  23. },
  24. ]
  25. export default route