@djb25/digit-ui-module-ekyc 1.0.30 → 1.0.32

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.
Files changed (63) hide show
  1. package/dist/index.js +8911 -1
  2. package/dist/index.js.map +1 -1
  3. package/dist/index.modern.js +3295 -2039
  4. package/dist/index.modern.js.map +1 -1
  5. package/package.json +4 -1
  6. package/dist/index.css +0 -54
  7. package/src/Module.js +0 -78
  8. package/src/components/AadhaarVerification.js +0 -315
  9. package/src/components/AssignEkyc.js +0 -236
  10. package/src/components/AssignEkycModal.js +0 -446
  11. package/src/components/CeoDashboard.js +0 -264
  12. package/src/components/CeoDashboard.jsx +0 -334
  13. package/src/components/ConnectionDetailsView.js +0 -241
  14. package/src/components/Dashboard.js +0 -43
  15. package/src/components/DesktopInbox.js +0 -176
  16. package/src/components/EKYCCard.js +0 -53
  17. package/src/components/Filter.js +0 -55
  18. package/src/components/MeterDetails.js +0 -336
  19. package/src/components/MobileInbox.js +0 -73
  20. package/src/components/PropertyInfo.js +0 -264
  21. package/src/components/Review.js +0 -696
  22. package/src/components/SearchConsumer.js +0 -142
  23. package/src/components/SearchFormFieldsComponent.js +0 -67
  24. package/src/components/SelectEkycZones.js +0 -71
  25. package/src/components/StatusCards.js +0 -148
  26. package/src/components/SurveyorDetailsCard.js +0 -512
  27. package/src/components/VendorDetails.jsx +0 -230
  28. package/src/components/analytics/charts/ClusterHeatmap.js +0 -88
  29. package/src/components/analytics/charts/ExecutiveBarChart.jsx +0 -30
  30. package/src/components/analytics/charts/ExecutiveLineChart.jsx +0 -159
  31. package/src/components/analytics/charts/ExecutivePieChart.jsx +0 -24
  32. package/src/components/analytics/charts/TaskStatusChart.js +0 -90
  33. package/src/components/analytics/components/AnalyticsTable.js +0 -106
  34. package/src/components/analytics/components/DashboardLayout.js +0 -52
  35. package/src/components/analytics/components/EmptyState.js +0 -27
  36. package/src/components/analytics/components/ErrorBoundary.js +0 -27
  37. package/src/components/analytics/components/FilterBar.js +0 -73
  38. package/src/components/analytics/components/NotificationPanel.js +0 -77
  39. package/src/components/analytics/components/SLAWidget.js +0 -56
  40. package/src/components/analytics/components/SkeletonLoader.js +0 -53
  41. package/src/components/analytics/components/SummaryCard.js +0 -74
  42. package/src/components/analytics/components/WorkflowTimeline.js +0 -55
  43. package/src/components/analytics/utils/exportUtils.js +0 -64
  44. package/src/components/analytics/utils/filterSerializer.js +0 -50
  45. package/src/components/mockData.js +0 -772
  46. package/src/config/AadhaarVerificationConfig.js +0 -367
  47. package/src/config/MeterDetailsConfig.js +0 -297
  48. package/src/config/PropertyInfoConfig.js +0 -145
  49. package/src/config/config.js +0 -70
  50. package/src/hook/SupervisorInboxTableConfig.js +0 -80
  51. package/src/hook/useInboxTableConfig.js +0 -131
  52. package/src/pages/citizen/Home.js +0 -54
  53. package/src/pages/citizen/Inbox.js +0 -265
  54. package/src/pages/citizen/index.js +0 -199
  55. package/src/pages/employee/ConsumerDetails.js +0 -299
  56. package/src/pages/employee/Create.js +0 -94
  57. package/src/pages/employee/EKYCForm.js +0 -118
  58. package/src/pages/employee/Inbox.js +0 -266
  59. package/src/pages/employee/Mapping.js +0 -358
  60. package/src/pages/employee/Update.js +0 -9
  61. package/src/pages/employee/index.js +0 -184
  62. package/src/utils/index.js +0 -46
  63. package/src/utils/reportDownloader.js +0 -90
