mirror of
				https://github.com/lingble/chatwoot.git
				synced 2025-10-31 19:17:48 +00:00 
			
		
		
		
	fix: locales settings on portal (#9583)
The previous changes made on Portal locales introduced a bug where users were not able to set the default locale, this PR fixes that
This commit is contained in:
		| @@ -35,7 +35,7 @@ const locales = computed(() => { | |||||||
| }); | }); | ||||||
| const allowedLocales = computed(() => { | const allowedLocales = computed(() => { | ||||||
|   return Object.keys(locales.value).map(key => { |   return Object.keys(locales.value).map(key => { | ||||||
|     return this.locales.value[key].code; |     return locales.value[key].code; | ||||||
|   }); |   }); | ||||||
| }); | }); | ||||||
|  |  | ||||||
| @@ -72,7 +72,7 @@ async function updatePortalLocales({ | |||||||
|  |  | ||||||
| function changeDefaultLocale({ localeCode }) { | function changeDefaultLocale({ localeCode }) { | ||||||
|   updatePortalLocales({ |   updatePortalLocales({ | ||||||
|     allowedLocales: allowedLocales.value, |     newAllowedLocales: allowedLocales.value, | ||||||
|     defaultLocale: localeCode, |     defaultLocale: localeCode, | ||||||
|     messageKey: 'CHANGE_DEFAULT_LOCALE', |     messageKey: 'CHANGE_DEFAULT_LOCALE', | ||||||
|   }); |   }); | ||||||
| @@ -90,7 +90,7 @@ function deletePortalLocale({ localeCode }) { | |||||||
|   const defaultLocale = currentPortal.value?.meta.default_locale; |   const defaultLocale = currentPortal.value?.meta.default_locale; | ||||||
|  |  | ||||||
|   updatePortalLocales({ |   updatePortalLocales({ | ||||||
|     allowedLocales: updatedLocales, |     newAllowedLocales: updatedLocales, | ||||||
|     defaultLocale, |     defaultLocale, | ||||||
|     messageKey: 'DELETE_LOCALE', |     messageKey: 'DELETE_LOCALE', | ||||||
|   }); |   }); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Shivam Mishra
					Shivam Mishra