diff --git a/ayanova/devdocs/todo.txt b/ayanova/devdocs/todo.txt index 95dc904b..a992eb01 100644 --- a/ayanova/devdocs/todo.txt +++ b/ayanova/devdocs/todo.txt @@ -155,7 +155,7 @@ TODO: IMPLEMENT and stub out entire nav layout, don't hae to open actual form, c - Not going with the fancy modular recomposable UI and I know v7 style will work - See the todo somewhere down below regarding the shell in case anything I forgot - +TODO: Enforce role rights for menu items once it's stubbed out TODO: Two kinds of mass fetch records in RAVEN diff --git a/ayanova/src/api/initialize.js b/ayanova/src/api/initialize.js index 82c38944..fa2fadd5 100644 --- a/ayanova/src/api/initialize.js +++ b/ayanova/src/api/initialize.js @@ -22,10 +22,13 @@ export default function initialize() { .then(function putFetchedNavItemsInStore() { //put nav items into store var key = 0; + var sub = []; + var subSub = []; + //****************** CUSTOMERS + //Everyone has a home //create array of sub items under the home menu item - var sub = []; //DASHBOARD sub.push({ @@ -51,7 +54,6 @@ export default function initialize() { }); //3rd level items under preferences - var subSub = []; //LOCALE subSub.push({ @@ -95,6 +97,36 @@ export default function initialize() { key++ ); + //****************** CUSTOMERS + //clear sublevel arrays + subsub = []; + sub = []; + + //CUSTOMERS subitem + sub.push({ + title: window.$gz.locale.get("ClientList"), + icon: "address-card", + route: "/customers", + key: key++ + }); + + //HEAD OFFICES subitem + sub.push({ + title: window.$gz.locale.get("HeadOfficeList"), + icon: "site-map", + route: "/headoffices", + key: key++ + }); + + //CUSTOMER (TOP) + addNavItem( + window.$gz.locale.get("ClientList"), + "address-book", + undefined, + sub, + key++ + ); + //NOTE: If a user has read full record or better then they should have access to that area // if ( diff --git a/ayanova/src/api/locale.js b/ayanova/src/api/locale.js index 025053ef..c779a794 100644 --- a/ayanova/src/api/locale.js +++ b/ayanova/src/api/locale.js @@ -56,6 +56,8 @@ export default { "NotifySubscriptionList", "UserPreferences", "Service", + "ClientList", + "HeadOfficeList", //"Dispatch", "Inventory", "Accounting",