rez-table-listing-mui 1.3.58 → 1.3.59
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +4 -4
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/listing/components/filter/components/attributes-filter.tsx +2 -2
- package/src/listing/components/filter/components/forms/components/Filter-criteria.tsx +5 -4
- package/src/listing/components/login/index.tsx +25 -39
- package/src/listing/components/table-body.tsx +2 -14
- package/src/listing/components/table-settings/components/sorting.tsx +10 -2
- package/src/listing/components/table-settings/index.tsx +3 -3
- package/src/listing/components/tabs/index.tsx +13 -15
- package/src/listing/libs/hooks/useEntityTableAPI.tsx +24 -16
- package/src/listing/libs/utils/apiColumn.ts +11 -11
- package/src/listing/libs/utils/common.ts +3 -9
- package/src/listing/types/common.ts +2 -2
- package/src/listing/types/filter.ts +2 -2
- package/src/testing-grounds/filter-in-modal/saved-filter-modal.tsx +1 -2
- package/src/view/FIlterWrapper.tsx +2 -1
- package/src/view/ListingView.tsx +71 -72
package/package.json
CHANGED
|
@@ -76,7 +76,7 @@ const AttributesFilter = ({
|
|
|
76
76
|
} else {
|
|
77
77
|
// Else, replace with new single selection
|
|
78
78
|
const defaultOperator =
|
|
79
|
-
columnsData?.operation_list[matchingColumn.
|
|
79
|
+
columnsData?.operation_list[matchingColumn.element_type]?.[0]?.value ||
|
|
80
80
|
"in";
|
|
81
81
|
|
|
82
82
|
const newFilter = {
|
|
@@ -173,7 +173,7 @@ const AttributesFilter = ({
|
|
|
173
173
|
}}
|
|
174
174
|
>
|
|
175
175
|
{columnsData?.column_list
|
|
176
|
-
?.filter((column) => column.
|
|
176
|
+
?.filter((column) => column.element_type.includes("select"))
|
|
177
177
|
.map((column, index) => (
|
|
178
178
|
<MenuItem
|
|
179
179
|
key={index}
|
|
@@ -62,14 +62,15 @@ const FilterCriteria = ({
|
|
|
62
62
|
const handleAddFilter = (
|
|
63
63
|
attribute: FilterDataMainFilterEntityWiseCriteriaProps
|
|
64
64
|
) => {
|
|
65
|
-
const dropdownOptions =
|
|
65
|
+
const dropdownOptions =
|
|
66
|
+
columnsData?.operation_list[attribute?.element_type];
|
|
66
67
|
|
|
67
|
-
const defaultValue = attribute.
|
|
68
|
+
const defaultValue = attribute.element_type === "multiselect" ? [] : "";
|
|
68
69
|
|
|
69
70
|
const defaultOperator = dropdownOptions?.[0]?.value || "";
|
|
70
71
|
|
|
71
72
|
const matchingDropdownList =
|
|
72
|
-
columnsData?.operation_list[attribute.
|
|
73
|
+
columnsData?.operation_list[attribute.element_type] || [];
|
|
73
74
|
|
|
74
75
|
const newFilter = {
|
|
75
76
|
filter_attribute: attribute.attribute_key,
|
|
@@ -83,7 +84,7 @@ const FilterCriteria = ({
|
|
|
83
84
|
// id: attribute?.id,
|
|
84
85
|
filter_attribute_name: attribute?.name,
|
|
85
86
|
filter_attribute_data_type:
|
|
86
|
-
attribute?.
|
|
87
|
+
attribute?.element_type || attribute?.element_type,
|
|
87
88
|
datasource_list: attribute?.datasource_list,
|
|
88
89
|
dropdown_list: matchingDropdownList,
|
|
89
90
|
filter_entity_name: selectedFilterEntity?.label,
|
|
@@ -8,65 +8,51 @@ const LoginButton = () => {
|
|
|
8
8
|
const handleLogin = async () => {
|
|
9
9
|
setLoading(true);
|
|
10
10
|
// const api_url = "https://api.eth-qa.rezolut.in/api/enrol/auth";
|
|
11
|
-
const api_url = "http://localhost:
|
|
12
|
-
const email_id = "
|
|
11
|
+
const api_url = "http://localhost:6010/api/auth";
|
|
12
|
+
const email_id = "admin@rezolut.in";
|
|
13
13
|
const email_otp = "123456";
|
|
14
14
|
const sub_domain = "universal";
|
|
15
15
|
|
|
16
16
|
setLoading(true);
|
|
17
17
|
|
|
18
18
|
await axios
|
|
19
|
-
.post(`${api_url}/sso/
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
.post(`${api_url}/sso/otp/generate`, {
|
|
20
|
+
identifier: email_id,
|
|
21
|
+
service: "email",
|
|
22
22
|
})
|
|
23
|
-
.then(async (
|
|
23
|
+
.then(async (otpAPIResponse) => {
|
|
24
24
|
await axios
|
|
25
|
-
.post(`${api_url}/
|
|
25
|
+
.post(`${api_url}/verify-otp`, {
|
|
26
26
|
identifier: email_id,
|
|
27
27
|
service: "email",
|
|
28
|
+
reset: true,
|
|
29
|
+
otp: "123456",
|
|
30
|
+
otp_id: otpAPIResponse.data.otp_id,
|
|
31
|
+
fcm_token: "",
|
|
32
|
+
subdomain: "platform",
|
|
28
33
|
})
|
|
29
|
-
.then(
|
|
30
|
-
|
|
31
|
-
.post(`${api_url}/verify-otp`, {
|
|
32
|
-
fcm_token: "",
|
|
33
|
-
identifier: email_id,
|
|
34
|
-
otp: email_otp,
|
|
35
|
-
otp_id: otpAPIResponse.data.otp_id,
|
|
36
|
-
reset: true,
|
|
37
|
-
service: "email",
|
|
38
|
-
subdomain: "universal",
|
|
39
|
-
})
|
|
40
|
-
.then((otpVerifyResponse) => {
|
|
41
|
-
const token = otpVerifyResponse.data.accessToken;
|
|
34
|
+
.then((otpVerifyResponse) => {
|
|
35
|
+
const token = otpVerifyResponse.data.accessToken;
|
|
42
36
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
})
|
|
51
|
-
.catch((error) => {
|
|
52
|
-
console.error("Login failed:", error);
|
|
53
|
-
alert("Login failed. Check console for details.");
|
|
54
|
-
})
|
|
55
|
-
.finally(() => {
|
|
56
|
-
setLoading(false);
|
|
57
|
-
});
|
|
37
|
+
if (token) {
|
|
38
|
+
localStorage.setItem("authToken", token);
|
|
39
|
+
alert("Login successful");
|
|
40
|
+
window.location.reload(); // reload app to re-trigger axios with token
|
|
41
|
+
} else {
|
|
42
|
+
alert("Token not found in response.");
|
|
43
|
+
}
|
|
58
44
|
})
|
|
59
45
|
.catch((error) => {
|
|
60
|
-
console.error("
|
|
61
|
-
alert("
|
|
46
|
+
console.error("OTP verification failed:", error);
|
|
47
|
+
alert("OTP verification failed. Check console for details.");
|
|
62
48
|
})
|
|
63
49
|
.finally(() => {
|
|
64
50
|
setLoading(false);
|
|
65
51
|
});
|
|
66
52
|
})
|
|
67
53
|
.catch((error) => {
|
|
68
|
-
console.error("
|
|
69
|
-
alert("
|
|
54
|
+
console.error("OTP generation failed:", error);
|
|
55
|
+
alert("OTP generation failed. Check console for details.");
|
|
70
56
|
})
|
|
71
57
|
.finally(() => {
|
|
72
58
|
setLoading(false);
|
|
@@ -15,10 +15,7 @@ import {
|
|
|
15
15
|
horizontalListSortingStrategy,
|
|
16
16
|
SortableContext,
|
|
17
17
|
} from "@dnd-kit/sortable";
|
|
18
|
-
import {
|
|
19
|
-
getColumnPinningStylesBody,
|
|
20
|
-
getDepthBackground,
|
|
21
|
-
} from "../libs/utils/common";
|
|
18
|
+
import { getColumnPinningStylesBody } from "../libs/utils/common";
|
|
22
19
|
import Checkbox from "./inputs/checkbox";
|
|
23
20
|
|
|
24
21
|
interface TableBodyProps<T> {
|
|
@@ -42,13 +39,7 @@ function TableBody<T>({
|
|
|
42
39
|
|
|
43
40
|
const renderRow = (row: Row<T>) => {
|
|
44
41
|
const renderedRow = (
|
|
45
|
-
<tr
|
|
46
|
-
key={row.id}
|
|
47
|
-
className="ts__body__tr"
|
|
48
|
-
style={{
|
|
49
|
-
backgroundColor: getDepthBackground(row.depth),
|
|
50
|
-
}}
|
|
51
|
-
>
|
|
42
|
+
<tr key={row.id} className="ts__body__tr">
|
|
52
43
|
{enableRowSelection && (
|
|
53
44
|
<td
|
|
54
45
|
className="ts__body__td ts__body__checkbox"
|
|
@@ -56,7 +47,6 @@ function TableBody<T>({
|
|
|
56
47
|
position: "sticky",
|
|
57
48
|
left: 0,
|
|
58
49
|
width: "50px",
|
|
59
|
-
backgroundColor: "inherit",
|
|
60
50
|
}}
|
|
61
51
|
>
|
|
62
52
|
<Checkbox
|
|
@@ -76,12 +66,10 @@ function TableBody<T>({
|
|
|
76
66
|
width: cell.column.getSize(),
|
|
77
67
|
...((wrapColumns.all_wrap || wrapColumns[cell.column.id]) && {
|
|
78
68
|
wordBreak: "break-all",
|
|
79
|
-
backgroundColor: "inherit",
|
|
80
69
|
// whiteSpace: "normal",
|
|
81
70
|
}),
|
|
82
71
|
} as React.CSSProperties,
|
|
83
72
|
align: (cell.column.columnDef.meta as align)?.align || "left",
|
|
84
|
-
// backgroundColor: getDepthBackground(row.depth),
|
|
85
73
|
};
|
|
86
74
|
|
|
87
75
|
return enableColumnReordering ? (
|
|
@@ -326,13 +326,21 @@ const Sorting = ({
|
|
|
326
326
|
const getCurrentLists = () => {
|
|
327
327
|
if (sortingTabState?.isDefault) {
|
|
328
328
|
return {
|
|
329
|
-
showList:
|
|
329
|
+
showList:
|
|
330
|
+
columnsData?.map((column: any) => ({
|
|
331
|
+
label: column?.name,
|
|
332
|
+
value: column?.attribute_key,
|
|
333
|
+
})) || [],
|
|
330
334
|
hideList: columnTabState?.hide_list || [],
|
|
331
335
|
};
|
|
332
336
|
} else {
|
|
333
337
|
const currentTab = sortingTabState?.tabs?.[activeTabIndex || 0];
|
|
334
338
|
return {
|
|
335
|
-
showList:
|
|
339
|
+
showList:
|
|
340
|
+
columnsData?.map((column: any) => ({
|
|
341
|
+
label: column?.name,
|
|
342
|
+
value: column?.attribute_key,
|
|
343
|
+
})) || [],
|
|
336
344
|
// hideList: currentTab?.hide_list || [],
|
|
337
345
|
};
|
|
338
346
|
}
|
|
@@ -54,11 +54,11 @@ export function QuickFilterSettings({
|
|
|
54
54
|
|
|
55
55
|
const hasAPIData = Boolean(Object.entries(columnsData).length);
|
|
56
56
|
let disbaledCondition =
|
|
57
|
-
quickTabStates?.show_list?.length === 0 ||
|
|
58
|
-
|
|
57
|
+
// quickTabStates?.show_list?.length === 0 || --> commented as per the requirement
|
|
58
|
+
columnTabState?.isDefault
|
|
59
59
|
? columnTabState?.show_list?.length === 0
|
|
60
60
|
: columnTabState?.tabs?.find((tab) => tab?.show_list?.length === 0)
|
|
61
|
-
?.show_list?.length === 0
|
|
61
|
+
?.show_list?.length === 0;
|
|
62
62
|
|
|
63
63
|
const handleTabChange = (_: React.SyntheticEvent, newValue: number) => {
|
|
64
64
|
setTabValue(newValue);
|
|
@@ -8,8 +8,8 @@ import { useMemo } from "react";
|
|
|
8
8
|
import { SettingIcon } from "../../../assets/svg";
|
|
9
9
|
|
|
10
10
|
interface TabDataProps {
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
tab_name: string | null;
|
|
12
|
+
count: string | number;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
interface TableTabsProps {
|
|
@@ -37,20 +37,20 @@ export function TableTabs({
|
|
|
37
37
|
tableStates.setPagination((prev) => ({ ...prev, pageIndex: 0 }));
|
|
38
38
|
};
|
|
39
39
|
|
|
40
|
-
// Normalize
|
|
40
|
+
// Normalize tab_name to uppercase for display + logic
|
|
41
41
|
const normalizedTabs = useMemo(() => {
|
|
42
42
|
return tabsData
|
|
43
|
-
?.filter((tab) => tab.
|
|
43
|
+
?.filter((tab) => tab.tab_name !== null)
|
|
44
44
|
?.map((tab) => ({
|
|
45
45
|
...tab,
|
|
46
|
-
|
|
46
|
+
tab_name: tab.tab_name,
|
|
47
47
|
}));
|
|
48
48
|
}, [tabsData]);
|
|
49
49
|
|
|
50
50
|
const defaultTab = useMemo(() => {
|
|
51
51
|
return (
|
|
52
|
-
normalizedTabs.find((t) => t.
|
|
53
|
-
normalizedTabs[0]?.
|
|
52
|
+
normalizedTabs.find((t) => t.tab_name === "All")?.tab_name ||
|
|
53
|
+
normalizedTabs[0]?.tab_name ||
|
|
54
54
|
""
|
|
55
55
|
);
|
|
56
56
|
}, [normalizedTabs]);
|
|
@@ -78,16 +78,16 @@ export function TableTabs({
|
|
|
78
78
|
slotProps={{ indicator: { sx: { display: "none" } } }}
|
|
79
79
|
sx={tableTabsStyles.tabs}
|
|
80
80
|
>
|
|
81
|
-
{normalizedTabs.map(({
|
|
82
|
-
const isSelected = activeTab ===
|
|
81
|
+
{normalizedTabs.map(({ tab_name, count }) => {
|
|
82
|
+
const isSelected = activeTab === tab_name;
|
|
83
83
|
|
|
84
84
|
return (
|
|
85
85
|
<Tab
|
|
86
|
-
key={
|
|
87
|
-
value={
|
|
86
|
+
key={tab_name}
|
|
87
|
+
value={tab_name}
|
|
88
88
|
label={
|
|
89
89
|
<Box display="flex" alignItems="center" gap={1}>
|
|
90
|
-
<Box>{
|
|
90
|
+
<Box>{tab_name}</Box>
|
|
91
91
|
<Box
|
|
92
92
|
sx={{
|
|
93
93
|
...tableTabsStyles.tabCount,
|
|
@@ -100,9 +100,7 @@ export function TableTabs({
|
|
|
100
100
|
}),
|
|
101
101
|
}}
|
|
102
102
|
>
|
|
103
|
-
{
|
|
104
|
-
? "0"
|
|
105
|
-
: String(tab_value_count).padStart(2, "0")}
|
|
103
|
+
{count == 0 ? "0" : String(count).padStart(2, "0")}
|
|
106
104
|
</Box>
|
|
107
105
|
</Box>
|
|
108
106
|
}
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
viewSettingsDropDown,
|
|
24
24
|
getOperationList,
|
|
25
25
|
getLayoutAttributes,
|
|
26
|
-
|
|
26
|
+
getAttributes,
|
|
27
27
|
} from "../utils/apiColumn";
|
|
28
28
|
import {
|
|
29
29
|
FilterDataMainFilterEntityListProps,
|
|
@@ -59,7 +59,7 @@ const entityListingCall = async ({
|
|
|
59
59
|
responseStatus: number;
|
|
60
60
|
data: EntityListingResponse;
|
|
61
61
|
}> => {
|
|
62
|
-
const url = `filter`;
|
|
62
|
+
const url = `filter/adm`;
|
|
63
63
|
|
|
64
64
|
const body = {
|
|
65
65
|
entity_type,
|
|
@@ -113,7 +113,7 @@ export const useEntityTableAPI = ({
|
|
|
113
113
|
});
|
|
114
114
|
|
|
115
115
|
return {
|
|
116
|
-
tableData: data?.data
|
|
116
|
+
tableData: data?.data,
|
|
117
117
|
status: data?.responseStatus,
|
|
118
118
|
isTableDataPending,
|
|
119
119
|
};
|
|
@@ -356,13 +356,21 @@ export const useGetFilterEntityListAndCriteria = ({
|
|
|
356
356
|
|
|
357
357
|
const filterEntityWiseCriteria = useQuery({
|
|
358
358
|
queryKey: ["filterEntityWiseCriteria", selectedFilterEntity],
|
|
359
|
-
queryFn: () =>
|
|
359
|
+
queryFn: () => getAttributes(selectedFilterEntity?.value as string),
|
|
360
360
|
enabled: !!selectedFilterEntity,
|
|
361
361
|
});
|
|
362
362
|
|
|
363
363
|
return { filterEntityList, filterEntityWiseCriteria };
|
|
364
364
|
};
|
|
365
365
|
|
|
366
|
+
export const useGetAttributes = (entity_type: string) => {
|
|
367
|
+
const attributes = useQuery({
|
|
368
|
+
queryKey: ["attributes", entity_type],
|
|
369
|
+
queryFn: () => getAttributes(entity_type),
|
|
370
|
+
});
|
|
371
|
+
|
|
372
|
+
return { attributes };
|
|
373
|
+
};
|
|
366
374
|
export const useGetOperationList = () => {
|
|
367
375
|
// First query to get meta data
|
|
368
376
|
const operationList = useQuery({
|
|
@@ -375,30 +383,30 @@ export const useGetOperationList = () => {
|
|
|
375
383
|
|
|
376
384
|
export const useGetLayoutAttributes = ({
|
|
377
385
|
entity_type,
|
|
378
|
-
|
|
386
|
+
element_type,
|
|
379
387
|
}: {
|
|
380
388
|
entity_type: string;
|
|
381
|
-
|
|
389
|
+
element_type?: string;
|
|
382
390
|
}) => {
|
|
383
391
|
// First query to get meta data
|
|
384
392
|
const layoutAttributes = useQuery({
|
|
385
|
-
queryKey: ["layoutAttributes", entity_type,
|
|
393
|
+
queryKey: ["layoutAttributes", entity_type, element_type],
|
|
386
394
|
queryFn: () =>
|
|
387
395
|
getLayoutAttributes({
|
|
388
396
|
entity_type,
|
|
389
|
-
|
|
397
|
+
element_type,
|
|
390
398
|
}),
|
|
391
399
|
});
|
|
392
400
|
|
|
393
401
|
return { layoutAttributes };
|
|
394
402
|
};
|
|
395
403
|
|
|
396
|
-
export const useGetSettingsColumnAttributes = (entity_type: string) => {
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
404
|
+
// export const useGetSettingsColumnAttributes = (entity_type: string) => {
|
|
405
|
+
// // First query to get meta data
|
|
406
|
+
// const settingsColumnAttributes = useQuery({
|
|
407
|
+
// queryKey: ["settingsColumnAttributes", entity_type],
|
|
408
|
+
// queryFn: () => getAttributes(entity_type),
|
|
409
|
+
// });
|
|
402
410
|
|
|
403
|
-
|
|
404
|
-
};
|
|
411
|
+
// return { settingsColumnAttributes };
|
|
412
|
+
// };
|
|
@@ -175,12 +175,8 @@ export const getFilterCriteriaByEntity = async (
|
|
|
175
175
|
) => {
|
|
176
176
|
const params = { entity_type: selectedFilterEntity?.value };
|
|
177
177
|
|
|
178
|
-
const response = await api.
|
|
179
|
-
`
|
|
180
|
-
{},
|
|
181
|
-
{
|
|
182
|
-
params,
|
|
183
|
-
}
|
|
178
|
+
const response = await api.get(
|
|
179
|
+
`/attribute-master/getAttributes?direct=false&entity_type=${selectedFilterEntity?.value}`
|
|
184
180
|
);
|
|
185
181
|
|
|
186
182
|
return response.data;
|
|
@@ -193,13 +189,13 @@ export const getOperationList = async () => {
|
|
|
193
189
|
|
|
194
190
|
export const getLayoutAttributes = async ({
|
|
195
191
|
entity_type,
|
|
196
|
-
|
|
192
|
+
element_type,
|
|
197
193
|
}: {
|
|
198
194
|
entity_type: string;
|
|
199
|
-
|
|
195
|
+
element_type?: string;
|
|
200
196
|
}) => {
|
|
201
197
|
const params = {
|
|
202
|
-
|
|
198
|
+
element_type,
|
|
203
199
|
};
|
|
204
200
|
const response = await api.post(
|
|
205
201
|
`/layout-preference/attributes`,
|
|
@@ -209,7 +205,11 @@ export const getLayoutAttributes = async ({
|
|
|
209
205
|
return response.data;
|
|
210
206
|
};
|
|
211
207
|
|
|
212
|
-
export const
|
|
213
|
-
const response = await api.get(
|
|
208
|
+
export const getAttributes = async (entity_type: string) => {
|
|
209
|
+
const response = await api.get(
|
|
210
|
+
`/attribute-master/getAttributes?direct=false&entity_type=${entity_type}`
|
|
211
|
+
);
|
|
212
|
+
console.log("resss", response);
|
|
213
|
+
|
|
214
214
|
return response.data;
|
|
215
215
|
};
|
|
@@ -76,20 +76,14 @@ export function customDebounce<T extends (...args: any[]) => any>(
|
|
|
76
76
|
};
|
|
77
77
|
}
|
|
78
78
|
|
|
79
|
-
export const getDepthBackground = (depth: number) => {
|
|
80
|
-
if (depth === 0) return "white";
|
|
81
|
-
const shade = 255 - depth * 8; // reduce brightness per level
|
|
82
|
-
return `rgb(${shade}, ${shade}, ${shade})`;
|
|
83
|
-
};
|
|
84
|
-
|
|
85
79
|
//ENTITY TYPE
|
|
86
|
-
const ENVIRONMENT = "
|
|
87
|
-
export const ENTITY_TYPE = "
|
|
80
|
+
const ENVIRONMENT = "adm_dev";
|
|
81
|
+
export const ENTITY_TYPE = "SCH";
|
|
88
82
|
export const MAPPED_ENTITY_TYPE = "LYPR"; // LAP OR LYPR
|
|
89
83
|
export const USER_ID = 226;
|
|
90
84
|
|
|
91
85
|
const environments = {
|
|
92
|
-
adm_dev: "http://localhost:
|
|
86
|
+
adm_dev: "http://localhost:6010/api",
|
|
93
87
|
crm_dev: "http://localhost:4011/api",
|
|
94
88
|
uat: "https://api.eth-qa.rezolut.in/api/enrol",
|
|
95
89
|
};
|
|
@@ -80,7 +80,7 @@ export interface FilterColumnsListProps {
|
|
|
80
80
|
searchable: string | null;
|
|
81
81
|
attribute_key: string;
|
|
82
82
|
sort_type: string | null;
|
|
83
|
-
|
|
83
|
+
element_type: FilterInputDataTypes;
|
|
84
84
|
data_source_type: string | null;
|
|
85
85
|
datasource_list: any | null;
|
|
86
86
|
visible: string;
|
|
@@ -356,7 +356,7 @@ export interface FilterDataMainFilterEntityWiseCriteriaProps {
|
|
|
356
356
|
attribute_key: string;
|
|
357
357
|
element_type: FilterInputDataTypes;
|
|
358
358
|
datasource_list: any;
|
|
359
|
-
|
|
359
|
+
element_type: FilterInputDataTypes;
|
|
360
360
|
}
|
|
361
361
|
|
|
362
362
|
export interface FilterDataProps {
|
|
@@ -48,7 +48,6 @@ const SavedFilterModal = ({
|
|
|
48
48
|
entity_type: ENTITY_TYPE,
|
|
49
49
|
selectedFilterEntity,
|
|
50
50
|
});
|
|
51
|
-
|
|
52
51
|
useEffect(() => {
|
|
53
52
|
const data: any = filterEntityList?.data;
|
|
54
53
|
|
|
@@ -65,7 +64,7 @@ const SavedFilterModal = ({
|
|
|
65
64
|
}, [filterEntityList?.data, filterEntityList?.isPending]);
|
|
66
65
|
|
|
67
66
|
useEffect(() => {
|
|
68
|
-
const data = filterEntityWiseCriteria?.data
|
|
67
|
+
const data = filterEntityWiseCriteria?.data;
|
|
69
68
|
|
|
70
69
|
setFilterData((prev: any) => ({
|
|
71
70
|
...prev,
|
|
@@ -4,6 +4,7 @@ import { useGetNavigationLayoutAPI } from "../listing/libs/hooks/useGetNavigatio
|
|
|
4
4
|
import { ENTITY_TYPE } from "../listing/libs/utils/common";
|
|
5
5
|
import {
|
|
6
6
|
useDeleteFilterAPI,
|
|
7
|
+
useGetAttributes,
|
|
7
8
|
useGetFilterEntityListAndCriteria,
|
|
8
9
|
useSavedFilterAPI,
|
|
9
10
|
useUpdateFilterAPI,
|
|
@@ -70,7 +71,7 @@ const CraftTableFilterWrapper = ({
|
|
|
70
71
|
}, [filterEntityList?.data, filterEntityList?.isPending]);
|
|
71
72
|
|
|
72
73
|
useEffect(() => {
|
|
73
|
-
const data = filterEntityWiseCriteria?.data
|
|
74
|
+
const data = filterEntityWiseCriteria?.data;
|
|
74
75
|
|
|
75
76
|
setFilterData((prev: any) => ({
|
|
76
77
|
...prev,
|