From 1c590160bb704ed4c41418d00a578f365a8f560f Mon Sep 17 00:00:00 2001 From: Muhsin Keloth Date: Mon, 5 Sep 2022 15:32:14 +0530 Subject: [PATCH] feat: Add locales under portal settings (#5386) * Add locales under portal settings * Fix path issue * chore: Updated category route * chore: Updated category route Co-authored-by: iamsivin --- .../dashboard/helpcenter/helpcenter.routes.js | 9 +- .../helpcenter/pages/portals/EditPortal.vue | 4 +- .../pages/portals/EditPortalLocales.vue | 152 ++++++++++++++++++ 3 files changed, 162 insertions(+), 3 deletions(-) create mode 100644 app/javascript/dashboard/routes/dashboard/helpcenter/pages/portals/EditPortalLocales.vue diff --git a/app/javascript/dashboard/routes/dashboard/helpcenter/helpcenter.routes.js b/app/javascript/dashboard/routes/dashboard/helpcenter/helpcenter.routes.js index fb0dda3312d6..5c75c561b7b8 100644 --- a/app/javascript/dashboard/routes/dashboard/helpcenter/helpcenter.routes.js +++ b/app/javascript/dashboard/routes/dashboard/helpcenter/helpcenter.routes.js @@ -8,6 +8,7 @@ const EditPortal = () => import('./pages/portals/EditPortal'); const EditPortalBasic = () => import('./pages/portals/EditPortalBasic'); const EditPortalCustomization = () => import('./pages/portals/EditPortalCustomization'); +const EditPortalLocales = () => import('./pages/portals/EditPortalLocales.vue'); const ShowPortal = () => import('./pages/portals/ShowPortal'); const PortalDetails = () => import('./pages/portals/PortalDetails'); const PortalCustomization = () => import('./pages/portals/PortalCustomization'); @@ -78,7 +79,13 @@ const portalRoutes = [ roles: ['administrator'], }, { - path: getPortalRoute(':portalSlug/edit/:locale/categories'), + path: 'locales', + name: 'edit_portal_locales', + component: EditPortalLocales, + roles: ['administrator'], + }, + { + path: 'categories', name: 'list_all_locale_categories', roles: ['administrator', 'agent'], component: ListAllCategories, diff --git a/app/javascript/dashboard/routes/dashboard/helpcenter/pages/portals/EditPortal.vue b/app/javascript/dashboard/routes/dashboard/helpcenter/pages/portals/EditPortal.vue index 7c77688cc52b..b9f27f9969f2 100644 --- a/app/javascript/dashboard/routes/dashboard/helpcenter/pages/portals/EditPortal.vue +++ b/app/javascript/dashboard/routes/dashboard/helpcenter/pages/portals/EditPortal.vue @@ -25,7 +25,7 @@ -
+
@@ -69,7 +69,7 @@ export default { name: this.$t('HELP_CENTER.PORTAL.EDIT.TABS.CATEGORY_SETTINGS.TITLE'), }, { - key: 'locales', + key: 'edit_portal_locales', name: this.$t('HELP_CENTER.PORTAL.EDIT.TABS.LOCALE_SETTINGS.TITLE'), }, ]; diff --git a/app/javascript/dashboard/routes/dashboard/helpcenter/pages/portals/EditPortalLocales.vue b/app/javascript/dashboard/routes/dashboard/helpcenter/pages/portals/EditPortalLocales.vue new file mode 100644 index 000000000000..1e0023e6c82e --- /dev/null +++ b/app/javascript/dashboard/routes/dashboard/helpcenter/pages/portals/EditPortalLocales.vue @@ -0,0 +1,152 @@ + + + +