wulf-pulse/components/configuration-items/contact-cell.tsx
root 6eee14f8af Add comprehensive admin features and multi-system integration
- Add admin dashboard with sync controls and data browser
- Implement RMM, Auvik, and Addigy organization mappings
- Add chunked ticket sync with progress tracking
- Implement entity sync service with rate limiting
- Add analytics engine and performance optimizer
- Create data browser for all PSA entities
- Add navigation components and UI improvements
- Implement background processing and sync services
- Add comprehensive documentation and migration scripts
- Update configuration items with multi-system support
- Enhance contact management and purchase history
- Add issue type assignment and LLM analyzer
- Improve error handling and logging utilities
2025-11-19 14:18:16 -05:00

32 lines
822 B
TypeScript

'use client';
import { Badge } from '@/components/ui/badge';
import { User } from 'lucide-react';
interface ContactCellProps {
contactId?: number;
contacts?: Record<number, any>;
}
export function ContactCell({ contactId, contacts }: ContactCellProps) {
if (!contactId) {
return <span className="text-xs text-muted-foreground">-</span>;
}
// Get contact from the contacts map
const contact = contacts?.[contactId];
if (contact) {
const contactName = `${contact.firstName || ''} ${contact.lastName || ''}`.trim();
if (contactName) {
return (
<Badge variant="outline" className="text-xs">
<User className="w-3 h-3 mr-1" />
{contactName}
</Badge>
);
}
}
return <span className="text-xs text-muted-foreground">ID: {contactId}</span>;
}