From 54819690e0bacd73c5ac2d7e82e973688aec94da Mon Sep 17 00:00:00 2001 From: ducica Date: Mon, 2 Dec 2024 14:46:32 +0100 Subject: [PATCH] show topic title as request subject --- .../common/components/SideRequestInfo.jsx | 13 +++++++------ setup.cfg | 2 +- 2 files changed, 8 insertions(+), 7 deletions(-) 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 717af3e9..2b3350c2 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 @@ -2,6 +2,7 @@ import React from "react"; import { i18next } from "@translations/oarepo_requests_ui/i18next"; import { Icon, List } from "semantic-ui-react"; import _has from "lodash/has"; +import _truncate from "lodash/truncate"; import { getRequestStatusIcon } from "@js/oarepo_requests_common"; import PropTypes from "prop-types"; @@ -64,12 +65,12 @@ export const SideRequestInfo = ({ request }) => { {i18next.t("Topic")} - - {i18next.t("Request topic")} + + {request?.topic?.label + ? _truncate(request?.topic?.label, { + length: 350, + }) + : i18next.t("Request topic")} diff --git a/setup.cfg b/setup.cfg index b5b49b65..cb047f8e 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = oarepo-requests -version = 2.3.7 +version = 2.3.8 description = authors = Ronald Krist readme = README.md