mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-16 16:07:33 +08:00
support modifying amount and description when importing transactions
This commit is contained in:
@@ -160,9 +160,29 @@
|
||||
</div>
|
||||
</template>
|
||||
<template #item.sourceAmount="{ item }">
|
||||
<span>{{ getTransactionDisplayAmount(item) }}</span>
|
||||
<v-icon class="icon-with-direction mx-1" size="13" :icon="mdiArrowRight" v-if="item.type === TransactionType.Transfer && item.sourceAccountId !== item.destinationAccountId"></v-icon>
|
||||
<span v-if="item.type === TransactionType.Transfer && item.sourceAccountId !== item.destinationAccountId">{{ getTransactionDisplayDestinationAmount(item) }}</span>
|
||||
<div class="d-flex align-center" v-if="editingTransaction !== item">
|
||||
<span>{{ getTransactionDisplayAmount(item) }}</span>
|
||||
<v-icon class="icon-with-direction mx-1" size="13" :icon="mdiArrowRight" v-if="item.type === TransactionType.Transfer && item.sourceAccountId !== item.destinationAccountId"></v-icon>
|
||||
<span v-if="item.type === TransactionType.Transfer && item.sourceAccountId !== item.destinationAccountId">{{ getTransactionDisplayDestinationAmount(item) }}</span>
|
||||
</div>
|
||||
<div class="d-flex align-center" :style="`width: ${item.type === TransactionType.Transfer && item.sourceAccountId !== item.destinationAccountId ? 250 : 100}px`" v-if="editingTransaction === item">
|
||||
<amount-input density="compact" variant="plain"
|
||||
persistent-placeholder
|
||||
:currency="item.originalSourceAccountCurrency || defaultCurrency"
|
||||
:show-currency="true"
|
||||
:disabled="!!disabled"
|
||||
:placeholder="tt('Amount')"
|
||||
v-model="item.sourceAmount"/>
|
||||
<v-icon class="icon-with-direction mx-1" size="13" :icon="mdiArrowRight" v-if="item.type === TransactionType.Transfer && item.sourceAccountId !== item.destinationAccountId"></v-icon>
|
||||
<amount-input density="compact" variant="plain"
|
||||
persistent-placeholder
|
||||
:currency="item.originalDestinationAccountCurrency || defaultCurrency"
|
||||
:show-currency="true"
|
||||
:disabled="!!disabled"
|
||||
:placeholder="tt('Transfer In Amount')"
|
||||
v-model="item.destinationAmount"
|
||||
v-if="item.type === TransactionType.Transfer && item.sourceAccountId !== item.destinationAccountId"/>
|
||||
</div>
|
||||
</template>
|
||||
<template #item.actualSourceAccountName="{ item }">
|
||||
<div class="d-flex align-center" v-if="editingTransaction !== item">
|
||||
@@ -178,7 +198,7 @@
|
||||
<span>{{ item.originalDestinationAccountName }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="d-flex align-center" style="width: 200px" v-if="editingTransaction === item">
|
||||
<div class="d-flex align-center" :style="`width: ${item.type === TransactionType.Transfer ? 450 : 200}px`" v-if="editingTransaction === item">
|
||||
<two-column-select density="compact" variant="plain"
|
||||
primary-key-field="id" primary-value-field="category"
|
||||
primary-title-field="name" primary-footer-field="displayBalance"
|
||||
@@ -271,6 +291,17 @@
|
||||
</v-autocomplete>
|
||||
</div>
|
||||
</template>
|
||||
<template #item.comment="{ item }">
|
||||
<span v-if="editingTransaction !== item">{{ item.comment || '' }}</span>
|
||||
<div v-if="editingTransaction === item">
|
||||
<v-text-field style="width: 200px" type="text"
|
||||
density="compact" variant="plain"
|
||||
persistent-placeholder
|
||||
:placeholder="tt('Description')"
|
||||
:disabled="!!disabled"
|
||||
v-model="item.comment" />
|
||||
</div>
|
||||
</template>
|
||||
<template #bottom>
|
||||
<div class="title-and-toolbar d-flex align-center text-no-wrap mt-2" v-if="importTransactions">
|
||||
<span :class="{ 'text-error': selectedInvalidTransactionCount > 0 }">
|
||||
@@ -1934,4 +1965,8 @@ defineExpose({
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.import-transaction-table .v-text-field.v-input.v-input--density-compact .v-field__input {
|
||||
padding-top: 0;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user