create public layout and admin and fix escrow and refund
This commit is contained in:
@@ -36,6 +36,25 @@ export const organizerRepo = {
|
||||
});
|
||||
},
|
||||
|
||||
async countByStatus(status: "PENDING" | "APPROVED" | "REJECTED") {
|
||||
return prisma.organizerVerification.count({ where: { status } });
|
||||
},
|
||||
|
||||
/** Verifikasi terbaru (default PENDING) untuk preview di dashboard admin. */
|
||||
async listRecent(status: "PENDING" | "APPROVED" | "REJECTED", limit = 3) {
|
||||
return prisma.organizerVerification.findMany({
|
||||
where: { status },
|
||||
orderBy: { createdAt: "desc" },
|
||||
take: limit,
|
||||
select: {
|
||||
id: true,
|
||||
fullName: true,
|
||||
createdAt: true,
|
||||
user: { select: { id: true, name: true, email: true } },
|
||||
},
|
||||
});
|
||||
},
|
||||
|
||||
async updateReview(
|
||||
id: string,
|
||||
data: {
|
||||
|
||||
Reference in New Issue
Block a user