feat: Adds pages to edit portals (#5373)

* feat: Adds pages to edit portals

* Update app/javascript/dashboard/i18n/locale/en/helpCenter.json

* Update app/javascript/dashboard/routes/dashboard/helpcenter/helpcenter.routes.js

Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>

* Review fixes

* Adds translations

* Fixes broken tests

* Update app/javascript/dashboard/routes/dashboard/helpcenter/components/PortalPopover.vue

* Update app/javascript/dashboard/routes/dashboard/helpcenter/components/PortalPopover.vue

Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
This commit is contained in:
Nithin David Thomas
2022-09-02 10:22:15 +05:30
committed by GitHub
parent 504d339dd7
commit a1663e4e49
14 changed files with 719 additions and 308 deletions

View File

@@ -1,4 +1,4 @@
import PortalAPI from 'dashboard/api/helpCenter/portals.js';
import PortalAPI from 'dashboard/api/helpCenter/portals';
import { throwErrorMessage } from 'dashboard/store/utils/api';
import { types } from './mutations';
const portalAPIs = new PortalAPI();
@@ -36,7 +36,7 @@ export const actions = {
}
},
update: async ({ commit }, { portalSlug, ...portalObj }) => {
update: async ({ commit }, { portalSlug, portalObj }) => {
commit(types.SET_HELP_PORTAL_UI_FLAG, {
uiFlags: { isUpdating: true },
portalSlug,
@@ -44,7 +44,7 @@ export const actions = {
try {
const { data } = await portalAPIs.updatePortal({
portalSlug,
portalObj,
params: portalObj,
});
commit(types.UPDATE_PORTAL_ENTRY, data);
} catch (error) {