Reflect Orders.paymentStatus's new meaning for Überweisung orders
- switch-to-stripe eligibility gained paymentStatus !== "paid" — an order an admin already marked paid by hand must never also be switchable to Stripe. - PaymentStatusBadge: "Offen" now renders in the same red/subtle style as a failed status (was neutral grey) — worth visually flagging, now that it's a real tracked state rather than a permanent placeholder.
This commit is contained in:
@@ -55,6 +55,7 @@ export default async function KontoBestellungDetailPage({ params }: { params: Pr
|
||||
const canSwitchPayment =
|
||||
order.paymentProvider === "manual" &&
|
||||
order.status === "received" &&
|
||||
order.paymentStatus !== "paid" &&
|
||||
groupPaymentMethodsForCheckout(await getPaymentMethods()).some((m) => m.provider === "stripe");
|
||||
|
||||
return (
|
||||
|
||||
@@ -14,8 +14,8 @@ const LABEL: Record<string, string> = {
|
||||
};
|
||||
|
||||
const STYLES: Record<string, string> = {
|
||||
not_applicable: "bg-bg-muted text-text-muted",
|
||||
pending: "bg-bg-muted text-text-muted",
|
||||
not_applicable: "bg-red-50 text-red-600",
|
||||
pending: "bg-red-50 text-red-600",
|
||||
paid: "bg-success-subtle text-success",
|
||||
failed: "bg-red-50 text-red-600",
|
||||
refunded: "bg-bg-muted text-text-light",
|
||||
|
||||
Reference in New Issue
Block a user