mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-19 01:04:25 +08:00
fix first day of week does not change when locale changed in sign up page
This commit is contained in:
@@ -228,12 +228,17 @@ export default {
|
|||||||
},
|
},
|
||||||
set: function (value) {
|
set: function (value) {
|
||||||
const isCurrencyDefault = this.user.defaultCurrency === this.$t('default.currency');
|
const isCurrencyDefault = this.user.defaultCurrency === this.$t('default.currency');
|
||||||
|
const isFirstWeekDayDefault = this.user.firstDayOfWeek === (this.$constants.datetime.allWeekDays[this.$t('default.firstDayOfWeek')] ? this.$constants.datetime.allWeekDays[this.$t('default.firstDayOfWeek')].type : 0);
|
||||||
|
|
||||||
this.$locale.setLanguage(value);
|
this.$locale.setLanguage(value);
|
||||||
|
|
||||||
if (isCurrencyDefault) {
|
if (isCurrencyDefault) {
|
||||||
this.user.defaultCurrency = this.$t('default.currency');
|
this.user.defaultCurrency = this.$t('default.currency');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isFirstWeekDayDefault) {
|
||||||
|
this.user.firstDayOfWeek = this.$constants.datetime.allWeekDays[this.$t('default.firstDayOfWeek')] ? this.$constants.datetime.allWeekDays[this.$t('default.firstDayOfWeek')].type : 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
inputIsEmpty() {
|
inputIsEmpty() {
|
||||||
|
|||||||
Reference in New Issue
Block a user