Add fix for portal update issue (#5381)
This commit is contained in:
@@ -109,10 +109,6 @@ export default {
|
|||||||
page_title: this.pageTitle,
|
page_title: this.pageTitle,
|
||||||
header_text: this.headerText,
|
header_text: this.headerText,
|
||||||
homepage_link: this.homePageLink,
|
homepage_link: this.homePageLink,
|
||||||
config: {
|
|
||||||
// TODO: add support for choosing locale
|
|
||||||
allowed_locales: ['en'],
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
this.$emit('submit', portal);
|
this.$emit('submit', portal);
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ export default {
|
|||||||
try {
|
try {
|
||||||
const portalSlug = this.lastPortalSlug;
|
const portalSlug = this.lastPortalSlug;
|
||||||
await this.$store.dispatch('portals/update', {
|
await this.$store.dispatch('portals/update', {
|
||||||
portalObj,
|
...portalObj,
|
||||||
portalSlug,
|
portalSlug,
|
||||||
});
|
});
|
||||||
this.alertMessage = this.$t(
|
this.alertMessage = this.$t(
|
||||||
|
|||||||
@@ -36,11 +36,11 @@ export default {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async updatePortalSettings(portal) {
|
async updatePortalSettings(portalObj) {
|
||||||
const portalSlug = this.$route.params.portalSlug;
|
const portalSlug = this.$route.params.portalSlug;
|
||||||
try {
|
try {
|
||||||
await this.$store.dispatch('portals/update', {
|
await this.$store.dispatch('portals/update', {
|
||||||
portalObj: portal,
|
...portalObj,
|
||||||
portalSlug,
|
portalSlug,
|
||||||
});
|
});
|
||||||
this.alertMessage = this.$t(
|
this.alertMessage = this.$t(
|
||||||
|
|||||||
@@ -50,13 +50,13 @@ export default {
|
|||||||
fetchPortals() {
|
fetchPortals() {
|
||||||
this.$store.dispatch('portals/index');
|
this.$store.dispatch('portals/index');
|
||||||
},
|
},
|
||||||
async updatePortalSettings(portal) {
|
async updatePortalSettings(portalObj) {
|
||||||
const portalSlug = this.$route.params.portalSlug;
|
const portalSlug = this.$route.params.portalSlug;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await this.$store.dispatch('portals/update', {
|
await this.$store.dispatch('portals/update', {
|
||||||
portalSlug,
|
portalSlug,
|
||||||
portalObj: portal,
|
...portalObj,
|
||||||
});
|
});
|
||||||
this.alertMessage = this.$t(
|
this.alertMessage = this.$t(
|
||||||
'HELP_CENTER.PORTAL.ADD.API.SUCCESS_MESSAGE_FOR_UPDATE'
|
'HELP_CENTER.PORTAL.ADD.API.SUCCESS_MESSAGE_FOR_UPDATE'
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ export const actions = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
update: async ({ commit }, { portalSlug, portalObj }) => {
|
update: async ({ commit }, { portalSlug, ...portalObj }) => {
|
||||||
commit(types.SET_HELP_PORTAL_UI_FLAG, {
|
commit(types.SET_HELP_PORTAL_UI_FLAG, {
|
||||||
uiFlags: { isUpdating: true },
|
uiFlags: { isUpdating: true },
|
||||||
portalSlug,
|
portalSlug,
|
||||||
@@ -44,7 +44,7 @@ export const actions = {
|
|||||||
try {
|
try {
|
||||||
const { data } = await portalAPIs.updatePortal({
|
const { data } = await portalAPIs.updatePortal({
|
||||||
portalSlug,
|
portalSlug,
|
||||||
params: portalObj,
|
portalObj,
|
||||||
});
|
});
|
||||||
commit(types.UPDATE_PORTAL_ENTRY, data);
|
commit(types.UPDATE_PORTAL_ENTRY, data);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|||||||
Reference in New Issue
Block a user