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