beautify: company upload id
This commit is contained in:
parent
6cd2a991d4
commit
e0a18f42ea
@ -7,7 +7,7 @@ import useAuthStore from '../../../store/authStore' // NEW
|
|||||||
import { useEffect, useState } from 'react' // NEW
|
import { useEffect, useState } from 'react' // NEW
|
||||||
import { useRouter } from 'next/navigation' // NEW
|
import { useRouter } from 'next/navigation' // NEW
|
||||||
|
|
||||||
const DOC_TYPES = ['Handelsregisterauszug', 'Gewerbeanmeldung', 'Steuerbescheid', 'Sonstiges']
|
const DOC_TYPES = ['Personalausweis', 'Reisepass', 'Führerschein', 'Aufenthaltstitel']
|
||||||
|
|
||||||
export default function CompanyIdUploadPage() {
|
export default function CompanyIdUploadPage() {
|
||||||
const {
|
const {
|
||||||
@ -79,25 +79,28 @@ export default function CompanyIdUploadPage() {
|
|||||||
<form onSubmit={submit} className="relative max-w-7xl w-full mx-auto bg-white rounded-2xl shadow-xl ring-1 ring-black/10 overflow-hidden">
|
<form onSubmit={submit} className="relative max-w-7xl w-full mx-auto bg-white rounded-2xl shadow-xl ring-1 ring-black/10 overflow-hidden">
|
||||||
<div className="px-6 py-8 sm:px-12 lg:px-16">
|
<div className="px-6 py-8 sm:px-12 lg:px-16">
|
||||||
<h1 className="text-xl sm:text-2xl font-semibold text-gray-900 mb-1">
|
<h1 className="text-xl sm:text-2xl font-semibold text-gray-900 mb-1">
|
||||||
Company Document Verification
|
Company Contact Person Identity Verification
|
||||||
</h1>
|
</h1>
|
||||||
<p className="text-sm text-gray-600 mb-8">
|
<p className="text-sm text-gray-600 mb-8">
|
||||||
Upload a valid company registration or compliance document
|
Please upload clear photos of both sides of the company contact person's ID document.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
{/* Fields: 3 in one row on md+ with unified inputs */}
|
{/* Fields: 3 in one row on md+ with unified inputs */}
|
||||||
<div className="grid gap-6 md:grid-cols-3">
|
<div className="grid gap-6 md:grid-cols-3">
|
||||||
<div>
|
<div>
|
||||||
<label className="block text-sm font-medium text-gray-700 mb-2">
|
<label className="block text-sm font-medium text-gray-700 mb-2">
|
||||||
Document Number *
|
Contact Person ID Number *
|
||||||
</label>
|
</label>
|
||||||
<input
|
<input
|
||||||
value={docNumber}
|
value={docNumber}
|
||||||
onChange={e => setDocNumber(e.target.value)}
|
onChange={e => setDocNumber(e.target.value)}
|
||||||
className={`${inputBase} ${docNumber ? 'text-gray-900' : 'text-gray-700'}`}
|
className={`${inputBase} ${docNumber ? 'text-gray-900' : 'text-gray-700'}`}
|
||||||
placeholder="Enter reference number"
|
placeholder="Enter contact person's ID number"
|
||||||
required
|
required
|
||||||
/>
|
/>
|
||||||
|
<p className="mt-1 text-xs text-gray-600">
|
||||||
|
Enter the ID number exactly as shown on the document
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
@ -110,29 +113,33 @@ export default function CompanyIdUploadPage() {
|
|||||||
className={`${inputBase} ${docType ? 'text-gray-900' : 'text-gray-700'}`}
|
className={`${inputBase} ${docType ? 'text-gray-900' : 'text-gray-700'}`}
|
||||||
required
|
required
|
||||||
>
|
>
|
||||||
<option value="">Select type</option>
|
<option value="">Select document type</option>
|
||||||
{DOC_TYPES.map(t => <option key={t} value={t}>{t}</option>)}
|
{DOC_TYPES.map(t => <option key={t} value={t}>{t}</option>)}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<label className="block text-sm font-medium text-gray-700 mb-2">
|
<label className="block text-sm font-medium text-gray-700 mb-2">
|
||||||
Issue Date *
|
Expiry Date *
|
||||||
</label>
|
</label>
|
||||||
<input
|
<input
|
||||||
type="date"
|
type="date"
|
||||||
value={issueDate}
|
value={issueDate}
|
||||||
onChange={e => setIssueDate(e.target.value)}
|
onChange={e => setIssueDate(e.target.value)}
|
||||||
|
placeholder="tt.mm.jjjj"
|
||||||
className={`${inputBase} ${issueDate ? 'text-gray-900' : 'text-gray-700'} appearance-none [&::-webkit-calendar-picker-indicator]:opacity-80`}
|
className={`${inputBase} ${issueDate ? 'text-gray-900' : 'text-gray-700'} appearance-none [&::-webkit-calendar-picker-indicator]:opacity-80`}
|
||||||
required
|
required
|
||||||
/>
|
/>
|
||||||
|
<p className="mt-1 text-xs text-gray-600">
|
||||||
|
Enter the expiry date shown on your document
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Back side toggle */}
|
{/* Back side toggle */}
|
||||||
<div className="mt-8 flex items-center gap-3">
|
<div className="mt-8 flex items-center gap-3">
|
||||||
<span className="text-sm font-medium text-gray-700">
|
<span className="text-sm font-medium text-gray-700">
|
||||||
Does document have a Backside?
|
Does ID have a Backside?
|
||||||
</span>
|
</span>
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
@ -147,7 +154,7 @@ export default function CompanyIdUploadPage() {
|
|||||||
|
|
||||||
{/* Upload Areas */}
|
{/* Upload Areas */}
|
||||||
<div className={`mt-8 grid gap-6 items-stretch ${hasBack ? 'grid-cols-1 md:grid-cols-2' : 'grid-cols-1'}`}>
|
<div className={`mt-8 grid gap-6 items-stretch ${hasBack ? 'grid-cols-1 md:grid-cols-2' : 'grid-cols-1'}`}>
|
||||||
{/* Primary document */}
|
{/* Upload ID Front Side */}
|
||||||
<div
|
<div
|
||||||
{...dropHandlers}
|
{...dropHandlers}
|
||||||
onDrop={e => onDrop(e, 'front')}
|
onDrop={e => onDrop(e, 'front')}
|
||||||
@ -184,16 +191,18 @@ export default function CompanyIdUploadPage() {
|
|||||||
<>
|
<>
|
||||||
<DocumentArrowUpIcon className="h-10 w-10 text-gray-400 group-hover:text-indigo-500 mb-4 transition" />
|
<DocumentArrowUpIcon className="h-10 w-10 text-gray-400 group-hover:text-indigo-500 mb-4 transition" />
|
||||||
<p className="text-sm font-medium text-indigo-600 group-hover:text-indigo-500">
|
<p className="text-sm font-medium text-indigo-600 group-hover:text-indigo-500">
|
||||||
Upload primary document *
|
Click to upload front side
|
||||||
</p>
|
</p>
|
||||||
<p className="mt-2 text-xs text-gray-500">
|
<p className="mt-2 text-xs text-gray-500">
|
||||||
PNG, JPG, PDF up to 10MB
|
or drag and drop
|
||||||
|
<br />
|
||||||
|
PNG, JPG, JPEG up to 10MB
|
||||||
</p>
|
</p>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Back/supporting document */}
|
{/* Upload ID Back Side */}
|
||||||
{hasBack && (
|
{hasBack && (
|
||||||
<div
|
<div
|
||||||
{...dropHandlers}
|
{...dropHandlers}
|
||||||
@ -231,10 +240,12 @@ export default function CompanyIdUploadPage() {
|
|||||||
<>
|
<>
|
||||||
<DocumentArrowUpIcon className="h-10 w-10 text-gray-400 group-hover:text-indigo-500 mb-4 transition" />
|
<DocumentArrowUpIcon className="h-10 w-10 text-gray-400 group-hover:text-indigo-500 mb-4 transition" />
|
||||||
<p className="text-sm font-medium text-indigo-600 group-hover:text-indigo-500">
|
<p className="text-sm font-medium text-indigo-600 group-hover:text-indigo-500">
|
||||||
Optional supporting file
|
Click to upload back side
|
||||||
</p>
|
</p>
|
||||||
<p className="mt-2 text-xs text-gray-500">
|
<p className="mt-2 text-xs text-gray-500">
|
||||||
(Invoice, license, certificate…)
|
or drag and drop
|
||||||
|
<br />
|
||||||
|
PNG, JPG, JPEG up to 10MB
|
||||||
</p>
|
</p>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
@ -245,14 +256,14 @@ export default function CompanyIdUploadPage() {
|
|||||||
{/* Info */}
|
{/* Info */}
|
||||||
<div className="mt-8 rounded-lg bg-indigo-50/60 border border-indigo-100 px-5 py-5">
|
<div className="mt-8 rounded-lg bg-indigo-50/60 border border-indigo-100 px-5 py-5">
|
||||||
<p className="text-sm font-semibold text-indigo-900 mb-3">
|
<p className="text-sm font-semibold text-indigo-900 mb-3">
|
||||||
Guidelines:
|
Please ensure your ID documents:
|
||||||
</p>
|
</p>
|
||||||
<ul className="text-sm text-indigo-800 space-y-1 list-disc pl-5">
|
<ul className="text-sm text-indigo-800 space-y-1 list-disc pl-5">
|
||||||
<li>Document must be valid & readable</li>
|
<li>Are clearly visible and readable</li>
|
||||||
<li>Complete page (no cropping)</li>
|
<li>Show all four corners</li>
|
||||||
<li>Good lighting (no glare)</li>
|
<li>Are not expired</li>
|
||||||
<li>PDF or clear image</li>
|
<li>Have good lighting (no shadows or glare)</li>
|
||||||
<li>Supplementary evidence speeds review</li>
|
<li>{hasBack ? 'Both front and back sides are uploaded' : 'Front side is uploaded'}</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user