0a33497d40
Initial commit of the Super-Admin web panel (Next.js + TypeScript). CI admin-web-check job was failing because the directory was never tracked in git. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
18 lines
528 B
TypeScript
18 lines
528 B
TypeScript
import type { Order } from "@/lib/api/types";
|
|
|
|
/** Label for open orders at pay time: table + guest name. */
|
|
export function formatPosOrderLabel(
|
|
order: Pick<Order, "tableNumber" | "guestName" | "customerName">,
|
|
tableWord: string
|
|
): string {
|
|
const parts: string[] = [];
|
|
if (order.tableNumber) {
|
|
parts.push(`${tableWord} ${order.tableNumber}`);
|
|
}
|
|
const name = order.guestName?.trim() || order.customerName?.trim();
|
|
if (name) {
|
|
parts.push(name);
|
|
}
|
|
return parts.length > 0 ? parts.join(" · ") : "—";
|
|
}
|