mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-19 01:04:25 +08:00
move all transactions from one account to another account (#288)
This commit is contained in:
@@ -163,6 +163,7 @@
|
||||
<f7-actions-button @click="showReconciliationStatement(accountForMoreActionSheet)">{{ tt('Reconciliation Statement') }}</f7-actions-button>
|
||||
</f7-actions-group>
|
||||
<f7-actions-group v-if="accountForMoreActionSheet && accountForMoreActionSheet.type === AccountType.SingleAccount.type">
|
||||
<f7-actions-button @click="moveAllTransactions(accountForMoreActionSheet)">{{ tt('Move All Transactions') }}</f7-actions-button>
|
||||
<f7-actions-button color="red" @click="showPasswordSheetForClearAllTransaction(accountForMoreActionSheet)">{{ tt('Clear All Transactions') }}</f7-actions-button>
|
||||
</f7-actions-group>
|
||||
<template v-if="accountForMoreActionSheet && accountForMoreActionSheet.type === AccountType.MultiSubAccounts.type">
|
||||
@@ -171,6 +172,7 @@
|
||||
v-show="showHidden || !subAccount.hidden">
|
||||
<f7-actions-label>{{ subAccount.name }}</f7-actions-label>
|
||||
<f7-actions-button @click="showReconciliationStatement(subAccount)">{{ tt('Reconciliation Statement') }}</f7-actions-button>
|
||||
<f7-actions-button @click="moveAllTransactions(subAccount)">{{ tt('Move All Transactions') }}</f7-actions-button>
|
||||
<f7-actions-button color="red" @click="showPasswordSheetForClearAllTransaction(subAccount)">{{ tt('Clear All Transactions') }}</f7-actions-button>
|
||||
</f7-actions-group>
|
||||
</template>
|
||||
@@ -363,6 +365,17 @@ function showReconciliationStatement(account: Account | null): void {
|
||||
accountForMoreActionSheet.value = null;
|
||||
}
|
||||
|
||||
function moveAllTransactions(account: Account | null): void {
|
||||
if (!account) {
|
||||
showAlert('An error occurred');
|
||||
return;
|
||||
}
|
||||
|
||||
props.f7router.navigate('/account/move_all_transactions?fromAccountId=' + account.id);
|
||||
showAccountMoreActionSheet.value = false;
|
||||
accountForMoreActionSheet.value = null;
|
||||
}
|
||||
|
||||
function showPasswordSheetForClearAllTransaction(account: Account | null): void {
|
||||
if (!account) {
|
||||
showAlert('An error occurred');
|
||||
|
||||
Reference in New Issue
Block a user