mirror of
https://github.com/spliit-app/spliit.git
synced 2025-12-06 09:29:39 +01:00
Redesign the groups page
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { getPrisma } from '@/lib/prisma'
|
||||
import { ExpenseFormValues, GroupFormValues } from '@/lib/schemas'
|
||||
import { delay } from '@/lib/utils'
|
||||
import { Expense } from '@prisma/client'
|
||||
import { v4 as uuidv4 } from 'uuid'
|
||||
|
||||
@@ -78,6 +79,15 @@ export async function getGroupExpensesParticipants(groupId: string) {
|
||||
)
|
||||
}
|
||||
|
||||
export async function getGroups(groupIds: string[]) {
|
||||
await delay(2000)
|
||||
const prisma = await getPrisma()
|
||||
return prisma.group.findMany({
|
||||
where: { id: { in: groupIds } },
|
||||
include: { _count: { select: { participants: true } } },
|
||||
})
|
||||
}
|
||||
|
||||
export async function updateExpense(
|
||||
groupId: string,
|
||||
expenseId: string,
|
||||
|
||||
Reference in New Issue
Block a user