chore: Helpcenter routing and UI fixes (#5460)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
This commit is contained in:
committed by
GitHub
parent
3b7cae19e6
commit
54d0055e86
@@ -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() {
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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: {
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -40,7 +40,7 @@ export default {
|
||||
articleTitle: '',
|
||||
articleContent: '',
|
||||
showOpenSidebarButton: false,
|
||||
showArticleSettings: false,
|
||||
showArticleSettings: true,
|
||||
article: {},
|
||||
};
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user