ESLINT 3
This commit is contained in:
parent
c30b33a070
commit
91ac05b575
@ -8,8 +8,8 @@ import Input from "./Input.vue";
|
|||||||
import Button from "./SimpleButton.vue";
|
import Button from "./SimpleButton.vue";
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
transactionid: string
|
transactionid: string,
|
||||||
withAccount: bool
|
withAccount: boolean,
|
||||||
}>()
|
}>()
|
||||||
|
|
||||||
const emit = defineEmits(["save"]);
|
const emit = defineEmits(["save"]);
|
||||||
@ -19,74 +19,47 @@ const TX = transactionsStore.Transactions.get(props.transactionid)!;
|
|||||||
const payeeType = ref<string|undefined>(undefined);
|
const payeeType = ref<string|undefined>(undefined);
|
||||||
|
|
||||||
const payload = computed(() => JSON.stringify({
|
const payload = computed(() => JSON.stringify({
|
||||||
date: TX.Date.toISOString().split("T")[0],
|
date: TX.Date.toISOString().split("T")[0],
|
||||||
payee: {
|
payee: {
|
||||||
Name: TX.Payee,
|
Name: TX.Payee,
|
||||||
ID: TX.PayeeID,
|
ID: TX.PayeeID,
|
||||||
Type: payeeType.value,
|
Type: payeeType.value,
|
||||||
},
|
},
|
||||||
categoryId: TX.CategoryID,
|
categoryId: TX.CategoryID,
|
||||||
memo: TX.Memo,
|
memo: TX.Memo,
|
||||||
amount: TX.Amount.toString(),
|
amount: TX.Amount.toString(),
|
||||||
state: "Uncleared"
|
state: "Uncleared"
|
||||||
}));
|
}));
|
||||||
|
|
||||||
function saveTransaction(e: MouseEvent) {
|
function saveTransaction(e: MouseEvent) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
transactionsStore.editTransaction(TX.ID, payload.value);
|
transactionsStore.editTransaction(TX.ID, payload.value);
|
||||||
emit('save');
|
emit('save');
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="text-sm">
|
<td class="text-sm">
|
||||||
<DateInput
|
<DateInput v-model="TX.Date" class="border-b-2 border-black" />
|
||||||
v-model="TX.Date"
|
|
||||||
class="border-b-2 border-black"
|
|
||||||
/>
|
|
||||||
</td>
|
</td>
|
||||||
<td v-if="withAccount">
|
<td v-if="withAccount">
|
||||||
<Autocomplete
|
<Autocomplete v-model:text="TX.Account" v-model:id="TX.AccountID" model="accounts" />
|
||||||
v-model:text="TX.Account"
|
|
||||||
v-model:id="TX.AccountID"
|
|
||||||
model="accounts"
|
|
||||||
/>
|
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<Autocomplete
|
<Autocomplete v-model:text="TX.Payee" v-model:id="TX.PayeeID" v-model:type="payeeType" model="payees" />
|
||||||
v-model:text="TX.Payee"
|
|
||||||
v-model:id="TX.PayeeID"
|
|
||||||
v-model:type="payeeType"
|
|
||||||
model="payees"
|
|
||||||
/>
|
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<Autocomplete
|
<Autocomplete v-model:text="TX.Category" v-model:id="TX.CategoryID" model="categories" />
|
||||||
v-model:text="TX.Category"
|
|
||||||
v-model:id="TX.CategoryID"
|
|
||||||
model="categories"
|
|
||||||
/>
|
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<Input
|
<Input v-model="TX.Memo" class="block w-full border-b-2 border-black" type="text" />
|
||||||
v-model="TX.Memo"
|
|
||||||
class="block w-full border-b-2 border-black"
|
|
||||||
type="text"
|
|
||||||
/>
|
|
||||||
</td>
|
</td>
|
||||||
<td class="text-right">
|
<td class="text-right">
|
||||||
<Input
|
<Input v-model="TX.Amount" class="text-right block w-full border-b-2 border-black" type="currency" />
|
||||||
v-model="TX.Amount"
|
|
||||||
class="text-right block w-full border-b-2 border-black"
|
|
||||||
type="currency"
|
|
||||||
/>
|
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<Button
|
<Button class="bg-blue-500" @click="saveTransaction">
|
||||||
class="bg-blue-500"
|
|
||||||
@click="saveTransaction"
|
|
||||||
>
|
|
||||||
Save
|
Save
|
||||||
</Button>
|
</Button>
|
||||||
</td>
|
</td>
|
||||||
|
@ -24,7 +24,9 @@ const TX = ref<Transaction>({
|
|||||||
ID: "",
|
ID: "",
|
||||||
Status: "Uncleared",
|
Status: "Uncleared",
|
||||||
TransferAccount: "",
|
TransferAccount: "",
|
||||||
Reconciled: false
|
Reconciled: false,
|
||||||
|
Account: "",
|
||||||
|
AccountID: "",
|
||||||
});
|
});
|
||||||
|
|
||||||
const payeeType = ref<string|undefined>(undefined);
|
const payeeType = ref<string|undefined>(undefined);
|
||||||
|
@ -11,7 +11,7 @@ import Checkbox from "./Checkbox.vue";
|
|||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
transactionid: string,
|
transactionid: string,
|
||||||
index: number,
|
index: number,
|
||||||
withAccount: bool,
|
withAccount: boolean,
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const edit = ref(false);
|
const edit = ref(false);
|
||||||
|
@ -142,8 +142,9 @@ function createReconcilationTransaction() {
|
|||||||
<TransactionRow
|
<TransactionRow
|
||||||
v-for="transaction in dayTransactions"
|
v-for="transaction in dayTransactions"
|
||||||
:key="transaction.ID"
|
:key="transaction.ID"
|
||||||
:transactionid="transaction.ID"
|
|
||||||
:index="index"
|
:index="index"
|
||||||
|
:transactionid="transaction.ID"
|
||||||
|
:with-account="false"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
</table>
|
</table>
|
||||||
|
@ -56,23 +56,6 @@ onMounted(() => {
|
|||||||
:index="index"
|
:index="index"
|
||||||
/>
|
/>
|
||||||
</table>
|
</table>
|
||||||
<div class="md:hidden">
|
|
||||||
<Modal @submit="submitModal">
|
|
||||||
<template #placeholder>
|
|
||||||
<Button
|
|
||||||
class="fixed right-4 bottom-4 font-bold text-lg bg-blue-500 py-2"
|
|
||||||
>
|
|
||||||
+
|
|
||||||
</Button>
|
|
||||||
</template>
|
|
||||||
<TransactionInputRow
|
|
||||||
ref="modalInputRow"
|
|
||||||
class="flex flex-col w-full h-full top-0"
|
|
||||||
:budgetid="budgetid"
|
|
||||||
:accountid="accountid"
|
|
||||||
/>
|
|
||||||
</Modal>
|
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
@ -24,6 +24,7 @@ export interface Transaction {
|
|||||||
PayeeID: string | undefined;
|
PayeeID: string | undefined;
|
||||||
Amount: number;
|
Amount: number;
|
||||||
Reconciled: boolean;
|
Reconciled: boolean;
|
||||||
|
Account: string;
|
||||||
AccountID: string;
|
AccountID: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user