change selfie with ktp to selfie with setrip tag
This commit is contained in:
@@ -93,8 +93,8 @@ export function ReviewCard({ verification }: { verification: Verification }) {
|
||||
src={`/api/files/kyc/${verification.id}/ktp`}
|
||||
/>
|
||||
<ImagePreview
|
||||
label="Selfie + KTP"
|
||||
src={`/api/files/kyc/${verification.id}/selfie`}
|
||||
label="Foto memegang kertas SETRIP"
|
||||
src={`/api/files/kyc/${verification.id}/liveness`}
|
||||
/>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -10,13 +10,13 @@ type Initial = {
|
||||
birthDate: Date;
|
||||
address: string;
|
||||
ktpImageKey: string;
|
||||
selfieKey: string;
|
||||
livenessKey: string;
|
||||
bankName: string;
|
||||
bankAccountNumber: string;
|
||||
bankAccountName: string;
|
||||
} | null;
|
||||
|
||||
type UploadKind = "ktp" | "selfie";
|
||||
type UploadKind = "ktp" | "liveness";
|
||||
|
||||
const ACCEPT_MIME = "image/jpeg,image/png,image/webp";
|
||||
const MAX_BYTES = 5 * 1024 * 1024;
|
||||
@@ -33,19 +33,19 @@ export function VerifyForm({ initial }: { initial: Initial }) {
|
||||
const [error, setError] = useState("");
|
||||
const [loading, setLoading] = useState(false);
|
||||
const [ktpKey, setKtpKey] = useState(initial?.ktpImageKey ?? "");
|
||||
const [selfieKey, setSelfieKey] = useState(initial?.selfieKey ?? "");
|
||||
const [livenessKey, setLivenessKey] = useState(initial?.livenessKey ?? "");
|
||||
|
||||
async function handleSubmit(e: React.FormEvent<HTMLFormElement>) {
|
||||
e.preventDefault();
|
||||
setError("");
|
||||
if (!ktpKey || !selfieKey) {
|
||||
setError("Foto KTP dan selfie wajib diunggah");
|
||||
if (!ktpKey || !livenessKey) {
|
||||
setError("Foto KTP dan foto memegang kertas SETRIP wajib diunggah");
|
||||
return;
|
||||
}
|
||||
setLoading(true);
|
||||
const formData = new FormData(e.currentTarget);
|
||||
formData.set("ktpImageKey", ktpKey);
|
||||
formData.set("selfieKey", selfieKey);
|
||||
formData.set("livenessKey", livenessKey);
|
||||
const result = await submitVerificationAction(formData);
|
||||
setLoading(false);
|
||||
if (result.error) {
|
||||
@@ -143,13 +143,22 @@ export function VerifyForm({ initial }: { initial: Initial }) {
|
||||
onChange={setKtpKey}
|
||||
onError={setError}
|
||||
/>
|
||||
<FileUpload
|
||||
label="Selfie dengan KTP"
|
||||
kind="selfie"
|
||||
value={selfieKey}
|
||||
onChange={setSelfieKey}
|
||||
onError={setError}
|
||||
/>
|
||||
<div>
|
||||
<FileUpload
|
||||
label="Foto kamu memegang kertas tulisan SETRIP"
|
||||
kind="liveness"
|
||||
value={livenessKey}
|
||||
onChange={setLivenessKey}
|
||||
onError={setError}
|
||||
/>
|
||||
<p className="mt-1.5 text-[11px] leading-relaxed text-neutral-500">
|
||||
Tulis kata <span className="font-semibold">SETRIP</span> dengan
|
||||
tangan di selembar kertas, lalu foto diri kamu sambil memegang
|
||||
kertas itu — pastikan wajah & tulisan terlihat jelas dalam satu
|
||||
foto. Foto ini bukti bahwa pengajuan benar dilakukan oleh kamu
|
||||
sendiri.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user