sanamare/src/lib/status.ts
Claude 6c784e8a30
Sanamare Shop: Grundgerüst, Storefront, Kasse, Zahlungen, Admin-Anfang
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SvuGvHpbAQ4syfuLuRvutL
2026-10-19 13:11:20 +00:00

22 lines
1.2 KiB
TypeScript

import type { OrderStatus, PaymentStatus } from "@prisma/client";
export const ORDER_STATUS: Record<OrderStatus, { label: string; tone: "neutral" | "gold" | "success" | "danger" }> = {
PENDING: { label: "Offen", tone: "gold" },
PAID: { label: "Bezahlt", tone: "success" },
PROCESSING: { label: "In Bearbeitung", tone: "gold" },
SHIPPED: { label: "Versendet", tone: "success" },
COMPLETED: { label: "Abgeschlossen", tone: "neutral" },
CANCELLED: { label: "Storniert", tone: "danger" },
REFUNDED: { label: "Erstattet", tone: "neutral" },
};
export const PAYMENT_STATUS: Record<PaymentStatus, { label: string; tone: "neutral" | "gold" | "success" | "danger" }> = {
OPEN: { label: "Zahlung offen", tone: "gold" },
AUTHORIZED: { label: "Autorisiert", tone: "gold" },
PAID: { label: "Bezahlt", tone: "success" },
FAILED: { label: "Fehlgeschlagen", tone: "danger" },
REFUNDED: { label: "Erstattet", tone: "neutral" },
};
export const dateFmt = new Intl.DateTimeFormat("de-DE", { dateStyle: "medium", timeStyle: "short", timeZone: "Europe/Berlin" });
export const dayFmt = new Intl.DateTimeFormat("de-DE", { dateStyle: "medium", timeZone: "Europe/Berlin" });