mirror of
				https://github.com/lingble/chatwoot.git
				synced 2025-10-30 18:47:51 +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(() => { | ||||
|   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 }) { | ||||
|   updatePortalLocales({ | ||||
|     allowedLocales: allowedLocales.value, | ||||
|     newAllowedLocales: allowedLocales.value, | ||||
|     defaultLocale: localeCode, | ||||
|     messageKey: 'CHANGE_DEFAULT_LOCALE', | ||||
|   }); | ||||
| @@ -90,7 +90,7 @@ function deletePortalLocale({ localeCode }) { | ||||
|   const defaultLocale = currentPortal.value?.meta.default_locale; | ||||
|  | ||||
|   updatePortalLocales({ | ||||
|     allowedLocales: updatedLocales, | ||||
|     newAllowedLocales: updatedLocales, | ||||
|     defaultLocale, | ||||
|     messageKey: 'DELETE_LOCALE', | ||||
|   }); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Shivam Mishra
					Shivam Mishra