From 8a2b9306dceab70ba272fc566ab184265745fef5 Mon Sep 17 00:00:00 2001 From: Marshal Date: Thu, 20 Aug 2026 03:59:14 +0000 Subject: [PATCH] feat(bookings): show per-document upload/review audit and download icon on clearance detail --- .../detail/ClearanceReviewSection.tsx | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/apps/edr-freight-web/backoffice/src/components/bookings/detail/ClearanceReviewSection.tsx b/apps/edr-freight-web/backoffice/src/components/bookings/detail/ClearanceReviewSection.tsx index 501e074e2..e4e78f462 100644 --- a/apps/edr-freight-web/backoffice/src/components/bookings/detail/ClearanceReviewSection.tsx +++ b/apps/edr-freight-web/backoffice/src/components/bookings/detail/ClearanceReviewSection.tsx @@ -31,6 +31,7 @@ import type { Freight } from "@edr/types"; import { isViewable } from "@edr/ui-common"; import { SectionCard } from "./SectionCard"; +import { formatDateTime } from "@/lib/format"; import { bookingsService } from "@/services/bookings.service"; import { downloadBookingFile, @@ -550,6 +551,11 @@ function DocReviewCard({ {hasFile ? doc.file!.name : "Not uploaded by customer"} + {hasFile && doc.uploadedAt ? ( + + Uploaded {formatDateTime(doc.uploadedAt)} + + ) : null} @@ -578,9 +584,36 @@ function DocReviewCard({ )} + {hasFile && ( + + + void downloadBookingFile(doc.file!.id, doc.file!.name) + } + c="edr-green" + style={{ + display: "flex", + background: "transparent", + border: "none", + cursor: "pointer", + }} + > + + + + )} + {doc.reviewedAt && (status === "APPROVED" || status === "QUERIED") && ( + + {status === "APPROVED" ? "Approved" : "Queried"} by{" "} + {doc.reviewedByName ?? "staff"} ยท {formatDateTime(doc.reviewedAt)} + + )} + {status === "QUERIED" && doc.note && (