create public layout and admin and fix escrow and refund

This commit is contained in:
arifal
2026-05-12 00:05:30 +07:00
parent a07942c4b4
commit 958514d575
48 changed files with 1928 additions and 18 deletions
+19
View File
@@ -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: {