mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-16 07:57:33 +08:00
code refactor
This commit is contained in:
@@ -143,7 +143,7 @@ export default {
|
||||
return getDay(this.currentTime);
|
||||
},
|
||||
currentDayOfWeek() {
|
||||
return this.$t(`datetime.${getDayOfWeekName(this.currentTime)}.short`);
|
||||
return this.$locale.getWeekdayShortName(getDayOfWeekName(this.currentTime));
|
||||
},
|
||||
currentShortTime() {
|
||||
return this.$locale.formatUnixTimeToShortTime(this.userStore, this.currentTime);
|
||||
|
||||
@@ -159,7 +159,7 @@
|
||||
{{ transaction.day }}
|
||||
</span>
|
||||
<span class="transaction-day-of-week full-line flex-direction-column">
|
||||
{{ $t(`datetime.${transaction.dayOfWeek}.short`) }}
|
||||
{{ getWeekdayShortName(transaction) }}
|
||||
</span>
|
||||
</div>
|
||||
</template>
|
||||
@@ -857,6 +857,9 @@ export default {
|
||||
enableThousandsSeparator: this.settingsStore.appSettings.thousandsSeparator
|
||||
});
|
||||
},
|
||||
getWeekdayShortName(transaction) {
|
||||
return this.$locale.getWeekdayShortName(transaction.dayOfWeek);
|
||||
},
|
||||
getTransactionTypeName(type, defaultName) {
|
||||
switch (type){
|
||||
case this.allTransactionTypes.ModifyBalance:
|
||||
|
||||
Reference in New Issue
Block a user