diff --git a/ayanova/src/api/gzmenu.js b/ayanova/src/api/gzmenu.js index bc19a850..2dde94a2 100644 --- a/ayanova/src/api/gzmenu.js +++ b/ayanova/src/api/gzmenu.js @@ -14,12 +14,18 @@ export default { if (ctx.icon && !ctx.icon.startsWith("fa-")) { ctx.icon = "fa-" + ctx.icon; } - vm.appBar.icon = ctx.icon; - vm.appBar.title = ctx.title; + + //Parse the forms object type if present + var formAyaType = 0; + if (ctx.formData && ctx.formData.ayaType != undefined) { + formAyaType = ctx.formData.ayaType; + } + //set the help url if presented or default to the User section intro vm.appBar.helpUrl = ctx.helpUrl ? ctx.helpUrl : "user-intro"; + vm.appBar.menuItems = []; //CONTEXT TOP PORTION @@ -42,19 +48,24 @@ export default { //LOGOUT vm.appBar.menuItems.push({ title: window.$gz.locale.get("Logout"), - icon: "sign-out-alt", - key: "app:logout" }); //divider vm.appBar.menuItems.push({ divider: true, inset: false }); + //SEARCH + vm.appBar.menuItems.push({ + title: window.$gz.locale.get("Search"), + icon: "search", + key: "app:search", + data: formAyaType + }); + //HELP vm.appBar.menuItems.push({ title: window.$gz.locale.get("MenuHelp"), - icon: "question-circle", key: "app:help", data: vm.appBar.helpUrl @@ -149,6 +160,12 @@ export default { var helpurl = vm.$store.state.helpUrl + item.data; window.open(helpurl, "_blank"); break; + case "search": + vm.$router.push({ + name: "home-search", + params: { ayatype: item.data } + }); + break; case "logout": vm.$router.push("/login"); break; diff --git a/ayanova/src/router.js b/ayanova/src/router.js index aee4a4ec..9b0a237d 100644 --- a/ayanova/src/router.js +++ b/ayanova/src/router.js @@ -77,7 +77,7 @@ export default new Router({ import(/* webpackChunkName: "home" */ "./views/home-dashboard.vue") }, { - path: "/home-search", + path: "/home-search/:ayatype", name: "home-search", component: () => import(/* webpackChunkName: "home" */ "./views/home-search.vue")