From 4cd82e02149ecdddad0c2a3491382aefac0c8cb5 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Thu, 31 Mar 2022 22:35:14 +0000 Subject: [PATCH] customer docs --- ayanova/src/App.vue | 6 +++--- ayanova/src/api/gzapi.js | 10 ++++++++++ ayanova/src/api/gzmenu.js | 11 ++++++++++- ayanova/src/views/customer-csr.vue | 2 +- 4 files changed, 24 insertions(+), 5 deletions(-) diff --git a/ayanova/src/App.vue b/ayanova/src/App.vue index ce2aebf3..811f9ea4 100644 --- a/ayanova/src/App.vue +++ b/ayanova/src/App.vue @@ -272,9 +272,9 @@ export default { navItems() { return this.$store.state.navItems; }, - helpUrl() { - return window.$gz.api.helpUrl(); - }, + // helpUrl() { + // return window.$gz.api.helpUrl(); + // }, titleDisplay() { if (this.appBar.title == null || this.appBar.title == "") { return null; diff --git a/ayanova/src/api/gzapi.js b/ayanova/src/api/gzapi.js index ef3d6b37..2a995e9b 100644 --- a/ayanova/src/api/gzapi.js +++ b/ayanova/src/api/gzapi.js @@ -295,6 +295,16 @@ export default { } return window.location.protocol + "//" + window.location.host + "/docs/"; }, + helpUrlCustomer() { + if ( + window.$gz.dev && + window.location.hostname == "localhost" && + window.location.port == "8080" + ) { + return "http://localhost:7575/cust/"; + } + return window.location.protocol + "//" + window.location.host + "/cust/"; + }, ///////////////////////////// // Just the server itself // used by profiler etc diff --git a/ayanova/src/api/gzmenu.js b/ayanova/src/api/gzmenu.js index 2abb5563..986e61d1 100644 --- a/ayanova/src/api/gzmenu.js +++ b/ayanova/src/api/gzmenu.js @@ -314,8 +314,17 @@ export default { if (!item.disabled && item.owner == "app") { switch (item.key) { case "help": - window.open(window.$gz.api.helpUrl() + item.data, "_blank"); + if (item.data.includes("~customer~")) { + window.open( + window.$gz.api.helpUrlCustomer() + + item.data.replace("~customer~", ""), + "_blank" + ); + } else { + window.open(window.$gz.api.helpUrl() + item.data, "_blank"); + } break; + case "search": vm.$router.push({ name: "home-search", diff --git a/ayanova/src/views/customer-csr.vue b/ayanova/src/views/customer-csr.vue index f5f5f39c..b5a40c3a 100644 --- a/ayanova/src/views/customer-csr.vue +++ b/ayanova/src/views/customer-csr.vue @@ -74,7 +74,7 @@ function generateMenu(vm) { isMain: true, icon: "$ayiConciergeBell", title: "CustomerServiceRequestList", - helpUrl: "customer-csr", + helpUrl: "~customer~customer-csr", hideSearch: true, menuItems: [], formData: {