@djb25/digit-ui-module-ekyc 1.0.15 → 1.0.17

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@djb25/digit-ui-module-ekyc",
3
- "version": "1.0.15",
3
+ "version": "1.0.17",
4
4
  "description": "Digit UI Module for Ekyc",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.modern.js",
@@ -35,7 +35,7 @@ const CitizenApp = () => {
35
35
  const breadcrumbs = [{ icon: HomeIcon, path: "/digit-ui/citizen" }, { label: t(getBreadcrumbLabel()) }];
36
36
 
37
37
  const roles = Digit.SessionStorage.get("User")?.info?.roles.map((ele) => ele.code);
38
- const isEkyAction = (!roles.includes("EKYC_SURVEYOR") || roles.includes("EMPLOYEE"))
38
+ const isEkyAction = (!roles?.includes("EKYC_SURVEYOR") || roles?.includes("EMPLOYEE"))
39
39
  return (
40
40
  <React.Fragment>
41
41
  <div className="ground-container form-container">
@@ -32,7 +32,7 @@ const Inbox = ({ parentRoute, businessService = "EKYC", initialStates = {}, filt
32
32
  };
33
33
  }, [tenantId, formState?.tableForm?.offset, formState?.tableForm?.limit, formState?.searchForm]);
34
34
 
35
- const { isLoading, data: dashboardData = {} } = Digit.Hooks.ekyc.useEkycSurveyorDashboard({}, queryParams, {
35
+ const { isLoading: isListLoading, data: listData = {} } = Digit.Hooks.ekyc.useEkycApplicationList({}, queryParams, {
36
36
  enabled: !!tenantId,
37
37
  keepPreviousData: true,
38
38
  });
@@ -64,8 +64,8 @@ const Inbox = ({ parentRoute, businessService = "EKYC", initialStates = {}, filt
64
64
  return [searchData];
65
65
  }
66
66
 
67
- return dashboardData?.dashboardInfo?.consumerList || [];
68
- }, [isSearchActive, searchData, dashboardData]);
67
+ return listData?.consumerList || [];
68
+ }, [isSearchActive, searchData, listData]);
69
69
 
70
70
  const filteredData = useMemo(() => {
71
71
  return (sourceData || []).map((item) => {
@@ -99,7 +99,7 @@ const Inbox = ({ parentRoute, businessService = "EKYC", initialStates = {}, filt
99
99
  });
100
100
  }, [sourceData]);
101
101
 
102
- const totalRecords = dashboardData?.dashboardInfo?.totalRecords || dashboardData?.totalCount || 0;
102
+ const totalRecords = listData?.totalCount || 0;
103
103
 
104
104
  const checkPathName = location.pathname.includes("ekyc/inbox");
105
105
  const PropsForInboxLinks = {
@@ -233,7 +233,7 @@ const Inbox = ({ parentRoute, businessService = "EKYC", initialStates = {}, filt
233
233
  },
234
234
  });
235
235
 
236
- const isInboxLoading = isLoading || isSearchLoading;
236
+ const isInboxLoading = isListLoading || isSearchLoading;
237
237
 
238
238
  return (
239
239
  <div className="app-container">
@@ -247,11 +247,11 @@ const Inbox = ({ parentRoute, businessService = "EKYC", initialStates = {}, filt
247
247
  propsForInboxTable,
248
248
  // propsForInboxMobileCards,
249
249
  formState,
250
- countData: dashboardData?.dashboardInfo,
251
- }}
252
- />
253
- </div>
254
- );
250
+ countData: listData,
251
+ }}
252
+ />
253
+ </div>
254
+ );
255
255
  };
256
256
 
257
257
  export default Inbox;