Skip to content

Commit

Permalink
Fixed task variables label (#1772)
Browse files Browse the repository at this point in the history
  • Loading branch information
shuhaib-aot authored Nov 23, 2023
1 parent 8cbbed3 commit 6b822af
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 4 deletions.
2 changes: 1 addition & 1 deletion forms-flow-web/src/components/ServiceFlow/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ export default React.memo(() => {
}
}
},
[dispatch, currentUser]
[dispatch, currentUser, selectedFilter]
);

useEffect(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,21 @@ const ServiceTaskListView = React.memo(() => {
);
const selectedTaskVariables = useSelector((state) => state.bpmTasks.selectedTaskVariables);
const vissibleAttributes = useSelector((state) => state.bpmTasks.vissibleAttributes);
const taskvariables = useSelector(
(state) => state.bpmTasks.selectedFilter?.variables || []
);
const [taskVariableLabels , setTaskVariableLabels] = useState({});

useEffect(()=>{
setTaskVariableLabels(()=>{
const data = {};
taskvariables.forEach((item)=>{
data[item.name] = item.label;
});
return data;
});
},[taskvariables]);


const options = [
{ value: '6', label: '6' },
Expand Down Expand Up @@ -213,7 +228,7 @@ const ServiceTaskListView = React.memo(() => {
return (
<Col xs={2} key={index} >
<div className="col-12" style={{ wordBreak: "break-all" }}>
<h6 className="font-weight-light">{eachVariable.name}</h6>
<h6 className="font-weight-light">{taskVariableLabels[eachVariable.name]}</h6>
</div>
<div className="d-flex col-12">
<h6>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export default function CreateNewFilterDrawer({
setIsTasksForCurrentUserGroupsEnabled,
] = useState(false);
const [isMyTasksEnabled,setIsMyTasksEnabled] = useState(false);
const [permissions, setPermissions] = useState("");
const [permissions, setPermissions] = useState(PRIVATE_ONLY_YOU);
const [identifierId, setIdentifierId] = useState("");
const [selectUserGroupIcon, setSelectUserGroupIcon] = useState("");
const [specificUserGroup, setSpecificUserGroup] = useState("");
Expand Down Expand Up @@ -256,6 +256,7 @@ export default function CreateNewFilterDrawer({
(filter) => filter.id === selectedFilterData?.id
);
if (selectedFilterData?.id === selectedFilter?.id) {
dispatch(setSelectedBPMFilter(resData));
fetchTasks(resData);
} else {
dispatch(setSelectedBPMFilter(filterSelected));
Expand All @@ -281,7 +282,7 @@ export default function CreateNewFilterDrawer({
setCandidateGroup("");
setAssignee("");
setIncludeAssignedTasks("");
setPermissions("");
setPermissions(PRIVATE_ONLY_YOU);
setIdentifierId("");
setSelectUserGroupIcon("");
setSpecificUserGroup("");
Expand Down

0 comments on commit 6b822af

Please sign in to comment.