This commit is contained in:
seb
2026-10-15 11:17:04 +02:00
parent a90776bb8b
commit 657d184d1c
2 changed files with 54 additions and 27 deletions

View File

@@ -44,7 +44,7 @@ import {
const cfg = manifestConfig('order');
const PAYMENT_TYPES = [
export const PAYMENT_TYPES = [
{ value: 'transfer', label: 'Banküberweisung', icon: AccountBalanceIcon },
{ value: 'cash', label: 'Barzahlung', icon: PointOfSaleIcon },
{ value: 'card', label: 'EC- / Kreditkarte', icon: CreditCardIcon },
@@ -54,15 +54,15 @@ const PAYMENT_TYPES = [
{ value: 'other', label: 'Sonstige', icon: PaymentsIcon },
];
function typeLabel(val) {
export function typeLabel(val) {
const match = PAYMENT_TYPES.find((t) => t.value === val);
return match?.label || val || 'Zahlung';
}
function typeIcon(val) {
export function typeIcon(val, sx = { fontSize: 18 }) {
const match = PAYMENT_TYPES.find((t) => t.value === val);
const IconComp = match?.icon || PaymentsIcon;
return <IconComp sx={{ fontSize: 18 }} />;
return <IconComp sx={sx} />;
}
const rowSx = {