feat: secure KYC storage, Google OAuth, terms gating
This commit is contained in:
@@ -3,6 +3,7 @@ import { getServerSession } from "next-auth";
|
||||
import { authOptions } from "@/lib/auth";
|
||||
import { isAdminEmail } from "@/lib/admin";
|
||||
import { organizerRepo } from "@/server/repositories/organizer.repo";
|
||||
import { organizerService } from "@/server/services/organizer.service";
|
||||
import { ReviewCard } from "@/features/organizer/components/review-card";
|
||||
|
||||
type Tab = "PENDING" | "APPROVED" | "REJECTED";
|
||||
@@ -28,7 +29,23 @@ export default async function AdminVerificationsPage({ searchParams }: PageProps
|
||||
const tab: Tab =
|
||||
params.tab === "APPROVED" || params.tab === "REJECTED" ? params.tab : "PENDING";
|
||||
|
||||
const items = await organizerRepo.listByStatus(tab);
|
||||
const rows = await organizerRepo.listByStatus(tab);
|
||||
const items = rows.map((v) => ({
|
||||
id: v.id,
|
||||
fullName: v.fullName,
|
||||
nik: organizerService.decryptNik(v.nikEncrypted),
|
||||
birthDate: v.birthDate,
|
||||
address: v.address,
|
||||
bankName: v.bankName,
|
||||
bankAccountNumber: v.bankAccountNumber,
|
||||
bankAccountName: v.bankAccountName,
|
||||
status: v.status,
|
||||
rejectionReason: v.rejectionReason,
|
||||
reviewedAt: v.reviewedAt,
|
||||
createdAt: v.createdAt,
|
||||
user: v.user,
|
||||
reviewedBy: v.reviewedBy,
|
||||
}));
|
||||
|
||||
const tabs: { key: Tab; label: string }[] = [
|
||||
{ key: "PENDING", label: "Pending" },
|
||||
|
||||
Reference in New Issue
Block a user