diff --git a/oarepo_requests/ui/theme/assets/semantic-ui/js/oarepo_requests_ui/common/components/SideRequestInfo.jsx b/oarepo_requests/ui/theme/assets/semantic-ui/js/oarepo_requests_ui/common/components/SideRequestInfo.jsx index 2b3350c..08db19e 100644 --- a/oarepo_requests/ui/theme/assets/semantic-ui/js/oarepo_requests_ui/common/components/SideRequestInfo.jsx +++ b/oarepo_requests/ui/theme/assets/semantic-ui/js/oarepo_requests_ui/common/components/SideRequestInfo.jsx @@ -10,44 +10,48 @@ export const SideRequestInfo = ({ request }) => { const statusIcon = getRequestStatusIcon(request?.status_code); return ( - - {i18next.t("Creator")} - - - - {_has(request, "links.created_by_html") ? ( - - {request.created_by.label} - - ) : ( - request.created_by?.label - )} - - - - - {i18next.t("Receiver")} - - - - {_has(request, "links.receiver_html") ? ( - - {request?.receiver?.label} - - ) : ( - request?.receiver?.label - )} - - - + {request?.created_by && + + {i18next.t("Creator")} + + + + {_has(request, "links.created_by_html") ? ( + + {request.created_by.label} + + ) : ( + request.created_by?.label + )} + + + + } + {request?.receiver && + + {i18next.t("Receiver")} + + + + {_has(request, "links.receiver_html") ? ( + + {request?.receiver?.label} + + ) : ( + request?.receiver?.label + )} + + + + } {i18next.t("Status")} @@ -68,8 +72,8 @@ export const SideRequestInfo = ({ request }) => { {request?.topic?.label ? _truncate(request?.topic?.label, { - length: 350, - }) + length: 350, + }) : i18next.t("Request topic")}