fix: harden delivery accounting and history

This commit is contained in:
Leon Tonhäuser committed 2026-08-10 13:44:04 +02:00
1 parent 8871e4794a
commit 510fde7afa
13 files changed
+728 -88

No files matched your search

+2 -4
View File
@@ -2,6 +2,7 @@
import { useRef, useState, type FormEvent } from "react";
import { formatBerlinDate } from "@/modules/downloads/format";
import type { DownloadDialogUsage } from "@/modules/downloads/stream";
type UsageDialogProps = Readonly<{
@@ -23,9 +24,6 @@ const priceFormatter = new Intl.NumberFormat("de-DE", {
style: "currency",
currency: "EUR",
});
const dateFormatter = new Intl.DateTimeFormat("de-DE", {
dateStyle: "medium",
});
export function UsageDialog({
albumId,
@@ -216,7 +214,7 @@ export function UsageDialog({
function formatDate(value: string): string {
const date = new Date(value);
return Number.isNaN(date.valueOf()) ? "Datum unbekannt" : dateFormatter.format(date);
return Number.isNaN(date.valueOf()) ? "Datum unbekannt" : formatBerlinDate(date);
}
function isLocalDownloadUrl(fileUrl: string, downloadId: string): boolean {