Closed jackrua closed 7 months ago
Very nice! Just one question about this:
Note: Here I hardcoded that the widget will retrieve just the last 50 transactions (due to efficiency reasons). This is ugly, I admit, but for the time being it should be ok.
Since the graph is showing current month, it would make sense show all transactions of that month, so only those that contributes to the graph data? I think it would be more "logical", but if you agree with this, we could handle it on another PR, and merge this meanwhile.
@mikev-cw I would merge this as is for now, I think it makes sense in this moment to just keep it simple and then we can think about adding filters and so on when we will be ready
@theperu Ok! Let's merge therefore!
(Addressing issue #149)
Disclaimer:
You may notice more changes in files than there are actually, since I just noticed that my Editor automatically formats code so in some cases lines are just reformatted and nothing is really changed. Hence, I will try to be specific on the main changes I made to the code. However if you feel like this is an issue I can close this PR and open a new one.
Overview:
To address this issue, we need to work with both the frontend of the app (i.e. find the correct widget to represent the transactions) and its backend (i.e. retrieve from the database the transactions from a specific bank account and define the providers that the widget can watch). So, moving from bottom to top of the stack, what I did was:
In commit fe9eec3 I added a method to
bankAccountMethods()
so that I can interrogate the db to get the last n transactions from a particular accountIn commit a3c7714 I defined the provider (
selectedAccountLastTransactions
) that will be exposed to the account page widget to update the transaction list. Note: Here I hardcoded that the widget will retrieve just the last 50 transactions (due to efficiency reasons). This is ugly, I admit, but for the time being it should be ok.As a widget I chose the same widget used to represent transactions in the home page. However, I didn't want to repeat for each transaction which account belong to (since it seemed redundant to me), so I just removed in the widget the bang operator (
!
), hence allowing for empty names in the bank account name field (commit 78f361b)Finally, I added the transaction list to the account page. Moreover, I changed the color of the back arrow, since it had the same color of the background (commit f29f92e)