Skip to content

Commit

Permalink
Merge branch 'UIREQMED-74' of github.com:folio-org/ui-requests-mediat…
Browse files Browse the repository at this point in the history
…ed into UIREQMED-74
  • Loading branch information
artem-blazhko committed Jan 21, 2025
2 parents f7599b9 + 8071b44 commit 881671c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import PropTypes from 'prop-types';
import { useMemo } from 'react';
import { FormattedMessage } from 'react-intl';
import {
FormattedMessage,
useIntl,
} from 'react-intl';

import { useStripes } from '@folio/stripes/core';
import { ProxyManager } from '@folio/stripes/smart-components';
Expand Down Expand Up @@ -29,6 +32,7 @@ const UserForm = ({
isUserPreselected,
}) => {
const stripes = useStripes();
const { formatMessage } = useIntl();
const name = getRequesterName(user);
const ConnectedProxyManager = useMemo(() => stripes.connect(ProxyManager), [stripes]);
const proxyInformation = getProxyInformation(proxy, request?.proxyUserId);
Expand All @@ -40,7 +44,7 @@ const UserForm = ({
name={name}
id={user.id}
barcode={user.barcode}
ariaLabel={<FormattedMessage id="ui-requests-mediated.form.requester.ariaLabel" />}
ariaLabel={formatMessage({ id: 'ui-requests-mediated.form.requester.ariaLabel' }) }

Check failure on line 47 in src/components/MediatedRequestsActivities/components/UserForm/UserForm.js

View workflow job for this annotation

GitHub Actions / build-npm

There should be no space before '}'

Check failure on line 47 in src/components/MediatedRequestsActivities/components/UserForm/UserForm.js

View workflow job for this annotation

GitHub Actions / build-npm

There should be no space before '}'
/>;
const proxySection = (isProxyAvailable && proxyInformation.id) ?
<UserHighlightBox
Expand Down
6 changes: 5 additions & 1 deletion src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -284,9 +284,13 @@ export const formatNoteReferrerEntityData = (entityData) => {
};

export const getUserHighlightBoxLink = (linkText, id, ariaLabel) => {
const additionalProps = {
...(ariaLabel ? { ariaLabel } : {}),
};

return linkText ?
<Link
{...(ariaLabel ? { ariaLabel } : {})}
{...additionalProps}
to={`/users/view/${id}`}
>
{linkText}
Expand Down

0 comments on commit 881671c

Please sign in to comment.