@djb25/digit-ui-module-ekyc 1.0.6 → 1.0.7
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.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +1006 -489
- package/dist/index.modern.js.map +1 -1
- package/package.json +4 -2
- package/src/components/DesktopInbox.js +207 -59
- package/src/components/StatusCards.js +167 -16
- package/src/pages/employee/AadhaarVerification.js +323 -280
- package/src/pages/employee/AddressDetails.js +124 -100
- package/src/pages/employee/Create.js +31 -19
- package/src/pages/employee/Inbox.js +11 -4
- package/src/pages/employee/PropertyInfo.js +382 -319
- package/src/pages/employee/Review.js +314 -226
- package/src/utils/index.js +46 -0
package/dist/index.modern.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import React, {
|
|
1
|
+
import React, { useRef, useEffect, useState, useMemo, useCallback, Fragment } from 'react';
|
|
2
2
|
import { Link, useHistory, useRouteMatch, useLocation, Switch } from 'react-router-dom';
|
|
3
|
-
import { PersonIcon as PersonIcon$1, EmployeeModuleCard, Card, HomeIcon, Table, Header, TextInput, SubmitBar,
|
|
3
|
+
import { PersonIcon as PersonIcon$1, EmployeeModuleCard, Modal, Loader, Card, HomeIcon, Table, Header, TextInput, SubmitBar, DetailsCard, FilterForm, FilterFormField, Dropdown, CardHeader, StatusTable, Row, CardLabel, RadioButtons, Toast, LocationIcon, PropertyHouse, UploadFile, ActionBar, LabelFieldPair, InfoBannerIcon, AppContainer, ModuleHeader, ArrowLeft, PrivateRoute } from '@djb25/digit-ui-react-components';
|
|
4
4
|
import { useTranslation } from 'react-i18next';
|
|
5
|
+
import { Chart, registerables } from 'chart.js';
|
|
5
6
|
|
|
6
7
|
const EKYCCard = () => {
|
|
7
8
|
const {
|
|
@@ -26,33 +27,297 @@ const EKYCCard = () => {
|
|
|
26
27
|
return /*#__PURE__*/React.createElement(EmployeeModuleCard, propsForModuleCard);
|
|
27
28
|
};
|
|
28
29
|
|
|
30
|
+
Chart.register(...registerables);
|
|
29
31
|
const StatusCards = ({
|
|
30
32
|
countData
|
|
31
33
|
}) => {
|
|
32
34
|
const {
|
|
33
35
|
t
|
|
34
36
|
} = useTranslation();
|
|
37
|
+
const chartRef1 = useRef(null);
|
|
38
|
+
const chartInstance1 = useRef(null);
|
|
39
|
+
const chartRef2 = useRef(null);
|
|
40
|
+
const chartInstance2 = useRef(null);
|
|
41
|
+
const total = (countData === null || countData === void 0 ? void 0 : countData.total) || 0;
|
|
42
|
+
const pending = (countData === null || countData === void 0 ? void 0 : countData.pending) || 0;
|
|
43
|
+
const active = (countData === null || countData === void 0 ? void 0 : countData.completed) || 0;
|
|
44
|
+
const completed = 0;
|
|
45
|
+
const actualCompleted = (countData === null || countData === void 0 ? void 0 : countData.completed) || 0;
|
|
46
|
+
const applied = total;
|
|
47
|
+
const approved = actualCompleted;
|
|
48
|
+
const efficiency = total > 0 ? Math.round(actualCompleted / total * 100) : 0;
|
|
49
|
+
useEffect(() => {
|
|
50
|
+
if (chartRef1.current) {
|
|
51
|
+
if (chartInstance1.current) chartInstance1.current.destroy();
|
|
52
|
+
const ctx1 = chartRef1.current.getContext("2d");
|
|
53
|
+
chartInstance1.current = new Chart(ctx1, {
|
|
54
|
+
type: "doughnut",
|
|
55
|
+
data: {
|
|
56
|
+
labels: [t("EKYC_ACTIVE"), t("EKYC_COMPLETED"), t("EKYC_PENDING")],
|
|
57
|
+
datasets: [{
|
|
58
|
+
data: [active, completed, pending],
|
|
59
|
+
backgroundColor: ["#1a3a6b", "#77B6EA", "#3d84ed"],
|
|
60
|
+
borderColor: ["#ffffff", "#ffffff", "#ffffff"],
|
|
61
|
+
borderWidth: 2,
|
|
62
|
+
hoverOffset: 4
|
|
63
|
+
}]
|
|
64
|
+
},
|
|
65
|
+
options: {
|
|
66
|
+
cutout: "75%",
|
|
67
|
+
plugins: {
|
|
68
|
+
legend: {
|
|
69
|
+
display: false
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
maintainAspectRatio: true,
|
|
73
|
+
responsive: true,
|
|
74
|
+
aspectRatio: 1
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
if (chartRef2.current) {
|
|
79
|
+
if (chartInstance2.current) chartInstance2.current.destroy();
|
|
80
|
+
const ctx2 = chartRef2.current.getContext("2d");
|
|
81
|
+
chartInstance2.current = new Chart(ctx2, {
|
|
82
|
+
type: "doughnut",
|
|
83
|
+
data: {
|
|
84
|
+
labels: [t("EKYC_APPROVED"), t("EKYC_OTHERS")],
|
|
85
|
+
datasets: [{
|
|
86
|
+
data: [approved, Math.max(0, applied - approved)],
|
|
87
|
+
backgroundColor: ["#219653", "#E0E0E0"],
|
|
88
|
+
borderColor: ["#ffffff", "#ffffff"],
|
|
89
|
+
borderWidth: 2,
|
|
90
|
+
hoverOffset: 4
|
|
91
|
+
}]
|
|
92
|
+
},
|
|
93
|
+
options: {
|
|
94
|
+
cutout: "75%",
|
|
95
|
+
plugins: {
|
|
96
|
+
legend: {
|
|
97
|
+
display: false
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
maintainAspectRatio: true,
|
|
101
|
+
responsive: true,
|
|
102
|
+
aspectRatio: 1
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
return () => {
|
|
107
|
+
if (chartInstance1.current) chartInstance1.current.destroy();
|
|
108
|
+
if (chartInstance2.current) chartInstance2.current.destroy();
|
|
109
|
+
};
|
|
110
|
+
}, [pending, completed, active, applied, approved, t]);
|
|
111
|
+
const formatNumber = num => {
|
|
112
|
+
return new Intl.NumberFormat("en-IN").format(num || 0);
|
|
113
|
+
};
|
|
35
114
|
return /*#__PURE__*/React.createElement("div", {
|
|
36
|
-
|
|
115
|
+
style: {
|
|
116
|
+
fontFamily: "'Segoe UI', sans-serif",
|
|
117
|
+
width: "100%"
|
|
118
|
+
}
|
|
37
119
|
}, /*#__PURE__*/React.createElement("div", {
|
|
38
|
-
|
|
120
|
+
style: {
|
|
121
|
+
display: "flex",
|
|
122
|
+
justifyContent: "space-between",
|
|
123
|
+
alignItems: "flex-start",
|
|
124
|
+
flexWrap: "wrap",
|
|
125
|
+
gap: "24px"
|
|
126
|
+
}
|
|
39
127
|
}, /*#__PURE__*/React.createElement("div", {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
className: "ekyc-status-card"
|
|
128
|
+
style: {
|
|
129
|
+
flex: "1",
|
|
130
|
+
minWidth: "250px"
|
|
131
|
+
}
|
|
45
132
|
}, /*#__PURE__*/React.createElement("div", {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
133
|
+
style: {
|
|
134
|
+
fontSize: "11px",
|
|
135
|
+
fontWeight: "700",
|
|
136
|
+
color: "#888",
|
|
137
|
+
letterSpacing: "1px",
|
|
138
|
+
marginBottom: "16px",
|
|
139
|
+
textTransform: "uppercase"
|
|
140
|
+
}
|
|
141
|
+
}, t("EKYC_DASHBOARD_METRICS") || "DASHBOARD METRICS"), /*#__PURE__*/React.createElement("div", {
|
|
142
|
+
style: {
|
|
143
|
+
display: "flex",
|
|
144
|
+
flexDirection: "column",
|
|
145
|
+
gap: "12px"
|
|
146
|
+
}
|
|
51
147
|
}, /*#__PURE__*/React.createElement("div", {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
148
|
+
style: {
|
|
149
|
+
display: "flex",
|
|
150
|
+
alignItems: "center",
|
|
151
|
+
gap: "10px"
|
|
152
|
+
}
|
|
153
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
154
|
+
style: {
|
|
155
|
+
width: "12px",
|
|
156
|
+
height: "12px",
|
|
157
|
+
borderRadius: "50%",
|
|
158
|
+
backgroundColor: "#1a3a6b",
|
|
159
|
+
flexShrink: 0
|
|
160
|
+
}
|
|
161
|
+
}), /*#__PURE__*/React.createElement("span", {
|
|
162
|
+
style: {
|
|
163
|
+
fontSize: "14px",
|
|
164
|
+
color: "#333"
|
|
165
|
+
}
|
|
166
|
+
}, t("EKYC_ACTIVE"), ": ", /*#__PURE__*/React.createElement("strong", {
|
|
167
|
+
style: {
|
|
168
|
+
color: "#1a3a6b"
|
|
169
|
+
}
|
|
170
|
+
}, formatNumber(active)))), /*#__PURE__*/React.createElement("div", {
|
|
171
|
+
style: {
|
|
172
|
+
display: "flex",
|
|
173
|
+
alignItems: "center",
|
|
174
|
+
gap: "10px"
|
|
175
|
+
}
|
|
176
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
177
|
+
style: {
|
|
178
|
+
width: "12px",
|
|
179
|
+
height: "12px",
|
|
180
|
+
borderRadius: "50%",
|
|
181
|
+
backgroundColor: "#3d84ed",
|
|
182
|
+
flexShrink: 0
|
|
183
|
+
}
|
|
184
|
+
}), /*#__PURE__*/React.createElement("span", {
|
|
185
|
+
style: {
|
|
186
|
+
fontSize: "14px",
|
|
187
|
+
color: "#333"
|
|
188
|
+
}
|
|
189
|
+
}, t("EKYC_PENDING"), ": ", /*#__PURE__*/React.createElement("strong", {
|
|
190
|
+
style: {
|
|
191
|
+
color: "#1a3a6b"
|
|
192
|
+
}
|
|
193
|
+
}, formatNumber(pending)))), /*#__PURE__*/React.createElement("div", {
|
|
194
|
+
style: {
|
|
195
|
+
display: "flex",
|
|
196
|
+
alignItems: "center",
|
|
197
|
+
gap: "10px"
|
|
198
|
+
}
|
|
199
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
200
|
+
style: {
|
|
201
|
+
width: "12px",
|
|
202
|
+
height: "12px",
|
|
203
|
+
borderRadius: "50%",
|
|
204
|
+
backgroundColor: "#77B6EA",
|
|
205
|
+
flexShrink: 0
|
|
206
|
+
}
|
|
207
|
+
}), /*#__PURE__*/React.createElement("span", {
|
|
208
|
+
style: {
|
|
209
|
+
fontSize: "14px",
|
|
210
|
+
color: "#333"
|
|
211
|
+
}
|
|
212
|
+
}, t("EKYC_COMPLETED"), ": ", /*#__PURE__*/React.createElement("strong", {
|
|
213
|
+
style: {
|
|
214
|
+
color: "#1a3a6b"
|
|
215
|
+
}
|
|
216
|
+
}, formatNumber(completed)))), /*#__PURE__*/React.createElement("div", {
|
|
217
|
+
style: {
|
|
218
|
+
marginTop: "20px",
|
|
219
|
+
padding: "16px",
|
|
220
|
+
background: "#f8faff",
|
|
221
|
+
borderRadius: "8px",
|
|
222
|
+
border: "1px solid #eef2f6"
|
|
223
|
+
}
|
|
224
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
225
|
+
style: {
|
|
226
|
+
fontSize: "32px",
|
|
227
|
+
fontWeight: "800",
|
|
228
|
+
color: "#1a3a6b",
|
|
229
|
+
lineHeight: 1
|
|
230
|
+
}
|
|
231
|
+
}, formatNumber(total)), /*#__PURE__*/React.createElement("div", {
|
|
232
|
+
style: {
|
|
233
|
+
fontSize: "12px",
|
|
234
|
+
color: "#667085",
|
|
235
|
+
marginTop: "4px",
|
|
236
|
+
fontWeight: "600"
|
|
237
|
+
}
|
|
238
|
+
}, t("EKYC_TOTAL_APPLICATIONS") || "Total Applications Applied")))), /*#__PURE__*/React.createElement("div", {
|
|
239
|
+
style: {
|
|
240
|
+
display: "flex",
|
|
241
|
+
gap: "32px",
|
|
242
|
+
alignItems: "center",
|
|
243
|
+
justifyContent: "flex-end",
|
|
244
|
+
flexWrap: "wrap"
|
|
245
|
+
}
|
|
246
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
247
|
+
style: {
|
|
248
|
+
textAlign: "center"
|
|
249
|
+
}
|
|
250
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
251
|
+
style: {
|
|
252
|
+
width: "140px",
|
|
253
|
+
height: "140px",
|
|
254
|
+
position: "relative"
|
|
255
|
+
}
|
|
256
|
+
}, /*#__PURE__*/React.createElement("canvas", {
|
|
257
|
+
ref: chartRef1
|
|
258
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
259
|
+
style: {
|
|
260
|
+
position: "absolute",
|
|
261
|
+
top: "50%",
|
|
262
|
+
left: "50%",
|
|
263
|
+
transform: "translate(-50%, -50%)",
|
|
264
|
+
textAlign: "center",
|
|
265
|
+
pointerEvents: "none",
|
|
266
|
+
width: "100%"
|
|
267
|
+
}
|
|
268
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
269
|
+
style: {
|
|
270
|
+
fontSize: "9px",
|
|
271
|
+
color: "#667085",
|
|
272
|
+
fontWeight: "700",
|
|
273
|
+
marginTop: "4px"
|
|
274
|
+
}
|
|
275
|
+
}, efficiency, "%"))), /*#__PURE__*/React.createElement("div", {
|
|
276
|
+
style: {
|
|
277
|
+
marginTop: "8px",
|
|
278
|
+
fontSize: "11px",
|
|
279
|
+
fontWeight: "700",
|
|
280
|
+
color: "#888",
|
|
281
|
+
textTransform: "uppercase"
|
|
282
|
+
}
|
|
283
|
+
}, t("EKYC_STATUS_BREAKDOWN"))), /*#__PURE__*/React.createElement("div", {
|
|
284
|
+
style: {
|
|
285
|
+
textAlign: "center"
|
|
286
|
+
}
|
|
287
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
288
|
+
style: {
|
|
289
|
+
width: "140px",
|
|
290
|
+
height: "140px",
|
|
291
|
+
position: "relative"
|
|
292
|
+
}
|
|
293
|
+
}, /*#__PURE__*/React.createElement("canvas", {
|
|
294
|
+
ref: chartRef2
|
|
295
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
296
|
+
style: {
|
|
297
|
+
position: "absolute",
|
|
298
|
+
top: "50%",
|
|
299
|
+
left: "50%",
|
|
300
|
+
transform: "translate(-50%, -50%)",
|
|
301
|
+
textAlign: "center",
|
|
302
|
+
pointerEvents: "none",
|
|
303
|
+
width: "100%"
|
|
304
|
+
}
|
|
305
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
306
|
+
style: {
|
|
307
|
+
fontSize: "9px",
|
|
308
|
+
color: "#667085",
|
|
309
|
+
fontWeight: "700",
|
|
310
|
+
marginTop: "4px"
|
|
311
|
+
}
|
|
312
|
+
}, total > 0 ? Math.round(approved / total * 100) : 0, "%"))), /*#__PURE__*/React.createElement("div", {
|
|
313
|
+
style: {
|
|
314
|
+
marginTop: "8px",
|
|
315
|
+
fontSize: "11px",
|
|
316
|
+
fontWeight: "700",
|
|
317
|
+
color: "#888",
|
|
318
|
+
textTransform: "uppercase"
|
|
319
|
+
}
|
|
320
|
+
}, t("EKYC_SUBMISSION_HEALTH"))))));
|
|
56
321
|
};
|
|
57
322
|
|
|
58
323
|
const DesktopInbox = ({
|
|
@@ -60,6 +325,7 @@ const DesktopInbox = ({
|
|
|
60
325
|
filterComponent,
|
|
61
326
|
...props
|
|
62
327
|
}) => {
|
|
328
|
+
var _Digit$Hooks$ekyc;
|
|
63
329
|
const {
|
|
64
330
|
data,
|
|
65
331
|
isLoading,
|
|
@@ -80,23 +346,143 @@ const DesktopInbox = ({
|
|
|
80
346
|
const {
|
|
81
347
|
t
|
|
82
348
|
} = useTranslation();
|
|
349
|
+
const tenantId = Digit.ULBService.getCurrentTenantId();
|
|
83
350
|
const [FilterComponent, setComp] = React.useState(() => {
|
|
84
351
|
var _Digit$ComponentRegis;
|
|
85
352
|
return (_Digit$ComponentRegis = Digit.ComponentRegistryService) === null || _Digit$ComponentRegis === void 0 ? void 0 : _Digit$ComponentRegis.getComponent(filterComponent);
|
|
86
353
|
});
|
|
354
|
+
const [showReviewModal, setShowReviewModal] = useState(false);
|
|
355
|
+
const [reviewHtml, setReviewHtml] = useState("");
|
|
356
|
+
const [selectedKno, setSelectedKno] = useState("");
|
|
357
|
+
const generateReviewHtml = info => {
|
|
358
|
+
if (!info) return "<h3>No data found</h3>";
|
|
359
|
+
return `
|
|
360
|
+
<!DOCTYPE html>
|
|
361
|
+
<html>
|
|
362
|
+
<head>
|
|
363
|
+
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet">
|
|
364
|
+
<style>
|
|
365
|
+
body { font-family: 'Inter', sans-serif; padding: 30px; color: #101828; line-height: 1.5; background: #fff; }
|
|
366
|
+
.header { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 2px solid #185FA5; padding-bottom: 20px; margin-bottom: 30px; }
|
|
367
|
+
.title { margin: 0; color: #185FA5; font-size: 24px; font-weight: 700; }
|
|
368
|
+
.subtitle { margin: 5px 0 0; color: #667085; font-size: 14px; }
|
|
369
|
+
.section { margin-bottom: 30px; border: 1px solid #EAECF0; border-radius: 12px; overflow: hidden; }
|
|
370
|
+
.section-header { background: #F9FAFB; padding: 12px 20px; border-bottom: 1px solid #EAECF0; font-weight: 700; font-size: 14px; color: #344054; text-transform: uppercase; letter-spacing: 0.05em; }
|
|
371
|
+
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; }
|
|
372
|
+
.item { padding: 16px 20px; border-bottom: 1px solid #F2F4F7; }
|
|
373
|
+
.item:nth-last-child(-n+2) { border-bottom: none; }
|
|
374
|
+
.label { font-size: 11px; color: #667085; text-transform: uppercase; font-weight: 600; letter-spacing: 0.02em; margin-bottom: 4px; }
|
|
375
|
+
.value { font-size: 14px; font-weight: 500; color: #1D2939; }
|
|
376
|
+
.badge { display: inline-block; padding: 4px 12px; border-radius: 16px; font-size: 12px; font-weight: 600; }
|
|
377
|
+
.badge-success { background: #ECFDF3; color: #027A48; }
|
|
378
|
+
.badge-warning { background: #FFFAEB; color: #B54708; }
|
|
379
|
+
.print-btn { background: #185FA5; color: #fff; padding: 10px 20px; border: none; border-radius: 8px; cursor: pointer; font-weight: 600; font-size: 14px; display: block; margin: 20px auto; }
|
|
380
|
+
@media print { .print-btn { display: none; } body { padding: 0; } }
|
|
381
|
+
</style>
|
|
382
|
+
</head>
|
|
383
|
+
<body>
|
|
384
|
+
<div class="header">
|
|
385
|
+
<div>
|
|
386
|
+
<h1 class="title">Delhi Jal Board</h1>
|
|
387
|
+
<p class="subtitle">EKYC Application Review Summary</p>
|
|
388
|
+
</div>
|
|
389
|
+
<div style="text-align: right">
|
|
390
|
+
<span class="badge ${info.statusFlag === 'ACTIVE' ? 'badge-success' : 'badge-warning'}">${info.statusFlag || 'N/A'}</span>
|
|
391
|
+
<p class="subtitle" style="margin-top: 8px">Generated on: ${new Date().toLocaleDateString()}</p>
|
|
392
|
+
</div>
|
|
393
|
+
</div>
|
|
394
|
+
|
|
395
|
+
<div class="section">
|
|
396
|
+
<div class="section-header">Basic Details</div>
|
|
397
|
+
<div class="grid">
|
|
398
|
+
<div class="item"><div class="label">KNO Number</div><div class="value">${info.kno || 'N/A'}</div></div>
|
|
399
|
+
<div class="item"><div class="label">Consumer Name</div><div class="value">${info.consumerName || 'N/A'}</div></div>
|
|
400
|
+
<div class="item"><div class="label">Mobile Number</div><div class="value">${info.mobileNo || 'N/A'}</div></div>
|
|
401
|
+
<div class="item"><div class="label">Email Address</div><div class="value">${info.email || 'N/A'}</div></div>
|
|
402
|
+
<div class="item"><div class="label">Connection Type</div><div class="value">${info.typeOfConnection || 'N/A'}</div></div>
|
|
403
|
+
<div class="item"><div class="label">Category</div><div class="value">${info.connectionCategory || 'N/A'}</div></div>
|
|
404
|
+
</div>
|
|
405
|
+
</div>
|
|
406
|
+
|
|
407
|
+
<div class="section">
|
|
408
|
+
<div class="section-header">Location & Property Information</div>
|
|
409
|
+
<div class="grid">
|
|
410
|
+
<div class="item"><div class="label">Address</div><div class="value">${info.addressRaw || 'N/A'}</div></div>
|
|
411
|
+
<div class="item"><div class="label">Locality</div><div class="value">${info.locality || 'N/A'}</div></div>
|
|
412
|
+
<div class="item"><div class="label">City - Pincode</div><div class="value">${info.city || 'N/A'} - ${info.pincode || 'N/A'}</div></div>
|
|
413
|
+
<div class="item"><div class="label">PID Number</div><div class="value">${info.pidNumber || 'N/A'}</div></div>
|
|
414
|
+
<div class="item"><div class="label">No. of Floors</div><div class="value">${info.noOfFloor || 'N/A'}</div></div>
|
|
415
|
+
<div class="item"><div class="label">Verification Status</div><div class="value"><span class="badge ${info.verificationStatus === 'SUCCESSFUL' ? 'badge-success' : 'badge-warning'}">${info.verificationStatus || 'PENDING'}</span></div></div>
|
|
416
|
+
</div>
|
|
417
|
+
</div>
|
|
418
|
+
|
|
419
|
+
<div class="section">
|
|
420
|
+
<div class="section-header">Meter Information</div>
|
|
421
|
+
<div class="grid">
|
|
422
|
+
<div class="item"><div class="label">Meter Number</div><div class="value">${info.meterNumber || 'N/A'}</div></div>
|
|
423
|
+
<div class="item"><div class="label">Meter Make</div><div class="value">${info.meterMake || 'N/A'}</div></div>
|
|
424
|
+
<div class="item"><div class="label">Meter Location</div><div class="value">${info.meterLocationAddress || 'N/A'}</div></div>
|
|
425
|
+
<div class="item"><div class="label">Working Status</div><div class="value">${info.workingStatus ? 'Working' : 'Not Working'}</div></div>
|
|
426
|
+
</div>
|
|
427
|
+
</div>
|
|
428
|
+
|
|
429
|
+
<button class="print-btn" onclick="window.print()">Print This Review</button>
|
|
430
|
+
</body>
|
|
431
|
+
</html>
|
|
432
|
+
`;
|
|
433
|
+
};
|
|
434
|
+
const useReviewHook = ((_Digit$Hooks$ekyc = Digit.Hooks.ekyc) === null || _Digit$Hooks$ekyc === void 0 ? void 0 : _Digit$Hooks$ekyc.useEkycApplicationReview) || ((p, config) => {
|
|
435
|
+
return Digit.Hooks.useMutation(data => Digit.EkycService.application_review(data, p), config);
|
|
436
|
+
});
|
|
437
|
+
const {
|
|
438
|
+
mutate: getReview,
|
|
439
|
+
isLoading: isReviewLoading
|
|
440
|
+
} = useReviewHook({
|
|
441
|
+
tenantId
|
|
442
|
+
}, {
|
|
443
|
+
onSuccess: res => {
|
|
444
|
+
if (res !== null && res !== void 0 && res.applicationReviewInfo) {
|
|
445
|
+
const html = generateReviewHtml(res.applicationReviewInfo);
|
|
446
|
+
setReviewHtml(html);
|
|
447
|
+
setShowReviewModal(true);
|
|
448
|
+
} else {
|
|
449
|
+
const url = (res === null || res === void 0 ? void 0 : res.acknowledgementURL) || (res === null || res === void 0 ? void 0 : res.reviewUrl) || (res === null || res === void 0 ? void 0 : res.url);
|
|
450
|
+
if (url) {
|
|
451
|
+
setReviewHtml("");
|
|
452
|
+
setReviewUrl(url);
|
|
453
|
+
setShowReviewModal(true);
|
|
454
|
+
} else {
|
|
455
|
+
alert(t("EKYC_REVIEW_INFO_NOT_FOUND"));
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
},
|
|
459
|
+
onError: err => {
|
|
460
|
+
alert((err === null || err === void 0 ? void 0 : err.message) || t("ERR_FAILED_TO_FETCH_REVIEW"));
|
|
461
|
+
}
|
|
462
|
+
});
|
|
463
|
+
const handleReview = kno => {
|
|
464
|
+
setSelectedKno(kno);
|
|
465
|
+
getReview({
|
|
466
|
+
kno
|
|
467
|
+
});
|
|
468
|
+
};
|
|
87
469
|
const columns = useMemo(() => [{
|
|
88
470
|
Header: t("EKYC_APPLICATION_NO"),
|
|
89
471
|
accessor: "applicationNumber",
|
|
90
472
|
Cell: ({
|
|
91
473
|
row
|
|
92
474
|
}) => {
|
|
93
|
-
var _row$original;
|
|
94
|
-
const
|
|
95
|
-
return /*#__PURE__*/React.createElement(
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
475
|
+
var _row$original, _row$original2;
|
|
476
|
+
const kno = ((_row$original = row.original) === null || _row$original === void 0 ? void 0 : _row$original.kno) || ((_row$original2 = row.original) === null || _row$original2 === void 0 ? void 0 : _row$original2.applicationNumber) || "NA";
|
|
477
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
478
|
+
className: "ekyc-application-link",
|
|
479
|
+
style: {
|
|
480
|
+
color: "#add8f7",
|
|
481
|
+
cursor: "pointer",
|
|
482
|
+
fontWeight: "bold"
|
|
483
|
+
},
|
|
484
|
+
onClick: () => handleReview(kno)
|
|
485
|
+
}, kno);
|
|
100
486
|
}
|
|
101
487
|
}, {
|
|
102
488
|
Header: t("EKYC_CITIZEN_NAME"),
|
|
@@ -104,8 +490,8 @@ const DesktopInbox = ({
|
|
|
104
490
|
Cell: ({
|
|
105
491
|
row
|
|
106
492
|
}) => {
|
|
107
|
-
var _row$
|
|
108
|
-
return /*#__PURE__*/React.createElement("span", null, ((_row$
|
|
493
|
+
var _row$original3;
|
|
494
|
+
return /*#__PURE__*/React.createElement("span", null, ((_row$original3 = row.original) === null || _row$original3 === void 0 ? void 0 : _row$original3.citizenName) || "NA");
|
|
109
495
|
}
|
|
110
496
|
}, {
|
|
111
497
|
Header: t("EKYC_STATUS"),
|
|
@@ -113,8 +499,8 @@ const DesktopInbox = ({
|
|
|
113
499
|
Cell: ({
|
|
114
500
|
row
|
|
115
501
|
}) => {
|
|
116
|
-
var _row$
|
|
117
|
-
const status = ((_row$
|
|
502
|
+
var _row$original4;
|
|
503
|
+
const status = ((_row$original4 = row.original) === null || _row$original4 === void 0 ? void 0 : _row$original4.status) || "DEFAULT";
|
|
118
504
|
return /*#__PURE__*/React.createElement("span", {
|
|
119
505
|
className: `ekyc-status-tag ${status}`
|
|
120
506
|
}, t(`${status}`));
|
|
@@ -124,11 +510,43 @@ const DesktopInbox = ({
|
|
|
124
510
|
return (data === null || data === void 0 ? void 0 : data.items) || [];
|
|
125
511
|
}, [data]);
|
|
126
512
|
return /*#__PURE__*/React.createElement("div", {
|
|
513
|
+
className: "ground-container employee-app-container form-container"
|
|
514
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
127
515
|
className: "inbox-container",
|
|
128
516
|
style: {
|
|
129
517
|
paddingBottom: "16px"
|
|
130
518
|
}
|
|
131
|
-
}, /*#__PURE__*/React.createElement(
|
|
519
|
+
}, showReviewModal && /*#__PURE__*/React.createElement(Modal, {
|
|
520
|
+
headerBarMain: t("EKYC_APPLICATION_REVIEW") + (selectedKno ? ` - ${selectedKno}` : ""),
|
|
521
|
+
headerBarEnd: /*#__PURE__*/React.createElement("div", {
|
|
522
|
+
style: {
|
|
523
|
+
cursor: "pointer",
|
|
524
|
+
padding: "5px 10px",
|
|
525
|
+
background: "#F2F4F7",
|
|
526
|
+
borderRadius: "4px"
|
|
527
|
+
},
|
|
528
|
+
onClick: () => setShowReviewModal(false)
|
|
529
|
+
}, t("CLOSE")),
|
|
530
|
+
hideSubmit: true,
|
|
531
|
+
popupStyles: {
|
|
532
|
+
width: "90%",
|
|
533
|
+
height: "90%",
|
|
534
|
+
maxWidth: "1000px"
|
|
535
|
+
},
|
|
536
|
+
popupModuleMianStyles: {
|
|
537
|
+
height: "calc(100% - 60px)",
|
|
538
|
+
padding: 0
|
|
539
|
+
}
|
|
540
|
+
}, /*#__PURE__*/React.createElement("iframe", {
|
|
541
|
+
srcDoc: reviewHtml,
|
|
542
|
+
src: !reviewHtml ? reviewUrl : undefined,
|
|
543
|
+
title: "Application Review",
|
|
544
|
+
style: {
|
|
545
|
+
width: "100%",
|
|
546
|
+
height: "100%",
|
|
547
|
+
border: "none"
|
|
548
|
+
}
|
|
549
|
+
})), (isLoading || isReviewLoading) && /*#__PURE__*/React.createElement(Loader, null), /*#__PURE__*/React.createElement("div", {
|
|
132
550
|
className: "filters-container"
|
|
133
551
|
}, /*#__PURE__*/React.createElement(Card, {
|
|
134
552
|
className: "sidebar-title-card",
|
|
@@ -203,7 +621,7 @@ const DesktopInbox = ({
|
|
|
203
621
|
className: "ekyc-table-cell"
|
|
204
622
|
};
|
|
205
623
|
}
|
|
206
|
-
})))));
|
|
624
|
+
}))))));
|
|
207
625
|
};
|
|
208
626
|
|
|
209
627
|
const SearchConsumer = ({
|
|
@@ -516,7 +934,7 @@ const Inbox = ({
|
|
|
516
934
|
filterComponent,
|
|
517
935
|
isInbox
|
|
518
936
|
}) => {
|
|
519
|
-
var
|
|
937
|
+
var _dashboardData$dashbo2;
|
|
520
938
|
const tenantId = Digit.ULBService.getCurrentTenantId();
|
|
521
939
|
const {
|
|
522
940
|
t
|
|
@@ -541,27 +959,31 @@ const Inbox = ({
|
|
|
541
959
|
} = Digit.Hooks.ekyc.useEkycSurveyorDashboard({}, {
|
|
542
960
|
tenantId,
|
|
543
961
|
offset: pageOffset,
|
|
544
|
-
limit: pageSize
|
|
545
|
-
status: ((_searchParams$status = searchParams.status) === null || _searchParams$status === void 0 ? void 0 : _searchParams$status.value) || ""
|
|
962
|
+
limit: pageSize
|
|
546
963
|
}, {
|
|
547
964
|
enabled: !!tenantId
|
|
548
965
|
});
|
|
549
966
|
const filteredData = useMemo(() => {
|
|
550
|
-
var _dashboardData$dashbo;
|
|
551
|
-
|
|
967
|
+
var _dashboardData$dashbo, _searchParams$status;
|
|
968
|
+
let items = (dashboardData === null || dashboardData === void 0 ? void 0 : (_dashboardData$dashbo = dashboardData.dashboardInfo) === null || _dashboardData$dashbo === void 0 ? void 0 : _dashboardData$dashbo.consumerList) || [];
|
|
969
|
+
const selectedStatus = (_searchParams$status = searchParams.status) === null || _searchParams$status === void 0 ? void 0 : _searchParams$status.value;
|
|
970
|
+
if (selectedStatus && selectedStatus !== "") {
|
|
971
|
+
items = items.filter(item => item.status === selectedStatus);
|
|
972
|
+
}
|
|
552
973
|
return items.map(item => ({
|
|
553
974
|
...item,
|
|
554
975
|
applicationNumber: item.kno || item.applicationNumber,
|
|
555
976
|
citizenName: item.consumerName || item.citizenName
|
|
556
977
|
}));
|
|
557
|
-
}, [dashboardData]);
|
|
978
|
+
}, [dashboardData, searchParams.status]);
|
|
558
979
|
const countData = useMemo(() => {
|
|
559
980
|
const info = (dashboardData === null || dashboardData === void 0 ? void 0 : dashboardData.dashboardInfo) || {};
|
|
560
981
|
return {
|
|
561
982
|
total: info.total || 0,
|
|
562
983
|
completed: info.completed || 0,
|
|
563
984
|
pending: info.pending || 0,
|
|
564
|
-
rejected: info.rejected || 0
|
|
985
|
+
rejected: info.rejected || 0,
|
|
986
|
+
active: info.active || 0
|
|
565
987
|
};
|
|
566
988
|
}, [dashboardData]);
|
|
567
989
|
const totalRecords = (dashboardData === null || dashboardData === void 0 ? void 0 : (_dashboardData$dashbo2 = dashboardData.dashboardInfo) === null || _dashboardData$dashbo2 === void 0 ? void 0 : _dashboardData$dashbo2.totalRecords) || (dashboardData === null || dashboardData === void 0 ? void 0 : dashboardData.totalCount) || 0;
|
|
@@ -825,13 +1247,22 @@ const Create = () => {
|
|
|
825
1247
|
}
|
|
826
1248
|
setSearchParams(params);
|
|
827
1249
|
setSearchPerformed(true);
|
|
1250
|
+
const currentKno = sessionStorage.getItem("EKYC_K_NUMBER");
|
|
1251
|
+
if (currentKno !== params.kNumber) {
|
|
1252
|
+
Object.keys(sessionStorage).forEach(key => {
|
|
1253
|
+
if (key.startsWith("EKYC_")) sessionStorage.removeItem(key);
|
|
1254
|
+
});
|
|
1255
|
+
}
|
|
828
1256
|
sessionStorage.setItem("EKYC_CREATE_SEARCH_PARAMS", JSON.stringify(params));
|
|
829
1257
|
sessionStorage.setItem("EKYC_CREATE_SEARCH_PERFORMED", "true");
|
|
1258
|
+
sessionStorage.setItem("EKYC_K_NUMBER", params.kNumber);
|
|
830
1259
|
};
|
|
831
1260
|
const closeToast = () => {
|
|
832
1261
|
setShowToast(null);
|
|
833
1262
|
};
|
|
834
|
-
return /*#__PURE__*/React.createElement(
|
|
1263
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
1264
|
+
class: "ground-container employee-app-container form-container"
|
|
1265
|
+
}, /*#__PURE__*/React.createElement(SearchConsumer, {
|
|
835
1266
|
onSearch: handleSearch,
|
|
836
1267
|
searchParams: searchParams
|
|
837
1268
|
}, searchPerformed && /*#__PURE__*/React.createElement(ConnectionDetailsView, {
|
|
@@ -853,7 +1284,17 @@ const Create = () => {
|
|
|
853
1284
|
label: showToast.label,
|
|
854
1285
|
onClose: closeToast,
|
|
855
1286
|
isDsc: true
|
|
856
|
-
}));
|
|
1287
|
+
})));
|
|
1288
|
+
};
|
|
1289
|
+
|
|
1290
|
+
const getSavedData = (key, fallback) => {
|
|
1291
|
+
const saved = sessionStorage.getItem(key);
|
|
1292
|
+
try {
|
|
1293
|
+
return saved ? JSON.parse(saved) : fallback;
|
|
1294
|
+
} catch (e) {
|
|
1295
|
+
console.warn(`Error parsing sessionStorage key "${key}":`, e);
|
|
1296
|
+
return fallback;
|
|
1297
|
+
}
|
|
857
1298
|
};
|
|
858
1299
|
|
|
859
1300
|
const CameraIcon = ({
|
|
@@ -889,25 +1330,6 @@ const PincodeIcon = ({
|
|
|
889
1330
|
d: "M13 13V11H15V13H13ZM13 9V7H15V9H13ZM17 13V11H19V13H17ZM17 9V7H19V9H17ZM11 13V11H9V13H11ZM11 9V7H9V9H11ZM7 13V11H5V13H7ZM7 9V7H5V9H7ZM21 3H3C1.9 3 1 3.9 1 5V19C1 20.1 1.9 21 3 21H21C22.1 21 23 20.1 23 19V5C23 3.9 22.1 3 21 3ZM21 19H3V5H21V19Z",
|
|
890
1331
|
fill: "currentColor"
|
|
891
1332
|
}));
|
|
892
|
-
const TrashIcon = ({
|
|
893
|
-
size: _size6 = 16
|
|
894
|
-
}) => /*#__PURE__*/React.createElement("svg", {
|
|
895
|
-
width: _size6,
|
|
896
|
-
height: _size6,
|
|
897
|
-
viewBox: "0 0 24 24",
|
|
898
|
-
fill: "none",
|
|
899
|
-
stroke: "#D92D20",
|
|
900
|
-
strokeWidth: "2",
|
|
901
|
-
strokeLinecap: "round"
|
|
902
|
-
}, /*#__PURE__*/React.createElement("polyline", {
|
|
903
|
-
points: "3 6 5 6 21 6"
|
|
904
|
-
}), /*#__PURE__*/React.createElement("path", {
|
|
905
|
-
d: "M19 6l-1 14a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2L5 6"
|
|
906
|
-
}), /*#__PURE__*/React.createElement("path", {
|
|
907
|
-
d: "M10 11v6M14 11v6"
|
|
908
|
-
}), /*#__PURE__*/React.createElement("path", {
|
|
909
|
-
d: "M9 6V4a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v2"
|
|
910
|
-
}));
|
|
911
1333
|
const CheckIcon = ({
|
|
912
1334
|
size: _size7 = 11,
|
|
913
1335
|
color: _color = "#fff"
|
|
@@ -1001,23 +1423,91 @@ const AddressDetails = ({
|
|
|
1001
1423
|
code: "SELF",
|
|
1002
1424
|
name: "EKYC_SELF"
|
|
1003
1425
|
},
|
|
1004
|
-
connectionDetails: null
|
|
1426
|
+
connectionDetails: null,
|
|
1427
|
+
initialData: {}
|
|
1005
1428
|
};
|
|
1429
|
+
const initialData = flowState.initialData || {};
|
|
1006
1430
|
const addrDetails = ((_flowState$connection = flowState.connectionDetails) === null || _flowState$connection === void 0 ? void 0 : _flowState$connection.addressDetails) || {};
|
|
1007
|
-
const [addressType, setAddressType] = useState({
|
|
1431
|
+
const [addressType, setAddressType] = useState(() => getSavedData("EKYC_ADDRESS_TYPE", {
|
|
1008
1432
|
code: "AADHAAR",
|
|
1009
1433
|
name: "EKYC_AADHAAR_ADDRESS"
|
|
1010
|
-
});
|
|
1011
|
-
const [correctAddress, setCorrectAddress] = useState({
|
|
1434
|
+
}));
|
|
1435
|
+
const [correctAddress, setCorrectAddress] = useState(() => getSavedData("EKYC_ADDRESS_CORRECT", {
|
|
1012
1436
|
code: "NO",
|
|
1013
1437
|
name: "CORE_COMMON_NO"
|
|
1014
|
-
});
|
|
1015
|
-
const [fullAddress, setFullAddress] = useState(
|
|
1016
|
-
const [flatNo, setFlatNo] = useState(
|
|
1017
|
-
const [building, setBuilding] = useState(
|
|
1018
|
-
const [landmark, setLandmark] = useState(
|
|
1019
|
-
const [pincode, setPincode] = useState(
|
|
1020
|
-
const [doorPhoto, setDoorPhoto] = useState(null);
|
|
1438
|
+
}));
|
|
1439
|
+
const [fullAddress, setFullAddress] = useState(() => sessionStorage.getItem("EKYC_FULL_ADDRESS") || initialData.fullAddress || "");
|
|
1440
|
+
const [flatNo, setFlatNo] = useState(() => sessionStorage.getItem("EKYC_FLAT_NO") || initialData.flatNo || "");
|
|
1441
|
+
const [building, setBuilding] = useState(() => sessionStorage.getItem("EKYC_BUILDING") || initialData.building || "");
|
|
1442
|
+
const [landmark, setLandmark] = useState(() => sessionStorage.getItem("EKYC_LANDMARK") || initialData.landmark || "");
|
|
1443
|
+
const [pincode, setPincode] = useState(() => sessionStorage.getItem("EKYC_PINCODE") || initialData.pincode || "");
|
|
1444
|
+
const [doorPhoto, setDoorPhoto] = useState(() => sessionStorage.getItem("EKYC_DOOR_PHOTO") || null);
|
|
1445
|
+
const [doorPhotoFileStoreId, setDoorPhotoFileStoreId] = useState(() => sessionStorage.getItem("EKYC_DOOR_PHOTO_FILESTORE_ID") || null);
|
|
1446
|
+
const [filephoto, setFilephoto] = useState(null);
|
|
1447
|
+
const [error, setError] = useState(null);
|
|
1448
|
+
const [toast, setToast] = useState(null);
|
|
1449
|
+
useEffect(() => {
|
|
1450
|
+
sessionStorage.setItem("EKYC_ADDRESS_TYPE", JSON.stringify(addressType));
|
|
1451
|
+
sessionStorage.setItem("EKYC_ADDRESS_CORRECT", JSON.stringify(correctAddress));
|
|
1452
|
+
sessionStorage.setItem("EKYC_FULL_ADDRESS", fullAddress);
|
|
1453
|
+
sessionStorage.setItem("EKYC_FLAT_NO", flatNo);
|
|
1454
|
+
sessionStorage.setItem("EKYC_BUILDING", building);
|
|
1455
|
+
sessionStorage.setItem("EKYC_LANDMARK", landmark);
|
|
1456
|
+
sessionStorage.setItem("EKYC_PINCODE", pincode);
|
|
1457
|
+
if (doorPhoto) sessionStorage.setItem("EKYC_DOOR_PHOTO", doorPhoto);
|
|
1458
|
+
if (doorPhotoFileStoreId) sessionStorage.setItem("EKYC_DOOR_PHOTO_FILESTORE_ID", doorPhotoFileStoreId);
|
|
1459
|
+
sessionStorage.setItem("EKYC_CURRENT_STEP", "ADDRESS");
|
|
1460
|
+
}, [addressType, correctAddress, fullAddress, flatNo, building, landmark, pincode, doorPhoto, doorPhotoFileStoreId]);
|
|
1461
|
+
const uploadFile = async (file, tenantId) => {
|
|
1462
|
+
var _res$data, _res$data$files, _res$data$files$;
|
|
1463
|
+
if (!file) return null;
|
|
1464
|
+
const res = await Digit.UploadServices.Filestorage("EKYC", file, tenantId);
|
|
1465
|
+
return (res === null || res === void 0 ? void 0 : (_res$data = res.data) === null || _res$data === void 0 ? void 0 : (_res$data$files = _res$data.files) === null || _res$data$files === void 0 ? void 0 : (_res$data$files$ = _res$data$files[0]) === null || _res$data$files$ === void 0 ? void 0 : _res$data$files$.fileStoreId) || null;
|
|
1466
|
+
};
|
|
1467
|
+
useEffect(() => {
|
|
1468
|
+
(async () => {
|
|
1469
|
+
setError(null);
|
|
1470
|
+
if (filephoto) {
|
|
1471
|
+
if (filephoto.size >= 2000000) {
|
|
1472
|
+
setError(t("EKYC_MAXIMUM_UPLOAD_SIZE_EXCEEDED"));
|
|
1473
|
+
setToast({
|
|
1474
|
+
type: "error",
|
|
1475
|
+
message: t("EKYC_MAXIMUM_UPLOAD_SIZE_EXCEEDED")
|
|
1476
|
+
});
|
|
1477
|
+
} else {
|
|
1478
|
+
try {
|
|
1479
|
+
setToast({
|
|
1480
|
+
type: "info",
|
|
1481
|
+
message: t("EKYC_UPLOADING")
|
|
1482
|
+
});
|
|
1483
|
+
const fsId = await uploadFile(filephoto, tenantId);
|
|
1484
|
+
if (fsId) {
|
|
1485
|
+
setDoorPhotoFileStoreId(fsId);
|
|
1486
|
+
const reader = new FileReader();
|
|
1487
|
+
reader.onloadend = () => setDoorPhoto(reader.result);
|
|
1488
|
+
reader.readAsDataURL(filephoto);
|
|
1489
|
+
setToast({
|
|
1490
|
+
type: "success",
|
|
1491
|
+
message: t("EKYC_UPLOAD_SUCCESS")
|
|
1492
|
+
});
|
|
1493
|
+
} else {
|
|
1494
|
+
setError(t("EKYC_FILE_UPLOAD_ERROR"));
|
|
1495
|
+
setToast({
|
|
1496
|
+
type: "error",
|
|
1497
|
+
message: t("EKYC_FILE_UPLOAD_ERROR")
|
|
1498
|
+
});
|
|
1499
|
+
}
|
|
1500
|
+
} catch (err) {
|
|
1501
|
+
setError(t("EKYC_FILE_UPLOAD_ERROR"));
|
|
1502
|
+
setToast({
|
|
1503
|
+
type: "error",
|
|
1504
|
+
message: t("EKYC_FILE_UPLOAD_ERROR")
|
|
1505
|
+
});
|
|
1506
|
+
}
|
|
1507
|
+
}
|
|
1508
|
+
}
|
|
1509
|
+
})();
|
|
1510
|
+
}, [filephoto]);
|
|
1021
1511
|
const [isLocationFetching, setIsLocationFetching] = useState(false);
|
|
1022
1512
|
const fileInputRef = useRef(null);
|
|
1023
1513
|
const tenantId = Digit.ULBService.getCurrentTenantId();
|
|
@@ -1068,12 +1558,16 @@ const AddressDetails = ({
|
|
|
1068
1558
|
return blocks;
|
|
1069
1559
|
};
|
|
1070
1560
|
const assemblies = getAssemblies(Array.isArray(rootBoundary) ? rootBoundary : rootBoundary ? [rootBoundary] : []);
|
|
1071
|
-
const [assembly, setAssembly] = useState(
|
|
1072
|
-
name:
|
|
1073
|
-
} : null);
|
|
1074
|
-
const [ward, setWard] = useState(
|
|
1075
|
-
name:
|
|
1076
|
-
} : null);
|
|
1561
|
+
const [assembly, setAssembly] = useState(() => getSavedData("EKYC_ASSEMBLY_DATA", initialData.assembly ? {
|
|
1562
|
+
name: initialData.assembly
|
|
1563
|
+
} : null));
|
|
1564
|
+
const [ward, setWard] = useState(() => getSavedData("EKYC_WARD_DATA", initialData.ward ? {
|
|
1565
|
+
name: initialData.ward
|
|
1566
|
+
} : null));
|
|
1567
|
+
useEffect(() => {
|
|
1568
|
+
sessionStorage.setItem("EKYC_ASSEMBLY_DATA", JSON.stringify(assembly));
|
|
1569
|
+
sessionStorage.setItem("EKYC_WARD_DATA", JSON.stringify(ward));
|
|
1570
|
+
}, [assembly, ward]);
|
|
1077
1571
|
useEffect(() => {
|
|
1078
1572
|
if (mdmsRes && addrDetails.assembly && !(assembly !== null && assembly !== void 0 && assembly.code)) {
|
|
1079
1573
|
const foundAssembly = assemblies.find(a => a.name === addrDetails.assembly || a.code === addrDetails.assembly);
|
|
@@ -1109,6 +1603,7 @@ const AddressDetails = ({
|
|
|
1109
1603
|
landmark,
|
|
1110
1604
|
pincode,
|
|
1111
1605
|
doorPhoto,
|
|
1606
|
+
doorPhotoFileStoreId,
|
|
1112
1607
|
assembly: assembly === null || assembly === void 0 ? void 0 : assembly.name,
|
|
1113
1608
|
ward: ward === null || ward === void 0 ? void 0 : ward.name
|
|
1114
1609
|
};
|
|
@@ -1118,26 +1613,26 @@ const AddressDetails = ({
|
|
|
1118
1613
|
const {
|
|
1119
1614
|
kNumber,
|
|
1120
1615
|
selectedOption,
|
|
1121
|
-
connectionDetails
|
|
1616
|
+
connectionDetails,
|
|
1617
|
+
initialData
|
|
1122
1618
|
} = flowState;
|
|
1123
1619
|
history.push("/digit-ui/employee/ekyc/property-info", {
|
|
1124
1620
|
kNumber,
|
|
1125
1621
|
selectedOption,
|
|
1126
1622
|
connectionDetails,
|
|
1127
|
-
addressDetails: payload
|
|
1623
|
+
addressDetails: payload,
|
|
1624
|
+
initialData
|
|
1128
1625
|
});
|
|
1129
1626
|
}
|
|
1130
1627
|
};
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
reader.onloadend = () => setDoorPhoto(reader.result);
|
|
1136
|
-
reader.readAsDataURL(file);
|
|
1137
|
-
};
|
|
1628
|
+
function selectphoto(e) {
|
|
1629
|
+
setDoorPhotoFileStoreId(null);
|
|
1630
|
+
setFilephoto(e.target.files[0]);
|
|
1631
|
+
}
|
|
1138
1632
|
const removePhoto = () => {
|
|
1139
1633
|
setDoorPhoto(null);
|
|
1140
|
-
|
|
1634
|
+
setDoorPhotoFileStoreId(null);
|
|
1635
|
+
setFilephoto(null);
|
|
1141
1636
|
};
|
|
1142
1637
|
const handleUseCurrentLocation = () => {
|
|
1143
1638
|
if (!("geolocation" in navigator)) {
|
|
@@ -1519,137 +2014,42 @@ const AddressDetails = ({
|
|
|
1519
2014
|
icon: /*#__PURE__*/React.createElement(CameraIcon, {
|
|
1520
2015
|
size: 16
|
|
1521
2016
|
}),
|
|
1522
|
-
label: t("
|
|
2017
|
+
label: t("EKYC_CAPTURE_DOOR_IMAGE")
|
|
1523
2018
|
}), /*#__PURE__*/React.createElement("div", {
|
|
1524
2019
|
style: {
|
|
1525
2020
|
fontSize: "12px",
|
|
1526
2021
|
color: "#667085",
|
|
1527
2022
|
marginBottom: "12px"
|
|
1528
2023
|
}
|
|
1529
|
-
}, t("EKYC_REQUIRED_FOR_VERIFICATION")), /*#__PURE__*/React.createElement(
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
2024
|
+
}, t("EKYC_REQUIRED_FOR_VERIFICATION")), /*#__PURE__*/React.createElement(UploadFile, {
|
|
2025
|
+
id: "ekyc-door-photo",
|
|
2026
|
+
extraStyleName: "propertyCreate",
|
|
2027
|
+
accept: ".jpg,.png,.jpeg",
|
|
2028
|
+
onUpload: selectphoto,
|
|
2029
|
+
onDelete: removePhoto,
|
|
2030
|
+
message: doorPhotoFileStoreId ? `1 ${t(`EKYC_ACTION_FILEUPLOADED`)}` : t(`EKYC_ACTION_NO_FILEUPLOADED`),
|
|
2031
|
+
error: error
|
|
2032
|
+
}), doorPhoto && /*#__PURE__*/React.createElement("div", {
|
|
2033
|
+
style: {
|
|
2034
|
+
marginTop: "10px",
|
|
1533
2035
|
borderRadius: "8px",
|
|
1534
|
-
padding: "12px 14px",
|
|
1535
|
-
display: "flex",
|
|
1536
|
-
alignItems: "flex-start",
|
|
1537
|
-
gap: "10px",
|
|
1538
|
-
marginBottom: "16px"
|
|
1539
|
-
}
|
|
1540
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
1541
|
-
style: {
|
|
1542
|
-
flexShrink: 0,
|
|
1543
|
-
marginTop: "1px"
|
|
1544
|
-
}
|
|
1545
|
-
}, /*#__PURE__*/React.createElement(InfoBannerIcon, {
|
|
1546
|
-
fill: "#B54708"
|
|
1547
|
-
})), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
1548
|
-
style: {
|
|
1549
|
-
fontWeight: "600",
|
|
1550
|
-
color: "#B54708",
|
|
1551
|
-
fontSize: "13px",
|
|
1552
|
-
marginBottom: "2px"
|
|
1553
|
-
}
|
|
1554
|
-
}, t("EKYC_IMPORTANT")), /*#__PURE__*/React.createElement("div", {
|
|
1555
|
-
style: {
|
|
1556
|
-
fontSize: "12px",
|
|
1557
|
-
color: "#92400E"
|
|
1558
|
-
}
|
|
1559
|
-
}, t("EKYC_CAPTURE_LIVE_CAMERA")))), /*#__PURE__*/React.createElement("input", {
|
|
1560
|
-
type: "file",
|
|
1561
|
-
ref: fileInputRef,
|
|
1562
|
-
onChange: handleCapture,
|
|
1563
|
-
accept: "image/*",
|
|
1564
|
-
style: {
|
|
1565
|
-
display: "none"
|
|
1566
|
-
}
|
|
1567
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
1568
|
-
onClick: !doorPhoto ? () => fileInputRef.current.click() : undefined,
|
|
1569
|
-
onMouseOver: e => {
|
|
1570
|
-
if (!doorPhoto) e.currentTarget.style.borderColor = "#185FA5";
|
|
1571
|
-
},
|
|
1572
|
-
onMouseOut: e => {
|
|
1573
|
-
if (!doorPhoto) e.currentTarget.style.borderColor = "#D0D5DD";
|
|
1574
|
-
},
|
|
1575
|
-
style: {
|
|
1576
|
-
border: "1.5px dashed #D0D5DD",
|
|
1577
|
-
borderRadius: "10px",
|
|
1578
|
-
minHeight: "160px",
|
|
1579
|
-
display: "flex",
|
|
1580
|
-
flexDirection: "column",
|
|
1581
|
-
alignItems: "center",
|
|
1582
|
-
justifyContent: "center",
|
|
1583
|
-
backgroundColor: "#F9FAFB",
|
|
1584
|
-
cursor: doorPhoto ? "default" : "pointer",
|
|
1585
2036
|
overflow: "hidden",
|
|
1586
|
-
|
|
1587
|
-
position: "relative",
|
|
1588
|
-
padding: doorPhoto ? "0" : "32px 24px"
|
|
1589
|
-
}
|
|
1590
|
-
}, !doorPhoto ? /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
1591
|
-
style: {
|
|
1592
|
-
width: "52px",
|
|
1593
|
-
height: "52px",
|
|
1594
|
-
borderRadius: "50%",
|
|
1595
|
-
background: "#E6F1FB",
|
|
1596
|
-
display: "flex",
|
|
1597
|
-
alignItems: "center",
|
|
1598
|
-
justifyContent: "center",
|
|
1599
|
-
marginBottom: "12px"
|
|
1600
|
-
}
|
|
1601
|
-
}, /*#__PURE__*/React.createElement(CameraIcon, {
|
|
1602
|
-
size: 26
|
|
1603
|
-
})), /*#__PURE__*/React.createElement("div", {
|
|
1604
|
-
style: {
|
|
1605
|
-
fontWeight: "600",
|
|
1606
|
-
fontSize: "14px",
|
|
1607
|
-
color: "#101828",
|
|
1608
|
-
marginBottom: "4px"
|
|
1609
|
-
}
|
|
1610
|
-
}, t("EKYC_TAP_TO_CAPTURE") || "Tap to capture"), /*#__PURE__*/React.createElement("div", {
|
|
1611
|
-
style: {
|
|
1612
|
-
fontSize: "12px",
|
|
1613
|
-
color: "#667085"
|
|
2037
|
+
border: "1px solid #EAECF0"
|
|
1614
2038
|
}
|
|
1615
|
-
},
|
|
2039
|
+
}, /*#__PURE__*/React.createElement("img", {
|
|
1616
2040
|
src: doorPhoto,
|
|
1617
|
-
alt: "Door",
|
|
2041
|
+
alt: "Door Preview",
|
|
1618
2042
|
style: {
|
|
1619
2043
|
width: "100%",
|
|
1620
|
-
maxHeight: "
|
|
1621
|
-
objectFit: "cover"
|
|
1622
|
-
display: "block"
|
|
1623
|
-
}
|
|
1624
|
-
}), /*#__PURE__*/React.createElement("button", {
|
|
1625
|
-
onClick: e => {
|
|
1626
|
-
e.stopPropagation();
|
|
1627
|
-
removePhoto();
|
|
1628
|
-
},
|
|
1629
|
-
style: {
|
|
1630
|
-
position: "absolute",
|
|
1631
|
-
top: "10px",
|
|
1632
|
-
right: "10px",
|
|
1633
|
-
background: "#fff",
|
|
1634
|
-
border: "0.5px solid #EAECF0",
|
|
1635
|
-
borderRadius: "7px",
|
|
1636
|
-
padding: "6px 10px",
|
|
1637
|
-
display: "flex",
|
|
1638
|
-
alignItems: "center",
|
|
1639
|
-
gap: "5px",
|
|
1640
|
-
cursor: "pointer",
|
|
1641
|
-
fontSize: "12px",
|
|
1642
|
-
color: "#D92D20",
|
|
1643
|
-
fontWeight: "500"
|
|
2044
|
+
maxHeight: "250px",
|
|
2045
|
+
objectFit: "cover"
|
|
1644
2046
|
}
|
|
1645
|
-
}, /*#__PURE__*/React.createElement(
|
|
1646
|
-
size: 13
|
|
1647
|
-
}), " ", t("EKYC_REMOVE")))), _isSection ? /*#__PURE__*/React.createElement("div", {
|
|
2047
|
+
})), _isSection ? /*#__PURE__*/React.createElement("div", {
|
|
1648
2048
|
style: {
|
|
1649
2049
|
marginTop: "24px"
|
|
1650
2050
|
}
|
|
1651
2051
|
}, /*#__PURE__*/React.createElement(SubmitBar, {
|
|
1652
|
-
label: t("
|
|
2052
|
+
label: t("ES_COMMON_SAVE_CONTINUE"),
|
|
1653
2053
|
onSubmit: handleCompleteVerification
|
|
1654
2054
|
})) : /*#__PURE__*/React.createElement(ActionBar, null, /*#__PURE__*/React.createElement(SubmitBar, {
|
|
1655
2055
|
label: t("EKYC_COMPLETE_VERIFICATION"),
|
|
@@ -1680,7 +2080,13 @@ const AddressDetails = ({
|
|
|
1680
2080
|
rx: "2"
|
|
1681
2081
|
}), /*#__PURE__*/React.createElement("path", {
|
|
1682
2082
|
d: "M7 11V7a5 5 0 0 1 10 0v4"
|
|
1683
|
-
})), t("EKYC_SECURE_DATA_NOTICE"))
|
|
2083
|
+
})), t("EKYC_SECURE_DATA_NOTICE")), toast && /*#__PURE__*/React.createElement(Toast, {
|
|
2084
|
+
label: toast.message,
|
|
2085
|
+
error: toast.type === "error",
|
|
2086
|
+
info: toast.type === "info",
|
|
2087
|
+
success: toast.type === "success",
|
|
2088
|
+
onClose: () => setToast(null)
|
|
2089
|
+
}));
|
|
1684
2090
|
if (_isSection) {
|
|
1685
2091
|
return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("hr", {
|
|
1686
2092
|
style: {
|
|
@@ -2044,7 +2450,6 @@ const RadioToggleRow = ({
|
|
|
2044
2450
|
}
|
|
2045
2451
|
}));
|
|
2046
2452
|
const AadhaarVerification = () => {
|
|
2047
|
-
var _connectionDetails$ad;
|
|
2048
2453
|
const {
|
|
2049
2454
|
t
|
|
2050
2455
|
} = useTranslation();
|
|
@@ -2070,26 +2475,63 @@ const AadhaarVerification = () => {
|
|
|
2070
2475
|
}
|
|
2071
2476
|
}
|
|
2072
2477
|
};
|
|
2073
|
-
const
|
|
2074
|
-
const [
|
|
2075
|
-
|
|
2478
|
+
const initialDetails = (connectionDetails === null || connectionDetails === void 0 ? void 0 : connectionDetails.connectionDetails) || (connectionDetails === null || connectionDetails === void 0 ? void 0 : connectionDetails.connectionDetailsInfo) || {};
|
|
2479
|
+
const [initialData] = useState(() => {
|
|
2480
|
+
var _connectionDetails$ad, _connectionDetails$pr, _connectionDetails$co, _connectionDetails$co2, _connectionDetails$pr2, _connectionDetails$pr3, _connectionDetails$ad2, _connectionDetails$ad3, _connectionDetails$ad4, _connectionDetails$ad5, _connectionDetails$ad6, _connectionDetails$ad7, _connectionDetails$ad8;
|
|
2481
|
+
return getSavedData("EKYC_INITIAL_DATA", {
|
|
2482
|
+
userName: initialDetails.consumerName || "",
|
|
2483
|
+
mobileNumber: initialDetails.phoneNumber || "",
|
|
2484
|
+
whatsappNumber: initialDetails.phoneNumber || "",
|
|
2485
|
+
email: initialDetails.email || "",
|
|
2486
|
+
noOfPersons: (connectionDetails === null || connectionDetails === void 0 ? void 0 : (_connectionDetails$ad = connectionDetails.addressDetails) === null || _connectionDetails$ad === void 0 ? void 0 : _connectionDetails$ad.noOfPerson) || "",
|
|
2487
|
+
pidNumber: (connectionDetails === null || connectionDetails === void 0 ? void 0 : (_connectionDetails$pr = connectionDetails.propertyDetails) === null || _connectionDetails$pr === void 0 ? void 0 : _connectionDetails$pr.pidNumber) || "",
|
|
2488
|
+
typeOfConnection: (connectionDetails === null || connectionDetails === void 0 ? void 0 : (_connectionDetails$co = connectionDetails.connectionDetails) === null || _connectionDetails$co === void 0 ? void 0 : _connectionDetails$co.connectionType) || "",
|
|
2489
|
+
connectionCategory: (connectionDetails === null || connectionDetails === void 0 ? void 0 : (_connectionDetails$co2 = connectionDetails.connectionDetails) === null || _connectionDetails$co2 === void 0 ? void 0 : _connectionDetails$co2.connectionCategory) || "",
|
|
2490
|
+
userType: (connectionDetails === null || connectionDetails === void 0 ? void 0 : (_connectionDetails$pr2 = connectionDetails.propertyDetails) === null || _connectionDetails$pr2 === void 0 ? void 0 : _connectionDetails$pr2.userType) || "",
|
|
2491
|
+
noOfFloor: (connectionDetails === null || connectionDetails === void 0 ? void 0 : (_connectionDetails$pr3 = connectionDetails.propertyDetails) === null || _connectionDetails$pr3 === void 0 ? void 0 : _connectionDetails$pr3.noOfFloor) || null,
|
|
2492
|
+
fullAddress: (connectionDetails === null || connectionDetails === void 0 ? void 0 : (_connectionDetails$ad2 = connectionDetails.addressDetails) === null || _connectionDetails$ad2 === void 0 ? void 0 : _connectionDetails$ad2.fullAddress) || "",
|
|
2493
|
+
flatNo: (connectionDetails === null || connectionDetails === void 0 ? void 0 : (_connectionDetails$ad3 = connectionDetails.addressDetails) === null || _connectionDetails$ad3 === void 0 ? void 0 : _connectionDetails$ad3.flatHouseNumber) || "",
|
|
2494
|
+
building: (connectionDetails === null || connectionDetails === void 0 ? void 0 : (_connectionDetails$ad4 = connectionDetails.addressDetails) === null || _connectionDetails$ad4 === void 0 ? void 0 : _connectionDetails$ad4.buildingTower) || "",
|
|
2495
|
+
landmark: (connectionDetails === null || connectionDetails === void 0 ? void 0 : (_connectionDetails$ad5 = connectionDetails.addressDetails) === null || _connectionDetails$ad5 === void 0 ? void 0 : _connectionDetails$ad5.landmark) || "",
|
|
2496
|
+
pincode: (connectionDetails === null || connectionDetails === void 0 ? void 0 : (_connectionDetails$ad6 = connectionDetails.addressDetails) === null || _connectionDetails$ad6 === void 0 ? void 0 : _connectionDetails$ad6.pinCode) || "",
|
|
2497
|
+
assembly: (connectionDetails === null || connectionDetails === void 0 ? void 0 : (_connectionDetails$ad7 = connectionDetails.addressDetails) === null || _connectionDetails$ad7 === void 0 ? void 0 : _connectionDetails$ad7.assembly) || "",
|
|
2498
|
+
ward: (connectionDetails === null || connectionDetails === void 0 ? void 0 : (_connectionDetails$ad8 = connectionDetails.addressDetails) === null || _connectionDetails$ad8 === void 0 ? void 0 : _connectionDetails$ad8.ward) || ""
|
|
2499
|
+
});
|
|
2500
|
+
});
|
|
2501
|
+
useEffect(() => {
|
|
2502
|
+
sessionStorage.setItem("EKYC_INITIAL_DATA", JSON.stringify(initialData));
|
|
2503
|
+
}, [initialData]);
|
|
2504
|
+
const [aadhaarLastFour, setAadhaarLastFour] = useState(() => sessionStorage.getItem("EKYC_AADHAAR_LAST_FOUR") || "");
|
|
2505
|
+
const [isAadhaarVerified, setIsAadhaarVerified] = useState(() => sessionStorage.getItem("EKYC_AADHAAR_VERIFIED") === "true");
|
|
2076
2506
|
const [isVerifying, setIsVerifying] = useState(false);
|
|
2077
2507
|
const [showOtpField, setShowOtpField] = useState(false);
|
|
2078
2508
|
const [otp, setOtp] = useState("");
|
|
2079
2509
|
const [otpError, setOtpError] = useState(false);
|
|
2080
|
-
const [nameCorrect, setNameCorrect] = useState({
|
|
2510
|
+
const [nameCorrect, setNameCorrect] = useState(() => getSavedData("EKYC_NAME_CORRECT", {
|
|
2081
2511
|
code: "NO",
|
|
2082
2512
|
name: "CORE_COMMON_NO"
|
|
2083
|
-
});
|
|
2084
|
-
const [userName, setUserName] = useState(
|
|
2085
|
-
const [mobileChange, setMobileChange] = useState({
|
|
2513
|
+
}));
|
|
2514
|
+
const [userName, setUserName] = useState(() => sessionStorage.getItem("EKYC_USER_NAME") || initialData.userName);
|
|
2515
|
+
const [mobileChange, setMobileChange] = useState(() => getSavedData("EKYC_MOBILE_CHANGE", {
|
|
2086
2516
|
code: "NO",
|
|
2087
2517
|
name: "CORE_COMMON_NO"
|
|
2088
|
-
});
|
|
2089
|
-
const [mobileNumber, setMobileNumber] = useState(
|
|
2090
|
-
const [whatsappNumber, setWhatsappNumber] = useState(
|
|
2091
|
-
const [email, setEmail] = useState(
|
|
2092
|
-
const [noOfPersons, setNoOfPersons] = useState((
|
|
2518
|
+
}));
|
|
2519
|
+
const [mobileNumber, setMobileNumber] = useState(() => sessionStorage.getItem("EKYC_MOBILE_NUMBER") || initialData.mobileNumber);
|
|
2520
|
+
const [whatsappNumber, setWhatsappNumber] = useState(() => sessionStorage.getItem("EKYC_WHATSAPP_NUMBER") || initialData.whatsappNumber);
|
|
2521
|
+
const [email, setEmail] = useState(() => sessionStorage.getItem("EKYC_EMAIL") || initialData.email);
|
|
2522
|
+
const [noOfPersons, setNoOfPersons] = useState(() => sessionStorage.getItem("EKYC_NO_OF_PERSONS") || initialData.noOfPersons);
|
|
2523
|
+
useEffect(() => {
|
|
2524
|
+
sessionStorage.setItem("EKYC_AADHAAR_LAST_FOUR", aadhaarLastFour);
|
|
2525
|
+
sessionStorage.setItem("EKYC_AADHAAR_VERIFIED", isAadhaarVerified);
|
|
2526
|
+
sessionStorage.setItem("EKYC_NAME_CORRECT", JSON.stringify(nameCorrect));
|
|
2527
|
+
sessionStorage.setItem("EKYC_USER_NAME", userName);
|
|
2528
|
+
sessionStorage.setItem("EKYC_MOBILE_CHANGE", JSON.stringify(mobileChange));
|
|
2529
|
+
sessionStorage.setItem("EKYC_MOBILE_NUMBER", mobileNumber);
|
|
2530
|
+
sessionStorage.setItem("EKYC_WHATSAPP_NUMBER", whatsappNumber);
|
|
2531
|
+
sessionStorage.setItem("EKYC_EMAIL", email);
|
|
2532
|
+
sessionStorage.setItem("EKYC_NO_OF_PERSONS", noOfPersons);
|
|
2533
|
+
sessionStorage.setItem("EKYC_CURRENT_STEP", "AADHAAR");
|
|
2534
|
+
}, [aadhaarLastFour, isAadhaarVerified, nameCorrect, userName, mobileChange, mobileNumber, whatsappNumber, email, noOfPersons]);
|
|
2093
2535
|
const [showAddressSection, setShowAddressSection] = useState(false);
|
|
2094
2536
|
const [addressData, setAddressData] = useState(null);
|
|
2095
2537
|
const yesNoOptions = [{
|
|
@@ -2149,7 +2591,8 @@ const AadhaarVerification = () => {
|
|
|
2149
2591
|
email,
|
|
2150
2592
|
noOfPersons
|
|
2151
2593
|
},
|
|
2152
|
-
addressDetails
|
|
2594
|
+
addressDetails,
|
|
2595
|
+
initialData: initialData
|
|
2153
2596
|
});
|
|
2154
2597
|
};
|
|
2155
2598
|
const styles = {
|
|
@@ -2198,6 +2641,8 @@ const AadhaarVerification = () => {
|
|
|
2198
2641
|
}
|
|
2199
2642
|
};
|
|
2200
2643
|
return /*#__PURE__*/React.createElement("div", {
|
|
2644
|
+
className: "ground-container employee-app-container form-container"
|
|
2645
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
2201
2646
|
className: "inbox-container"
|
|
2202
2647
|
}, /*#__PURE__*/React.createElement("style", null, `
|
|
2203
2648
|
@keyframes fadeSlideIn {
|
|
@@ -2342,7 +2787,7 @@ const AadhaarVerification = () => {
|
|
|
2342
2787
|
style: {
|
|
2343
2788
|
marginTop: "16px"
|
|
2344
2789
|
}
|
|
2345
|
-
}, t("EKYC_ENTER_OTP")
|
|
2790
|
+
}, t("EKYC_ENTER_OTP")), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement("div", {
|
|
2346
2791
|
className: "field"
|
|
2347
2792
|
}, /*#__PURE__*/React.createElement(IconInput$1, {
|
|
2348
2793
|
icon: /*#__PURE__*/React.createElement(LockIcon, {
|
|
@@ -2411,7 +2856,7 @@ const AadhaarVerification = () => {
|
|
|
2411
2856
|
style: styles.infoLabel
|
|
2412
2857
|
}, t("EKYC_NAME") || "Name"), /*#__PURE__*/React.createElement("div", {
|
|
2413
2858
|
style: styles.infoValue
|
|
2414
|
-
},
|
|
2859
|
+
}, initialDetails.consumerName)), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
2415
2860
|
style: styles.infoLabel
|
|
2416
2861
|
}, t("EKYC_AADHAAR") || "Aadhaar"), /*#__PURE__*/React.createElement("div", {
|
|
2417
2862
|
style: styles.infoValue
|
|
@@ -2426,7 +2871,7 @@ const AadhaarVerification = () => {
|
|
|
2426
2871
|
...styles.infoValue,
|
|
2427
2872
|
fontSize: "13px"
|
|
2428
2873
|
}
|
|
2429
|
-
},
|
|
2874
|
+
}, initialDetails.address)))), /*#__PURE__*/React.createElement("hr", {
|
|
2430
2875
|
style: {
|
|
2431
2876
|
margin: "24px 0",
|
|
2432
2877
|
border: 0,
|
|
@@ -2553,7 +2998,7 @@ const AadhaarVerification = () => {
|
|
|
2553
2998
|
}
|
|
2554
2999
|
}, /*#__PURE__*/React.createElement(LockIcon, {
|
|
2555
3000
|
size: 11
|
|
2556
|
-
}), t("EKYC_SECURE_DATA_NOTICE") || "Your data is encrypted and secure"))));
|
|
3001
|
+
}), t("EKYC_SECURE_DATA_NOTICE") || "Your data is encrypted and secure")))));
|
|
2557
3002
|
};
|
|
2558
3003
|
|
|
2559
3004
|
const CheckIcon$2 = ({
|
|
@@ -2600,35 +3045,6 @@ const DocumentIcon = ({
|
|
|
2600
3045
|
}, /*#__PURE__*/React.createElement("path", {
|
|
2601
3046
|
d: "M14 2H6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V8l-6-6zm-1 7V3.5L18.5 9H13z"
|
|
2602
3047
|
}));
|
|
2603
|
-
const CameraIcon$1 = ({
|
|
2604
|
-
size: _size5 = 24
|
|
2605
|
-
}) => /*#__PURE__*/React.createElement("svg", {
|
|
2606
|
-
width: _size5,
|
|
2607
|
-
height: _size5,
|
|
2608
|
-
viewBox: "0 0 24 24",
|
|
2609
|
-
fill: "currentColor"
|
|
2610
|
-
}, /*#__PURE__*/React.createElement("path", {
|
|
2611
|
-
d: "M9 2L7.17 4H4C2.9 4 2 4.9 2 6v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2h-3.17L13 2H9zm3 15c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"
|
|
2612
|
-
}));
|
|
2613
|
-
const TrashIcon$1 = ({
|
|
2614
|
-
size: _size6 = 14
|
|
2615
|
-
}) => /*#__PURE__*/React.createElement("svg", {
|
|
2616
|
-
width: _size6,
|
|
2617
|
-
height: _size6,
|
|
2618
|
-
viewBox: "0 0 24 24",
|
|
2619
|
-
fill: "none",
|
|
2620
|
-
stroke: "#D92D20",
|
|
2621
|
-
strokeWidth: "2",
|
|
2622
|
-
strokeLinecap: "round"
|
|
2623
|
-
}, /*#__PURE__*/React.createElement("polyline", {
|
|
2624
|
-
points: "3 6 5 6 21 6"
|
|
2625
|
-
}), /*#__PURE__*/React.createElement("path", {
|
|
2626
|
-
d: "M19 6l-1 14a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2L5 6"
|
|
2627
|
-
}), /*#__PURE__*/React.createElement("path", {
|
|
2628
|
-
d: "M10 11v6M14 11v6"
|
|
2629
|
-
}), /*#__PURE__*/React.createElement("path", {
|
|
2630
|
-
d: "M9 6V4a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v2"
|
|
2631
|
-
}));
|
|
2632
3048
|
const PidIcon = ({
|
|
2633
3049
|
size: _size7 = 16
|
|
2634
3050
|
}) => /*#__PURE__*/React.createElement("svg", {
|
|
@@ -2711,11 +3127,13 @@ const PropertyInfo = () => {
|
|
|
2711
3127
|
const history = useHistory();
|
|
2712
3128
|
const location = useLocation();
|
|
2713
3129
|
const flowState = location.state || {
|
|
2714
|
-
kNumber: "EKYC-1234567890"
|
|
3130
|
+
kNumber: sessionStorage.getItem("EKYC_K_NUMBER") || "EKYC-1234567890",
|
|
3131
|
+
initialData: getSavedData("EKYC_INITIAL_DATA", {})
|
|
2715
3132
|
};
|
|
2716
3133
|
const {
|
|
2717
3134
|
kNumber
|
|
2718
3135
|
} = flowState;
|
|
3136
|
+
const initialData = flowState.initialData || getSavedData("EKYC_INITIAL_DATA", {});
|
|
2719
3137
|
const tenantId = Digit.ULBService.getCurrentTenantId();
|
|
2720
3138
|
const {
|
|
2721
3139
|
data: dataV0
|
|
@@ -2729,14 +3147,137 @@ const PropertyInfo = () => {
|
|
|
2729
3147
|
const {
|
|
2730
3148
|
data: dataV2
|
|
2731
3149
|
} = Digit.Hooks.ekyc.useGetFloorCount(tenantId);
|
|
2732
|
-
const [ownerType, setOwnerType] = useState("OWNER");
|
|
2733
|
-
const [pidNumber, setPidNumber] = useState("");
|
|
2734
|
-
const [connectionCategory, setConnectionCategory] = useState(
|
|
2735
|
-
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
const [
|
|
2739
|
-
|
|
3150
|
+
const [ownerType, setOwnerType] = useState(() => sessionStorage.getItem("EKYC_OWNER_TYPE") || initialData.ownerType || "OWNER");
|
|
3151
|
+
const [pidNumber, setPidNumber] = useState(() => sessionStorage.getItem("EKYC_PID_NUMBER") || initialData.pidNumber || "");
|
|
3152
|
+
const [connectionCategory, setConnectionCategory] = useState(() => getSavedData("EKYC_TYPE_OF_CONNECTION_DATA", initialData.typeOfConnection ? {
|
|
3153
|
+
label: t(initialData.typeOfConnection),
|
|
3154
|
+
value: initialData.typeOfConnection
|
|
3155
|
+
} : null));
|
|
3156
|
+
const [connectionType, setConnectionType] = useState(() => getSavedData("EKYC_CONNECTION_CATEGORY_DATA", initialData.connectionCategory ? {
|
|
3157
|
+
label: t(initialData.connectionCategory),
|
|
3158
|
+
value: initialData.connectionCategory
|
|
3159
|
+
} : null));
|
|
3160
|
+
const [userType, setUserType] = useState(() => getSavedData("EKYC_USER_TYPE_DATA", initialData.userType ? {
|
|
3161
|
+
label: t(initialData.userType),
|
|
3162
|
+
value: initialData.userType
|
|
3163
|
+
} : null));
|
|
3164
|
+
const [noOfFloors, setNoOfFloors] = useState(() => getSavedData("EKYC_NO_OF_FLOORS_DATA", initialData.noOfFloor ? {
|
|
3165
|
+
label: t(initialData.noOfFloor),
|
|
3166
|
+
value: initialData.noOfFloor
|
|
3167
|
+
} : null));
|
|
3168
|
+
const [propertyDocument, setPropertyDocument] = useState(() => sessionStorage.getItem("EKYC_PROPERTY_DOC") || null);
|
|
3169
|
+
const [propertyDocumentFileStoreId, setPropertyDocumentFileStoreId] = useState(() => sessionStorage.getItem("EKYC_PROPERTY_DOC_FILESTORE_ID") || null);
|
|
3170
|
+
const [buildingPhoto, setBuildingPhoto] = useState(() => sessionStorage.getItem("EKYC_BUILDING_PHOTO") || null);
|
|
3171
|
+
const [buildingPhotoFileStoreId, setBuildingPhotoFileStoreId] = useState(() => sessionStorage.getItem("EKYC_BUILDING_PHOTO_FILESTORE_ID") || null);
|
|
3172
|
+
const [filepdf, setFilepdf] = useState(null);
|
|
3173
|
+
const [filephoto, setFilephoto] = useState(null);
|
|
3174
|
+
const [error, setError] = useState(null);
|
|
3175
|
+
const [toast, setToast] = useState(null);
|
|
3176
|
+
useEffect(() => {
|
|
3177
|
+
sessionStorage.setItem("EKYC_OWNER_TYPE", ownerType);
|
|
3178
|
+
sessionStorage.setItem("EKYC_PID_NUMBER", pidNumber);
|
|
3179
|
+
sessionStorage.setItem("EKYC_TYPE_OF_CONNECTION_DATA", JSON.stringify(connectionCategory));
|
|
3180
|
+
sessionStorage.setItem("EKYC_CONNECTION_CATEGORY_DATA", JSON.stringify(connectionType));
|
|
3181
|
+
sessionStorage.setItem("EKYC_USER_TYPE_DATA", JSON.stringify(userType));
|
|
3182
|
+
sessionStorage.setItem("EKYC_NO_OF_FLOORS_DATA", JSON.stringify(noOfFloors));
|
|
3183
|
+
if (propertyDocument) sessionStorage.setItem("EKYC_PROPERTY_DOC", propertyDocument);
|
|
3184
|
+
if (propertyDocumentFileStoreId) sessionStorage.setItem("EKYC_PROPERTY_DOC_FILESTORE_ID", propertyDocumentFileStoreId);
|
|
3185
|
+
if (buildingPhoto) sessionStorage.setItem("EKYC_BUILDING_PHOTO", buildingPhoto);
|
|
3186
|
+
if (buildingPhotoFileStoreId) sessionStorage.setItem("EKYC_BUILDING_PHOTO_FILESTORE_ID", buildingPhotoFileStoreId);
|
|
3187
|
+
sessionStorage.setItem("EKYC_CURRENT_STEP", "PROPERTY");
|
|
3188
|
+
}, [ownerType, pidNumber, connectionCategory, connectionType, userType, noOfFloors, propertyDocument, propertyDocumentFileStoreId, buildingPhoto, buildingPhotoFileStoreId]);
|
|
3189
|
+
const uploadFile = async (file, tenantId) => {
|
|
3190
|
+
var _res$data, _res$data$files, _res$data$files$;
|
|
3191
|
+
if (!file) return null;
|
|
3192
|
+
const res = await Digit.UploadServices.Filestorage("EKYC", file, tenantId);
|
|
3193
|
+
return (res === null || res === void 0 ? void 0 : (_res$data = res.data) === null || _res$data === void 0 ? void 0 : (_res$data$files = _res$data.files) === null || _res$data$files === void 0 ? void 0 : (_res$data$files$ = _res$data$files[0]) === null || _res$data$files$ === void 0 ? void 0 : _res$data$files$.fileStoreId) || null;
|
|
3194
|
+
};
|
|
3195
|
+
useEffect(() => {
|
|
3196
|
+
(async () => {
|
|
3197
|
+
setError(null);
|
|
3198
|
+
if (filepdf) {
|
|
3199
|
+
if (filepdf.size >= 5000000) {
|
|
3200
|
+
setError(t("EKYC_MAXIMUM_UPLOAD_SIZE_EXCEEDED"));
|
|
3201
|
+
setToast({
|
|
3202
|
+
type: "error",
|
|
3203
|
+
message: t("EKYC_MAXIMUM_UPLOAD_SIZE_EXCEEDED")
|
|
3204
|
+
});
|
|
3205
|
+
} else {
|
|
3206
|
+
try {
|
|
3207
|
+
setToast({
|
|
3208
|
+
type: "info",
|
|
3209
|
+
message: t("EKYC_UPLOADING")
|
|
3210
|
+
});
|
|
3211
|
+
const fileStoreId = await uploadFile(filepdf, tenantId);
|
|
3212
|
+
if (fileStoreId) {
|
|
3213
|
+
setPropertyDocumentFileStoreId(fileStoreId);
|
|
3214
|
+
setPropertyDocument(filepdf.name);
|
|
3215
|
+
setToast({
|
|
3216
|
+
type: "success",
|
|
3217
|
+
message: t("EKYC_UPLOAD_SUCCESS")
|
|
3218
|
+
});
|
|
3219
|
+
} else {
|
|
3220
|
+
setError(t("EKYC_FILE_UPLOAD_ERROR"));
|
|
3221
|
+
setToast({
|
|
3222
|
+
type: "error",
|
|
3223
|
+
message: t("EKYC_FILE_UPLOAD_ERROR")
|
|
3224
|
+
});
|
|
3225
|
+
}
|
|
3226
|
+
} catch (err) {
|
|
3227
|
+
setError(t("EKYC_FILE_UPLOAD_ERROR"));
|
|
3228
|
+
setToast({
|
|
3229
|
+
type: "error",
|
|
3230
|
+
message: t("EKYC_FILE_UPLOAD_ERROR")
|
|
3231
|
+
});
|
|
3232
|
+
}
|
|
3233
|
+
}
|
|
3234
|
+
}
|
|
3235
|
+
})();
|
|
3236
|
+
}, [filepdf]);
|
|
3237
|
+
useEffect(() => {
|
|
3238
|
+
(async () => {
|
|
3239
|
+
setError(null);
|
|
3240
|
+
if (filephoto) {
|
|
3241
|
+
if (filephoto.size >= 2000000) {
|
|
3242
|
+
setError(t("EKYC_MAXIMUM_UPLOAD_SIZE_EXCEEDED"));
|
|
3243
|
+
setToast({
|
|
3244
|
+
type: "error",
|
|
3245
|
+
message: t("EKYC_MAXIMUM_UPLOAD_SIZE_EXCEEDED")
|
|
3246
|
+
});
|
|
3247
|
+
} else {
|
|
3248
|
+
try {
|
|
3249
|
+
setToast({
|
|
3250
|
+
type: "info",
|
|
3251
|
+
message: t("EKYC_UPLOADING")
|
|
3252
|
+
});
|
|
3253
|
+
const fileStoreId = await uploadFile(filephoto, tenantId);
|
|
3254
|
+
if (fileStoreId) {
|
|
3255
|
+
setBuildingPhotoFileStoreId(fileStoreId);
|
|
3256
|
+
const reader = new FileReader();
|
|
3257
|
+
reader.onloadend = () => setBuildingPhoto(reader.result);
|
|
3258
|
+
reader.readAsDataURL(filephoto);
|
|
3259
|
+
setToast({
|
|
3260
|
+
type: "success",
|
|
3261
|
+
message: t("EKYC_UPLOAD_SUCCESS")
|
|
3262
|
+
});
|
|
3263
|
+
} else {
|
|
3264
|
+
setError(t("EKYC_FILE_UPLOAD_ERROR"));
|
|
3265
|
+
setToast({
|
|
3266
|
+
type: "error",
|
|
3267
|
+
message: t("EKYC_FILE_UPLOAD_ERROR")
|
|
3268
|
+
});
|
|
3269
|
+
}
|
|
3270
|
+
} catch (err) {
|
|
3271
|
+
setError(t("EKYC_FILE_UPLOAD_ERROR"));
|
|
3272
|
+
setToast({
|
|
3273
|
+
type: "error",
|
|
3274
|
+
message: t("EKYC_FILE_UPLOAD_ERROR")
|
|
3275
|
+
});
|
|
3276
|
+
}
|
|
3277
|
+
}
|
|
3278
|
+
}
|
|
3279
|
+
})();
|
|
3280
|
+
}, [filephoto]);
|
|
2740
3281
|
const fileRef = useRef(null);
|
|
2741
3282
|
const cameraRef = useRef(null);
|
|
2742
3283
|
const handleSaveAndContinue = () => {
|
|
@@ -2750,22 +3291,21 @@ const PropertyInfo = () => {
|
|
|
2750
3291
|
userType,
|
|
2751
3292
|
noOfFloors,
|
|
2752
3293
|
propertyDocument,
|
|
2753
|
-
|
|
2754
|
-
|
|
3294
|
+
propertyDocumentFileStoreId,
|
|
3295
|
+
buildingPhoto,
|
|
3296
|
+
buildingPhotoFileStoreId
|
|
3297
|
+
},
|
|
3298
|
+
initialData
|
|
2755
3299
|
});
|
|
2756
3300
|
};
|
|
2757
|
-
|
|
2758
|
-
|
|
2759
|
-
|
|
2760
|
-
|
|
2761
|
-
|
|
2762
|
-
|
|
2763
|
-
|
|
2764
|
-
|
|
2765
|
-
const reader = new FileReader();
|
|
2766
|
-
reader.onloadend = () => setBuildingPhoto(reader.result);
|
|
2767
|
-
reader.readAsDataURL(file);
|
|
2768
|
-
};
|
|
3301
|
+
function selectpdf(e) {
|
|
3302
|
+
setPropertyDocumentFileStoreId(null);
|
|
3303
|
+
setFilepdf(e.target.files[0]);
|
|
3304
|
+
}
|
|
3305
|
+
function selectphoto(e) {
|
|
3306
|
+
setBuildingPhotoFileStoreId(null);
|
|
3307
|
+
setFilephoto(e.target.files[0]);
|
|
3308
|
+
}
|
|
2769
3309
|
const connectionCategoryOptions = (dataV0 === null || dataV0 === void 0 ? void 0 : (_dataV0$wsServicesC = dataV0["ws-services-calculation"]) === null || _dataV0$wsServicesC === void 0 ? void 0 : (_dataV0$wsServicesC$p = _dataV0$wsServicesC.propertyTypeV2) === null || _dataV0$wsServicesC$p === void 0 ? void 0 : _dataV0$wsServicesC$p.map(item => ({
|
|
2770
3310
|
label: t(item.code),
|
|
2771
3311
|
value: item.code
|
|
@@ -2783,6 +3323,8 @@ const PropertyInfo = () => {
|
|
|
2783
3323
|
value: item.code
|
|
2784
3324
|
}))) || [];
|
|
2785
3325
|
return /*#__PURE__*/React.createElement("div", {
|
|
3326
|
+
class: "ground-container employee-app-container form-container"
|
|
3327
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
2786
3328
|
className: "inbox-container"
|
|
2787
3329
|
}, /*#__PURE__*/React.createElement("style", null, `
|
|
2788
3330
|
@keyframes fadeSlideIn {
|
|
@@ -3102,76 +3644,26 @@ const PropertyInfo = () => {
|
|
|
3102
3644
|
letterSpacing: "0.04em",
|
|
3103
3645
|
marginBottom: "8px"
|
|
3104
3646
|
}
|
|
3105
|
-
}, t("EKYC_UPLOAD_PROPERTY_DOC") || "Upload property document"), /*#__PURE__*/React.createElement(
|
|
3106
|
-
|
|
3107
|
-
|
|
3647
|
+
}, t("EKYC_UPLOAD_PROPERTY_DOC") || "Upload property document"), /*#__PURE__*/React.createElement(UploadFile, {
|
|
3648
|
+
id: "ekyc-property-doc",
|
|
3649
|
+
extraStyleName: "propertyCreate",
|
|
3108
3650
|
accept: ".pdf",
|
|
3109
|
-
|
|
3110
|
-
|
|
3651
|
+
onUpload: selectpdf,
|
|
3652
|
+
onDelete: () => {
|
|
3653
|
+
setPropertyDocumentFileStoreId(null);
|
|
3654
|
+
setPropertyDocument(null);
|
|
3655
|
+
setFilepdf(null);
|
|
3111
3656
|
},
|
|
3112
|
-
|
|
3113
|
-
|
|
3114
|
-
|
|
3115
|
-
|
|
3116
|
-
if (pidNumber) e.currentTarget.style.borderColor = "#185FA5";
|
|
3117
|
-
},
|
|
3118
|
-
onMouseOut: e => {
|
|
3119
|
-
if (pidNumber) e.currentTarget.style.borderColor = "#B5D4F4";
|
|
3120
|
-
},
|
|
3121
|
-
style: {
|
|
3122
|
-
border: pidNumber ? "1.5px dashed #B5D4F4" : "1.5px dashed #D0D5DD",
|
|
3123
|
-
borderRadius: "10px",
|
|
3124
|
-
padding: "28px 20px",
|
|
3125
|
-
textAlign: "center",
|
|
3126
|
-
cursor: pidNumber ? "pointer" : "not-allowed",
|
|
3127
|
-
backgroundColor: pidNumber ? "#E6F1FB" : "#F9FAFB",
|
|
3128
|
-
minHeight: "160px",
|
|
3129
|
-
display: "flex",
|
|
3130
|
-
flexDirection: "column",
|
|
3131
|
-
alignItems: "center",
|
|
3132
|
-
justifyContent: "center",
|
|
3133
|
-
gap: "10px",
|
|
3134
|
-
transition: "all 0.15s",
|
|
3135
|
-
opacity: pidNumber ? 1 : 0.6
|
|
3136
|
-
}
|
|
3137
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
3138
|
-
style: {
|
|
3139
|
-
background: pidNumber ? "#fff" : "#EAECF0",
|
|
3140
|
-
padding: "10px",
|
|
3141
|
-
borderRadius: "10px",
|
|
3142
|
-
display: "flex",
|
|
3143
|
-
filter: pidNumber ? "none" : "grayscale(100%)"
|
|
3144
|
-
}
|
|
3145
|
-
}, /*#__PURE__*/React.createElement("svg", {
|
|
3146
|
-
width: "32",
|
|
3147
|
-
height: "32",
|
|
3148
|
-
viewBox: "0 0 24 24",
|
|
3149
|
-
fill: pidNumber ? "#185FA5" : "#98A2B3"
|
|
3150
|
-
}, /*#__PURE__*/React.createElement("path", {
|
|
3151
|
-
d: "M14 2H6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V8l-6-6zm-1 7V3.5L18.5 9H13z"
|
|
3152
|
-
}), /*#__PURE__*/React.createElement("path", {
|
|
3153
|
-
d: "M12 18v-4M12 14l-2 2M12 14l2 2",
|
|
3154
|
-
stroke: "#fff",
|
|
3155
|
-
strokeWidth: "1.5",
|
|
3156
|
-
strokeLinecap: "round"
|
|
3157
|
-
}))), propertyDocument ? /*#__PURE__*/React.createElement("div", {
|
|
3158
|
-
style: {
|
|
3159
|
-
fontSize: "13px",
|
|
3160
|
-
fontWeight: "600",
|
|
3161
|
-
color: "#0F6E56"
|
|
3162
|
-
}
|
|
3163
|
-
}, "\u2713 ", propertyDocument.name) : /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
3657
|
+
message: propertyDocumentFileStoreId ? `1 ${t(`EKYC_ACTION_FILEUPLOADED`)}` : t(`EKYC_ACTION_NO_FILEUPLOADED`),
|
|
3658
|
+
error: error,
|
|
3659
|
+
disabled: !pidNumber
|
|
3660
|
+
}), !pidNumber && /*#__PURE__*/React.createElement("div", {
|
|
3164
3661
|
style: {
|
|
3165
|
-
fontSize: "
|
|
3166
|
-
|
|
3167
|
-
|
|
3168
|
-
}
|
|
3169
|
-
}, pidNumber ? t("EKYC_UPLOAD_PROPERTY_DOC_CTA") || "Tap to upload" : t("EKYC_ENTER_PID_FIRST_CTA") || "Enter PID to upload"), /*#__PURE__*/React.createElement("div", {
|
|
3170
|
-
style: {
|
|
3171
|
-
fontSize: "12px",
|
|
3172
|
-
color: pidNumber ? "#378ADD" : "#98A2B3"
|
|
3662
|
+
fontSize: "11px",
|
|
3663
|
+
color: "#D92D20",
|
|
3664
|
+
marginTop: "4px"
|
|
3173
3665
|
}
|
|
3174
|
-
},
|
|
3666
|
+
}, t("EKYC_ENTER_PID_FIRST_CTA") || "Enter PID to upload")), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
3175
3667
|
style: {
|
|
3176
3668
|
fontSize: "11px",
|
|
3177
3669
|
fontWeight: "600",
|
|
@@ -3180,103 +3672,34 @@ const PropertyInfo = () => {
|
|
|
3180
3672
|
letterSpacing: "0.04em",
|
|
3181
3673
|
marginBottom: "8px"
|
|
3182
3674
|
}
|
|
3183
|
-
}, t("EKYC_CAPTURE_BUILDING_IMAGE") || "Capture building image"), /*#__PURE__*/React.createElement(
|
|
3184
|
-
|
|
3185
|
-
|
|
3186
|
-
accept: "
|
|
3187
|
-
|
|
3188
|
-
|
|
3189
|
-
|
|
3190
|
-
|
|
3191
|
-
|
|
3192
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
3193
|
-
onClick: !buildingPhoto ? () => cameraRef.current.click() : undefined,
|
|
3194
|
-
onMouseOver: e => {
|
|
3195
|
-
if (!buildingPhoto) e.currentTarget.style.borderColor = "#185FA5";
|
|
3196
|
-
},
|
|
3197
|
-
onMouseOut: e => {
|
|
3198
|
-
if (!buildingPhoto) e.currentTarget.style.borderColor = "#D0D5DD";
|
|
3675
|
+
}, t("EKYC_CAPTURE_BUILDING_IMAGE") || "Capture building image"), /*#__PURE__*/React.createElement(UploadFile, {
|
|
3676
|
+
id: "ekyc-building-photo",
|
|
3677
|
+
extraStyleName: "propertyCreate",
|
|
3678
|
+
accept: ".jpg,.png,.jpeg",
|
|
3679
|
+
onUpload: selectphoto,
|
|
3680
|
+
onDelete: () => {
|
|
3681
|
+
setBuildingPhotoFileStoreId(null);
|
|
3682
|
+
setBuildingPhoto(null);
|
|
3683
|
+
setFilephoto(null);
|
|
3199
3684
|
},
|
|
3685
|
+
message: buildingPhotoFileStoreId ? `1 ${t(`EKYC_ACTION_FILEUPLOADED`)}` : t(`EKYC_ACTION_NO_FILEUPLOADED`),
|
|
3686
|
+
error: error
|
|
3687
|
+
}), buildingPhoto && /*#__PURE__*/React.createElement("div", {
|
|
3200
3688
|
style: {
|
|
3201
|
-
|
|
3202
|
-
borderRadius: "
|
|
3203
|
-
minHeight: "160px",
|
|
3204
|
-
display: "flex",
|
|
3205
|
-
flexDirection: "column",
|
|
3206
|
-
alignItems: "center",
|
|
3207
|
-
justifyContent: "center",
|
|
3208
|
-
backgroundColor: "#F9FAFB",
|
|
3209
|
-
cursor: buildingPhoto ? "default" : "pointer",
|
|
3689
|
+
marginTop: "10px",
|
|
3690
|
+
borderRadius: "8px",
|
|
3210
3691
|
overflow: "hidden",
|
|
3211
|
-
|
|
3212
|
-
position: "relative",
|
|
3213
|
-
padding: buildingPhoto ? "0" : "28px 20px"
|
|
3214
|
-
}
|
|
3215
|
-
}, !buildingPhoto ? /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
3216
|
-
style: {
|
|
3217
|
-
background: "#E6F1FB",
|
|
3218
|
-
width: "52px",
|
|
3219
|
-
height: "52px",
|
|
3220
|
-
borderRadius: "50%",
|
|
3221
|
-
display: "flex",
|
|
3222
|
-
alignItems: "center",
|
|
3223
|
-
justifyContent: "center",
|
|
3224
|
-
marginBottom: "10px"
|
|
3225
|
-
}
|
|
3226
|
-
}, /*#__PURE__*/React.createElement(CameraIcon$1, {
|
|
3227
|
-
size: 26
|
|
3228
|
-
})), /*#__PURE__*/React.createElement("div", {
|
|
3229
|
-
style: {
|
|
3230
|
-
fontSize: "13px",
|
|
3231
|
-
fontWeight: "600",
|
|
3232
|
-
color: "#101828"
|
|
3233
|
-
}
|
|
3234
|
-
}, t("EKYC_TAP_TO_CAPTURE") || "Tap to capture"), /*#__PURE__*/React.createElement("div", {
|
|
3235
|
-
style: {
|
|
3236
|
-
fontSize: "12px",
|
|
3237
|
-
color: "#667085",
|
|
3238
|
-
marginTop: "2px"
|
|
3239
|
-
}
|
|
3240
|
-
}, t("EKYC_BUILDING_PHOTO") || "Building photo with GPS"), /*#__PURE__*/React.createElement("div", {
|
|
3241
|
-
style: {
|
|
3242
|
-
fontSize: "11px",
|
|
3243
|
-
color: "#98A2B3",
|
|
3244
|
-
marginTop: "2px"
|
|
3692
|
+
border: "1px solid #EAECF0"
|
|
3245
3693
|
}
|
|
3246
|
-
},
|
|
3694
|
+
}, /*#__PURE__*/React.createElement("img", {
|
|
3247
3695
|
src: buildingPhoto,
|
|
3248
|
-
alt: "Building",
|
|
3696
|
+
alt: "Building Preview",
|
|
3249
3697
|
style: {
|
|
3250
3698
|
width: "100%",
|
|
3251
|
-
maxHeight: "
|
|
3252
|
-
objectFit: "cover"
|
|
3253
|
-
display: "block"
|
|
3254
|
-
}
|
|
3255
|
-
}), /*#__PURE__*/React.createElement("button", {
|
|
3256
|
-
onClick: e => {
|
|
3257
|
-
e.stopPropagation();
|
|
3258
|
-
setBuildingPhoto(null);
|
|
3259
|
-
if (cameraRef.current) cameraRef.current.value = "";
|
|
3260
|
-
},
|
|
3261
|
-
style: {
|
|
3262
|
-
position: "absolute",
|
|
3263
|
-
top: "8px",
|
|
3264
|
-
right: "8px",
|
|
3265
|
-
background: "#fff",
|
|
3266
|
-
border: "0.5px solid #EAECF0",
|
|
3267
|
-
borderRadius: "7px",
|
|
3268
|
-
padding: "5px 10px",
|
|
3269
|
-
display: "flex",
|
|
3270
|
-
alignItems: "center",
|
|
3271
|
-
gap: "5px",
|
|
3272
|
-
cursor: "pointer",
|
|
3273
|
-
fontSize: "12px",
|
|
3274
|
-
color: "#D92D20",
|
|
3275
|
-
fontWeight: "500"
|
|
3699
|
+
maxHeight: "150px",
|
|
3700
|
+
objectFit: "cover"
|
|
3276
3701
|
}
|
|
3277
|
-
}, /*#__PURE__*/React.createElement(
|
|
3278
|
-
size: 13
|
|
3279
|
-
}), " ", t("EKYC_REMOVE") || "Remove"))))), /*#__PURE__*/React.createElement("div", {
|
|
3702
|
+
})))), /*#__PURE__*/React.createElement("div", {
|
|
3280
3703
|
style: {
|
|
3281
3704
|
backgroundColor: "#E6F1FB",
|
|
3282
3705
|
border: "0.5px solid #B5D4F4",
|
|
@@ -3333,7 +3756,13 @@ const PropertyInfo = () => {
|
|
|
3333
3756
|
rx: "2"
|
|
3334
3757
|
}), /*#__PURE__*/React.createElement("path", {
|
|
3335
3758
|
d: "M7 11V7a5 5 0 0 1 10 0v4"
|
|
3336
|
-
})), t("EKYC_SECURE_DATA_NOTICE") || "Your data is encrypted and secure"))))
|
|
3759
|
+
})), t("EKYC_SECURE_DATA_NOTICE") || "Your data is encrypted and secure")))), toast && /*#__PURE__*/React.createElement(Toast, {
|
|
3760
|
+
label: toast.message,
|
|
3761
|
+
error: toast.type === "error",
|
|
3762
|
+
info: toast.type === "info",
|
|
3763
|
+
success: toast.type === "success",
|
|
3764
|
+
onClose: () => setToast(null)
|
|
3765
|
+
}));
|
|
3337
3766
|
};
|
|
3338
3767
|
|
|
3339
3768
|
const CheckIcon$3 = ({
|
|
@@ -3430,7 +3859,8 @@ const ReviewCard = ({
|
|
|
3430
3859
|
title,
|
|
3431
3860
|
onEdit,
|
|
3432
3861
|
editLabel,
|
|
3433
|
-
rows
|
|
3862
|
+
rows,
|
|
3863
|
+
t
|
|
3434
3864
|
}) => /*#__PURE__*/React.createElement("div", {
|
|
3435
3865
|
style: {
|
|
3436
3866
|
border: "0.5px solid #EAECF0",
|
|
@@ -3510,24 +3940,78 @@ const ReviewCard = ({
|
|
|
3510
3940
|
fontSize: "14px",
|
|
3511
3941
|
color: "#101828",
|
|
3512
3942
|
fontWeight: "500",
|
|
3513
|
-
wordBreak: "break-word"
|
|
3943
|
+
wordBreak: "break-word",
|
|
3944
|
+
display: "flex",
|
|
3945
|
+
alignItems: "center",
|
|
3946
|
+
gap: "8px"
|
|
3947
|
+
}
|
|
3948
|
+
}, row.value, row.isModified && /*#__PURE__*/React.createElement("span", {
|
|
3949
|
+
style: {
|
|
3950
|
+
fontSize: "10px",
|
|
3951
|
+
background: "#FFF4ED",
|
|
3952
|
+
color: "#B45309",
|
|
3953
|
+
border: "0.5px solid #FDE68A",
|
|
3954
|
+
borderRadius: "4px",
|
|
3955
|
+
padding: "2px 6px",
|
|
3956
|
+
fontWeight: "600",
|
|
3957
|
+
textTransform: "uppercase"
|
|
3514
3958
|
}
|
|
3515
|
-
},
|
|
3959
|
+
}, t("EKYC_MODIFIED") || "Modified"))) : null)));
|
|
3516
3960
|
const Review = () => {
|
|
3517
|
-
var _propertyDetails$conn3, _propertyDetails$conn4, _propertyDetails$user2, _propertyDetails$noOf2;
|
|
3961
|
+
var _getSavedData, _getSavedData2, _propertyDetails$conn3, _propertyDetails$conn4, _propertyDetails$conn5, _propertyDetails$conn6, _propertyDetails$user2, _propertyDetails$user3, _propertyDetails$noOf2, _propertyDetails$noOf3;
|
|
3518
3962
|
const {
|
|
3519
3963
|
t
|
|
3520
3964
|
} = useTranslation();
|
|
3521
3965
|
const history = useHistory();
|
|
3522
3966
|
const location = useLocation();
|
|
3523
|
-
const {
|
|
3524
|
-
|
|
3525
|
-
|
|
3526
|
-
|
|
3527
|
-
|
|
3528
|
-
|
|
3529
|
-
|
|
3967
|
+
const state = location.state || {};
|
|
3968
|
+
const initialData = state.initialData || getSavedData("EKYC_INITIAL_DATA", {});
|
|
3969
|
+
const kNumber = state.kNumber || sessionStorage.getItem("EKYC_K_NUMBER") || "EKYC-1234567890";
|
|
3970
|
+
const aadhaarDetails = state.aadhaarDetails || {
|
|
3971
|
+
userName: sessionStorage.getItem("EKYC_USER_NAME"),
|
|
3972
|
+
mobileNumber: sessionStorage.getItem("EKYC_MOBILE_NUMBER"),
|
|
3973
|
+
whatsappNumber: sessionStorage.getItem("EKYC_WHATSAPP_NUMBER"),
|
|
3974
|
+
email: sessionStorage.getItem("EKYC_EMAIL"),
|
|
3975
|
+
noOfPersons: sessionStorage.getItem("EKYC_NO_OF_PERSONS")
|
|
3976
|
+
};
|
|
3977
|
+
const addressDetails = state.addressDetails || {
|
|
3978
|
+
fullAddress: sessionStorage.getItem("EKYC_FULL_ADDRESS"),
|
|
3979
|
+
flatNo: sessionStorage.getItem("EKYC_FLAT_NO"),
|
|
3980
|
+
building: sessionStorage.getItem("EKYC_BUILDING"),
|
|
3981
|
+
landmark: sessionStorage.getItem("EKYC_LANDMARK"),
|
|
3982
|
+
pincode: sessionStorage.getItem("EKYC_PINCODE"),
|
|
3983
|
+
assembly: (_getSavedData = getSavedData("EKYC_ASSEMBLY_DATA")) === null || _getSavedData === void 0 ? void 0 : _getSavedData.name,
|
|
3984
|
+
ward: (_getSavedData2 = getSavedData("EKYC_WARD_DATA")) === null || _getSavedData2 === void 0 ? void 0 : _getSavedData2.name,
|
|
3985
|
+
doorPhoto: sessionStorage.getItem("EKYC_DOOR_PHOTO"),
|
|
3986
|
+
doorPhotoFileStoreId: sessionStorage.getItem("EKYC_DOOR_PHOTO_FILESTORE_ID")
|
|
3987
|
+
};
|
|
3988
|
+
const propertyDetails = state.propertyDetails || {
|
|
3989
|
+
ownerType: sessionStorage.getItem("EKYC_OWNER_TYPE"),
|
|
3990
|
+
pidNumber: sessionStorage.getItem("EKYC_PID_NUMBER"),
|
|
3991
|
+
connectionCategory: getSavedData("EKYC_TYPE_OF_CONNECTION_DATA"),
|
|
3992
|
+
connectionType: getSavedData("EKYC_CONNECTION_CATEGORY_DATA"),
|
|
3993
|
+
userType: getSavedData("EKYC_USER_TYPE_DATA"),
|
|
3994
|
+
noOfFloors: getSavedData("EKYC_NO_OF_FLOORS_DATA"),
|
|
3995
|
+
propertyDocument: sessionStorage.getItem("EKYC_PROPERTY_DOC"),
|
|
3996
|
+
propertyDocumentFileStoreId: sessionStorage.getItem("EKYC_PROPERTY_DOC_FILESTORE_ID"),
|
|
3997
|
+
buildingPhoto: sessionStorage.getItem("EKYC_BUILDING_PHOTO"),
|
|
3998
|
+
buildingPhotoFileStoreId: sessionStorage.getItem("EKYC_BUILDING_PHOTO_FILESTORE_ID")
|
|
3999
|
+
};
|
|
4000
|
+
useEffect(() => {
|
|
4001
|
+
sessionStorage.setItem("EKYC_CURRENT_STEP", "REVIEW");
|
|
4002
|
+
}, []);
|
|
4003
|
+
const isFieldModified = (key, currentVal) => {
|
|
4004
|
+
const initialVal = initialData[key];
|
|
4005
|
+
if (initialVal === undefined) return false;
|
|
4006
|
+
return JSON.stringify(initialVal) !== JSON.stringify(currentVal);
|
|
4007
|
+
};
|
|
3530
4008
|
const [toast, setToast] = useState(null);
|
|
4009
|
+
const tenantId = Digit.ULBService.getCurrentTenantId() || "dl";
|
|
4010
|
+
const {
|
|
4011
|
+
mutate,
|
|
4012
|
+
isLoading: isMutationLoading
|
|
4013
|
+
} = Digit.Hooks.ekyc.useEkycApplicationUpdate(tenantId);
|
|
4014
|
+
const isSubmitting = isMutationLoading;
|
|
3531
4015
|
const uploadFile = async (file, tenantId) => {
|
|
3532
4016
|
var _res$data, _res$data$files, _res$data$files$;
|
|
3533
4017
|
if (!file) return null;
|
|
@@ -3546,27 +4030,25 @@ const Review = () => {
|
|
|
3546
4030
|
});
|
|
3547
4031
|
};
|
|
3548
4032
|
const handleSubmit = async () => {
|
|
3549
|
-
setIsSubmitting(true);
|
|
3550
4033
|
setToast(null);
|
|
3551
4034
|
try {
|
|
3552
|
-
var _Digit$UserService$ge,
|
|
3553
|
-
const tenantId = Digit.ULBService.getCurrentTenantId() || "dl.djb";
|
|
4035
|
+
var _Digit$UserService$ge, _propertyDetails$user, _propertyDetails$noOf, _propertyDetails$conn, _propertyDetails$conn2;
|
|
3554
4036
|
const userInfo = ((_Digit$UserService$ge = Digit.UserService.getUser()) === null || _Digit$UserService$ge === void 0 ? void 0 : _Digit$UserService$ge.info) || {};
|
|
3555
|
-
|
|
3556
|
-
|
|
3557
|
-
|
|
3558
|
-
|
|
4037
|
+
let propertyDocFileStoreId = propertyDetails.propertyDocumentFileStoreId || null;
|
|
4038
|
+
if (!propertyDocFileStoreId && propertyDetails.propertyDocument instanceof File) {
|
|
4039
|
+
propertyDocFileStoreId = await uploadFile(propertyDetails.propertyDocument, tenantId);
|
|
4040
|
+
}
|
|
4041
|
+
let buildingImageFileStoreId = propertyDetails.buildingPhotoFileStoreId || null;
|
|
4042
|
+
if (!buildingImageFileStoreId && propertyDetails.buildingPhoto) {
|
|
3559
4043
|
const photoFile = dataUrlToFile(propertyDetails.buildingPhoto, "building_photo.jpg");
|
|
3560
4044
|
buildingImageFileStoreId = await uploadFile(photoFile, tenantId);
|
|
3561
4045
|
}
|
|
4046
|
+
let doorPhotoFileStoreId = addressDetails.doorPhotoFileStoreId || null;
|
|
4047
|
+
if (!doorPhotoFileStoreId && addressDetails.doorPhoto) {
|
|
4048
|
+
const doorFile = dataUrlToFile(addressDetails.doorPhoto, "door_photo.jpg");
|
|
4049
|
+
doorPhotoFileStoreId = await uploadFile(doorFile, tenantId);
|
|
4050
|
+
}
|
|
3562
4051
|
const requestBody = {
|
|
3563
|
-
RequestInfo: {
|
|
3564
|
-
apiId: "Rainmaker",
|
|
3565
|
-
ver: "1.0",
|
|
3566
|
-
msgId: `${Date.now()}|${navigator.language || "en_IN"}`,
|
|
3567
|
-
tenantId,
|
|
3568
|
-
authToken: userInfo.access_token || ((_Digit$UserService$ge2 = Digit.UserService.getUser()) === null || _Digit$UserService$ge2 === void 0 ? void 0 : _Digit$UserService$ge2.access_token) || ""
|
|
3569
|
-
},
|
|
3570
4052
|
updateType: "PROPERTY",
|
|
3571
4053
|
kno: kNumber,
|
|
3572
4054
|
pidNumber: propertyDetails.pidNumber || null,
|
|
@@ -3576,33 +4058,48 @@ const Review = () => {
|
|
|
3576
4058
|
noOfFloor: (_propertyDetails$noOf = propertyDetails.noOfFloors) !== null && _propertyDetails$noOf !== void 0 && _propertyDetails$noOf.value ? parseInt(propertyDetails.noOfFloors.value, 10) : null,
|
|
3577
4059
|
typeOfConnection: ((_propertyDetails$conn = propertyDetails.connectionCategory) === null || _propertyDetails$conn === void 0 ? void 0 : _propertyDetails$conn.value) || null,
|
|
3578
4060
|
connectionCategory: ((_propertyDetails$conn2 = propertyDetails.connectionType) === null || _propertyDetails$conn2 === void 0 ? void 0 : _propertyDetails$conn2.value) || null,
|
|
3579
|
-
modifiedBy: userInfo.name || userInfo.userName || null
|
|
4061
|
+
modifiedBy: userInfo.name || userInfo.userName || null,
|
|
4062
|
+
mobileNumber: aadhaarDetails.mobileNumber || null,
|
|
4063
|
+
email: aadhaarDetails.email || null,
|
|
4064
|
+
userName: aadhaarDetails.userName || null,
|
|
4065
|
+
noOfPersons: aadhaarDetails.noOfPersons || null,
|
|
4066
|
+
doorPhotoFileStoreId: doorPhotoFileStoreId,
|
|
4067
|
+
fullAddress: addressDetails.fullAddress || null,
|
|
4068
|
+
flatNo: addressDetails.flatNo || null,
|
|
4069
|
+
building: addressDetails.building || null,
|
|
4070
|
+
landmark: addressDetails.landmark || null,
|
|
4071
|
+
pincode: addressDetails.pincode || null,
|
|
4072
|
+
assembly: addressDetails.assembly || null,
|
|
4073
|
+
ward: addressDetails.ward || null
|
|
3580
4074
|
};
|
|
3581
|
-
|
|
3582
|
-
|
|
3583
|
-
|
|
3584
|
-
|
|
4075
|
+
mutate(requestBody, {
|
|
4076
|
+
onSuccess: res => {
|
|
4077
|
+
setToast({
|
|
4078
|
+
type: "success",
|
|
4079
|
+
message: t("EKYC_SUBMIT_SUCCESS") || "Application submitted successfully!"
|
|
4080
|
+
});
|
|
4081
|
+
Object.keys(sessionStorage).forEach(key => {
|
|
4082
|
+
if (key.startsWith("EKYC_")) sessionStorage.removeItem(key);
|
|
4083
|
+
});
|
|
4084
|
+
setTimeout(() => {
|
|
4085
|
+
history.push("/digit-ui/employee/ekyc/dashboard");
|
|
4086
|
+
}, 1800);
|
|
3585
4087
|
},
|
|
3586
|
-
|
|
3587
|
-
|
|
3588
|
-
|
|
3589
|
-
|
|
3590
|
-
|
|
3591
|
-
|
|
3592
|
-
|
|
4088
|
+
onError: err => {
|
|
4089
|
+
var _err$response, _err$response$data, _err$response$data$Er, _err$response$data$Er2;
|
|
4090
|
+
console.error("eKYC Submit Error:", err);
|
|
4091
|
+
setToast({
|
|
4092
|
+
type: "error",
|
|
4093
|
+
message: (err === null || err === void 0 ? void 0 : (_err$response = err.response) === null || _err$response === void 0 ? void 0 : (_err$response$data = _err$response.data) === null || _err$response$data === void 0 ? void 0 : (_err$response$data$Er = _err$response$data.Errors) === null || _err$response$data$Er === void 0 ? void 0 : (_err$response$data$Er2 = _err$response$data$Er[0]) === null || _err$response$data$Er2 === void 0 ? void 0 : _err$response$data$Er2.message) || t("EKYC_SUBMIT_ERROR") || "Submission failed. Please try again."
|
|
4094
|
+
});
|
|
4095
|
+
}
|
|
3593
4096
|
});
|
|
3594
|
-
setTimeout(() => {
|
|
3595
|
-
history.push("/digit-ui/employee/ekyc/dashboard");
|
|
3596
|
-
}, 1800);
|
|
3597
4097
|
} catch (err) {
|
|
3598
|
-
|
|
3599
|
-
console.error("eKYC Submit Error:", err);
|
|
4098
|
+
console.error("eKYC Frontend Error:", err);
|
|
3600
4099
|
setToast({
|
|
3601
4100
|
type: "error",
|
|
3602
|
-
message:
|
|
4101
|
+
message: t("EKYC_SUBMIT_ERROR") || "An error occurred during submission."
|
|
3603
4102
|
});
|
|
3604
|
-
} finally {
|
|
3605
|
-
setIsSubmitting(false);
|
|
3606
4103
|
}
|
|
3607
4104
|
};
|
|
3608
4105
|
const handleEditAadhaar = () => {
|
|
@@ -3614,7 +4111,9 @@ const Review = () => {
|
|
|
3614
4111
|
const handleEditProperty = () => {
|
|
3615
4112
|
history.push("/digit-ui/employee/ekyc/property-info", location.state);
|
|
3616
4113
|
};
|
|
3617
|
-
return /*#__PURE__*/React.createElement(
|
|
4114
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
4115
|
+
className: "ground-container employee-app-container form-container"
|
|
4116
|
+
}, /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
3618
4117
|
className: "inbox-container"
|
|
3619
4118
|
}, /*#__PURE__*/React.createElement("style", null, `
|
|
3620
4119
|
@keyframes fadeSlideIn {
|
|
@@ -3797,18 +4296,22 @@ const Review = () => {
|
|
|
3797
4296
|
title: t("EKYC_AADHAAR_VERIFICATION_HEADER") || "Aadhaar details",
|
|
3798
4297
|
onEdit: handleEditAadhaar,
|
|
3799
4298
|
editLabel: t("CS_COMMON_EDIT") || "Edit",
|
|
4299
|
+
t: t,
|
|
3800
4300
|
rows: [{
|
|
3801
4301
|
label: t("EKYC_NAME") || "Name",
|
|
3802
|
-
value: aadhaarDetails.userName || "Rajesh Kumar Singh"
|
|
4302
|
+
value: aadhaarDetails.userName || "Rajesh Kumar Singh",
|
|
4303
|
+
isModified: isFieldModified("userName", aadhaarDetails.userName)
|
|
3803
4304
|
}, {
|
|
3804
4305
|
label: t("EKYC_AADHAAR") || "Aadhaar no.",
|
|
3805
4306
|
value: aadhaarDetails.aadhaarLastFour ? `${aadhaarDetails.aadhaarLastFour}` : "XXXX XXXX 1234"
|
|
3806
4307
|
}, {
|
|
3807
4308
|
label: t("EKYC_MOBILE_NO") || "Mobile no.",
|
|
3808
|
-
value: aadhaarDetails.mobileNumber || "XXXXXXXXXX"
|
|
4309
|
+
value: aadhaarDetails.mobileNumber || "XXXXXXXXXX",
|
|
4310
|
+
isModified: isFieldModified("mobileNumber", aadhaarDetails.mobileNumber)
|
|
3809
4311
|
}, {
|
|
3810
4312
|
label: t("EKYC_EMAIL_ADDRESS") || "Email",
|
|
3811
|
-
value: aadhaarDetails.email || null
|
|
4313
|
+
value: aadhaarDetails.email || null,
|
|
4314
|
+
isModified: isFieldModified("email", aadhaarDetails.email)
|
|
3812
4315
|
}]
|
|
3813
4316
|
}), /*#__PURE__*/React.createElement("hr", {
|
|
3814
4317
|
style: {
|
|
@@ -3828,27 +4331,35 @@ const Review = () => {
|
|
|
3828
4331
|
title: t("EKYC_ADDRESS_DETAILS_HEADER") || "Address details",
|
|
3829
4332
|
onEdit: handleEditAddress,
|
|
3830
4333
|
editLabel: t("CS_COMMON_EDIT") || "Edit",
|
|
4334
|
+
t: t,
|
|
3831
4335
|
rows: [{
|
|
3832
4336
|
label: t("EKYC_FULL_ADDRESS") || "Full address",
|
|
3833
|
-
value: addressDetails.fullAddress || "H.No. 123, Sector 15, Rohini, Delhi – 110085"
|
|
4337
|
+
value: addressDetails.fullAddress || "H.No. 123, Sector 15, Rohini, Delhi – 110085",
|
|
4338
|
+
isModified: isFieldModified("fullAddress", addressDetails.fullAddress)
|
|
3834
4339
|
}, {
|
|
3835
4340
|
label: t("EKYC_FLAT_HOUSE_NUMBER") || "Flat / House no.",
|
|
3836
|
-
value: addressDetails.flatNo || null
|
|
4341
|
+
value: addressDetails.flatNo || null,
|
|
4342
|
+
isModified: isFieldModified("flatNo", addressDetails.flatNo)
|
|
3837
4343
|
}, {
|
|
3838
4344
|
label: t("EKYC_BUILDING_TOWER") || "Building",
|
|
3839
|
-
value: addressDetails.building || null
|
|
4345
|
+
value: addressDetails.building || null,
|
|
4346
|
+
isModified: isFieldModified("building", addressDetails.building)
|
|
3840
4347
|
}, {
|
|
3841
4348
|
label: t("EKYC_LANDMARK") || "Landmark",
|
|
3842
|
-
value: addressDetails.landmark || null
|
|
4349
|
+
value: addressDetails.landmark || null,
|
|
4350
|
+
isModified: isFieldModified("landmark", addressDetails.landmark)
|
|
3843
4351
|
}, {
|
|
3844
4352
|
label: t("EKYC_PINCODE") || "Pincode",
|
|
3845
|
-
value: addressDetails.pincode || "110085"
|
|
4353
|
+
value: addressDetails.pincode || "110085",
|
|
4354
|
+
isModified: isFieldModified("pincode", addressDetails.pincode)
|
|
3846
4355
|
}, {
|
|
3847
4356
|
label: t("EKYC_ASSEMBLY") || "Assembly",
|
|
3848
|
-
value: addressDetails.assembly || "AC-12 Chandni Chowk"
|
|
4357
|
+
value: addressDetails.assembly || "AC-12 Chandni Chowk",
|
|
4358
|
+
isModified: isFieldModified("assembly", addressDetails.assembly)
|
|
3849
4359
|
}, {
|
|
3850
4360
|
label: t("EKYC_WARD") || "Ward",
|
|
3851
|
-
value: addressDetails.ward || "WARD-45 Civil Lines"
|
|
4361
|
+
value: addressDetails.ward || "WARD-45 Civil Lines",
|
|
4362
|
+
isModified: isFieldModified("ward", addressDetails.ward)
|
|
3852
4363
|
}]
|
|
3853
4364
|
}), /*#__PURE__*/React.createElement("hr", {
|
|
3854
4365
|
style: {
|
|
@@ -3868,24 +4379,30 @@ const Review = () => {
|
|
|
3868
4379
|
title: t("EKYC_PROPERTY_INFO") || "Property details",
|
|
3869
4380
|
onEdit: handleEditProperty,
|
|
3870
4381
|
editLabel: t("CS_COMMON_EDIT") || "Edit",
|
|
4382
|
+
t: t,
|
|
3871
4383
|
rows: [{
|
|
3872
4384
|
label: t("EKYC_PROPERTY_OWNER") || "Property owner",
|
|
3873
4385
|
value: propertyDetails.ownerType || "Owner"
|
|
3874
4386
|
}, {
|
|
3875
4387
|
label: t("EKYC_PID_NUMBER") || "PID number",
|
|
3876
|
-
value: propertyDetails.pidNumber || null
|
|
4388
|
+
value: propertyDetails.pidNumber || null,
|
|
4389
|
+
isModified: isFieldModified("pidNumber", propertyDetails.pidNumber)
|
|
3877
4390
|
}, {
|
|
3878
4391
|
label: t("EKYC_TYPE_OF_CONNECTION") || "Type of connection",
|
|
3879
|
-
value: ((_propertyDetails$conn3 = propertyDetails.connectionCategory) === null || _propertyDetails$conn3 === void 0 ? void 0 : _propertyDetails$conn3.label) || null
|
|
4392
|
+
value: ((_propertyDetails$conn3 = propertyDetails.connectionCategory) === null || _propertyDetails$conn3 === void 0 ? void 0 : _propertyDetails$conn3.label) || null,
|
|
4393
|
+
isModified: isFieldModified("typeOfConnection", (_propertyDetails$conn4 = propertyDetails.connectionCategory) === null || _propertyDetails$conn4 === void 0 ? void 0 : _propertyDetails$conn4.value)
|
|
3880
4394
|
}, {
|
|
3881
4395
|
label: t("EKYC_CONNECTION_CATEGORY") || "Connection category",
|
|
3882
|
-
value: ((_propertyDetails$
|
|
4396
|
+
value: ((_propertyDetails$conn5 = propertyDetails.connectionType) === null || _propertyDetails$conn5 === void 0 ? void 0 : _propertyDetails$conn5.label) || null,
|
|
4397
|
+
isModified: isFieldModified("connectionCategory", (_propertyDetails$conn6 = propertyDetails.connectionType) === null || _propertyDetails$conn6 === void 0 ? void 0 : _propertyDetails$conn6.value)
|
|
3883
4398
|
}, {
|
|
3884
4399
|
label: t("EKYC_USER_TYPE") || "User type",
|
|
3885
|
-
value: ((_propertyDetails$user2 = propertyDetails.userType) === null || _propertyDetails$user2 === void 0 ? void 0 : _propertyDetails$user2.label) || null
|
|
4400
|
+
value: ((_propertyDetails$user2 = propertyDetails.userType) === null || _propertyDetails$user2 === void 0 ? void 0 : _propertyDetails$user2.label) || null,
|
|
4401
|
+
isModified: isFieldModified("userType", (_propertyDetails$user3 = propertyDetails.userType) === null || _propertyDetails$user3 === void 0 ? void 0 : _propertyDetails$user3.value)
|
|
3886
4402
|
}, {
|
|
3887
4403
|
label: t("EKYC_NO_OF_FLOORS") || "No. of floors",
|
|
3888
|
-
value: ((_propertyDetails$noOf2 = propertyDetails.noOfFloors) === null || _propertyDetails$noOf2 === void 0 ? void 0 : _propertyDetails$noOf2.label) || null
|
|
4404
|
+
value: ((_propertyDetails$noOf2 = propertyDetails.noOfFloors) === null || _propertyDetails$noOf2 === void 0 ? void 0 : _propertyDetails$noOf2.label) || null,
|
|
4405
|
+
isModified: isFieldModified("noOfFloor", (_propertyDetails$noOf3 = propertyDetails.noOfFloors) === null || _propertyDetails$noOf3 === void 0 ? void 0 : _propertyDetails$noOf3.value)
|
|
3889
4406
|
}]
|
|
3890
4407
|
})), /*#__PURE__*/React.createElement("div", {
|
|
3891
4408
|
style: {
|
|
@@ -3926,7 +4443,7 @@ const Review = () => {
|
|
|
3926
4443
|
error: toast.type === "error",
|
|
3927
4444
|
success: toast.type === "success",
|
|
3928
4445
|
onClose: () => setToast(null)
|
|
3929
|
-
}));
|
|
4446
|
+
})));
|
|
3930
4447
|
};
|
|
3931
4448
|
|
|
3932
4449
|
const EmployeeApp = ({
|