Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show total expenses of a group #116

Merged
merged 7 commits into from
Oct 23, 2024

Conversation

FriesischScott
Copy link
Contributor

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.

image

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.

@KMKoushik
Copy link
Member

this is good, i'll be away this week. so i'll start merging them next week along with others

@FriesischScott
Copy link
Contributor Author

Great! I'll be happy to make any changes you want me to.

Copy link
Member

@KMKoushik KMKoushik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Screenshot 2024-10-14 at 4 51 37 pm

@FriesischScott
Copy link
Contributor Author

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 Screenshot 2024-10-14 at 4 51 37 pm

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?

@KMKoushik
Copy link
Member

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!

@FriesischScott
Copy link
Contributor Author

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.

@FriesischScott
Copy link
Contributor Author

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.

Copy link
Member

@KMKoushik KMKoushik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TYSM

@KMKoushik KMKoushik merged commit 464cc4f into oss-apps:main Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants