From cb9e5146bf7077230e8e47480136b5146bdd3985 Mon Sep 17 00:00:00 2001 From: Eli Ribble Date: Thu, 9 Apr 2026 13:48:48 +0000 Subject: [PATCH] Fix display of report ID and status on the by-id page. --- ts/format.ts | 6 ++++++ ts/rmo/view/StatusByID.vue | 13 ++++++++----- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/ts/format.ts b/ts/format.ts index 7d2d181b..bd947420 100644 --- a/ts/format.ts +++ b/ts/format.ts @@ -54,6 +54,12 @@ export function formatRelativeTime(dateString: string): string { if (diffHours < 24) return `${diffHours} hour${diffHours > 1 ? "s" : ""} ago`; return `${diffDays} day${diffDays > 1 ? "s" : ""} ago`; } +export function formatReportID(id: string): string { + if (id.length === 12) { + return `${id.substring(0, 4)}-${id.substring(4, 8)}-${id.substring(8)}`; + } + return id; +} export function formatTimeRelative(t: Date): string { const now = new Date(); const diffMs = now.getTime() - t.getTime(); diff --git a/ts/rmo/view/StatusByID.vue b/ts/rmo/view/StatusByID.vue index f3ba1fe4..c9caec9b 100644 --- a/ts/rmo/view/StatusByID.vue +++ b/ts/rmo/view/StatusByID.vue @@ -1,4 +1,7 @@