Preserve transaction status when editing instead of resetting to Uncleared
Adds a Status select to the add/edit transaction dialog that defaults to the current value when editing, so cleared transactions stay cleared. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -126,6 +126,7 @@
|
||||
/>
|
||||
<v-text-field v-model="txnForm.memo" label="Memo" />
|
||||
<v-text-field v-model="txnForm.checkNumber" label="Check #" />
|
||||
<v-select v-model="txnForm.status" label="Status" :items="['Uncleared','Cleared','Reconciled']" />
|
||||
|
||||
<v-switch v-model="useSplits" label="Split across categories" color="primary" class="mt-2" />
|
||||
|
||||
@@ -290,7 +291,8 @@ const txnForm = ref({
|
||||
payeeName: '',
|
||||
categoryId: null as string | null,
|
||||
memo: '',
|
||||
checkNumber: ''
|
||||
checkNumber: '',
|
||||
status: 'Uncleared'
|
||||
})
|
||||
|
||||
const transferForm = ref({ fromAccountId: '', toAccountId: '', date: new Date().toISOString().split('T')[0], amount: 0, memo: '' })
|
||||
@@ -383,7 +385,8 @@ function openAddDialog() {
|
||||
payeeName: '',
|
||||
categoryId: null,
|
||||
memo: '',
|
||||
checkNumber: ''
|
||||
checkNumber: '',
|
||||
status: 'Uncleared'
|
||||
}
|
||||
useSplits.value = false
|
||||
splits.value = []
|
||||
@@ -401,7 +404,8 @@ function editTransaction(txn: Transaction) {
|
||||
payeeName: txn.payeeName || '',
|
||||
categoryId: txn.categoryId,
|
||||
memo: txn.memo || '',
|
||||
checkNumber: txn.checkNumber || ''
|
||||
checkNumber: txn.checkNumber || '',
|
||||
status: txn.status || 'Uncleared'
|
||||
}
|
||||
if (txn.splits && txn.splits.length > 1) {
|
||||
useSplits.value = true
|
||||
@@ -426,7 +430,7 @@ async function saveTxn() {
|
||||
const payload: any = {
|
||||
...txnForm.value,
|
||||
amount,
|
||||
status: 'Uncleared',
|
||||
status: txnForm.value.status,
|
||||
splits: null
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user