/** * DealerInformationCard Component * Displays dealer details for Claim Management requests */ import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'; import { Building, Mail, Phone, MapPin } from 'lucide-react'; import { DealerInfo } from '@/pages/RequestDetail/types/claimManagement.types'; interface DealerInformationCardProps { dealerInfo: DealerInfo; className?: string; } export function DealerInformationCard({ dealerInfo, className }: DealerInformationCardProps) { // Defensive check: Ensure dealerInfo exists if (!dealerInfo) { console.warn('[DealerInformationCard] dealerInfo is missing'); return (

Dealer information not available

); } // Check if essential fields are present if (!dealerInfo.dealerCode && !dealerInfo.dealerName) { console.warn('[DealerInformationCard] Dealer info missing essential fields:', dealerInfo); return (

Dealer information incomplete

); } return ( Dealer Information {/* Dealer Code and Name */}

{dealerInfo.dealerCode}

{dealerInfo.dealerName}

{/* Contact Information */}
{/* Email */}
{dealerInfo.email}
{/* Phone */}
{dealerInfo.phone}
{/* Address */}
{dealerInfo.address}
); }