Rename Transaction to TX to match input row
This commit is contained in:
parent
10ea73663f
commit
5f161b2163
@ -9,17 +9,17 @@ const props = defineProps<{
|
||||
}>()
|
||||
|
||||
const accountStore = useAccountStore();
|
||||
const Transaction = accountStore.Transactions.get(props.transactionid)!;
|
||||
const TX = accountStore.Transactions.get(props.transactionid)!;
|
||||
|
||||
const payload = computed(() => JSON.stringify({
|
||||
date: Transaction.Date.toISOString().split("T")[0],
|
||||
date: TX.Date.toISOString().split("T")[0],
|
||||
payee: {
|
||||
Name: Transaction.Payee,
|
||||
ID: Transaction.PayeeID,
|
||||
Name: TX.Payee,
|
||||
ID: TX.PayeeID,
|
||||
},
|
||||
categoryId: Transaction.CategoryID,
|
||||
memo: Transaction.Memo,
|
||||
amount: Transaction.Amount.toString(),
|
||||
categoryId: TX.CategoryID,
|
||||
memo: TX.Memo,
|
||||
amount: TX.Amount.toString(),
|
||||
state: "Uncleared"
|
||||
}));
|
||||
|
||||
@ -32,22 +32,22 @@ function saveTransaction(e: MouseEvent) {
|
||||
<template>
|
||||
<tr>
|
||||
<td style="width: 90px;" class="text-sm">
|
||||
<DateInput class="border-b-2 border-black" v-model="Transaction.Date" />
|
||||
<DateInput class="border-b-2 border-black" v-model="TX.Date" />
|
||||
</td>
|
||||
<td style="max-width: 150px;">
|
||||
<Autocomplete v-model:text="Transaction.Payee" v-model:id="Transaction.PayeeID" type="payees" />
|
||||
<Autocomplete v-model:text="TX.Payee" v-model:id="TX.PayeeID" type="payees" />
|
||||
</td>
|
||||
<td style="max-width: 200px;">
|
||||
<Autocomplete v-model:text="Transaction.Category" v-model:id="Transaction.CategoryID" type="categories" />
|
||||
<Autocomplete v-model:text="TX.Category" v-model:id="TX.CategoryID" type="categories" />
|
||||
</td>
|
||||
<td>
|
||||
<input class="block w-full border-b-2 border-black" type="text" v-model="Transaction.Memo" />
|
||||
<input class="block w-full border-b-2 border-black" type="text" v-model="TX.Memo" />
|
||||
</td>
|
||||
<td style="width: 80px;" class="text-right">
|
||||
<input
|
||||
class="text-right block w-full border-b-2 border-black"
|
||||
type="currency"
|
||||
v-model="Transaction.Amount"
|
||||
v-model="TX.Amount"
|
||||
/>
|
||||
</td>
|
||||
<td style="width: 20px;">
|
||||
|
Loading…
x
Reference in New Issue
Block a user