From 2c5a4931bde13b9a96812805084221bea117832f Mon Sep 17 00:00:00 2001 From: Okke Harsta Date: Fri, 29 Sep 2023 16:52:59 +0200 Subject: [PATCH] Mobile displays for role cards --- README.md | 8 +++++++- client/src/components/MoreLessText.js | 8 ++++---- client/src/components/RoleCard.jsx | 2 +- client/src/components/RoleCard.scss | 8 +++++++- client/src/components/User.js | 8 ++------ client/src/index.scss | 4 ++-- client/src/pages/Inviter.scss | 10 ++++++++++ welcome/src/components/MoreLessText.js | 8 ++++---- welcome/src/components/RoleCard.jsx | 2 +- welcome/src/components/RoleCard.scss | 8 +++++++- welcome/src/components/User.js | 2 +- welcome/src/index.scss | 21 ++++++++++++++------- welcome/src/pages/Proceed.js | 5 +++-- 13 files changed, 63 insertions(+), 31 deletions(-) diff --git a/README.md b/README.md index 8e242f89..6ac6a59f 100644 --- a/README.md +++ b/README.md @@ -88,6 +88,12 @@ http://localhost:8080/ui/swagger-ui/index.html http://localhost:8081/ -http://localhost:4000/profile +http://localhost:4000 http://localhost:3000 + +### [Institution Admin](#institution-admin) + +To become an institution admin in invite, add the following values as `eduPersonEntitlements` using Mujina: +* urn:mace:surfnet.nl:surfnet.nl:sab:organizationGUID:ad93daef-0911-e511-80d0-005056956c1a +* urn:mace:surfnet.nl:surfnet.nl:sab:role:SURFconextverantwoordelijke \ No newline at end of file diff --git a/client/src/components/MoreLessText.js b/client/src/components/MoreLessText.js index 8d1ff60c..f756e315 100644 --- a/client/src/components/MoreLessText.js +++ b/client/src/components/MoreLessText.js @@ -3,10 +3,10 @@ import "./MoreLessText.scss"; import I18n from "../locale/I18n"; import {isEmpty, stopEvent} from "../utils/Utils"; -export const MoreLessText = ({txt, type = "full"}) => { +export const MoreLessText = ({txt, cutOffNumber = 190, type = "full"}) => { - const [showMore, setShowMore] = useState(!isEmpty(txt) && txt.length > 190 - && txt.substring(190).indexOf(" ") > -1); + const [showMore, setShowMore] = useState(!isEmpty(txt) && txt.length > cutOffNumber + && txt.substring(cutOffNumber).indexOf(" ") > -1); const [showLess, setShowLess] = useState(false); const toggleShowMore = e => { @@ -16,7 +16,7 @@ export const MoreLessText = ({txt, type = "full"}) => { setShowLess(isShowingMore); } - const txtToDisplay = isEmpty(txt) ? txt : txt.substring(0, 190 + txt.substring(190).indexOf(" ")); + const txtToDisplay = isEmpty(txt) ? txt : txt.substring(0, cutOffNumber + txt.substring(cutOffNumber).indexOf(" ")); return ( diff --git a/client/src/components/RoleCard.jsx b/client/src/components/RoleCard.jsx index ee2e21bf..e5b4faf3 100644 --- a/client/src/components/RoleCard.jsx +++ b/client/src/components/RoleCard.jsx @@ -23,7 +23,7 @@ export const RoleCard = ({role, index, invitationSelected, invitationSelectCallb

{application.data.metaDataFields[`name:${I18n.locale}`]} ({application.data.metaDataFields[`OrganizationName:${I18n.locale}`]})

{role.name}

- +
{isEmpty(invitationSelected) &&