Update vendor compliance report UI

Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
This commit is contained in:
Sacha Al Himdani
2026-03-10 14:51:32 +01:00
parent 40e71489d8
commit 66a7d6c3e8
10 changed files with 379 additions and 383 deletions

View File

@@ -8,6 +8,14 @@ export function toDateInput(dateString?: string | null): string {
return dateString.split('T')[0];
}
export function todayAsDateInput(): string {
const now = new Date();
const year = now.getFullYear();
const month = String(now.getMonth() + 1).padStart(2, "0");
const day = String(now.getDate()).padStart(2, "0");
return `${year}-${month}-${day}`;
}
export function formatDate(dateInput?: string | null): string {
if (!dateInput) return "";

View File

@@ -73,6 +73,7 @@ export {
formatDatetime,
formatDate,
toDateInput,
todayAsDateInput,
formatDuration,
parseDate,
} from "./date";