Initial commit

This commit is contained in:
wangxuming
2026-07-12 15:53:24 +08:00
commit 68d61700d5
252 changed files with 23291 additions and 0 deletions

View File

@@ -0,0 +1,42 @@
import type { CallBatchDto } from "../types";
import { batchTicketCount, formatDateTime, formatVisitorName } from "../lib/format";
import { StatusBadge } from "./StatusBadge";
export function BatchCard({
batch,
showContactDetails = false,
}: {
batch: CallBatchDto;
showContactDetails?: boolean;
}) {
return (
<section className="batch-card" aria-labelledby={`batch-${batch.id}`}>
<div className="batch-card__header">
<div>
<h3 id={`batch-${batch.id}`}></h3>
</div>
<StatusBadge status={batch.status} />
</div>
<p className="batch-card__summary">
<strong>{batchTicketCount(batch)} </strong>
<span>{formatDateTime(batch.called_at)}</span>
</p>
<ul className="batch-ticket-list">
{batch.tickets.map((ticket) => (
<li key={ticket.id} className="batch-ticket-row">
<div className="batch-ticket-identity">
<strong className="ticket-number">{ticket.ticket_number}</strong>
{showContactDetails ? (
<span className="ticket-contact-line">
<span><span className="ticket-contact-label"></span> <strong className="phone-value">{ticket.phone || "未返回"}</strong></span>
<span><span className="ticket-contact-label"></span> {formatVisitorName(ticket)}</span>
</span>
) : null}
</div>
<StatusBadge status={ticket.status} kind="ticket" />
</li>
))}
</ul>
</section>
);
}