diff --git a/src/router/modules/account.js b/src/router/modules/account.js new file mode 100644 index 000000000..674184383 --- /dev/null +++ b/src/router/modules/account.js @@ -0,0 +1,174 @@ +import { RouterView } from 'vue-router'; + +export default { + path: '/account', + name: 'Account', + meta: { + title: 'accounts', + icon: 'vn:account', + moduleName: 'Account', + }, + component: RouterView, + redirect: { name: 'AccountMain' }, + menus: { + main: ['AccountList', 'AccountDepartment'], + card: [ + 'AccountBasicData', + 'AccountNotes', + 'AccountPda', + 'AccountNotificationsManager', + 'AccountPBX', + 'AccountLog', + 'AccountCalendar', + 'AccountDms', + 'AccountTimeControl', + ], + departmentCard: ['BasicData'], + }, + children: [ + { + path: '', + name: 'AccountMain', + component: () => import('src/pages/Account/AccountMain.vue'), + redirect: { name: 'AccountList' }, + children: [ + { + path: 'list', + name: 'AccountList', + meta: { + title: 'list', + icon: 'view_list', + }, + component: () => import('src/pages/Account/AccountList.vue'), + }, + { + path: 'department', + name: 'AccountDepartment', + meta: { + title: 'department', + icon: 'vn:greuge', + }, + component: () => import('src/pages/Account/AccountDepartment.vue'), + }, + { + path: 'create', + name: 'AccountCreate', + meta: { + title: 'accountCreate', + icon: 'add', + }, + component: () => import('src/pages/Account/AccountCreate.vue'), + }, + ], + }, + { + name: 'AccountCard', + path: ':id', + component: () => import('src/pages/Account/Card/AccountCard.vue'), + redirect: { name: 'AccountSummary' }, + children: [ + { + name: 'AccountSummary', + path: 'summary', + meta: { + title: 'summary', + icon: 'launch', + }, + component: () => import('src/pages/Account/Card/AccountSummary.vue'), + }, + { + path: 'basic-data', + name: 'AccountBasicData', + meta: { + title: 'basicData', + icon: 'vn:settings', + }, + component: () => + import('src/pages/Account/Card/AccountBasicData.vue'), + }, + { + path: 'notes', + name: 'NotesCard', + redirect: { name: 'AccountNotes' }, + children: [ + { + path: '', + name: 'AccountNotes', + meta: { + title: 'notes', + icon: 'vn:notes', + }, + component: () => + import('src/pages/Account/Card/AccountNotes.vue'), + }, + ], + }, + { + name: 'AccountPda', + path: 'pda', + meta: { + title: 'pda', + icon: 'phone_android', + }, + component: () => import('src/pages/Account/Card/AccountPda.vue'), + }, + { + name: 'AccountNotificationsManager', + path: 'notifications', + meta: { + title: 'notifications', + icon: 'notifications', + }, + component: () => + import('src/pages/Account/Card/AccountNotificationsManager.vue'), + }, + { + path: 'pbx', + name: 'AccountPBX', + meta: { + title: 'pbx', + icon: 'vn:pbx', + }, + component: () => import('src/pages/Account/Card/AccountPBX.vue'), + }, + { + name: 'AccountDms', + path: 'dms', + meta: { + title: 'dms', + icon: 'cloud_upload', + }, + component: () => import('src/pages/Account/Card/AccountDms.vue'), + }, + { + name: 'AccountLog', + path: 'log', + meta: { + title: 'log', + icon: 'vn:History', + }, + component: () => import('src/pages/Account/Card/AccountLog.vue'), + }, + { + name: 'AccountCalendar', + path: 'calendar', + meta: { + title: 'calendar', + icon: 'calendar_today', + }, + component: () => import('src/pages/Account/Card/AccountCalendar.vue'), + }, + { + name: 'AccountTimeControl', + path: 'time-control', + meta: { + title: 'timeControl', + icon: 'access_time', + }, + component: () => + import('src/pages/Account/Card/AccountTimeControl.vue'), + }, + ], + }, + ], +}; diff --git a/src/router/modules/index.js b/src/router/modules/index.js index 7fff2f2e5..5c2d44f58 100644 --- a/src/router/modules/index.js +++ b/src/router/modules/index.js @@ -18,6 +18,7 @@ import Parking from './parking'; import Agency from './agency'; import ItemType from './itemType'; import Zone from './zone'; +import Account from './account'; export default [ Item, @@ -40,4 +41,5 @@ export default [ Agency, ItemType, Zone, + Account, ]; diff --git a/src/router/routes.js b/src/router/routes.js index 04780ee17..46b7293d4 100644 --- a/src/router/routes.js +++ b/src/router/routes.js @@ -18,6 +18,7 @@ import roadmap from 'src/router/modules/roadmap'; import parking from 'src/router/modules/parking'; import agency from 'src/router/modules/agency'; import zone from 'src/router/modules/zone'; +import account from './modules/account'; const routes = [ { @@ -77,6 +78,7 @@ const routes = [ agency, ItemType, zone, + account, { path: '/:catchAll(.*)*', name: 'NotFound', diff --git a/src/stores/useNavigationStore.js b/src/stores/useNavigationStore.js index ee1e04e9b..6ae571cfc 100644 --- a/src/stores/useNavigationStore.js +++ b/src/stores/useNavigationStore.js @@ -22,6 +22,7 @@ export const useNavigationStore = defineStore('navigationStore', () => { 'worker', 'wagon', 'zone', + 'account', ]; const pinnedModules = ref([]); const role = useRole();