bugfix : remove orphan
This commit is contained in:
@@ -23,6 +23,14 @@ type PosSlipModalProps = {
|
||||
logoUrl?: string;
|
||||
/** Address / phone line shown under the café name on the bill. */
|
||||
tagline?: string;
|
||||
/** Custom header note from branch print settings (bill only). */
|
||||
receiptHeader?: string | null;
|
||||
/** Custom footer note from branch print settings (bill only). */
|
||||
receiptFooter?: string | null;
|
||||
/** WiFi password printed near the bill footer. */
|
||||
wifiPassword?: string | null;
|
||||
/** Paper width in mm — 58 or 80 (default 80). */
|
||||
paperWidthMm?: number;
|
||||
onClose: () => void;
|
||||
/** Full order for customer bill */
|
||||
order?: Order;
|
||||
@@ -39,6 +47,10 @@ export function PosSlipModal({
|
||||
cafeName,
|
||||
logoUrl,
|
||||
tagline,
|
||||
receiptHeader,
|
||||
receiptFooter,
|
||||
wifiPassword,
|
||||
paperWidthMm,
|
||||
onClose,
|
||||
order,
|
||||
kitchenLines = [],
|
||||
@@ -103,6 +115,9 @@ export function PosSlipModal({
|
||||
cafeName,
|
||||
logoUrl: resolveMediaUrl(logoUrl),
|
||||
tagline,
|
||||
header: receiptHeader?.trim() || undefined,
|
||||
wifi: wifiPassword?.trim() || undefined,
|
||||
paperWidthMm,
|
||||
title: t("billTitle"),
|
||||
date: formattedDate,
|
||||
metaRow,
|
||||
@@ -118,7 +133,7 @@ export function PosSlipModal({
|
||||
amount: formatCurrency(p.amount, numberLocale),
|
||||
})),
|
||||
},
|
||||
footer: t("thankYou"),
|
||||
footer: receiptFooter?.trim() || t("thankYou"),
|
||||
locale,
|
||||
};
|
||||
|
||||
@@ -147,6 +162,11 @@ export function PosSlipModal({
|
||||
{variant === "bill" && tagline && (
|
||||
<div className="text-center text-[10px] text-muted-foreground">{tagline}</div>
|
||||
)}
|
||||
{variant === "bill" && receiptHeader?.trim() && (
|
||||
<div className="whitespace-pre-line text-center text-[11px] font-medium text-foreground/80">
|
||||
{receiptHeader.trim()}
|
||||
</div>
|
||||
)}
|
||||
<div className="mb-1 mt-1.5 border-y border-foreground/60 py-0.5 text-center text-xs font-bold">
|
||||
{variant === "kitchen" ? t("kitchenTitle") : t("billTitle")}
|
||||
</div>
|
||||
@@ -191,7 +211,14 @@ export function PosSlipModal({
|
||||
</div>
|
||||
))}
|
||||
<div className="receipt-divider" />
|
||||
<div className="mt-2 text-center text-xs">{t("thankYou")}</div>
|
||||
{wifiPassword?.trim() && (
|
||||
<div className="text-center text-[11px]" dir="ltr">
|
||||
WiFi: {wifiPassword.trim()}
|
||||
</div>
|
||||
)}
|
||||
<div className="mt-2 text-center text-xs">
|
||||
{receiptFooter?.trim() || t("thankYou")}
|
||||
</div>
|
||||
</>
|
||||
)}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user