import { User, Mail, Phone, Briefcase, Building2, Clock, MapPin, Calendar, BadgeCheck, CircleDot, } from "lucide-react" import { Card, CardContent, CardHeader, CardTitle, } from "@/shared/components/ui/card" import { Badge } from "@/shared/components/ui/badge" import { Separator } from "@/shared/components/ui/separator" type EmployeeData = { id?: number type?: string first_name?: string last_name?: string email?: string phone?: string position?: string designation?: string salary?: string wage_type?: string status?: string track_attendance?: boolean notify_owner_when_punch_in_out?: boolean geo_fence_radius?: string | number | null department?: { id?: number; name?: string } | null shop_calender?: { id?: number; title?: string } | null shop_timing?: { id?: number; title?: string } | null created_at?: string updated_at?: string } type EmployeeGeneralInfoProps = { employee: EmployeeData } function InfoItem({ icon: Icon, label, value, }: { icon: React.ComponentType<{ className?: string }> label: string value?: string | null }) { return (
{label} {value || }
) } export function EmployeeGeneralInfo({ employee }: EmployeeGeneralInfoProps) { const fullName = [employee.first_name, employee.last_name].filter(Boolean).join(" ") return (
{/* Personal Information */} Personal Information
{fullName || "Unknown"} {employee.type && ( {employee.type} )} {employee.status && ( {employee.status} )}
{/* Work Details */} Work Details
{employee.track_attendance ? "Attendance Tracked" : "No Attendance Tracking"} {employee.notify_owner_when_punch_in_out && ( Punch In/Out Notifications )}
) }