sub account cannot set statement date

This commit is contained in:
MaysWind
2024-12-11 23:53:01 +08:00
parent 8f543d7a84
commit 563e328ce3
9 changed files with 33 additions and 48 deletions
+1
View File
@@ -1062,6 +1062,7 @@
"account category is invalid": "Account category is invalid",
"account balance time is not set": "Account balance time is not set",
"cannot set statement date for non credit card account": "Cannot set statement date for non credit card account",
"cannot set statement date for sub account": "Cannot set statement date for sub-account",
"transaction id is invalid": "Transaction ID is invalid",
"transaction not found": "Transaction is not found",
"transaction type is invalid": "Transaction type is invalid",
+1
View File
@@ -1062,6 +1062,7 @@
"account category is invalid": "Danh mục tài khoản không hợp lệ",
"account balance time is not set": "Thời gian số dư tài khoản chưa được đặt",
"cannot set statement date for non credit card account": "Cannot set statement date for non credit card account",
"cannot set statement date for sub account": "Cannot set statement date for sub-account",
"transaction id is invalid": "ID giao dịch không hợp lệ",
"transaction not found": "Không tìm thấy giao dịch",
"transaction type is invalid": "Loại giao dịch không hợp lệ",
+1
View File
@@ -1062,6 +1062,7 @@
"account category is invalid": "账户分类无效",
"account balance time is not set": "账户余额时间没有设置",
"cannot set statement date for non credit card account": "非信用卡账户不能设置账单日期",
"cannot set statement date for sub account": "子账户不能设置账单日期",
"transaction id is invalid": "交易ID无效",
"transaction not found": "交易不存在",
"transaction type is invalid": "交易类型无效",
-5
View File
@@ -285,7 +285,6 @@ export const useAccountsStore = defineStore('accounts', {
balance: 0,
balanceTime: now,
comment: '',
creditCardStatementDate: parentAccount.creditCardStatementDate,
visible: true
};
},
@@ -762,10 +761,6 @@ export const useAccountsStore = defineStore('accounts', {
comment: subAccount.comment
};
if (account.category === accountConstants.creditCardCategoryType) {
submitAccount.creditCardStatementDate = subAccount.creditCardStatementDate;
}
if (isEdit) {
submitAccount.id = subAccount.id;
submitAccount.hidden = !subAccount.visible;
@@ -108,7 +108,7 @@
:disabled="loading || submitting"
v-model="selectedAccount.color" />
</v-col>
<v-col cols="12" :md="isAccountSupportCreditCardStatementDate() ? 6 : 12" v-if="account.type === allAccountTypes.SingleAccount || currentAccountIndex >= 0">
<v-col cols="12" :md="currentAccountIndex < 0 && isAccountSupportCreditCardStatementDate() ? 6 : 12" v-if="account.type === allAccountTypes.SingleAccount || currentAccountIndex >= 0">
<v-autocomplete
item-title="displayName"
item-value="currencyCode"
@@ -126,7 +126,7 @@
</template>
</v-autocomplete>
</v-col>
<v-col cols="12" :md="account.type === allAccountTypes.SingleAccount || currentAccountIndex >= 0 ? 6 : 12" v-if="isAccountSupportCreditCardStatementDate()">
<v-col cols="12" :md="account.type === allAccountTypes.SingleAccount || currentAccountIndex >= 0 ? 6 : 12" v-if="currentAccountIndex < 0 && isAccountSupportCreditCardStatementDate()">
<v-autocomplete
item-title="displayName"
item-value="day"
@@ -137,7 +137,7 @@
:placeholder="$t('Statement Date')"
:items="allAvailableMonthDays"
:no-data-text="$t('No results')"
v-model="selectedAccount.creditCardStatementDate"
v-model="account.creditCardStatementDate"
></v-autocomplete>
</v-col>
<v-col cols="12" :md="!editAccountId && selectedAccount.balance ? 6 : 12"
-14
View File
@@ -415,20 +415,6 @@
</select>
</f7-list-item>
<f7-list-item
class="list-item-with-header-and-title list-item-no-item-after"
:header="$t('Statement Date')"
:title="getAccountCreditCardStatementDate(subAccount.creditCardStatementDate)"
smart-select :smart-select-params="{ openIn: 'popup', popupPush: true, closeOnSelect: true, scrollToSelectedItem: true, searchbar: true, searchbarPlaceholder: $t('Statement Date'), searchbarDisableText: $t('Cancel'), appendSearchbarNotFound: $t('No results'), pageTitle: $t('Statement Date'), popupCloseLinkText: $t('Done') }"
v-if="isAccountSupportCreditCardStatementDate()"
>
<select v-model="subAccount.creditCardStatementDate">
<option :value="monthDay.day"
:key="monthDay.day"
v-for="monthDay in allAvailableMonthDays">{{ monthDay.displayName }}</option>
</select>
</f7-list-item>
<f7-list-item
link="#" no-chevron
class="list-item-with-header-and-title"