@@ -1,145 +0,0 @@
1
- import React from "react";
2
- import { UploadFile, Dropdown } from "@djb25/digit-ui-react-components";
3
-
4
- const PropertyInfoConfig = (t, formData = {}, uploadFile, buildingImage, buildingImageId, setBuildingImage, setBuildingImageId) => {
5
- const propertyType = formData?.propertyType?.name || formData?.propertyType;
6
- const isHotel = propertyType === "Hotel";
7
- const isHospitalOrNursing = propertyType === "Hospital" || propertyType === "Nursing Home";
8
-
9
- const fields = [
10
- {
11
- label: t("PID Number"),
12
- isMandatory: false,
13
- type: "text",
14
- populators: {
15
- name: "pidNumber",
16
- },
17
- },
18
- {
19
- label: t("Property Type"),
20
- isMandatory: false,
21
- type: "custom",
22
- key: "propertyType",
23
- populators: {
24
- name: "propertyType",
25
- component: (props) => (
26
- <Dropdown
27
- option={[
28
- { name: "Residential" },
29
- { name: "Commercial" },
30
- { name: "Hotel" },
31
- { name: "Hospital" },
32
- { name: "Nursing Home" },
33
- ]}
34
- optionKey="name"
35
- selected={props.value}
36
- select={props.onChange}
37
- />
38
- ),
39
- },
40
- },
41
- {
42
- label: t("Sub Property Category"),
43
- isMandatory: false,
44
- type: "custom",
45
- key: "subPropertyCategory",
46
- populators: {
47
- name: "subPropertyCategory",
48
- component: (props) => (
49
- <Dropdown
50
- option={[]}
51
- optionKey="name"
52
- selected={props.value}
53
- select={props.onChange}
54
- />
55
- ),
56
- },
57
- },
58
- {
59
- label: t("No. of Floors"),
60
- isMandatory: true,
61
- type: "number",
62
- populators: {
63
- name: "noOfFloors",
64
- validation: {
65
- required: true,
66
- min: 1,
67
- },
68
- },
69
- },
70
- {
71
- label: t("Floor No. of this KNO"),
72
- isMandatory: false,
73
- type: "text",
74
- populators: {
75
- name: "floorNo",
76
- },
77
- },
78
- {
79
- label: isHospitalOrNursing ? t("No of Beds") : t("No of Beds"),
80
- isMandatory: isHospitalOrNursing,
81
- type: "number",
82
- populators: {
83
- name: "noOfBeds",
84
- validation: isHospitalOrNursing ? { required: true, min: 1 } : {},
85
- },
86
- },
87
- {
88
- label: isHotel ? t("No. of Rooms") : t("No. of Rooms"),
89
- isMandatory: isHotel,
90
- type: "number",
91
- populators: {
92
- name: "noOfRooms",
93
- validation: isHotel ? { required: true, min: 1 } : {},
94
- },
95
- },
96
- {
97
- label: t("Number of Dwelling Units"),
98
- isMandatory: false,
99
- type: "number",
100
- populators: {
101
- name: "dwellingUnits",
102
- },
103
- },
104
- {
105
- label: t("Building Image"),
106
- isMandatory: true,
107
- type: "custom",
108
- key: "buildingImage",
109
- populators: {
110
- name: "buildingImage",
111
- component: (props) => (
112
- <div>
113
- <UploadFile
114
- onUpload={(e) => uploadFile(e, props.onChange)}
115
- onDelete={() => {
116
- props.onChange(null);
117
- setBuildingImage(null);
118
- setBuildingImageId(null);
119
- }}
120
- message={buildingImageId ? t("Uploaded") : t("No file selected")}
121
- />
122
- {buildingImage && (
123
- <div style={{ marginTop: "10px" }}>
124
- <img
125
- src={buildingImage}
126
- alt="preview"
127
- style={{ maxWidth: "100%", maxHeight: "200px", objectFit: "contain" }}
128
- />
129
- </div>
130
- )}
131
- </div>
132
- ),
133
- },
134
- },
135
- ];
136
-
137
- return [
138
- {
139
- head: t("EKYC_PROPERTY_DETAILS"),
140
- body: fields,
141
- },
142
- ];
143
- };
144
-
145
- export default PropertyInfoConfig;
@@ -1,70 +0,0 @@
1
- import AadhaarVerification from "../components/AadhaarVerification";
2
-
3
- export const ekycConfig = [
4
- {
5
- body: [
6
- {
7
- route: "consumer-details",
8
- component: AadhaarVerification,
9
- key: "aadhaarVerification",
10
- texts: {
11
- header: "EKYC_CONSUMER_CONNECTION",
12
- submitBarLabel: "COMMON_SAVE_NEXT",
13
- },
14
- timeLine: [
15
- {
16
- currentStep: 1,
17
- actions: "EKYC_CONSUMER_CONNECTION",
18
- },
19
- ],
20
- },
21
- {
22
- route: "address-details",
23
- component: "AddressDetails",
24
- key: "addressDetails",
25
- doorImage: true,
26
- showMapActualLocation: false,
27
- texts: {
28
- header: "EKYC_ADDRESS_DETAILS",
29
- submitBarLabel: "COMMON_SAVE_NEXT",
30
- },
31
- timeLine: [
32
- {
33
- currentStep: 2,
34
- actions: "EKYC_ADDRESS_DETAILS",
35
- },
36
- ],
37
- },
38
- {
39
- route: "property-info",
40
- component: "PropertyInfo",
41
- key: "propertyDetails",
42
- texts: {
43
- header: "EKYC_PROPERTY_INFO",
44
- submitBarLabel: "COMMON_SAVE_NEXT",
45
- },
46
- timeLine: [
47
- {
48
- currentStep: 3,
49
- actions: "EKYC_PROPERTY_INFO",
50
- },
51
- ],
52
- },
53
- {
54
- route: "meter-details",
55
- component: "MeterDetails",
56
- key: "meterDetails",
57
- texts: {
58
- header: "EKYC_METER_DETAILS",
59
- submitBarLabel: "COMMON_SAVE_NEXT",
60
- },
61
- timeLine: [
62
- {
63
- currentStep: 4,
64
- actions: "EKYC_METER_DETAILS",
65
- },
66
- ],
67
- },
68
- ],
69
- },
70
- ];
@@ -1,80 +0,0 @@
1
- import { useHistory } from "react-router-dom";
2
- import { useTranslation } from "react-i18next";
3
- import { tableColumnConfig } from "../../../vendor/src/config/tableConfig";
4
-
5
- const SupervisorInboxTableConfig = ({
6
- onPageSizeChange,
7
- formState,
8
- totalCount,
9
- table,
10
- dispatch,
11
- onSortingByData,
12
- inboxStyles = {},
13
- tableStyle = {},
14
- }) => {
15
- const { t } = useTranslation();
16
- const history = useHistory();
17
-
18
- const userType = Digit.SessionStorage.get("User")?.info?.type?.toLowerCase() || "citizen";
19
-
20
- const handleReview = (id) => {
21
- history.push(`/digit-ui/${userType}/ekyc/assign/surveyor-details/${id}`);
22
- };
23
-
24
- const limit = formState?.tableForm?.limit || 10;
25
- const offset = formState?.tableForm?.offset || 0;
26
-
27
- return {
28
- disableSort: false,
29
- autoSort: false,
30
- manualPagination: true,
31
-
32
- currentPage: Math.floor(offset / limit),
33
-
34
- onPageSizeChange,
35
-
36
- onNextPage: () =>
37
- dispatch({
38
- action: "mutateTableForm",
39
- data: {
40
- ...formState.tableForm,
41
- offset: Number(offset) + Number(limit),
42
- },
43
- }),
44
-
45
- onPrevPage: () =>
46
- dispatch({
47
- action: "mutateTableForm",
48
- data: {
49
- ...formState.tableForm,
50
- offset: Number(offset) - Number(limit),
51
- },
52
- }),
53
-
54
- onLastPage: () =>
55
- dispatch({
56
- action: "mutateTableForm",
57
- data: {
58
- ...formState.tableForm,
59
- offset: Math.ceil(totalCount / limit) * limit - Number(limit),
60
- },
61
- }),
62
-
63
- onFirstPage: () =>
64
- dispatch({
65
- action: "mutateTableForm",
66
- data: { ...formState.tableForm, offset: 0 },
67
- }),
68
-
69
- totalRecords: totalCount,
70
- onSort: onSortingByData,
71
-
72
- data: table,
73
- columns: tableColumnConfig(t, handleReview),
74
-
75
- inboxStyles: { ...inboxStyles },
76
- tableStyle: { ...tableStyle },
77
- };
78
- };
79
-
80
- export default SupervisorInboxTableConfig;
@@ -1,131 +0,0 @@
1
- import React, { useState } from "react";
2
- import { useHistory } from "react-router-dom";
3
- import { useTranslation } from "react-i18next";
4
-
5
- const useInboxTableConfig = ({
6
- parentRoute,
7
- onPageSizeChange,
8
- formState,
9
- totalCount,
10
- table,
11
- dispatch,
12
- checkPathName,
13
- onSortingByData,
14
- tenantId,
15
- inboxStyles = {},
16
- tableStyle = {},
17
- }) => {
18
- const { t } = useTranslation();
19
- const history = useHistory();
20
- const [selectedKno, setSelectedKno] = useState("");
21
- const { data: reviewData, getReview } = Digit.Hooks.ekyc.useEkycAPI("review", tenantId);
22
- const handleReview = (kno) => {
23
- setSelectedKno(kno);
24
- getReview({ kno });
25
- };
26
-
27
- const limit = formState?.tableForm?.limit || 10;
28
- const offset = formState?.tableForm?.offset || 0;
29
- const userType = Digit.SessionStorage.get("User")?.info?.type?.toLowerCase() || "citizen";
30
-
31
- React.useEffect(() => {
32
- if (reviewData) {
33
- history.push(`/digit-ui/${userType}/ekyc/review/${selectedKno}`, { aadhaarData: reviewData?.aadhaarData, reviewData });
34
- }
35
- // eslint-disable-next-line react-hooks/exhaustive-deps
36
- }, [reviewData]);
37
-
38
- const tableColumnConfig = [
39
- {
40
- Header: t("EKYC_APPLICATION_NO"),
41
- accessor: "applicationNumber",
42
- disableSortBy: true,
43
- Cell: ({ row }) => {
44
- const kno = row.original?.kno || row.original?.applicationNumber || "NA";
45
- return (
46
- <span className="ekyc-application-link" onClick={() => handleReview(kno)}>
47
- {kno}
48
- </span>
49
- );
50
- },
51
- },
52
- {
53
- Header: t("EKYC_CITIZEN_NAME"),
54
- accessor: "citizenName",
55
- Cell: ({ row }) => <span>{row.original?.citizenName || "NA"}</span>,
56
- },
57
- {
58
- Header: t("EKYC_STATUS"),
59
- accessor: "actionStatus",
60
- Cell: ({ row }) => {
61
- const status = row.original?.status || "DEFAULT";
62
- return <span className={`ekyc-status-tag ${status}`}>{t(`${status}`)}</span>;
63
- },
64
- },
65
- {
66
- Header: t("EKYC_EKYC_STATUS"),
67
- accessor: "ekycStatus",
68
- Cell: ({ row }) => {
69
- const ekycStatus = (row.original?.ekycStatus || row.original?.ekycstatus || "NA").toUpperCase();
70
- return <span className={`ekyc-status-tag ${ekycStatus}`}>{t(`${ekycStatus}`)}</span>;
71
- },
72
- },
73
- {
74
- Header: t("EKYC_REVIEW"),
75
- accessor: "review",
76
- Cell: ({ row }) => {
77
- const kno = row.original?.kno || row.original?.applicationNumber || "NA";
78
- return (
79
- <span
80
- className="ekyc-application-link"
81
- style={{ color: "#add8f7", cursor: "pointer", fontWeight: "bold" }}
82
- onClick={() => handleReview(kno)}
83
- >
84
- {t("EKYC_REVIEW")}
85
- </span>
86
- );
87
- },
88
- },
89
- ];
90
-
91
- return {
92
- disableSort: false,
93
- autoSort: false,
94
- manualPagination: true,
95
- initSortId: "applicationDate",
96
- onPageSizeChange: onPageSizeChange,
97
- currentPage: offset,
98
- onNextPage: () =>
99
- dispatch({
100
- action: "mutateTableForm",
101
- data: { ...formState.tableForm, offset: parseInt(formState.tableForm?.offset) + 10 },
102
- checkPathName,
103
- }),
104
- onPrevPage: () =>
105
- dispatch({
106
- action: "mutateTableForm",
107
- data: { ...formState.tableForm, offset: parseInt(formState.tableForm?.offset) - 10 },
108
- checkPathName,
109
- }),
110
- pageSizeLimit: limit,
111
- onSort: onSortingByData,
112
- // sortParams: [{id: getValues("sortBy"), desc: getValues("sortOrder") === "DESC" ? true : false}],
113
- totalRecords: totalCount,
114
- onSearch: formState?.searchForm?.message,
115
- onLastPage: () =>
116
- dispatch({
117
- action: "mutateTableForm",
118
- data: { ...formState.tableForm, offset: Math.max(0, Math.ceil(totalCount / limit) - 10) },
119
- checkPathName,
120
- }),
121
- onFirstPage: () => dispatch({ action: "mutateTableForm", data: { ...formState.tableForm, offset: 0 }, checkPathName }),
122
- // globalSearch: {searchForItemsInTable},
123
- // searchQueryForTable,
124
- data: table,
125
- columns: tableColumnConfig,
126
- inboxStyles: { ...inboxStyles },
127
- tableStyle: { ...tableStyle },
128
- };
129
- };
130
-
131
- export default useInboxTableConfig;
@@ -1,54 +0,0 @@
1
- import React from "react";
2
- import { useTranslation } from "react-i18next";
3
- import { ModuleLinksView } from "@djb25/digit-ui-react-components";
4
- const Home = () => {
5
- const { t } = useTranslation();
6
- const propsForModuleCard = {
7
- moduleName: t("ACTION_TEST_EKYC"),
8
- kpis: [
9
- {
10
- count: "-",
11
- label: t("TOTAL_EKYC"),
12
- link: `/digit-ui/citizen/ekyc/dashboard`,
13
- },
14
- ],
15
- links: [],
16
- };
17
- const citizenInfo = Digit.SessionStorage.get("User")?.info?.roles;
18
- const roles = Array.isArray(citizenInfo) ? citizenInfo.map((ele) => ele.code) : [];
19
-
20
- if (roles.includes("EKYC_SURVEYOR")) {
21
- propsForModuleCard.links.push({
22
- label: t("SURVEYOR_DASHBOARD"),
23
- link: `/digit-ui/citizen/ekyc/surveyor-dashboard`,
24
- });
25
- }
26
-
27
- if (roles.includes("EKYC_SUPERVISOR") || roles.includes("EKYC_VENDOR")) {
28
- propsForModuleCard.links.push(
29
- {
30
- label: t("EKYC_DASHBOARD"),
31
- link: `/digit-ui/citizen/ekyc/dashboard`,
32
- },
33
- {
34
- label: t("EKYC_INBOX"),
35
- link: `/digit-ui/citizen/ekyc/inbox`,
36
- },
37
- {
38
- label: t("EKYC_ASSIGN"),
39
- link: `/digit-ui/citizen/ekyc/assign`,
40
- }
41
- );
42
- }
43
-
44
- if (roles.length === 1 && roles.includes("CITIZEN")) {
45
- propsForModuleCard.links.push({
46
- label: t("EKYC_STATUS"),
47
- link: `/digit-ui/citizen/ekyc/:id`,
48
- });
49
- }
50
-
51
- return <ModuleLinksView links={propsForModuleCard.links} />;
52
- };
53
-
54
- export default Home;