Show total expenses of a group
This PR adds a display of the total expenses in a group to the group detail page.
My use case is this: I use a group to track the shared expenses for a holiday trip and am interested in the overall expenses as a reference for future trips of the same kind.
Something similar was requested in #100.
I added the total costs as a second flex column next to the amounts you lent or owe.
I don't have much experience with typescript but I'm confident that I got the types right and have verified that pnpm build runs successfully.
this is good, i'll be away this week. so i'll start merging them next week along with others
Great! I'll be happy to make any changes you want me to.
the only problem with is, the total will keep on growing if you use same group, think it's better to have it in a separate section, so if users want it they can click and check them.
it can be a section here
If you think it's too much on the group detail page I'm happy to put it somewhere else.
The image you shared is of the FriendBalance. How would the total expenses of a group fit there?
Maybe I could link from the group detail page to a separate group statistics page?
If you think it's too much on the group detail page I'm happy to put it somewhere else.
The image you shared is of the
FriendBalance. How would the total expenses of a group fit there?Maybe I could link from the group detail page to a separate group statistics page?
oh i meant as a button in the top section of the group details page, on clicking it can show a model!
If you think it's too much on the group detail page I'm happy to put it somewhere else. The image you shared is of the
FriendBalance. How would the total expenses of a group fit there? Maybe I could link from the group detail page to a separate group statistics page?oh i meant as a button in the top section of the group details page, on clicking it can show a model!
Sounds good. I'll do it.
I moved the total expenses to a new Group statistics modal. This way it could be extended with more statistics in the future.
You were right, The UI ismuch cleaner this way. I wasn't quite sure what icon to use so I opted for a simple bar chart to represent the statistics.
I also cleaned up a few unused variables and replaced the info icon with one from lucide. The old icon was quite thin compared to the lucide one.
