ConusAI vendor v0.1.0-beta.114
ci / gate (push) Waiting to run

This commit is contained in:
ConusAI vendor v0.1.0-beta.114
2026-11-14 09:56:45 +00:00
commit 1ce8d23c35
867 changed files with 122104 additions and 0 deletions
+59
View File
@@ -0,0 +1,59 @@
import { Table, TableBody, TableCaption, TableCell, TableHead, TableHeader, TableRow } from "@conusai-kit/ui/primitives"
// The imports applied so far. A server component: it holds no state, and every string is passed in.
import type { ReactElement } from "react"
import type { ImportView } from "../contract/index.js"
export interface ImportListLabels {
/** How many imports, already filled with the plural form. */
readonly count: string
readonly caption: string
readonly empty: string
readonly source: string
readonly status: string
readonly created: string
readonly updated: string
readonly unchanged: string
readonly refused: string
}
export function ImportList({
imports,
labels,
}: {
imports: readonly ImportView[]
labels: ImportListLabels
}): ReactElement {
return imports.length === 0 ? (
<p>{labels.empty}</p>
) : (
<>
<p>{labels.count}</p>
<Table>
<TableCaption>{labels.caption}</TableCaption>
<TableHeader>
<TableRow>
<TableHead scope="col">{labels.source}</TableHead>
<TableHead scope="col">{labels.status}</TableHead>
<TableHead scope="col">{labels.created}</TableHead>
<TableHead scope="col">{labels.updated}</TableHead>
<TableHead scope="col">{labels.unchanged}</TableHead>
<TableHead scope="col">{labels.refused}</TableHead>
</TableRow>
</TableHeader>
<TableBody>
{imports.map((row) => (
<TableRow key={row.importId}>
<TableHead scope="row">{row.sourceName}</TableHead>
<TableCell>{row.status}</TableCell>
<TableCell>{row.created}</TableCell>
<TableCell>{row.updated}</TableCell>
<TableCell>{row.unchanged}</TableCell>
<TableCell>{row.refused}</TableCell>
</TableRow>
))}
</TableBody>
</Table>
</>
)
}