This commit is contained in:
@@ -120,7 +120,26 @@ TODO: IMPLEMENT and stub out entire nav layout, don't hae to open actual form, c
|
||||
- NOTIFICATION
|
||||
|
||||
|
||||
|
||||
|
||||
[HOLDER]
|
||||
[HOLDER]
|
||||
ACTION
|
||||
ACTION
|
||||
ACTION
|
||||
ACTION
|
||||
ACTION
|
||||
[HOLDER]
|
||||
ACTION
|
||||
|
||||
So top level can be a holder or an action
|
||||
if holder then we are in second level
|
||||
SECOND LEVEL
|
||||
Can be a holder or an action
|
||||
if Holder then we are in third level
|
||||
Can only be an action
|
||||
action
|
||||
action
|
||||
|
||||
|
||||
- FRIDAY 12/12 thoughts for monday
|
||||
- MRU? Goes where? (Likely in HELP menu to right top or is that getting full? If so then into HOME I guess)
|
||||
|
||||
@@ -5,7 +5,36 @@
|
||||
<!-- <gztest ref="gztest"></gztest> -->
|
||||
<v-navigation-drawer v-if="isAuthenticated" v-model="drawer" app>
|
||||
<v-list dense>
|
||||
<v-list-item
|
||||
<template v-for="item in navItems">
|
||||
<!-- TOP LEVEL can be holders or actions -->
|
||||
<template v-if="!item.route">
|
||||
<!-- TOP LEVEL HOLDER -->
|
||||
<v-list-group
|
||||
:prepend-icon="'fa-' + item.icon"
|
||||
value="true"
|
||||
:key="item.key"
|
||||
>
|
||||
<template v-slot:activator>
|
||||
<v-list-item-title>{{ item.title }}</v-list-item-title>
|
||||
</template>
|
||||
<template v-for="subitem in item.navItems">
|
||||
<template v-if="!subitem.route">
|
||||
<!-- SECOND LEVEL HOLDER CONTAINS ONLY ACTIONS -->
|
||||
{{ subitem.title }}
|
||||
</template>
|
||||
<template v-else>
|
||||
<!-- SECOND LEVEL ACTION -->
|
||||
</template>
|
||||
</template>
|
||||
</v-list-group>
|
||||
</template>
|
||||
|
||||
<template v-else>
|
||||
<!-- TOP LEVEL ACTION -->
|
||||
</template>
|
||||
</template>
|
||||
|
||||
<!-- <v-list-item
|
||||
v-for="item in navItems"
|
||||
:key="item.route"
|
||||
:to="item.route"
|
||||
@@ -16,7 +45,7 @@
|
||||
<v-list-item-content>
|
||||
<v-list-item-title>{{ item.title }}</v-list-item-title>
|
||||
</v-list-item-content>
|
||||
</v-list-item>
|
||||
</v-list-item> -->
|
||||
</v-list>
|
||||
</v-navigation-drawer>
|
||||
<v-app-bar
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
/* Xeslint-disable */
|
||||
|
||||
function addNavItem(title, icon, route, navItems) {
|
||||
function addNavItem(title, icon, route, navItems, key) {
|
||||
window.$gz.store.commit("addNavItem", {
|
||||
title,
|
||||
icon,
|
||||
route,
|
||||
navItems
|
||||
navItems,
|
||||
key: key
|
||||
});
|
||||
}
|
||||
|
||||
@@ -20,6 +21,7 @@ export default function initialize() {
|
||||
.fetch(window.$gz.locale.coreKeys)
|
||||
.then(function putFetchedNavItemsInStore() {
|
||||
//put nav items into store
|
||||
var key = 0;
|
||||
//Everyone has a home
|
||||
|
||||
//create array of sub items under the home menu item
|
||||
@@ -29,20 +31,23 @@ export default function initialize() {
|
||||
sub.push({
|
||||
title: window.$gz.locale.get("DashboardDashboard"),
|
||||
icon: "tachometer-alt",
|
||||
route: "/dashboard"
|
||||
route: "/dashboard",
|
||||
key: key++
|
||||
});
|
||||
//SCHEDULE (personal)
|
||||
sub.push({
|
||||
title: window.$gz.locale.get("Schedule"),
|
||||
icon: "calendar-alt",
|
||||
route: "/schedule/me"
|
||||
route: "/schedule/me",
|
||||
key: key++
|
||||
});
|
||||
|
||||
//MEMOS
|
||||
sub.push({
|
||||
title: window.$gz.locale.get("Schedule"),
|
||||
icon: "inbox",
|
||||
route: "/memo"
|
||||
route: "/memo",
|
||||
key: key++
|
||||
});
|
||||
|
||||
//3rd level items under preferences
|
||||
@@ -52,21 +57,24 @@ export default function initialize() {
|
||||
subSub.push({
|
||||
title: window.$gz.locale.get("Locale"),
|
||||
icon: "language",
|
||||
route: "/locale"
|
||||
route: "/locale",
|
||||
key: key++
|
||||
});
|
||||
|
||||
//SET LOGIN
|
||||
subSub.push({
|
||||
title: window.$gz.locale.get("SetLoginPassword"),
|
||||
icon: "key",
|
||||
route: "/changepw"
|
||||
route: "/changepw",
|
||||
key: key++
|
||||
});
|
||||
|
||||
//NOTIFICATION SUBSCRIPTIONS
|
||||
subSub.push({
|
||||
title: window.$gz.locale.get("NotifySubscriptionList"),
|
||||
icon: "bullhorn",
|
||||
route: "/notifysubscriptions"
|
||||
route: "/notifysubscriptions",
|
||||
key: key++
|
||||
});
|
||||
|
||||
//USER PREFERENCES (personal)
|
||||
@@ -74,10 +82,18 @@ export default function initialize() {
|
||||
title: window.$gz.locale.get("UserPreferences"),
|
||||
icon: "user-cog",
|
||||
route: undefined,
|
||||
navItems: subSub
|
||||
navItems: subSub,
|
||||
key: key++
|
||||
});
|
||||
|
||||
addNavItem(window.$gz.locale.get("Home"), "home", "/", sub);
|
||||
//HOME
|
||||
addNavItem(
|
||||
window.$gz.locale.get("Home"),
|
||||
"home",
|
||||
undefined,
|
||||
sub,
|
||||
key++
|
||||
);
|
||||
|
||||
//NOTE: If a user has read full record or better then they should have access to that area
|
||||
|
||||
@@ -95,7 +111,13 @@ export default function initialize() {
|
||||
window.$gz.role.AUTHORIZATION_ROLES.SubContractorFull
|
||||
)
|
||||
) {
|
||||
addNavItem(window.$gz.locale.get("Service"), "toolbox", "/service");
|
||||
addNavItem(
|
||||
window.$gz.locale.get("Service"),
|
||||
"toolbox",
|
||||
"/service",
|
||||
undefined,
|
||||
key++
|
||||
);
|
||||
}
|
||||
|
||||
if (
|
||||
@@ -109,7 +131,9 @@ export default function initialize() {
|
||||
addNavItem(
|
||||
window.$gz.locale.get("Dispatch"),
|
||||
"shipping-fast",
|
||||
"/dispatch"
|
||||
"/dispatch",
|
||||
undefined,
|
||||
key++
|
||||
);
|
||||
}
|
||||
|
||||
@@ -130,7 +154,9 @@ export default function initialize() {
|
||||
addNavItem(
|
||||
window.$gz.locale.get("Inventory"),
|
||||
"dolly",
|
||||
"/inventory"
|
||||
"/inventory",
|
||||
undefined,
|
||||
key++
|
||||
);
|
||||
}
|
||||
|
||||
@@ -142,7 +168,9 @@ export default function initialize() {
|
||||
addNavItem(
|
||||
window.$gz.locale.get("Accounting"),
|
||||
"file-invoice-dollar",
|
||||
"/accounting"
|
||||
"/accounting",
|
||||
undefined,
|
||||
key++
|
||||
);
|
||||
}
|
||||
|
||||
@@ -157,7 +185,9 @@ export default function initialize() {
|
||||
addNavItem(
|
||||
window.$gz.locale.get("Administration"),
|
||||
"user-tie",
|
||||
"/admin"
|
||||
"/admin",
|
||||
undefined,
|
||||
key++
|
||||
);
|
||||
}
|
||||
|
||||
@@ -169,13 +199,16 @@ export default function initialize() {
|
||||
window.$gz.role.AUTHORIZATION_ROLES.OpsAdminLimited
|
||||
)
|
||||
) {
|
||||
addNavItem(window.$gz.locale.get("Operations"), "cogs", "ops");
|
||||
addNavItem(
|
||||
window.$gz.locale.get("Operations"),
|
||||
"cogs",
|
||||
"ops",
|
||||
undefined,
|
||||
key++
|
||||
);
|
||||
}
|
||||
|
||||
//MOVED TO MENU OUT OF NAV
|
||||
//Everyone can see about and logout
|
||||
// addNavItem(window.$gz.locale.get("HelpAboutAyaNova"), "info-circle", "/about");
|
||||
// addNavItem(window.$gz.locale.get("Logout"), "sign-out-alt", "/login");
|
||||
// console.log(window.$gz.store.state.navItems);
|
||||
})
|
||||
.then(() => {
|
||||
//CACHE LOCALE SETTINGS
|
||||
|
||||
Reference in New Issue
Block a user