From 54f946461c4f205f0dd69b6554f04a07c68b011d Mon Sep 17 00:00:00 2001 From: DeathKaioken Date: Sat, 4 Oct 2025 00:17:07 +0200 Subject: [PATCH] feature: add register quick action dashboard --- src/app/quickaction-dashboard/page.tsx | 295 +++++++++++++++++++++++++ 1 file changed, 295 insertions(+) create mode 100644 src/app/quickaction-dashboard/page.tsx diff --git a/src/app/quickaction-dashboard/page.tsx b/src/app/quickaction-dashboard/page.tsx new file mode 100644 index 0000000..75d1b4a --- /dev/null +++ b/src/app/quickaction-dashboard/page.tsx @@ -0,0 +1,295 @@ +'use client' + +import { useState, useCallback } from 'react' +import PageLayout from '../components/PageLayout' +import useAuthStore from '../store/authStore' +import { + CheckCircleIcon, + XCircleIcon, + EnvelopeOpenIcon, + IdentificationIcon, + InformationCircleIcon, + DocumentCheckIcon, + ArrowUpOnSquareIcon, + PencilSquareIcon, + ClipboardDocumentCheckIcon +} from '@heroicons/react/24/outline' + +interface StatusItem { + key: string + label: string + description: string + complete: boolean + icon: React.ComponentType> +} + +export default function QuickActionDashboardPage() { + const user = useAuthStore(s => s.user) + + // Mock status derivation (replace with real user flags) + const [emailVerified, setEmailVerified] = useState(!!user?.emailVerified) + const [idUploaded, setIdUploaded] = useState(false) + const [additionalInfo, setAdditionalInfo] = useState(false) + const [contractSigned, setContractSigned] = useState(false) + + const statusItems: StatusItem[] = [ + { + key: 'email', + label: 'Email Verification', + description: emailVerified ? 'Verified' : 'Missing', + complete: emailVerified, + icon: EnvelopeOpenIcon + }, + { + key: 'id', + label: 'ID Document', + description: idUploaded ? 'Uploaded' : 'Missing', + complete: idUploaded, + icon: IdentificationIcon + }, + { + key: 'info', + label: 'Additional Info', + description: additionalInfo ? 'Completed' : 'Missing', + complete: additionalInfo, + icon: InformationCircleIcon + }, + { + key: 'contract', + label: 'Contract', + description: contractSigned ? 'Signed' : 'Missing', + complete: contractSigned, + icon: DocumentCheckIcon + } + ] + + // Action handlers (placeholder async simulations) + const handleVerifyEmail = useCallback(async () => { + // TODO: trigger backend email verification flow + await new Promise(r => setTimeout(r, 600)) + setEmailVerified(true) + }, []) + + const handleUploadId = useCallback(async () => { + // TODO: open upload modal / navigate + await new Promise(r => setTimeout(r, 600)) + setIdUploaded(true) + }, []) + + const handleCompleteInfo = useCallback(async () => { + // TODO: navigate to profile completion + await new Promise(r => setTimeout(r, 600)) + setAdditionalInfo(true) + }, []) + + const handleSignContract = useCallback(async () => { + // TODO: open contract signing flow + await new Promise(r => setTimeout(r, 600)) + setContractSigned(true) + }, []) + + const canUploadId = emailVerified + const canCompleteInfo = emailVerified && idUploaded + const canSignContract = emailVerified && idUploaded && additionalInfo + + return ( + +
+ {/* Background Pattern */} + + {/* Colored Blur Effect */} +