From e53f19d42c2f480c5dfd2578578734cec6424b84 Mon Sep 17 00:00:00 2001 From: gary5199 <> Date: Thu, 12 Nov 2020 19:17:44 -0600 Subject: [PATCH 1/5] Add collaborator --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 29a36cd..9407cc2 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,7 @@ https://forevermatt.github.io/svelte-budget/ - [ ] Handle page reloads in the middle of the add-expense process (which loses the timestamp, for example) - [ ] Add a data-breadcrumb trail as they enter data for a new transaction +- [x] Setup collaborator - [ ] ... ## Data Structure From e108ff259c597e14bf4cd66793251f568c3fe409 Mon Sep 17 00:00:00 2001 From: forevermatt Date: Thu, 19 Nov 2020 20:12:43 -0500 Subject: [PATCH 2/5] Enable viewing account details and renaming the account --- README.md | 2 +- src/data/transactions.js | 6 ++++++ src/views/AccountView.svelte | 38 ++++++++++++++++++++++++++++++++++++ src/views/Accounts.svelte | 10 +++++----- src/views/routes.js | 2 ++ 5 files changed, 52 insertions(+), 6 deletions(-) create mode 100644 src/views/AccountView.svelte diff --git a/README.md b/README.md index 9407cc2..b38c157 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ https://forevermatt.github.io/svelte-budget/ - [x] Edit a category - [x] Add a financial account - [x] Add nicer buttons (with icons) -- [ ] Edit a financial account +- [x] Edit a financial account - [x] Record an expense - [x] Create separate repo to document data structure versions - [x] Subtract the transaction amount from a category's budget upon completion diff --git a/src/data/transactions.js b/src/data/transactions.js index 36db8ea..9ad098b 100644 --- a/src/data/transactions.js +++ b/src/data/transactions.js @@ -14,6 +14,12 @@ export const startNewPendingTransaction = transactionData => { transactionInProgress.set(transaction) } +export const getTransactionsForAccount = accountUuid => { + return get(transactions).filter(transaction => { + return transaction.accountUuid === accountUuid + }) +} + export const getTransactionsForCategory = categoryUuid => { return get(transactions).filter(transaction => { const categoryAmounts = transaction.categoryAmounts || {} diff --git a/src/views/AccountView.svelte b/src/views/AccountView.svelte new file mode 100644 index 0000000..9c0a5e0 --- /dev/null +++ b/src/views/AccountView.svelte @@ -0,0 +1,38 @@ + + + + +

+ { account.name }: +

+
+ + + +