From b2398ad364014d3f3b05364959bc70dffdcb7cea Mon Sep 17 00:00:00 2001 From: jze9 Date: Wed, 22 Jul 2026 15:50:37 +0500 Subject: [PATCH] Show last-found location and time on the object card Surfaces last_seen_location/last_seen_at (recorded by inventory audit scans) on both the admin edit page and the public QR-scan detail page, so it's visible without having to check the audit list. Co-Authored-By: Claude Sonnet 5 --- frontend/src/pages/admin/ObjectFormPage.tsx | 7 +++++++ frontend/src/pages/public/ObjectDetailPage.tsx | 6 ++++++ 2 files changed, 13 insertions(+) diff --git a/frontend/src/pages/admin/ObjectFormPage.tsx b/frontend/src/pages/admin/ObjectFormPage.tsx index e51c5f7..06ec8c3 100644 --- a/frontend/src/pages/admin/ObjectFormPage.tsx +++ b/frontend/src/pages/admin/ObjectFormPage.tsx @@ -122,6 +122,13 @@ export function ObjectFormPage() {

{isEditing ? 'Изменить объект' : 'Новый объект'}

+ {object?.last_seen_at && ( +

+ Последний раз найден{object.last_seen_location ? `: ${object.last_seen_location}` : ''} ·{' '} + {new Date(object.last_seen_at).toLocaleString('ru-RU', { dateStyle: 'medium', timeStyle: 'short' })} +

+ )} +
diff --git a/frontend/src/pages/public/ObjectDetailPage.tsx b/frontend/src/pages/public/ObjectDetailPage.tsx index c0baf6e..e865490 100644 --- a/frontend/src/pages/public/ObjectDetailPage.tsx +++ b/frontend/src/pages/public/ObjectDetailPage.tsx @@ -23,6 +23,12 @@ export function ObjectDetailPage() {

{object.name}

Инв. номер: {object.inventory_number}

+ {object.last_seen_at && ( +

+ Последний раз найден{object.last_seen_location ? `: ${object.last_seen_location}` : ''} ·{' '} + {new Date(object.last_seen_at).toLocaleString('ru-RU', { dateStyle: 'medium', timeStyle: 'short' })} +

+ )}
{object.description && (

{object.description}