From 229abdf4771e193efd4ff5abbb7e919f815d8343 Mon Sep 17 00:00:00 2001 From: Jason Skomorowski Date: Mon, 4 May 2026 14:57:34 -0400 Subject: [PATCH 1/2] Display user in event log ILLDEV-352 --- .../sections/EventHistory/EventHistory.css | 6 ++++++ .../sections/EventHistory/EventHistoryDetails.js | 8 ++++++++ .../sections/EventHistory/EventHistoryRow.js | 8 +++++++- translations/ui-rs/en.json | 2 ++ 4 files changed, 23 insertions(+), 1 deletion(-) diff --git a/src/components/ViewPatronRequest/sections/EventHistory/EventHistory.css b/src/components/ViewPatronRequest/sections/EventHistory/EventHistory.css index 48bef119..7c97c532 100644 --- a/src/components/ViewPatronRequest/sections/EventHistory/EventHistory.css +++ b/src/components/ViewPatronRequest/sections/EventHistory/EventHistory.css @@ -31,6 +31,12 @@ padding-right: var(--gutter-static, 1rem); } +/* margin-right: auto keeps the user pinned left when summaryText is absent */ +.summaryUser { + flex-shrink: 0; + margin-right: auto; +} + .eventBody { background-color: rgba(255, 255, 255, 0.5); } diff --git a/src/components/ViewPatronRequest/sections/EventHistory/EventHistoryDetails.js b/src/components/ViewPatronRequest/sections/EventHistory/EventHistoryDetails.js index f4570cc7..817c2692 100644 --- a/src/components/ViewPatronRequest/sections/EventHistory/EventHistoryDetails.js +++ b/src/components/ViewPatronRequest/sections/EventHistory/EventHistoryDetails.js @@ -114,6 +114,14 @@ const EventHistoryDetails = ({ event }) => { /> )} + {eventData.user && ( + + } + value={eventData.user} + /> + + )} {/* 2. Problem / Error */} diff --git a/src/components/ViewPatronRequest/sections/EventHistory/EventHistoryRow.js b/src/components/ViewPatronRequest/sections/EventHistory/EventHistoryRow.js index a91bd2b0..e1972a2e 100644 --- a/src/components/ViewPatronRequest/sections/EventHistory/EventHistoryRow.js +++ b/src/components/ViewPatronRequest/sections/EventHistory/EventHistoryRow.js @@ -1,4 +1,4 @@ -import { useIntl } from 'react-intl'; +import { FormattedMessage, useIntl } from 'react-intl'; import { Accordion, Badge, Layout } from '@folio/stripes/components'; import formattedDateTime from '../../../../util/formattedDateTime'; import EventHistoryDetails from './EventHistoryDetails'; @@ -110,9 +110,15 @@ const EventHistoryRow = ({ event }) => { const statusLabel = getStatusLabel(intl, event.eventStatus); const summary = getEventSummary(intl, event); const badgeColor = STATUS_BADGE_COLOR[event.eventStatus] || 'default'; + const user = event.eventData?.user; const summaryRow = ( <> + {user && ( + + + + )} {summary && ( {summary} diff --git a/translations/ui-rs/en.json b/translations/ui-rs/en.json index 91bcb365..79b24c13 100644 --- a/translations/ui-rs/en.json +++ b/translations/ui-rs/en.json @@ -118,6 +118,8 @@ "eventHistory.summary.supplierMessageConfirmation": "Supplier message confirmation", "eventHistory.summary.patronRequestMessage": "Patron request message", "eventHistory.summary.eventRecorded": "Event recorded", + "eventHistory.summary.byUser": "by {user}", + "eventHistory.user": "User", "eventHistory.rawEvent": "Raw event data", "information.heading.partDetails": "Part details", "information.heading.publicationDetails": "Publication details", From 70aa1dfa4acbfff423be94035458ab6a0927638f Mon Sep 17 00:00:00 2001 From: Jason Skomorowski Date: Tue, 5 May 2026 18:25:48 -0400 Subject: [PATCH 2/2] Streamline user display in event log --- .../sections/EventHistory/EventHistory.css | 6 ------ .../sections/EventHistory/EventHistoryDetails.js | 2 +- .../sections/EventHistory/EventHistoryRow.js | 13 ++++++------- translations/ui-rs/en.json | 4 ++-- 4 files changed, 9 insertions(+), 16 deletions(-) diff --git a/src/components/ViewPatronRequest/sections/EventHistory/EventHistory.css b/src/components/ViewPatronRequest/sections/EventHistory/EventHistory.css index 7c97c532..48bef119 100644 --- a/src/components/ViewPatronRequest/sections/EventHistory/EventHistory.css +++ b/src/components/ViewPatronRequest/sections/EventHistory/EventHistory.css @@ -31,12 +31,6 @@ padding-right: var(--gutter-static, 1rem); } -/* margin-right: auto keeps the user pinned left when summaryText is absent */ -.summaryUser { - flex-shrink: 0; - margin-right: auto; -} - .eventBody { background-color: rgba(255, 255, 255, 0.5); } diff --git a/src/components/ViewPatronRequest/sections/EventHistory/EventHistoryDetails.js b/src/components/ViewPatronRequest/sections/EventHistory/EventHistoryDetails.js index 817c2692..a7aa134e 100644 --- a/src/components/ViewPatronRequest/sections/EventHistory/EventHistoryDetails.js +++ b/src/components/ViewPatronRequest/sections/EventHistory/EventHistoryDetails.js @@ -117,7 +117,7 @@ const EventHistoryDetails = ({ event }) => { {eventData.user && ( } + label={} value={eventData.user} /> diff --git a/src/components/ViewPatronRequest/sections/EventHistory/EventHistoryRow.js b/src/components/ViewPatronRequest/sections/EventHistory/EventHistoryRow.js index e1972a2e..ed9ff80e 100644 --- a/src/components/ViewPatronRequest/sections/EventHistory/EventHistoryRow.js +++ b/src/components/ViewPatronRequest/sections/EventHistory/EventHistoryRow.js @@ -110,18 +110,17 @@ const EventHistoryRow = ({ event }) => { const statusLabel = getStatusLabel(intl, event.eventStatus); const summary = getEventSummary(intl, event); const badgeColor = STATUS_BADGE_COLOR[event.eventStatus] || 'default'; - const user = event.eventData?.user; + const actor = event.eventData?.user; const summaryRow = ( <> - {user && ( - - - - )} - {summary && ( + {(summary || actor) && ( {summary} + {summary && actor && ' ยท '} + {actor && ( + + )} )} diff --git a/translations/ui-rs/en.json b/translations/ui-rs/en.json index 79b24c13..25d9d143 100644 --- a/translations/ui-rs/en.json +++ b/translations/ui-rs/en.json @@ -118,8 +118,8 @@ "eventHistory.summary.supplierMessageConfirmation": "Supplier message confirmation", "eventHistory.summary.patronRequestMessage": "Patron request message", "eventHistory.summary.eventRecorded": "Event recorded", - "eventHistory.summary.byUser": "by {user}", - "eventHistory.user": "User", + "eventHistory.summary.byActor": "by {actor}", + "eventHistory.actor": "Actor", "eventHistory.rawEvent": "Raw event data", "information.heading.partDetails": "Part details", "information.heading.publicationDetails": "Publication details",