"use client"; import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card"; import { Badge } from "@/components/ui/badge"; import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "@/components/ui/table"; interface LayoutSection { id: number; name: string; type: string; sheetName: string; startingRow?: number | null; endingRow?: number | null; tableName: string; fields: LayoutSectionField[]; } interface LayoutSectionField { id: number; name: string; dataType: string; dataTypeFormat: string | null; cellPosition: string; importTableColumnName: string; importColumnOrderNumber: number; } interface LayoutSectionCardProps { section: LayoutSection; } export function LayoutSectionCard({ section }: LayoutSectionCardProps) { const getTypeColor = (type: string) => { switch (type.toLowerCase()) { case "properties": return "bg-blue-100 text-blue-800"; case "grid": return "bg-green-100 text-green-800"; default: return "bg-gray-100 text-gray-800"; } }; return (
{section.name} Sheet: {section.sheetName} | Table: {section.tableName}
{section.type}
{section.startingRow && ( Rows: {section.startingRow} - {section.endingRow || "end"} )} Fields: {section.fields.length}
{section.fields.length > 0 && (

Fields

Name Type Position Column Order {section.fields.map((field) => ( {field.name} {field.dataType} {field.cellPosition} {field.importTableColumnName} {field.importColumnOrderNumber} ))}
)}
); }