fix: Update survey locale based on the account (#4207)

This commit is contained in:
Pranav Raj S
2022-03-20 13:07:36 +05:30
committed by GitHub
parent 8372ae418e
commit 6097f4c122
8 changed files with 99 additions and 8 deletions

View File

@@ -144,6 +144,7 @@ export default {
this.surveyDetails = result?.data?.csat_survey_response;
this.selectedRating = this.surveyDetails?.rating;
this.feedbackMessage = this.surveyDetails?.feedback_message || '';
this.setLocale(result.data.locale);
} catch (error) {
const errorMessage = error?.response?.data?.message;
this.errorMessage = errorMessage || this.$t('SURVEY.API.ERROR_MESSAGE');
@@ -179,6 +180,9 @@ export default {
this.isUpdating = false;
}
},
setLocale(locale) {
this.$root.$i18n.locale = locale || 'en';
},
},
};
</script>