import { FileText, Calendar, Hash, Users, Building2, Clock, } 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 CreditNoteData = { id?: number subject?: string credit_invoice?: string date?: string status?: string notes?: string customer_id?: number customer_name?: string department_name?: string department_id?: number invoice_id?: number created_at?: string updated_at?: string } type CreditNoteGeneralInfoProps = { creditNote: CreditNoteData } function InfoItem({ icon: Icon, label, value, }: { icon: React.ComponentType<{ className?: string }> label: string value?: string | null }) { return (
{label} {value || }
) } const statusColorMap: Record = { draft: "secondary", open: "default", applied: "default", void: "outline", } export function CreditNoteGeneralInfo({ creditNote }: CreditNoteGeneralInfoProps) { return (
{/* Credit Note Details */} Credit Note Details
{creditNote.subject && ( {creditNote.subject} )} {creditNote.status && ( {creditNote.status.charAt(0).toUpperCase() + creditNote.status.slice(1)} )}
{/* Relations */} Related Info
{creditNote.notes && ( <>
Notes

{creditNote.notes}

)}
) }