From 3f2bcf1a1acf558fae4fc7c208706f742f19bca7 Mon Sep 17 00:00:00 2001 From: Nathnael Date: Tue, 1 Sep 2026 07:01:27 +0000 Subject: [PATCH] fix(customers): drop fake before-state in history diff rows MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit DiffRow rendered onboarding's initial field values as '— → value', implying a prior state that never existed. Show the value alone when there is no real before. Co-Authored-By: Claude Sonnet 5 --- .../customers/ChangeRequestReview.tsx | 38 ++++++++++--------- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/apps/edr-freight-web/backoffice/src/components/customers/ChangeRequestReview.tsx b/apps/edr-freight-web/backoffice/src/components/customers/ChangeRequestReview.tsx index 7f4cf30ce..88cbc1769 100644 --- a/apps/edr-freight-web/backoffice/src/components/customers/ChangeRequestReview.tsx +++ b/apps/edr-freight-web/backoffice/src/components/customers/ChangeRequestReview.tsx @@ -174,6 +174,10 @@ export function DiffRow({ from: string; to: string; }) { + // No real "before" (field went from unset straight to a value, e.g. the + // onboarding wizard's first save) — show the value alone rather than a + // fake "— → value" that implies a prior state that never existed. + const hadBefore = from !== "—"; const changed = from !== to; return ( @@ -181,24 +185,24 @@ export function DiffRow({ {label} - - {from} - - {changed && ( - <> - - → - - - {to} - - + {hadBefore && ( + + {from} + )} + {hadBefore && changed && ( + + → + + )} + + {to} + );