Skip to content

Commit 570fbeb

Browse files
authored
Merge pull request #542 from Bonymol-aot/FWF-4368/attribute-filter-modal
FWF-4368: [Feature] Added attribute filter
2 parents bc119cb + d115067 commit 570fbeb

File tree

14 files changed

+1892
-130
lines changed

14 files changed

+1892
-130
lines changed

forms-flow-components/src/components/CustomComponents/CustomInfo.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,14 @@ interface CustomInfoProps {
77
heading: string ;
88
content: string ;
99
className?: string ;
10+
dataTestId?: string;
1011
}
1112

1213
export const CustomInfo: FC<CustomInfoProps> = ( {
1314
heading ,
1415
content ,
1516
className ,
17+
dataTestId
1618
}) => {
1719
const { t } = useTranslation();
1820

@@ -26,7 +28,7 @@ export const CustomInfo: FC<CustomInfoProps> = ( {
2628

2729

2830
return (
29-
<div className={`info-panel ${className}`}>
31+
<div className={`info-panel ${className}`} data-test-id={dataTestId}>
3032
<div className="d-flex align-items-center">
3133
<NewInfoIcon />
3234
<div className="field-label ms-2">{t(heading)}</div>

forms-flow-review/package-lock.json

Lines changed: 1213 additions & 51 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

forms-flow-review/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
"webpack-merge": "^5.8.0"
5959
},
6060
"dependencies": {
61+
"@aot-technologies/formio-react": "^1.0.4",
6162
"@reduxjs/toolkit": "^2.6.0",
6263
"@stomp/stompjs": "^7.0.1",
6364
"@types/react": "^17.0.19",
@@ -67,8 +68,8 @@
6768
"connected-react-router": "^6.9.3",
6869
"crypto-js": "^4.2.0",
6970
"history": "^4.7.2",
71+
"i18next": "^21.6.16",
7072
"i18next-browser-languagedetector": "^8.0.4",
71-
"i18next": "^21.6.16",
7273
"redux-logger": "^3.0.6",
7374
"single-spa": "^5.9.3",
7475
"single-spa-react": "^4.3.1",

forms-flow-review/src/Routes/TaskListing.tsx

Lines changed: 43 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1-
import { useEffect, useCallback, useState } from "react";
1+
import { useEffect, useCallback } from "react";
22
import SocketIOService from "../services/SocketIOService";
3+
import { fetchBPMTaskCount, fetchFilterList } from "../api/services/filterServices";
4+
import { useDispatch, } from "react-redux";
5+
import { setBPMFiltersAndCount } from "../actions/taskActions";
36
import { ResizableTable } from "../components";
47

58
interface SocketUpdateParams {
@@ -10,6 +13,33 @@ interface SocketUpdateParams {
1013

1114
const TaskList = () => {
1215

16+
17+
18+
19+
const dispatch = useDispatch();
20+
21+
useEffect(() => {
22+
dispatch(fetchFilterList());
23+
dispatch(
24+
fetchFilterList((err, data) => {
25+
if (data) {
26+
fetchBPMTaskCount(data.filters)
27+
.then((res) => {
28+
dispatch(setBPMFiltersAndCount(res.data));
29+
})
30+
.catch((err) => {
31+
if (err) {
32+
console.error(err);
33+
}
34+
})
35+
}
36+
})
37+
);
38+
}, [dispatch]);
39+
40+
41+
42+
1343
const SocketIOCallback = useCallback(
1444
({ refreshedTaskId, forceReload, isUpdateEvent }: SocketUpdateParams) => {
1545
console.log("SocketIOCallback called");
@@ -43,9 +73,19 @@ const TaskList = () => {
4373
};
4474
}, [SocketIOCallback]);
4575

76+
77+
78+
4679
return (
4780
<div>
48-
<ResizableTable/>
81+
<ResizableTable />
4982
</div>
83+
84+
85+
5086
);
51-
};export default TaskList;
87+
};
88+
89+
90+
91+
export default TaskList;

forms-flow-review/src/actions/actionConstants.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ export default {
1616
BPM_FILTER_LIST: "BPM_FILTER_LIST",
1717
IS_BPM_FILTERS_LOADING: "IS_BPM_FILTERS_LOADING",
1818
BPM_SELECTED_FILTER: "BPM_SELECTED_FILTER",
19+
BPM_FILTERS_AND_COUNT:"BPM_FILTERS_AND_COUNT",
20+
SELECTED_TASK_ID: "SELECTED_TASK_ID",
21+
UPDATE_FILTER_SEARCH_PARAMS:"UPDATE_FILTER_SEARCH_PARAMS",
1922
TASKLIST: "TASKLIST",
2023
TASK_LIST_LIMIT_CHANGE: "TASK_LIST_LIMIT_CHANGE",
2124
TASK_LIST_PAGE_CHANGE: "TASK_LIST_PAGE_CHANGE",

forms-flow-review/src/actions/taskActions.ts

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,40 @@ export const setTasks = (data: any) => ({
9696
});
9797
};
9898

99+
export const setSelectedBPMFilter = (data) => (dispatch) => {
100+
dispatch({
101+
type: ACTION_CONSTANTS.BPM_SELECTED_FILTER,
102+
payload: data,
103+
});
104+
};
105+
106+
export const setBPMFiltersAndCount = (data) => (dispatch) => {
107+
dispatch({
108+
type: ACTION_CONSTANTS.BPM_FILTERS_AND_COUNT,
109+
payload: data,
110+
});
111+
};
112+
113+
export const setSelectedTaskID = (data) => (dispatch) => {
114+
dispatch({
115+
type: ACTION_CONSTANTS.SELECTED_TASK_ID,
116+
payload: data,
117+
});
118+
};
119+
120+
export const setBPMTaskListActivePage = (data) => (dispatch) => {
121+
dispatch({
122+
type: ACTION_CONSTANTS.BPM_TASK_LIST_ACTIVE_PAGE,
123+
payload: data,
124+
});
125+
};
126+
127+
export const setBPMFilterSearchParams = (data) => (dispatch) => {
128+
dispatch({
129+
type: ACTION_CONSTANTS.UPDATE_FILTER_SEARCH_PARAMS,
130+
payload: data,
131+
});
132+
};
99133

100134

101135

0 commit comments

Comments
 (0)