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.memo" label="Memo" />
|
||||||
<v-text-field v-model="txnForm.checkNumber" label="Check #" />
|
<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" />
|
<v-switch v-model="useSplits" label="Split across categories" color="primary" class="mt-2" />
|
||||||
|
|
||||||
@@ -290,7 +291,8 @@ const txnForm = ref({
|
|||||||
payeeName: '',
|
payeeName: '',
|
||||||
categoryId: null as string | null,
|
categoryId: null as string | null,
|
||||||
memo: '',
|
memo: '',
|
||||||
checkNumber: ''
|
checkNumber: '',
|
||||||
|
status: 'Uncleared'
|
||||||
})
|
})
|
||||||
|
|
||||||
const transferForm = ref({ fromAccountId: '', toAccountId: '', date: new Date().toISOString().split('T')[0], amount: 0, memo: '' })
|
const transferForm = ref({ fromAccountId: '', toAccountId: '', date: new Date().toISOString().split('T')[0], amount: 0, memo: '' })
|
||||||
@@ -383,7 +385,8 @@ function openAddDialog() {
|
|||||||
payeeName: '',
|
payeeName: '',
|
||||||
categoryId: null,
|
categoryId: null,
|
||||||
memo: '',
|
memo: '',
|
||||||
checkNumber: ''
|
checkNumber: '',
|
||||||
|
status: 'Uncleared'
|
||||||
}
|
}
|
||||||
useSplits.value = false
|
useSplits.value = false
|
||||||
splits.value = []
|
splits.value = []
|
||||||
@@ -401,7 +404,8 @@ function editTransaction(txn: Transaction) {
|
|||||||
payeeName: txn.payeeName || '',
|
payeeName: txn.payeeName || '',
|
||||||
categoryId: txn.categoryId,
|
categoryId: txn.categoryId,
|
||||||
memo: txn.memo || '',
|
memo: txn.memo || '',
|
||||||
checkNumber: txn.checkNumber || ''
|
checkNumber: txn.checkNumber || '',
|
||||||
|
status: txn.status || 'Uncleared'
|
||||||
}
|
}
|
||||||
if (txn.splits && txn.splits.length > 1) {
|
if (txn.splits && txn.splits.length > 1) {
|
||||||
useSplits.value = true
|
useSplits.value = true
|
||||||
@@ -426,7 +430,7 @@ async function saveTxn() {
|
|||||||
const payload: any = {
|
const payload: any = {
|
||||||
...txnForm.value,
|
...txnForm.value,
|
||||||
amount,
|
amount,
|
||||||
status: 'Uncleared',
|
status: txnForm.value.status,
|
||||||
splits: null
|
splits: null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user