diff --git a/ayanova/src/api/initialize.js b/ayanova/src/api/initialize.js index 64465dc4..e239f6ef 100644 --- a/ayanova/src/api/initialize.js +++ b/ayanova/src/api/initialize.js @@ -455,31 +455,40 @@ function initNavPanel() { } //****************** ACCOUNTING - if ( - window.$gz.role.hasRole([ - role.BizAdminFull, - role.AccountingFull, - role.BizAdminLimited - ]) - ) { - sub = []; - //RATES + sub = []; + + //SERVICE RATES + if (window.$gz.role.canOpen(window.$gz.type.ServiceRate)) { sub.push({ - title: "RateList", + title: "ServiceRateList", icon: "$ayiCalculator", - route: "/acc-accounting", + route: "/acc-service-rates", key: key++ }); + } + //TRAVEL RATES + if (window.$gz.role.canOpen(window.$gz.type.TravelRate)) { sub.push({ - title: "TaxCodeList", - icon: "$ayiPercent", - route: "/acc-accounting", + title: "TravelRateList", + icon: "$ayiCalculator", + route: "/acc-travel-rates", key: key++ }); + } - // ** ACCOUNTING (TOP) + // if (window.$gz.role.canOpen(window.$gz.type.TaxCode)) { + // sub.push({ + // title: "TaxCodeList", + // icon: "$ayiPercent", + // route: "/acc-accounting", + // key: key++ + // }); + // } + + // ** ACCOUNTING (TOP) + if (sub.length > 0) { addNavItem("Accounting", "$ayiCoins", undefined, sub, key++, "accounting"); } diff --git a/ayanova/src/router.js b/ayanova/src/router.js index 879c622b..e4279275 100644 --- a/ayanova/src/router.js +++ b/ayanova/src/router.js @@ -65,6 +65,49 @@ export default new Router({ base: process.env.BASE_URL, scrollBehavior, routes: [ + //########################## GENERAL / COMMON GROUP ################################### + { + path: "/open/:ayatype/:recordid", + name: "ay-open", + component: () => + import(/* webpackChunkName: "ay-common" */ "./views/ay-open.vue") + }, + { + path: "/about", + name: "ay-about", + // route level code-splitting + // this generates a separate chunk (about.[hash].js) for this route + // which is lazy-loaded when the route is visited. + component: () => + import(/* webpackChunkName: "ay-common" */ "./views/ay-about.vue") + }, + { + path: "/applog", + name: "ay-log", + component: () => + import(/* webpackChunkName: "ay-common" */ "./views/ay-log.vue") + }, + { + path: "/customize/:formCustomTemplateKey", + name: "ay-customize", + component: () => + import(/* webpackChunkName: "ay-common" */ "./views/ay-customize.vue") + }, + { + path: "/data-list-view/:dataListKey/:formKey/:listViewId", + name: "ay-data-list-view", + component: () => + import( + /* webpackChunkName: "ay-common" */ "./views/ay-data-list-view.vue" + ) + }, + + { + path: "/history/:ayatype/:recordid/:userlog?", + name: "ay-history", + component: () => + import(/* webpackChunkName: "ay-common" */ "./views/ay-history.vue") + }, { path: "/login", name: "login", @@ -179,6 +222,7 @@ export default new Router({ /* webpackChunkName: "ay-common" */ "./views/home-notify-subscription.vue" ) }, + //####################### CUSTOMERS GROUP ############################## { path: "/cust-customers", name: "cust-customers", @@ -227,6 +271,7 @@ export default new Router({ component: () => import(/* webpackChunkName: "cust" */ "./views/cust-head-office.vue") }, + //####################### SERVICE GROUP ############################## { path: "/svc-schedule", name: "svc-schedule", @@ -313,6 +358,7 @@ export default new Router({ component: () => import(/* webpackChunkName: "svc" */ "./views/svc-csr-list.vue") }, + //######################### INVENTORY GROUP ############################## { path: "/inv-parts", name: "inv-parts", @@ -356,6 +402,7 @@ export default new Router({ component: () => import(/* webpackChunkName: "inv" */ "./views/inv-adjustments.vue") }, + //####################### VENDORS GROUP ############################## { path: "/vendors", name: "vendors", @@ -368,13 +415,45 @@ export default new Router({ component: () => import(/* webpackChunkName: "vend" */ "./views/vendor.vue") }, + //###################### ACCOUNTING GROUP ########################## { - path: "/acc-accounting", - name: "acc-accounting", + path: "/acc-service-rates", + name: "service-rates", component: () => - import(/* webpackChunkName: "acc" */ "./views/acc-accounting.vue") + import(/* webpackChunkName: "acc" */ "./views/acc-service-rates.vue") + }, + { + path: "/acc-service-rates/:recordid", + name: "service-rate-edit", + component: () => + import(/* webpackChunkName: "acc" */ "./views/acc-service-rate.vue") }, + { + path: "/acc-travel-rates", + name: "travel-rates", + component: () => + import(/* webpackChunkName: "acc" */ "./views/acc-travel-rates.vue") + }, + { + path: "/acc-travel-rates/:recordid", + name: "travel-rate-edit", + component: () => + import(/* webpackChunkName: "acc" */ "./views/acc-travel-rate.vue") + }, + { + path: "/acc-tax-codes", + name: "tax-codes", + component: () => + import(/* webpackChunkName: "acc" */ "./views/acc-tax-codes.vue") + }, + { + path: "/acc-tax-codes/:recordid", + name: "tax-code-edit", + component: () => + import(/* webpackChunkName: "acc" */ "./views/acc-tax-code.vue") + }, + //######################### ADMINISTRATION GROUP ##################################### { path: "/adm-global-settings", name: "adm-global-settings", @@ -461,7 +540,7 @@ export default new Router({ component: () => import(/* webpackChunkName: "adm" */ "./views/adm-import.vue") }, - + //########################## OPERATIONS GROUP ############################ { path: "/ops-backup", name: "ops-backup", @@ -525,7 +604,7 @@ export default new Router({ ) }, - //**********************************CUSTOMER PAGES */ + //######################### CUSTOMER USER GROUP ###################################### { path: "/customer-workorders", name: "customer-workorders", @@ -543,50 +622,7 @@ export default new Router({ ) }, - //**********************************GENERAL */ - { - path: "/open/:ayatype/:recordid", - name: "ay-open", - component: () => - import(/* webpackChunkName: "ay-common" */ "./views/ay-open.vue") - }, - { - path: "/about", - name: "ay-about", - // route level code-splitting - // this generates a separate chunk (about.[hash].js) for this route - // which is lazy-loaded when the route is visited. - component: () => - import(/* webpackChunkName: "ay-common" */ "./views/ay-about.vue") - }, - { - path: "/applog", - name: "ay-log", - component: () => - import(/* webpackChunkName: "ay-common" */ "./views/ay-log.vue") - }, - { - path: "/customize/:formCustomTemplateKey", - name: "ay-customize", - component: () => - import(/* webpackChunkName: "ay-common" */ "./views/ay-customize.vue") - }, - { - path: "/data-list-view/:dataListKey/:formKey/:listViewId", - name: "ay-data-list-view", - component: () => - import( - /* webpackChunkName: "ay-common" */ "./views/ay-data-list-view.vue" - ) - }, - - { - path: "/history/:ayatype/:recordid/:userlog?", - name: "ay-history", - component: () => - import(/* webpackChunkName: "ay-common" */ "./views/ay-history.vue") - }, - //SPECIAL ROUTES + //############################## SPECIAL ROUTES ############################### { //REPORT VIEW FROM URL path: "/viewreport",