From efda6e1b65822d2aa1f7753322598d1f2d2f3460 Mon Sep 17 00:00:00 2001 From: Jan Bader Date: Fri, 22 Apr 2022 20:50:52 +0000 Subject: [PATCH] Group transactions by date to simplify grouping in UI --- web/src/components/TransactionRow.vue | 20 -------------------- web/src/date.ts | 9 +++++++++ web/src/pages/Account.vue | 22 ++++++++++++++++------ web/src/stores/budget-account.ts | 3 +-- web/src/stores/transactions.ts | 19 ++++++++++++------- 5 files changed, 38 insertions(+), 35 deletions(-) diff --git a/web/src/components/TransactionRow.vue b/web/src/components/TransactionRow.vue index 82320e4..48799e1 100644 --- a/web/src/components/TransactionRow.vue +++ b/web/src/components/TransactionRow.vue @@ -21,19 +21,6 @@ const Reconciling = computed(() => useTransactionsStore().Reconciling); const transactionsStore = useTransactionsStore(); const TX = transactionsStore.Transactions.get(props.transactionid)!; -function dateChanged() { - const currentAccount = useAccountStore().CurrentAccount; - if (currentAccount == null) - return true; - const transactionIndex = currentAccount.Transactions.indexOf(props.transactionid); - if(transactionIndex<=0) - return true; - - const previousTransactionId = currentAccount.Transactions[transactionIndex-1]; - const previousTransaction = transactionsStore.Transactions.get(previousTransactionId); - return TX.Date.getTime() != previousTransaction?.Date.getTime(); -} - function getStatusSymbol() { if(TX.Status == "Reconciled") return "✔"; @@ -46,13 +33,6 @@ function getStatusSymbol() {