- ✅
- ✅ - ✅ - ✅
This commit is contained in:
@@ -20,32 +20,6 @@ export const bookingRepo = {
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* Daftar booking di trip ini yang masih menunggu konfirmasi pembayaran
|
||||
* dari organizer (Payment MANUAL status AWAITING).
|
||||
*/
|
||||
async findAwaitingManualConfirmation(tripId: string) {
|
||||
return prisma.booking.findMany({
|
||||
where: {
|
||||
tripId,
|
||||
status: "AWAITING_PAY",
|
||||
payments: {
|
||||
some: { provider: "MANUAL", status: "AWAITING" },
|
||||
},
|
||||
},
|
||||
include: {
|
||||
participant: true,
|
||||
user: { select: { id: true, name: true, image: true } },
|
||||
payments: {
|
||||
where: { provider: "MANUAL", status: "AWAITING" },
|
||||
orderBy: { createdAt: "desc" },
|
||||
take: 1,
|
||||
},
|
||||
},
|
||||
orderBy: { updatedAt: "asc" },
|
||||
});
|
||||
},
|
||||
|
||||
async create(
|
||||
data: Pick<
|
||||
Prisma.BookingUncheckedCreateInput,
|
||||
|
||||
Reference in New Issue
Block a user