Complete migration two transactions store
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
<script lang="ts" setup>
|
||||
import { computed, ref } from "vue";
|
||||
import Autocomplete, { Suggestion } from '../components/Autocomplete.vue'
|
||||
import { Transaction, useAccountStore } from '../stores/budget-account'
|
||||
import Autocomplete from '../components/Autocomplete.vue'
|
||||
import { Transaction, useTransactionsStore } from "../stores/transactions";
|
||||
import DateInput from "./DateInput.vue";
|
||||
|
||||
const props = defineProps<{
|
||||
@ -22,6 +22,7 @@ const TX = ref<Transaction>({
|
||||
ID: "",
|
||||
Status: "Uncleared",
|
||||
TransferAccount: "",
|
||||
Reconciled: false
|
||||
});
|
||||
|
||||
const payeeType = ref<string|undefined>(undefined);
|
||||
@ -41,10 +42,10 @@ const payload = computed(() => JSON.stringify({
|
||||
state: "Uncleared"
|
||||
}));
|
||||
|
||||
const accountStore = useAccountStore();
|
||||
const transactionsStore = useTransactionsStore();
|
||||
function saveTransaction(e: MouseEvent) {
|
||||
e.preventDefault();
|
||||
accountStore.saveTransaction(payload.value);
|
||||
transactionsStore.saveTransaction(payload.value);
|
||||
}
|
||||
</script>
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
<script lang="ts" setup>
|
||||
import { computed, ref } from "vue";
|
||||
import { useBudgetsStore } from "../stores/budget";
|
||||
import { Transaction, useAccountStore } from "../stores/budget-account";
|
||||
import { Transaction, useTransactionsStore } from "../stores/transactions";
|
||||
import Currency from "./Currency.vue";
|
||||
import TransactionEditRow from "./TransactionEditRow.vue";
|
||||
import { formatDate } from "../date";
|
||||
@ -14,7 +14,7 @@ const props = defineProps<{
|
||||
const edit = ref(false);
|
||||
|
||||
const CurrentBudgetID = computed(() => useBudgetsStore().CurrentBudgetID);
|
||||
const Reconciling = computed(() => useAccountStore().Reconciling);
|
||||
const Reconciling = computed(() => useTransactionsStore().Reconciling);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
Reference in New Issue
Block a user