From d3c560e628cbe836cb91833a0b6f304d8962a85a Mon Sep 17 00:00:00 2001 From: josephalexantony-aot Date: Mon, 8 Jul 2024 03:28:47 -0700 Subject: [PATCH] FWF-3450:[Feature]- Displayed Name of the creator in task filter. --- .../ServiceFlow/list/sort/CreateNewFilter.js | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/forms-flow-web/src/components/ServiceFlow/list/sort/CreateNewFilter.js b/forms-flow-web/src/components/ServiceFlow/list/sort/CreateNewFilter.js index 5fe4206fe7..89fa9c678a 100644 --- a/forms-flow-web/src/components/ServiceFlow/list/sort/CreateNewFilter.js +++ b/forms-flow-web/src/components/ServiceFlow/list/sort/CreateNewFilter.js @@ -73,6 +73,7 @@ export default function CreateNewFilterDrawer({ }) { const dispatch = useDispatch(); const [filterName, setFilterName] = useState(""); + const [createdBy, setCreatedBy] = useState(""); const [showUndefinedVariable, setShowUndefinedVariable] = useState(false); const [definitionKeyId, setDefinitionKeyId] = useState(""); const [candidateGroup, setCandidateGroup] = useState([]); @@ -99,8 +100,8 @@ export default function CreateNewFilterDrawer({ const userGroups = useSelector( (state) => state.userAuthorization?.userGroups ); - const userName = useSelector( - (state) => state.user?.userDetail?.preferred_username + const userDetails = useSelector( + (state) => state.user?.userDetail ); const sortParams = useSelector( (state) => state.bpmTasks.filterListSortParams @@ -184,6 +185,7 @@ export default function CreateNewFilterDrawer({ useEffect(() => { if (selectedFilterData) { setFilterName(selectedFilterData.name); + setCreatedBy(selectedFilterData.createdBy); setFIlterDisplayOrder(selectedFilterData.order); let processDefinitionName = selectedFilterData?.criteria?.processDefinitionKey; @@ -373,7 +375,7 @@ export default function CreateNewFilterDrawer({ roles = []; } if (permissions === PRIVATE_ONLY_YOU) { - users.push(userName); + users.push(userDetails.preferred_username); } if ( selectUserGroupIcon === "user" && @@ -909,6 +911,13 @@ export default function CreateNewFilterDrawer({ {(t) => t("Specific Group")} {" "}
+ {createdBy && <> +
+ {(t) => t("Filter Created by")} +
+ + {createdBy} + } {permissions === SPECIFIC_USER_OR_GROUP && specificUserGroup === SPECIFIC_USER_OR_GROUP ? (
@@ -951,7 +960,7 @@ export default function CreateNewFilterDrawer({