Skip to content

Commit

Permalink
STSMACOM-748: Show the username in the 'last updated' accordion in th…
Browse files Browse the repository at this point in the history
…e Note editing pane.
  • Loading branch information
Dmytro-Melnyshyn committed Nov 7, 2023
1 parent a7451e9 commit f7adc7c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

* Added `inputType` prop to `<SearchAndSort>` component to support both input and textarea search boxes. Refs STSMACOM-786.
* Export new `advancedSearchQueryToRows` helper to be used in Inventory app to reduce code duplication. Refs STSMACOM-787.
* Show the username in the "last updated" accordion in the Note editing pane. Fixes STSMACOM-748.

## [9.0.0](https://github.com/folio-org/stripes-smart-components/tree/v9.0.0) (2023-10-11)
[Full Changelog](https://github.com/folio-org/stripes-smart-components/compare/v8.0.0...v9.0.0)
Expand Down
8 changes: 7 additions & 1 deletion lib/Notes/utils/getMetadataFormResponse.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,16 @@ const getMetadataPropsFromResponse = (responseMetadata) => {
const {
createdDate,
createdByUsername: createdBy,
updatedByUsername,
updatedDate: lastUpdatedDate,
updatedByUserId: lastUpdatedBy
updatedByUserId,
createdByUserId,
} = responseMetadata;

const lastUpdatedBy = createdByUserId === updatedByUserId
? createdBy
: updatedByUsername;

const metadataProps = {};

if (createdDate) { metadataProps.createdDate = createdDate; }
Expand Down

0 comments on commit f7adc7c

Please sign in to comment.