Ability to archive groups when they’re settled up (#45)

* Settled up icon on group card

* remove logs

* archived groups

* remove settled up

* remove more settled up

* recent-group-list-card

* sortGroups

* archiveGroup

* unarchiveGroup

* clean up

* more clean up

* Prettier, fix TS errors, add titles

---------

Co-authored-by: Sebastien Castiel <sebastien@castiel.me>
This commit is contained in:
Brandon Eng
2024-01-16 22:41:46 +07:00
committed by GitHub
parent 1141501edb
commit 36cc4f1ef7
7 changed files with 336 additions and 176 deletions

View File

@@ -218,7 +218,11 @@ export async function getGroupExpenses(groupId: string) {
const prisma = await getPrisma()
return prisma.expense.findMany({
where: { groupId },
include: { paidFor: { include: { participant: true } }, paidBy: true, category: true },
include: {
paidFor: { include: { participant: true } },
paidBy: true,
category: true,
},
orderBy: { expenseDate: 'desc' },
})
}