feat(customers): add initial admin bootstrap and csv import
This commit is contained in:
parent
c816e9869d
commit
ecab0fe6b6
27 changed files with 1197 additions and 34 deletions
24
frontend/athena/components/customers/ImportSummaryCard.tsx
Normal file
24
frontend/athena/components/customers/ImportSummaryCard.tsx
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
import type { CustomerImportSummary } from "@/types/customer";
|
||||
|
||||
const summaryItems = [
|
||||
["Gesamt", "total_rows"],
|
||||
["Gültig", "valid_rows"],
|
||||
["Fehler", "error_count"],
|
||||
["Warnungen", "warning_count"],
|
||||
["Creates", "create_count"],
|
||||
["Updates", "update_count"],
|
||||
["Skips", "skip_count"],
|
||||
] as const;
|
||||
|
||||
export default function ImportSummaryCard({ summary }: { summary: CustomerImportSummary }) {
|
||||
return (
|
||||
<div className="grid grid-cols-2 gap-3 sm:grid-cols-4 lg:grid-cols-7">
|
||||
{summaryItems.map(([label, key]) => (
|
||||
<div key={key} className="rounded-lg border bg-white p-3">
|
||||
<p className="text-xs text-slate-500">{label}</p>
|
||||
<p className="mt-1 text-xl font-semibold text-slate-950">{summary[key]}</p>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue