change selfie with ktp to selfie with setrip tag

This commit is contained in:
2026-05-08 20:02:11 +07:00
parent f5d86d2414
commit ccb3437e82
24 changed files with 127 additions and 84 deletions
+2 -1
View File
@@ -60,7 +60,8 @@ export default async function AdminVerificationsPage({ searchParams }: PageProps
Review Verifikasi Organizer
</h1>
<p className="mt-1 text-sm text-neutral-500">
Periksa data KTP, selfie, dan rekening sebelum menyetujui.
Periksa data KTP, foto liveness (memegang kertas SETRIP), dan rekening
sebelum menyetujui.
</p>
</header>
+1 -1
View File
@@ -38,7 +38,7 @@ export async function GET(_req: NextRequest, ctx: RouteCtx) {
return NextResponse.json({ error: "Forbidden" }, { status: 403 });
}
const key = kind === "ktp" ? verification.ktpImageKey : verification.selfieKey;
const key = kind === "ktp" ? verification.ktpImageKey : verification.livenessKey;
if (!key) {
return NextResponse.json({ error: "File belum diunggah" }, { status: 404 });
}
+4 -1
View File
@@ -28,7 +28,10 @@ export async function POST(req: NextRequest) {
const file = form.get("file");
if (!isKycKind(kind)) {
return NextResponse.json({ error: "kind harus 'ktp' atau 'selfie'" }, { status: 400 });
return NextResponse.json(
{ error: "kind harus 'ktp' atau 'liveness'" },
{ status: 400 }
);
}
if (!(file instanceof File)) {
return NextResponse.json({ error: "File wajib diisi" }, { status: 400 });
+1 -1
View File
@@ -79,7 +79,7 @@ function VerificationBanner({
<p className="mt-1 text-sm text-neutral-700">
{isRejected
? "Pengajuan sebelumnya ditolak. Untuk membuat trip berbayar, perbaiki data dan ajukan ulang."
: "Untuk membuat trip berbayar, akun kamu perlu diverifikasi (KTP, selfie, & rekening). Trip gratis tidak butuh verifikasi."}
: "Untuk membuat trip berbayar, akun kamu perlu diverifikasi (KTP, foto memegang kertas SETRIP, & rekening). Trip gratis tidak butuh verifikasi."}
</p>
</div>
<Link
File diff suppressed because one or more lines are too long
@@ -1100,7 +1100,7 @@ export const OrganizerVerificationScalarFieldEnum = {
birthDate: 'birthDate',
address: 'address',
ktpImageKey: 'ktpImageKey',
selfieKey: 'selfieKey',
livenessKey: 'livenessKey',
bankName: 'bankName',
bankAccountNumber: 'bankAccountNumber',
bankAccountName: 'bankAccountName',
@@ -135,7 +135,7 @@ export const OrganizerVerificationScalarFieldEnum = {
birthDate: 'birthDate',
address: 'address',
ktpImageKey: 'ktpImageKey',
selfieKey: 'selfieKey',
livenessKey: 'livenessKey',
bankName: 'bankName',
bankAccountNumber: 'bankAccountNumber',
bankAccountName: 'bankAccountName',
@@ -33,7 +33,7 @@ export type OrganizerVerificationMinAggregateOutputType = {
birthDate: Date | null
address: string | null
ktpImageKey: string | null
selfieKey: string | null
livenessKey: string | null
bankName: string | null
bankAccountNumber: string | null
bankAccountName: string | null
@@ -55,7 +55,7 @@ export type OrganizerVerificationMaxAggregateOutputType = {
birthDate: Date | null
address: string | null
ktpImageKey: string | null
selfieKey: string | null
livenessKey: string | null
bankName: string | null
bankAccountNumber: string | null
bankAccountName: string | null
@@ -77,7 +77,7 @@ export type OrganizerVerificationCountAggregateOutputType = {
birthDate: number
address: number
ktpImageKey: number
selfieKey: number
livenessKey: number
bankName: number
bankAccountNumber: number
bankAccountName: number
@@ -101,7 +101,7 @@ export type OrganizerVerificationMinAggregateInputType = {
birthDate?: true
address?: true
ktpImageKey?: true
selfieKey?: true
livenessKey?: true
bankName?: true
bankAccountNumber?: true
bankAccountName?: true
@@ -123,7 +123,7 @@ export type OrganizerVerificationMaxAggregateInputType = {
birthDate?: true
address?: true
ktpImageKey?: true
selfieKey?: true
livenessKey?: true
bankName?: true
bankAccountNumber?: true
bankAccountName?: true
@@ -145,7 +145,7 @@ export type OrganizerVerificationCountAggregateInputType = {
birthDate?: true
address?: true
ktpImageKey?: true
selfieKey?: true
livenessKey?: true
bankName?: true
bankAccountNumber?: true
bankAccountName?: true
@@ -240,7 +240,7 @@ export type OrganizerVerificationGroupByOutputType = {
birthDate: Date
address: string
ktpImageKey: string
selfieKey: string
livenessKey: string
bankName: string
bankAccountNumber: string
bankAccountName: string
@@ -283,7 +283,7 @@ export type OrganizerVerificationWhereInput = {
birthDate?: Prisma.DateTimeFilter<"OrganizerVerification"> | Date | string
address?: Prisma.StringFilter<"OrganizerVerification"> | string
ktpImageKey?: Prisma.StringFilter<"OrganizerVerification"> | string
selfieKey?: Prisma.StringFilter<"OrganizerVerification"> | string
livenessKey?: Prisma.StringFilter<"OrganizerVerification"> | string
bankName?: Prisma.StringFilter<"OrganizerVerification"> | string
bankAccountNumber?: Prisma.StringFilter<"OrganizerVerification"> | string
bankAccountName?: Prisma.StringFilter<"OrganizerVerification"> | string
@@ -307,7 +307,7 @@ export type OrganizerVerificationOrderByWithRelationInput = {
birthDate?: Prisma.SortOrder
address?: Prisma.SortOrder
ktpImageKey?: Prisma.SortOrder
selfieKey?: Prisma.SortOrder
livenessKey?: Prisma.SortOrder
bankName?: Prisma.SortOrder
bankAccountNumber?: Prisma.SortOrder
bankAccountName?: Prisma.SortOrder
@@ -334,7 +334,7 @@ export type OrganizerVerificationWhereUniqueInput = Prisma.AtLeast<{
birthDate?: Prisma.DateTimeFilter<"OrganizerVerification"> | Date | string
address?: Prisma.StringFilter<"OrganizerVerification"> | string
ktpImageKey?: Prisma.StringFilter<"OrganizerVerification"> | string
selfieKey?: Prisma.StringFilter<"OrganizerVerification"> | string
livenessKey?: Prisma.StringFilter<"OrganizerVerification"> | string
bankName?: Prisma.StringFilter<"OrganizerVerification"> | string
bankAccountNumber?: Prisma.StringFilter<"OrganizerVerification"> | string
bankAccountName?: Prisma.StringFilter<"OrganizerVerification"> | string
@@ -358,7 +358,7 @@ export type OrganizerVerificationOrderByWithAggregationInput = {
birthDate?: Prisma.SortOrder
address?: Prisma.SortOrder
ktpImageKey?: Prisma.SortOrder
selfieKey?: Prisma.SortOrder
livenessKey?: Prisma.SortOrder
bankName?: Prisma.SortOrder
bankAccountNumber?: Prisma.SortOrder
bankAccountName?: Prisma.SortOrder
@@ -386,7 +386,7 @@ export type OrganizerVerificationScalarWhereWithAggregatesInput = {
birthDate?: Prisma.DateTimeWithAggregatesFilter<"OrganizerVerification"> | Date | string
address?: Prisma.StringWithAggregatesFilter<"OrganizerVerification"> | string
ktpImageKey?: Prisma.StringWithAggregatesFilter<"OrganizerVerification"> | string
selfieKey?: Prisma.StringWithAggregatesFilter<"OrganizerVerification"> | string
livenessKey?: Prisma.StringWithAggregatesFilter<"OrganizerVerification"> | string
bankName?: Prisma.StringWithAggregatesFilter<"OrganizerVerification"> | string
bankAccountNumber?: Prisma.StringWithAggregatesFilter<"OrganizerVerification"> | string
bankAccountName?: Prisma.StringWithAggregatesFilter<"OrganizerVerification"> | string
@@ -407,7 +407,7 @@ export type OrganizerVerificationCreateInput = {
birthDate: Date | string
address: string
ktpImageKey: string
selfieKey: string
livenessKey: string
bankName: string
bankAccountNumber: string
bankAccountName: string
@@ -430,7 +430,7 @@ export type OrganizerVerificationUncheckedCreateInput = {
birthDate: Date | string
address: string
ktpImageKey: string
selfieKey: string
livenessKey: string
bankName: string
bankAccountNumber: string
bankAccountName: string
@@ -451,7 +451,7 @@ export type OrganizerVerificationUpdateInput = {
birthDate?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
address?: Prisma.StringFieldUpdateOperationsInput | string
ktpImageKey?: Prisma.StringFieldUpdateOperationsInput | string
selfieKey?: Prisma.StringFieldUpdateOperationsInput | string
livenessKey?: Prisma.StringFieldUpdateOperationsInput | string
bankName?: Prisma.StringFieldUpdateOperationsInput | string
bankAccountNumber?: Prisma.StringFieldUpdateOperationsInput | string
bankAccountName?: Prisma.StringFieldUpdateOperationsInput | string
@@ -474,7 +474,7 @@ export type OrganizerVerificationUncheckedUpdateInput = {
birthDate?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
address?: Prisma.StringFieldUpdateOperationsInput | string
ktpImageKey?: Prisma.StringFieldUpdateOperationsInput | string
selfieKey?: Prisma.StringFieldUpdateOperationsInput | string
livenessKey?: Prisma.StringFieldUpdateOperationsInput | string
bankName?: Prisma.StringFieldUpdateOperationsInput | string
bankAccountNumber?: Prisma.StringFieldUpdateOperationsInput | string
bankAccountName?: Prisma.StringFieldUpdateOperationsInput | string
@@ -496,7 +496,7 @@ export type OrganizerVerificationCreateManyInput = {
birthDate: Date | string
address: string
ktpImageKey: string
selfieKey: string
livenessKey: string
bankName: string
bankAccountNumber: string
bankAccountName: string
@@ -517,7 +517,7 @@ export type OrganizerVerificationUpdateManyMutationInput = {
birthDate?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
address?: Prisma.StringFieldUpdateOperationsInput | string
ktpImageKey?: Prisma.StringFieldUpdateOperationsInput | string
selfieKey?: Prisma.StringFieldUpdateOperationsInput | string
livenessKey?: Prisma.StringFieldUpdateOperationsInput | string
bankName?: Prisma.StringFieldUpdateOperationsInput | string
bankAccountNumber?: Prisma.StringFieldUpdateOperationsInput | string
bankAccountName?: Prisma.StringFieldUpdateOperationsInput | string
@@ -538,7 +538,7 @@ export type OrganizerVerificationUncheckedUpdateManyInput = {
birthDate?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
address?: Prisma.StringFieldUpdateOperationsInput | string
ktpImageKey?: Prisma.StringFieldUpdateOperationsInput | string
selfieKey?: Prisma.StringFieldUpdateOperationsInput | string
livenessKey?: Prisma.StringFieldUpdateOperationsInput | string
bankName?: Prisma.StringFieldUpdateOperationsInput | string
bankAccountNumber?: Prisma.StringFieldUpdateOperationsInput | string
bankAccountName?: Prisma.StringFieldUpdateOperationsInput | string
@@ -575,7 +575,7 @@ export type OrganizerVerificationCountOrderByAggregateInput = {
birthDate?: Prisma.SortOrder
address?: Prisma.SortOrder
ktpImageKey?: Prisma.SortOrder
selfieKey?: Prisma.SortOrder
livenessKey?: Prisma.SortOrder
bankName?: Prisma.SortOrder
bankAccountNumber?: Prisma.SortOrder
bankAccountName?: Prisma.SortOrder
@@ -597,7 +597,7 @@ export type OrganizerVerificationMaxOrderByAggregateInput = {
birthDate?: Prisma.SortOrder
address?: Prisma.SortOrder
ktpImageKey?: Prisma.SortOrder
selfieKey?: Prisma.SortOrder
livenessKey?: Prisma.SortOrder
bankName?: Prisma.SortOrder
bankAccountNumber?: Prisma.SortOrder
bankAccountName?: Prisma.SortOrder
@@ -619,7 +619,7 @@ export type OrganizerVerificationMinOrderByAggregateInput = {
birthDate?: Prisma.SortOrder
address?: Prisma.SortOrder
ktpImageKey?: Prisma.SortOrder
selfieKey?: Prisma.SortOrder
livenessKey?: Prisma.SortOrder
bankName?: Prisma.SortOrder
bankAccountNumber?: Prisma.SortOrder
bankAccountName?: Prisma.SortOrder
@@ -718,7 +718,7 @@ export type OrganizerVerificationCreateWithoutUserInput = {
birthDate: Date | string
address: string
ktpImageKey: string
selfieKey: string
livenessKey: string
bankName: string
bankAccountNumber: string
bankAccountName: string
@@ -739,7 +739,7 @@ export type OrganizerVerificationUncheckedCreateWithoutUserInput = {
birthDate: Date | string
address: string
ktpImageKey: string
selfieKey: string
livenessKey: string
bankName: string
bankAccountNumber: string
bankAccountName: string
@@ -765,7 +765,7 @@ export type OrganizerVerificationCreateWithoutReviewedByInput = {
birthDate: Date | string
address: string
ktpImageKey: string
selfieKey: string
livenessKey: string
bankName: string
bankAccountNumber: string
bankAccountName: string
@@ -787,7 +787,7 @@ export type OrganizerVerificationUncheckedCreateWithoutReviewedByInput = {
birthDate: Date | string
address: string
ktpImageKey: string
selfieKey: string
livenessKey: string
bankName: string
bankAccountNumber: string
bankAccountName: string
@@ -828,7 +828,7 @@ export type OrganizerVerificationUpdateWithoutUserInput = {
birthDate?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
address?: Prisma.StringFieldUpdateOperationsInput | string
ktpImageKey?: Prisma.StringFieldUpdateOperationsInput | string
selfieKey?: Prisma.StringFieldUpdateOperationsInput | string
livenessKey?: Prisma.StringFieldUpdateOperationsInput | string
bankName?: Prisma.StringFieldUpdateOperationsInput | string
bankAccountNumber?: Prisma.StringFieldUpdateOperationsInput | string
bankAccountName?: Prisma.StringFieldUpdateOperationsInput | string
@@ -849,7 +849,7 @@ export type OrganizerVerificationUncheckedUpdateWithoutUserInput = {
birthDate?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
address?: Prisma.StringFieldUpdateOperationsInput | string
ktpImageKey?: Prisma.StringFieldUpdateOperationsInput | string
selfieKey?: Prisma.StringFieldUpdateOperationsInput | string
livenessKey?: Prisma.StringFieldUpdateOperationsInput | string
bankName?: Prisma.StringFieldUpdateOperationsInput | string
bankAccountNumber?: Prisma.StringFieldUpdateOperationsInput | string
bankAccountName?: Prisma.StringFieldUpdateOperationsInput | string
@@ -890,7 +890,7 @@ export type OrganizerVerificationScalarWhereInput = {
birthDate?: Prisma.DateTimeFilter<"OrganizerVerification"> | Date | string
address?: Prisma.StringFilter<"OrganizerVerification"> | string
ktpImageKey?: Prisma.StringFilter<"OrganizerVerification"> | string
selfieKey?: Prisma.StringFilter<"OrganizerVerification"> | string
livenessKey?: Prisma.StringFilter<"OrganizerVerification"> | string
bankName?: Prisma.StringFilter<"OrganizerVerification"> | string
bankAccountNumber?: Prisma.StringFilter<"OrganizerVerification"> | string
bankAccountName?: Prisma.StringFilter<"OrganizerVerification"> | string
@@ -912,7 +912,7 @@ export type OrganizerVerificationCreateManyReviewedByInput = {
birthDate: Date | string
address: string
ktpImageKey: string
selfieKey: string
livenessKey: string
bankName: string
bankAccountNumber: string
bankAccountName: string
@@ -932,7 +932,7 @@ export type OrganizerVerificationUpdateWithoutReviewedByInput = {
birthDate?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
address?: Prisma.StringFieldUpdateOperationsInput | string
ktpImageKey?: Prisma.StringFieldUpdateOperationsInput | string
selfieKey?: Prisma.StringFieldUpdateOperationsInput | string
livenessKey?: Prisma.StringFieldUpdateOperationsInput | string
bankName?: Prisma.StringFieldUpdateOperationsInput | string
bankAccountNumber?: Prisma.StringFieldUpdateOperationsInput | string
bankAccountName?: Prisma.StringFieldUpdateOperationsInput | string
@@ -954,7 +954,7 @@ export type OrganizerVerificationUncheckedUpdateWithoutReviewedByInput = {
birthDate?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
address?: Prisma.StringFieldUpdateOperationsInput | string
ktpImageKey?: Prisma.StringFieldUpdateOperationsInput | string
selfieKey?: Prisma.StringFieldUpdateOperationsInput | string
livenessKey?: Prisma.StringFieldUpdateOperationsInput | string
bankName?: Prisma.StringFieldUpdateOperationsInput | string
bankAccountNumber?: Prisma.StringFieldUpdateOperationsInput | string
bankAccountName?: Prisma.StringFieldUpdateOperationsInput | string
@@ -975,7 +975,7 @@ export type OrganizerVerificationUncheckedUpdateManyWithoutReviewedByInput = {
birthDate?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
address?: Prisma.StringFieldUpdateOperationsInput | string
ktpImageKey?: Prisma.StringFieldUpdateOperationsInput | string
selfieKey?: Prisma.StringFieldUpdateOperationsInput | string
livenessKey?: Prisma.StringFieldUpdateOperationsInput | string
bankName?: Prisma.StringFieldUpdateOperationsInput | string
bankAccountNumber?: Prisma.StringFieldUpdateOperationsInput | string
bankAccountName?: Prisma.StringFieldUpdateOperationsInput | string
@@ -998,7 +998,7 @@ export type OrganizerVerificationSelect<ExtArgs extends runtime.Types.Extensions
birthDate?: boolean
address?: boolean
ktpImageKey?: boolean
selfieKey?: boolean
livenessKey?: boolean
bankName?: boolean
bankAccountNumber?: boolean
bankAccountName?: boolean
@@ -1022,7 +1022,7 @@ export type OrganizerVerificationSelectCreateManyAndReturn<ExtArgs extends runti
birthDate?: boolean
address?: boolean
ktpImageKey?: boolean
selfieKey?: boolean
livenessKey?: boolean
bankName?: boolean
bankAccountNumber?: boolean
bankAccountName?: boolean
@@ -1046,7 +1046,7 @@ export type OrganizerVerificationSelectUpdateManyAndReturn<ExtArgs extends runti
birthDate?: boolean
address?: boolean
ktpImageKey?: boolean
selfieKey?: boolean
livenessKey?: boolean
bankName?: boolean
bankAccountNumber?: boolean
bankAccountName?: boolean
@@ -1070,7 +1070,7 @@ export type OrganizerVerificationSelectScalar = {
birthDate?: boolean
address?: boolean
ktpImageKey?: boolean
selfieKey?: boolean
livenessKey?: boolean
bankName?: boolean
bankAccountNumber?: boolean
bankAccountName?: boolean
@@ -1083,7 +1083,7 @@ export type OrganizerVerificationSelectScalar = {
updatedAt?: boolean
}
export type OrganizerVerificationOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "userId" | "fullName" | "nikEncrypted" | "nikHash" | "birthDate" | "address" | "ktpImageKey" | "selfieKey" | "bankName" | "bankAccountNumber" | "bankAccountName" | "status" | "rejectionReason" | "reviewedAt" | "reviewedById" | "verifiedAt" | "createdAt" | "updatedAt", ExtArgs["result"]["organizerVerification"]>
export type OrganizerVerificationOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "userId" | "fullName" | "nikEncrypted" | "nikHash" | "birthDate" | "address" | "ktpImageKey" | "livenessKey" | "bankName" | "bankAccountNumber" | "bankAccountName" | "status" | "rejectionReason" | "reviewedAt" | "reviewedById" | "verifiedAt" | "createdAt" | "updatedAt", ExtArgs["result"]["organizerVerification"]>
export type OrganizerVerificationInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
user?: boolean | Prisma.UserDefaultArgs<ExtArgs>
reviewedBy?: boolean | Prisma.OrganizerVerification$reviewedByArgs<ExtArgs>
@@ -1125,9 +1125,10 @@ export type $OrganizerVerificationPayload<ExtArgs extends runtime.Types.Extensio
*/
ktpImageKey: string
/**
* Storage key selfie memegang KTP.
* Storage key foto liveness — user memegang kertas bertuliskan "SETRIP".
* (Sebelumnya: selfie memegang KTP. Diganti supaya user tidak perlu memajang KTP dua kali.)
*/
selfieKey: string
livenessKey: string
bankName: string
bankAccountNumber: string
bankAccountName: string
@@ -1571,7 +1572,7 @@ export interface OrganizerVerificationFieldRefs {
readonly birthDate: Prisma.FieldRef<"OrganizerVerification", 'DateTime'>
readonly address: Prisma.FieldRef<"OrganizerVerification", 'String'>
readonly ktpImageKey: Prisma.FieldRef<"OrganizerVerification", 'String'>
readonly selfieKey: Prisma.FieldRef<"OrganizerVerification", 'String'>
readonly livenessKey: Prisma.FieldRef<"OrganizerVerification", 'String'>
readonly bankName: Prisma.FieldRef<"OrganizerVerification", 'String'>
readonly bankAccountNumber: Prisma.FieldRef<"OrganizerVerification", 'String'>
readonly bankAccountName: Prisma.FieldRef<"OrganizerVerification", 'String'>
+1 -1
View File
@@ -21,7 +21,7 @@ export default async function VerifyPage() {
birthDate: verification.birthDate,
address: verification.address,
ktpImageKey: verification.ktpImageKey,
selfieKey: verification.selfieKey,
livenessKey: verification.livenessKey,
bankName: verification.bankName,
bankAccountNumber: verification.bankAccountNumber,
bankAccountName: verification.bankAccountName,