diff --git a/app/javascript/dashboard/components/layout/Sidebar.vue b/app/javascript/dashboard/components/layout/Sidebar.vue index 372562cd3..314b594d2 100644 --- a/app/javascript/dashboard/components/layout/Sidebar.vue +++ b/app/javascript/dashboard/components/layout/Sidebar.vue @@ -110,13 +110,19 @@ export default { primaryMenuItems() { const menuItems = this.sideMenuConfig.primaryMenu; return menuItems.filter(menuItem => { + const isAvailableForTheUser = menuItem.roles.includes(this.currentRole); + + if (!isAvailableForTheUser) { + return false; + } + if (menuItem.featureFlag) { return this.isFeatureEnabledonAccount( this.accountId, menuItem.featureFlag ); } - return menuItem.roles.includes(this.currentRole); + return true; }); }, activeSecondaryMenu() { diff --git a/app/javascript/dashboard/routes/dashboard/helpcenter/components/HelpCenterLayout.vue b/app/javascript/dashboard/routes/dashboard/helpcenter/components/HelpCenterLayout.vue index 162e9343e..528b55575 100644 --- a/app/javascript/dashboard/routes/dashboard/helpcenter/components/HelpCenterLayout.vue +++ b/app/javascript/dashboard/routes/dashboard/helpcenter/components/HelpCenterLayout.vue @@ -10,6 +10,8 @@ v-if="portals.length" :class="sidebarClassName" :header-title="headerTitle" + :portal-slug="selectedPortalSlug" + :locale-slug="selectedLocaleInPortal" :sub-title="localeName(selectedLocaleInPortal)" :accessible-menu-items="accessibleMenuItems" :additional-secondary-menu-items="additionalSecondaryMenuItems" diff --git a/app/javascript/dashboard/routes/dashboard/helpcenter/components/Sidebar/Sidebar.vue b/app/javascript/dashboard/routes/dashboard/helpcenter/components/Sidebar/Sidebar.vue index d2e14b6a8..355ffc0a1 100644 --- a/app/javascript/dashboard/routes/dashboard/helpcenter/components/Sidebar/Sidebar.vue +++ b/app/javascript/dashboard/routes/dashboard/helpcenter/components/Sidebar/Sidebar.vue @@ -48,6 +48,14 @@ export default { type: String, default: '', }, + portalSlug: { + type: String, + default: '', + }, + localeSlug: { + type: String, + default: '', + }, accessibleMenuItems: { type: Array, default: () => [], @@ -68,8 +76,7 @@ export default { ); }, portalLink() { - const slug = this.$route.params.portalSlug; - return `/hc/${slug}`; + return `/hc/${this.portalSlug}/${this.localeSlug}`; }, }, methods: { diff --git a/app/javascript/dashboard/routes/dashboard/helpcenter/pages/articles/EditArticle.vue b/app/javascript/dashboard/routes/dashboard/helpcenter/pages/articles/EditArticle.vue index 656c8fecf..700574b2e 100644 --- a/app/javascript/dashboard/routes/dashboard/helpcenter/pages/articles/EditArticle.vue +++ b/app/javascript/dashboard/routes/dashboard/helpcenter/pages/articles/EditArticle.vue @@ -65,7 +65,7 @@ export default { return { isUpdating: false, isSaved: false, - showArticleSettings: false, + showArticleSettings: true, alertMessage: '', showDeleteConfirmationPopup: false, }; @@ -86,7 +86,7 @@ export default { }, portalLink() { const slug = this.$route.params.portalSlug; - return `/hc/${slug}`; + return `/hc/${slug}/${this.article.category.slug}/${this.article.id}`; }, }, mounted() { diff --git a/app/javascript/dashboard/routes/dashboard/helpcenter/pages/articles/NewArticle.vue b/app/javascript/dashboard/routes/dashboard/helpcenter/pages/articles/NewArticle.vue index 6d74088b3..7e0fafff0 100644 --- a/app/javascript/dashboard/routes/dashboard/helpcenter/pages/articles/NewArticle.vue +++ b/app/javascript/dashboard/routes/dashboard/helpcenter/pages/articles/NewArticle.vue @@ -40,7 +40,7 @@ export default { articleTitle: '', articleContent: '', showOpenSidebarButton: false, - showArticleSettings: false, + showArticleSettings: true, article: {}, }; },