Issue #1 was concerned with returning just the group name. This issue builds atop of it by extending the route /groups/:id with the info on the groups:
name
members - as a list of objects made up of member_id and member_name
amount of owed/borrowed money to the group
last 10 items that were added to the group
The purpose of this route is to have the clients fetch enough info for a brief overview of the group the user is on. Especially members is useful for displaying the correct messages about who paid/borrowed money.
[x] Create a golang struct representing the aforementioned response
[ ] Make queries to the database
Android
[ ] Create a model representing the response from the server
[ ] Inside /src/main/java/fi/isdc_helsinki/splitbit/repositories/ApiClient.kt add another function declaration for making a call for that info to the server.
[ ] Inside src/main/java/fi/isdc_helsinki/splitbit/group/GroupViewModel.kt add a function to fetch the group overview and present it inside src/main/java/fi/isdc_helsinki/splitbit/group/GroupView.kt
[ ] Currently inside src/main/java/fi/isdc_helsinki/splitbit/group/GroupView.kt We hardcode information "Mariusz paid \$"+item.price. Change that by comparing whether the current user id is different to the currently logged in one (untill #2 is not finished, this cannot be done properly but you can hardcode the current user_id and username for now)
[ ] Inside src/main/java/fi/isdc_helsinki/splitbit/group/composables/ExpenseListItem.kt change the condition determining if the user is the one borrowing or lending (based on an argument passed from the parent component)
Web
[ ] Prepare the server request and response typescript model.
[ ] Use the fetch API inside the route file /g/[slug] for fetching the data, use the request and response model.
[ ] Abstract the single item logic from src/routes/g/[slug]/+page.svelte to a reusable component and perform parsing of the arguments such as title, date, icon, payerInfo
[ ] Use the new component inside src/routes/g/[slug]/+page.svelte and based on the fetched data, make it display appropriate entries.
[ ] Add group summary ui with the 3 buttons and the amount of owed money.
Server
Issue #1 was concerned with returning just the group name. This issue builds atop of it by extending the route /groups/:id with the info on the groups:
Android
Web