From c0a631e2b4dcefebd675988e38bb287b751365ec Mon Sep 17 00:00:00 2001 From: pradeepkumar Date: Sat, 21 Mar 2026 08:56:10 +0530 Subject: [PATCH] feat: Add agent profile verification status banners to the dashboard and update the agent profile interface with verification fields. --- src/app/(agent)/agent/dashboard/page.tsx | 40 ++++++++++++++++++++++++ src/services/agents.service.ts | 2 ++ 2 files changed, 42 insertions(+) diff --git a/src/app/(agent)/agent/dashboard/page.tsx b/src/app/(agent)/agent/dashboard/page.tsx index fd623b6..f60260a 100644 --- a/src/app/(agent)/agent/dashboard/page.tsx +++ b/src/app/(agent)/agent/dashboard/page.tsx @@ -3,6 +3,7 @@ import { useState, useEffect } from 'react'; import { useSession } from 'next-auth/react'; import Image from 'next/image'; +import Link from 'next/link'; // Import shared components import { @@ -287,6 +288,45 @@ export default function AgentDashboard() { return (
+ {/* Verification Status Banner */} + {agentProfile?.verificationStatus === 'REJECTED' && ( +
+
+ Warning +
+

Profile Verification Rejected

+ {agentProfile.verificationNote && ( +

Reason: {agentProfile.verificationNote}

+ )} +

Please update your profile and documents, then resubmit for verification.

+ + Update & Resubmit + +
+
+
+ )} + {agentProfile?.verificationStatus === 'PENDING_REVIEW' && ( +
+
+
+

Profile verification is under review. You will be notified once approved.

+
+
+ )} + {agentProfile?.verificationStatus === 'NONE' && ( +
+
+ Info +
+

Complete your profile and upload verification documents to get verified.

+ + Complete Profile + +
+
+
+ )} {/* Main Layout - Responsive: Column on mobile, Row on desktop */}
{/* Left Sidebar - Status & Contact */} diff --git a/src/services/agents.service.ts b/src/services/agents.service.ts index 9726f1e..fb972b4 100644 --- a/src/services/agents.service.ts +++ b/src/services/agents.service.ts @@ -35,6 +35,8 @@ export interface AgentProfile { isAvailable: boolean; agentTypeId: string | null; agentType: AgentType | null; + verificationStatus?: string; + verificationNote?: string | null; user?: { id: string; email: string;