@djb25/digit-ui-module-ekyc 1.0.5 → 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 +1142 -497
- package/dist/index.modern.js.map +1 -1
- package/package.json +4 -2
- package/src/components/DesktopInbox.js +208 -60
- package/src/components/Filter.js +5 -4
- package/src/components/StatusCards.js +167 -16
- package/src/pages/employee/AadhaarVerification.js +341 -249
- package/src/pages/employee/AddressDetails.js +148 -124
- package/src/pages/employee/Create.js +31 -19
- package/src/pages/employee/Inbox.js +14 -8
- package/src/pages/employee/PropertyInfo.js +382 -302
- package/src/pages/employee/Review.js +365 -179
- 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
|
+
}
|
|
119
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
120
|
+
style: {
|
|
121
|
+
display: "flex",
|
|
122
|
+
justifyContent: "space-between",
|
|
123
|
+
alignItems: "flex-start",
|
|
124
|
+
flexWrap: "wrap",
|
|
125
|
+
gap: "24px"
|
|
126
|
+
}
|
|
127
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
128
|
+
style: {
|
|
129
|
+
flex: "1",
|
|
130
|
+
minWidth: "250px"
|
|
131
|
+
}
|
|
132
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
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
|
+
}
|
|
147
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
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
|
+
}
|
|
37
224
|
}, /*#__PURE__*/React.createElement("div", {
|
|
38
|
-
|
|
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
|
+
}
|
|
39
246
|
}, /*#__PURE__*/React.createElement("div", {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
}, t("EKYC_TOTAL"))), /*#__PURE__*/React.createElement("div", {
|
|
44
|
-
className: "ekyc-status-card"
|
|
247
|
+
style: {
|
|
248
|
+
textAlign: "center"
|
|
249
|
+
}
|
|
45
250
|
}, /*#__PURE__*/React.createElement("div", {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
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
|
+
}
|
|
51
268
|
}, /*#__PURE__*/React.createElement("div", {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
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,19 +499,54 @@ 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
|
-
}, t(
|
|
506
|
+
}, t(`${status}`));
|
|
121
507
|
}
|
|
122
508
|
}], [t, parentRoute]);
|
|
123
509
|
const tableData = useMemo(() => {
|
|
124
510
|
return (data === null || data === void 0 ? void 0 : data.items) || [];
|
|
125
511
|
}, [data]);
|
|
126
512
|
return /*#__PURE__*/React.createElement("div", {
|
|
127
|
-
className: "
|
|
513
|
+
className: "ground-container employee-app-container form-container"
|
|
128
514
|
}, /*#__PURE__*/React.createElement("div", {
|
|
515
|
+
className: "inbox-container",
|
|
516
|
+
style: {
|
|
517
|
+
paddingBottom: "16px"
|
|
518
|
+
}
|
|
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", {
|
|
129
550
|
className: "filters-container"
|
|
130
551
|
}, /*#__PURE__*/React.createElement(Card, {
|
|
131
552
|
className: "sidebar-title-card",
|
|
@@ -200,7 +621,7 @@ const DesktopInbox = ({
|
|
|
200
621
|
className: "ekyc-table-cell"
|
|
201
622
|
};
|
|
202
623
|
}
|
|
203
|
-
})))));
|
|
624
|
+
}))))));
|
|
204
625
|
};
|
|
205
626
|
|
|
206
627
|
const SearchConsumer = ({
|
|
@@ -453,18 +874,6 @@ const Filter = ({
|
|
|
453
874
|
const [_searchParams, setSearchParams] = useState(() => ({
|
|
454
875
|
...searchParams
|
|
455
876
|
}));
|
|
456
|
-
const localParamChange = filterParam => {
|
|
457
|
-
let keys_to_delete = filterParam.delete;
|
|
458
|
-
let _new = {
|
|
459
|
-
..._searchParams,
|
|
460
|
-
...filterParam
|
|
461
|
-
};
|
|
462
|
-
if (keys_to_delete) keys_to_delete.forEach(key => delete _new[key]);
|
|
463
|
-
delete filterParam.delete;
|
|
464
|
-
setSearchParams({
|
|
465
|
-
..._new
|
|
466
|
-
});
|
|
467
|
-
};
|
|
468
877
|
const applyLocalFilters = () => {
|
|
469
878
|
onFilterChange(_searchParams);
|
|
470
879
|
};
|
|
@@ -477,9 +886,12 @@ const Filter = ({
|
|
|
477
886
|
});
|
|
478
887
|
};
|
|
479
888
|
const onStatusChange = value => {
|
|
480
|
-
|
|
889
|
+
const newParams = {
|
|
890
|
+
..._searchParams,
|
|
481
891
|
status: value
|
|
482
|
-
}
|
|
892
|
+
};
|
|
893
|
+
setSearchParams(newParams);
|
|
894
|
+
onFilterChange(newParams);
|
|
483
895
|
};
|
|
484
896
|
return /*#__PURE__*/React.createElement(FilterForm, {
|
|
485
897
|
onSubmit: applyLocalFilters,
|
|
@@ -500,14 +912,11 @@ const Filter = ({
|
|
|
500
912
|
label: t("EKYC_STATUS_ALL"),
|
|
501
913
|
value: ""
|
|
502
914
|
}, {
|
|
503
|
-
label: t("
|
|
504
|
-
value: "
|
|
915
|
+
label: t("EKYC_STATUS_ACTIVE"),
|
|
916
|
+
value: "ACTIVE"
|
|
505
917
|
}, {
|
|
506
918
|
label: t("EKYC_STATUS_PENDING"),
|
|
507
|
-
value: "PENDING"
|
|
508
|
-
}, {
|
|
509
|
-
label: t("EKYC_STATUS_REJECTED"),
|
|
510
|
-
value: "REJECTED"
|
|
919
|
+
value: "PENDING START"
|
|
511
920
|
}],
|
|
512
921
|
optionKey: "label",
|
|
513
922
|
select: onStatusChange,
|
|
@@ -525,7 +934,7 @@ const Inbox = ({
|
|
|
525
934
|
filterComponent,
|
|
526
935
|
isInbox
|
|
527
936
|
}) => {
|
|
528
|
-
var
|
|
937
|
+
var _dashboardData$dashbo2;
|
|
529
938
|
const tenantId = Digit.ULBService.getCurrentTenantId();
|
|
530
939
|
const {
|
|
531
940
|
t
|
|
@@ -550,27 +959,31 @@ const Inbox = ({
|
|
|
550
959
|
} = Digit.Hooks.ekyc.useEkycSurveyorDashboard({}, {
|
|
551
960
|
tenantId,
|
|
552
961
|
offset: pageOffset,
|
|
553
|
-
limit: pageSize
|
|
554
|
-
status: ((_searchParams$status = searchParams.status) === null || _searchParams$status === void 0 ? void 0 : _searchParams$status.value) || ""
|
|
962
|
+
limit: pageSize
|
|
555
963
|
}, {
|
|
556
964
|
enabled: !!tenantId
|
|
557
965
|
});
|
|
558
966
|
const filteredData = useMemo(() => {
|
|
559
|
-
var _dashboardData$dashbo;
|
|
560
|
-
|
|
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
|
+
}
|
|
561
973
|
return items.map(item => ({
|
|
562
974
|
...item,
|
|
563
975
|
applicationNumber: item.kno || item.applicationNumber,
|
|
564
976
|
citizenName: item.consumerName || item.citizenName
|
|
565
977
|
}));
|
|
566
|
-
}, [dashboardData]);
|
|
978
|
+
}, [dashboardData, searchParams.status]);
|
|
567
979
|
const countData = useMemo(() => {
|
|
568
980
|
const info = (dashboardData === null || dashboardData === void 0 ? void 0 : dashboardData.dashboardInfo) || {};
|
|
569
981
|
return {
|
|
570
982
|
total: info.total || 0,
|
|
571
983
|
completed: info.completed || 0,
|
|
572
984
|
pending: info.pending || 0,
|
|
573
|
-
rejected: info.rejected || 0
|
|
985
|
+
rejected: info.rejected || 0,
|
|
986
|
+
active: info.active || 0
|
|
574
987
|
};
|
|
575
988
|
}, [dashboardData]);
|
|
576
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;
|
|
@@ -596,17 +1009,14 @@ const Inbox = ({
|
|
|
596
1009
|
name: "status",
|
|
597
1010
|
type: "dropdown",
|
|
598
1011
|
options: [{
|
|
599
|
-
label: t("
|
|
1012
|
+
label: t("EKYC_STATUS_ALL"),
|
|
600
1013
|
value: ""
|
|
601
1014
|
}, {
|
|
602
|
-
label: t("
|
|
603
|
-
value: "
|
|
1015
|
+
label: t("EKYC_STATUS_ACTIVE"),
|
|
1016
|
+
value: "ACTIVE"
|
|
604
1017
|
}, {
|
|
605
1018
|
label: t("EKYC_STATUS_PENDING"),
|
|
606
|
-
value: "PENDING"
|
|
607
|
-
}, {
|
|
608
|
-
label: t("EKYC_STATUS_REJECTED"),
|
|
609
|
-
value: "REJECTED"
|
|
1019
|
+
value: "PENDING START"
|
|
610
1020
|
}],
|
|
611
1021
|
optionsKey: "label"
|
|
612
1022
|
}], [t]);
|
|
@@ -837,13 +1247,22 @@ const Create = () => {
|
|
|
837
1247
|
}
|
|
838
1248
|
setSearchParams(params);
|
|
839
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
|
+
}
|
|
840
1256
|
sessionStorage.setItem("EKYC_CREATE_SEARCH_PARAMS", JSON.stringify(params));
|
|
841
1257
|
sessionStorage.setItem("EKYC_CREATE_SEARCH_PERFORMED", "true");
|
|
1258
|
+
sessionStorage.setItem("EKYC_K_NUMBER", params.kNumber);
|
|
842
1259
|
};
|
|
843
1260
|
const closeToast = () => {
|
|
844
1261
|
setShowToast(null);
|
|
845
1262
|
};
|
|
846
|
-
return /*#__PURE__*/React.createElement(
|
|
1263
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
1264
|
+
class: "ground-container employee-app-container form-container"
|
|
1265
|
+
}, /*#__PURE__*/React.createElement(SearchConsumer, {
|
|
847
1266
|
onSearch: handleSearch,
|
|
848
1267
|
searchParams: searchParams
|
|
849
1268
|
}, searchPerformed && /*#__PURE__*/React.createElement(ConnectionDetailsView, {
|
|
@@ -865,7 +1284,17 @@ const Create = () => {
|
|
|
865
1284
|
label: showToast.label,
|
|
866
1285
|
onClose: closeToast,
|
|
867
1286
|
isDsc: true
|
|
868
|
-
}));
|
|
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
|
+
}
|
|
869
1298
|
};
|
|
870
1299
|
|
|
871
1300
|
const CameraIcon = ({
|
|
@@ -901,25 +1330,6 @@ const PincodeIcon = ({
|
|
|
901
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",
|
|
902
1331
|
fill: "currentColor"
|
|
903
1332
|
}));
|
|
904
|
-
const TrashIcon = ({
|
|
905
|
-
size: _size6 = 16
|
|
906
|
-
}) => /*#__PURE__*/React.createElement("svg", {
|
|
907
|
-
width: _size6,
|
|
908
|
-
height: _size6,
|
|
909
|
-
viewBox: "0 0 24 24",
|
|
910
|
-
fill: "none",
|
|
911
|
-
stroke: "#D92D20",
|
|
912
|
-
strokeWidth: "2",
|
|
913
|
-
strokeLinecap: "round"
|
|
914
|
-
}, /*#__PURE__*/React.createElement("polyline", {
|
|
915
|
-
points: "3 6 5 6 21 6"
|
|
916
|
-
}), /*#__PURE__*/React.createElement("path", {
|
|
917
|
-
d: "M19 6l-1 14a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2L5 6"
|
|
918
|
-
}), /*#__PURE__*/React.createElement("path", {
|
|
919
|
-
d: "M10 11v6M14 11v6"
|
|
920
|
-
}), /*#__PURE__*/React.createElement("path", {
|
|
921
|
-
d: "M9 6V4a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v2"
|
|
922
|
-
}));
|
|
923
1333
|
const CheckIcon = ({
|
|
924
1334
|
size: _size7 = 11,
|
|
925
1335
|
color: _color = "#fff"
|
|
@@ -1013,23 +1423,91 @@ const AddressDetails = ({
|
|
|
1013
1423
|
code: "SELF",
|
|
1014
1424
|
name: "EKYC_SELF"
|
|
1015
1425
|
},
|
|
1016
|
-
connectionDetails: null
|
|
1426
|
+
connectionDetails: null,
|
|
1427
|
+
initialData: {}
|
|
1017
1428
|
};
|
|
1429
|
+
const initialData = flowState.initialData || {};
|
|
1018
1430
|
const addrDetails = ((_flowState$connection = flowState.connectionDetails) === null || _flowState$connection === void 0 ? void 0 : _flowState$connection.addressDetails) || {};
|
|
1019
|
-
const [addressType, setAddressType] = useState({
|
|
1431
|
+
const [addressType, setAddressType] = useState(() => getSavedData("EKYC_ADDRESS_TYPE", {
|
|
1020
1432
|
code: "AADHAAR",
|
|
1021
1433
|
name: "EKYC_AADHAAR_ADDRESS"
|
|
1022
|
-
});
|
|
1023
|
-
const [correctAddress, setCorrectAddress] = useState({
|
|
1434
|
+
}));
|
|
1435
|
+
const [correctAddress, setCorrectAddress] = useState(() => getSavedData("EKYC_ADDRESS_CORRECT", {
|
|
1024
1436
|
code: "NO",
|
|
1025
1437
|
name: "CORE_COMMON_NO"
|
|
1026
|
-
});
|
|
1027
|
-
const [fullAddress, setFullAddress] = useState(
|
|
1028
|
-
const [flatNo, setFlatNo] = useState(
|
|
1029
|
-
const [building, setBuilding] = useState(
|
|
1030
|
-
const [landmark, setLandmark] = useState(
|
|
1031
|
-
const [pincode, setPincode] = useState(
|
|
1032
|
-
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]);
|
|
1033
1511
|
const [isLocationFetching, setIsLocationFetching] = useState(false);
|
|
1034
1512
|
const fileInputRef = useRef(null);
|
|
1035
1513
|
const tenantId = Digit.ULBService.getCurrentTenantId();
|
|
@@ -1080,12 +1558,16 @@ const AddressDetails = ({
|
|
|
1080
1558
|
return blocks;
|
|
1081
1559
|
};
|
|
1082
1560
|
const assemblies = getAssemblies(Array.isArray(rootBoundary) ? rootBoundary : rootBoundary ? [rootBoundary] : []);
|
|
1083
|
-
const [assembly, setAssembly] = useState(
|
|
1084
|
-
name:
|
|
1085
|
-
} : null);
|
|
1086
|
-
const [ward, setWard] = useState(
|
|
1087
|
-
name:
|
|
1088
|
-
} : 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]);
|
|
1089
1571
|
useEffect(() => {
|
|
1090
1572
|
if (mdmsRes && addrDetails.assembly && !(assembly !== null && assembly !== void 0 && assembly.code)) {
|
|
1091
1573
|
const foundAssembly = assemblies.find(a => a.name === addrDetails.assembly || a.code === addrDetails.assembly);
|
|
@@ -1121,6 +1603,7 @@ const AddressDetails = ({
|
|
|
1121
1603
|
landmark,
|
|
1122
1604
|
pincode,
|
|
1123
1605
|
doorPhoto,
|
|
1606
|
+
doorPhotoFileStoreId,
|
|
1124
1607
|
assembly: assembly === null || assembly === void 0 ? void 0 : assembly.name,
|
|
1125
1608
|
ward: ward === null || ward === void 0 ? void 0 : ward.name
|
|
1126
1609
|
};
|
|
@@ -1130,30 +1613,30 @@ const AddressDetails = ({
|
|
|
1130
1613
|
const {
|
|
1131
1614
|
kNumber,
|
|
1132
1615
|
selectedOption,
|
|
1133
|
-
connectionDetails
|
|
1616
|
+
connectionDetails,
|
|
1617
|
+
initialData
|
|
1134
1618
|
} = flowState;
|
|
1135
1619
|
history.push("/digit-ui/employee/ekyc/property-info", {
|
|
1136
1620
|
kNumber,
|
|
1137
1621
|
selectedOption,
|
|
1138
1622
|
connectionDetails,
|
|
1139
|
-
addressDetails: payload
|
|
1623
|
+
addressDetails: payload,
|
|
1624
|
+
initialData
|
|
1140
1625
|
});
|
|
1141
1626
|
}
|
|
1142
1627
|
};
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
reader.onloadend = () => setDoorPhoto(reader.result);
|
|
1148
|
-
reader.readAsDataURL(file);
|
|
1149
|
-
};
|
|
1628
|
+
function selectphoto(e) {
|
|
1629
|
+
setDoorPhotoFileStoreId(null);
|
|
1630
|
+
setFilephoto(e.target.files[0]);
|
|
1631
|
+
}
|
|
1150
1632
|
const removePhoto = () => {
|
|
1151
1633
|
setDoorPhoto(null);
|
|
1152
|
-
|
|
1634
|
+
setDoorPhotoFileStoreId(null);
|
|
1635
|
+
setFilephoto(null);
|
|
1153
1636
|
};
|
|
1154
1637
|
const handleUseCurrentLocation = () => {
|
|
1155
1638
|
if (!("geolocation" in navigator)) {
|
|
1156
|
-
alert(t("GEOLOCATION_NOT_SUPPORTED")
|
|
1639
|
+
alert(t("GEOLOCATION_NOT_SUPPORTED"));
|
|
1157
1640
|
return;
|
|
1158
1641
|
}
|
|
1159
1642
|
setIsLocationFetching(true);
|
|
@@ -1182,7 +1665,7 @@ const AddressDetails = ({
|
|
|
1182
1665
|
}, err => {
|
|
1183
1666
|
console.error("Geolocation error:", err);
|
|
1184
1667
|
setIsLocationFetching(false);
|
|
1185
|
-
alert(t("LOCATION_FETCH_FAILED")
|
|
1668
|
+
alert(t("LOCATION_FETCH_FAILED"));
|
|
1186
1669
|
}, {
|
|
1187
1670
|
enableHighAccuracy: true,
|
|
1188
1671
|
timeout: 10000,
|
|
@@ -1202,7 +1685,7 @@ const AddressDetails = ({
|
|
|
1202
1685
|
height: "16px"
|
|
1203
1686
|
}
|
|
1204
1687
|
}),
|
|
1205
|
-
label: t("EKYC_ADDRESS_DETAILS_HEADER")
|
|
1688
|
+
label: t("EKYC_ADDRESS_DETAILS_HEADER")
|
|
1206
1689
|
}), /*#__PURE__*/React.createElement("div", {
|
|
1207
1690
|
style: {
|
|
1208
1691
|
marginBottom: "20px"
|
|
@@ -1255,7 +1738,7 @@ const AddressDetails = ({
|
|
|
1255
1738
|
color: "#04342C",
|
|
1256
1739
|
fontWeight: "500"
|
|
1257
1740
|
}
|
|
1258
|
-
}, addrDetails.fullAddress
|
|
1741
|
+
}, addrDetails.fullAddress)), addressType.code === "OLD" && /*#__PURE__*/React.createElement("div", {
|
|
1259
1742
|
style: {
|
|
1260
1743
|
animation: "fadeSlideIn 0.3s ease"
|
|
1261
1744
|
}
|
|
@@ -1273,7 +1756,7 @@ const AddressDetails = ({
|
|
|
1273
1756
|
fontSize: "13px",
|
|
1274
1757
|
color: "#505A5F"
|
|
1275
1758
|
}
|
|
1276
|
-
}, t("EKYC_ADDRESS_CORRECTION_PROMPT")
|
|
1759
|
+
}, t("EKYC_ADDRESS_CORRECTION_PROMPT")), /*#__PURE__*/React.createElement(RadioButtons, {
|
|
1277
1760
|
options: yesNoOptions,
|
|
1278
1761
|
optionsKey: "name",
|
|
1279
1762
|
selectedOption: correctAddress,
|
|
@@ -1337,7 +1820,7 @@ const AddressDetails = ({
|
|
|
1337
1820
|
fontSize: "14px",
|
|
1338
1821
|
color: "#344054"
|
|
1339
1822
|
}
|
|
1340
|
-
}, isLocationFetching ? t("EKYC_FETCHING_LOCATION")
|
|
1823
|
+
}, isLocationFetching ? t("EKYC_FETCHING_LOCATION") : t("EKYC_USE_CURRENT_LOCATION"))), !isLocationFetching && /*#__PURE__*/React.createElement("span", {
|
|
1341
1824
|
style: {
|
|
1342
1825
|
fontSize: "18px",
|
|
1343
1826
|
color: "#98A2B3",
|
|
@@ -1356,7 +1839,7 @@ const AddressDetails = ({
|
|
|
1356
1839
|
letterSpacing: "0.04em",
|
|
1357
1840
|
marginBottom: "6px"
|
|
1358
1841
|
}
|
|
1359
|
-
}, t("EKYC_FULL_ADDRESS")
|
|
1842
|
+
}, t("EKYC_FULL_ADDRESS")), /*#__PURE__*/React.createElement(IconInput, {
|
|
1360
1843
|
icon: /*#__PURE__*/React.createElement(PropertyHouse, {
|
|
1361
1844
|
styles: {
|
|
1362
1845
|
fill: "#0068fa",
|
|
@@ -1367,7 +1850,7 @@ const AddressDetails = ({
|
|
|
1367
1850
|
topAligned: true,
|
|
1368
1851
|
value: fullAddress,
|
|
1369
1852
|
onChange: e => setFullAddress(e.target.value),
|
|
1370
|
-
placeholder: t("EKYC_ENTER_FULL_ADDRESS")
|
|
1853
|
+
placeholder: t("EKYC_ENTER_FULL_ADDRESS"),
|
|
1371
1854
|
inputStyle: {
|
|
1372
1855
|
minHeight: "72px"
|
|
1373
1856
|
}
|
|
@@ -1387,7 +1870,7 @@ const AddressDetails = ({
|
|
|
1387
1870
|
letterSpacing: "0.04em",
|
|
1388
1871
|
marginBottom: "6px"
|
|
1389
1872
|
}
|
|
1390
|
-
}, t("EKYC_FLAT_HOUSE_NUMBER")
|
|
1873
|
+
}, t("EKYC_FLAT_HOUSE_NUMBER")), /*#__PURE__*/React.createElement(IconInput, {
|
|
1391
1874
|
icon: /*#__PURE__*/React.createElement(PropertyHouse, {
|
|
1392
1875
|
styles: {
|
|
1393
1876
|
fill: "#0068fa",
|
|
@@ -1397,7 +1880,7 @@ const AddressDetails = ({
|
|
|
1397
1880
|
}),
|
|
1398
1881
|
value: flatNo,
|
|
1399
1882
|
onChange: e => setFlatNo(e.target.value),
|
|
1400
|
-
placeholder: t("EKYC_ENTER_FLAT_NO")
|
|
1883
|
+
placeholder: t("EKYC_ENTER_FLAT_NO")
|
|
1401
1884
|
})), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
1402
1885
|
style: {
|
|
1403
1886
|
fontSize: "11px",
|
|
@@ -1407,7 +1890,7 @@ const AddressDetails = ({
|
|
|
1407
1890
|
letterSpacing: "0.04em",
|
|
1408
1891
|
marginBottom: "6px"
|
|
1409
1892
|
}
|
|
1410
|
-
}, t("EKYC_BUILDING_TOWER")
|
|
1893
|
+
}, t("EKYC_BUILDING_TOWER")), /*#__PURE__*/React.createElement(IconInput, {
|
|
1411
1894
|
icon: /*#__PURE__*/React.createElement(PropertyHouse, {
|
|
1412
1895
|
styles: {
|
|
1413
1896
|
fill: "#0068fa",
|
|
@@ -1417,7 +1900,7 @@ const AddressDetails = ({
|
|
|
1417
1900
|
}),
|
|
1418
1901
|
value: building,
|
|
1419
1902
|
onChange: e => setBuilding(e.target.value),
|
|
1420
|
-
placeholder: t("EKYC_ENTER_BUILDING")
|
|
1903
|
+
placeholder: t("EKYC_ENTER_BUILDING")
|
|
1421
1904
|
}))), /*#__PURE__*/React.createElement("div", {
|
|
1422
1905
|
style: {
|
|
1423
1906
|
display: "grid",
|
|
@@ -1434,7 +1917,7 @@ const AddressDetails = ({
|
|
|
1434
1917
|
letterSpacing: "0.04em",
|
|
1435
1918
|
marginBottom: "6px"
|
|
1436
1919
|
}
|
|
1437
|
-
}, t("EKYC_LANDMARK")
|
|
1920
|
+
}, t("EKYC_LANDMARK")), /*#__PURE__*/React.createElement(IconInput, {
|
|
1438
1921
|
icon: /*#__PURE__*/React.createElement(LocationIcon, {
|
|
1439
1922
|
className: "icon",
|
|
1440
1923
|
styles: {
|
|
@@ -1445,7 +1928,7 @@ const AddressDetails = ({
|
|
|
1445
1928
|
}),
|
|
1446
1929
|
value: landmark,
|
|
1447
1930
|
onChange: e => setLandmark(e.target.value),
|
|
1448
|
-
placeholder: t("EKYC_ENTER_LANDMARK")
|
|
1931
|
+
placeholder: t("EKYC_ENTER_LANDMARK")
|
|
1449
1932
|
})), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
1450
1933
|
style: {
|
|
1451
1934
|
fontSize: "11px",
|
|
@@ -1455,7 +1938,7 @@ const AddressDetails = ({
|
|
|
1455
1938
|
letterSpacing: "0.04em",
|
|
1456
1939
|
marginBottom: "6px"
|
|
1457
1940
|
}
|
|
1458
|
-
}, t("EKYC_PINCODE")
|
|
1941
|
+
}, t("EKYC_PINCODE")), /*#__PURE__*/React.createElement(IconInput, {
|
|
1459
1942
|
icon: /*#__PURE__*/React.createElement(PincodeIcon, {
|
|
1460
1943
|
size: 15
|
|
1461
1944
|
}),
|
|
@@ -1463,7 +1946,7 @@ const AddressDetails = ({
|
|
|
1463
1946
|
onChange: e => {
|
|
1464
1947
|
if (/^\d*$/.test(e.target.value)) setPincode(e.target.value);
|
|
1465
1948
|
},
|
|
1466
|
-
placeholder: t("EKYC_ENTER_PINCODE")
|
|
1949
|
+
placeholder: t("EKYC_ENTER_PINCODE"),
|
|
1467
1950
|
maxLength: 6
|
|
1468
1951
|
})))), /*#__PURE__*/React.createElement("hr", {
|
|
1469
1952
|
style: {
|
|
@@ -1479,7 +1962,7 @@ const AddressDetails = ({
|
|
|
1479
1962
|
height: "16px"
|
|
1480
1963
|
}
|
|
1481
1964
|
}),
|
|
1482
|
-
label: t("EKYC_ADMINISTRATIVE_DIVISION")
|
|
1965
|
+
label: t("EKYC_ADMINISTRATIVE_DIVISION")
|
|
1483
1966
|
}), isMdmsLoading ? /*#__PURE__*/React.createElement(Loader, null) : /*#__PURE__*/React.createElement("div", {
|
|
1484
1967
|
style: {
|
|
1485
1968
|
display: "grid",
|
|
@@ -1496,7 +1979,7 @@ const AddressDetails = ({
|
|
|
1496
1979
|
letterSpacing: "0.04em",
|
|
1497
1980
|
marginBottom: "6px"
|
|
1498
1981
|
}
|
|
1499
|
-
}, t("EKYC_ASSEMBLY")
|
|
1982
|
+
}, t("EKYC_ASSEMBLY")), /*#__PURE__*/React.createElement(Dropdown, {
|
|
1500
1983
|
option: assemblies,
|
|
1501
1984
|
optionKey: "name",
|
|
1502
1985
|
selected: assembly,
|
|
@@ -1531,140 +2014,45 @@ const AddressDetails = ({
|
|
|
1531
2014
|
icon: /*#__PURE__*/React.createElement(CameraIcon, {
|
|
1532
2015
|
size: 16
|
|
1533
2016
|
}),
|
|
1534
|
-
label: t("
|
|
2017
|
+
label: t("EKYC_CAPTURE_DOOR_IMAGE")
|
|
1535
2018
|
}), /*#__PURE__*/React.createElement("div", {
|
|
1536
2019
|
style: {
|
|
1537
2020
|
fontSize: "12px",
|
|
1538
2021
|
color: "#667085",
|
|
1539
2022
|
marginBottom: "12px"
|
|
1540
2023
|
}
|
|
1541
|
-
}, t("EKYC_REQUIRED_FOR_VERIFICATION")
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
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",
|
|
1545
2035
|
borderRadius: "8px",
|
|
1546
|
-
padding: "12px 14px",
|
|
1547
|
-
display: "flex",
|
|
1548
|
-
alignItems: "flex-start",
|
|
1549
|
-
gap: "10px",
|
|
1550
|
-
marginBottom: "16px"
|
|
1551
|
-
}
|
|
1552
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
1553
|
-
style: {
|
|
1554
|
-
flexShrink: 0,
|
|
1555
|
-
marginTop: "1px"
|
|
1556
|
-
}
|
|
1557
|
-
}, /*#__PURE__*/React.createElement(InfoBannerIcon, {
|
|
1558
|
-
fill: "#B54708"
|
|
1559
|
-
})), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
1560
|
-
style: {
|
|
1561
|
-
fontWeight: "600",
|
|
1562
|
-
color: "#B54708",
|
|
1563
|
-
fontSize: "13px",
|
|
1564
|
-
marginBottom: "2px"
|
|
1565
|
-
}
|
|
1566
|
-
}, t("EKYC_IMPORTANT") || "Important"), /*#__PURE__*/React.createElement("div", {
|
|
1567
|
-
style: {
|
|
1568
|
-
fontSize: "12px",
|
|
1569
|
-
color: "#92400E"
|
|
1570
|
-
}
|
|
1571
|
-
}, t("EKYC_CAPTURE_LIVE_CAMERA") || "Capture with live camera for GPS metadata"))), /*#__PURE__*/React.createElement("input", {
|
|
1572
|
-
type: "file",
|
|
1573
|
-
ref: fileInputRef,
|
|
1574
|
-
onChange: handleCapture,
|
|
1575
|
-
accept: "image/*",
|
|
1576
|
-
style: {
|
|
1577
|
-
display: "none"
|
|
1578
|
-
}
|
|
1579
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
1580
|
-
onClick: !doorPhoto ? () => fileInputRef.current.click() : undefined,
|
|
1581
|
-
onMouseOver: e => {
|
|
1582
|
-
if (!doorPhoto) e.currentTarget.style.borderColor = "#185FA5";
|
|
1583
|
-
},
|
|
1584
|
-
onMouseOut: e => {
|
|
1585
|
-
if (!doorPhoto) e.currentTarget.style.borderColor = "#D0D5DD";
|
|
1586
|
-
},
|
|
1587
|
-
style: {
|
|
1588
|
-
border: "1.5px dashed #D0D5DD",
|
|
1589
|
-
borderRadius: "10px",
|
|
1590
|
-
minHeight: "160px",
|
|
1591
|
-
display: "flex",
|
|
1592
|
-
flexDirection: "column",
|
|
1593
|
-
alignItems: "center",
|
|
1594
|
-
justifyContent: "center",
|
|
1595
|
-
backgroundColor: "#F9FAFB",
|
|
1596
|
-
cursor: doorPhoto ? "default" : "pointer",
|
|
1597
2036
|
overflow: "hidden",
|
|
1598
|
-
|
|
1599
|
-
position: "relative",
|
|
1600
|
-
padding: doorPhoto ? "0" : "32px 24px"
|
|
1601
|
-
}
|
|
1602
|
-
}, !doorPhoto ? /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
1603
|
-
style: {
|
|
1604
|
-
width: "52px",
|
|
1605
|
-
height: "52px",
|
|
1606
|
-
borderRadius: "50%",
|
|
1607
|
-
background: "#E6F1FB",
|
|
1608
|
-
display: "flex",
|
|
1609
|
-
alignItems: "center",
|
|
1610
|
-
justifyContent: "center",
|
|
1611
|
-
marginBottom: "12px"
|
|
1612
|
-
}
|
|
1613
|
-
}, /*#__PURE__*/React.createElement(CameraIcon, {
|
|
1614
|
-
size: 26
|
|
1615
|
-
})), /*#__PURE__*/React.createElement("div", {
|
|
1616
|
-
style: {
|
|
1617
|
-
fontWeight: "600",
|
|
1618
|
-
fontSize: "14px",
|
|
1619
|
-
color: "#101828",
|
|
1620
|
-
marginBottom: "4px"
|
|
1621
|
-
}
|
|
1622
|
-
}, t("EKYC_TAP_TO_CAPTURE") || "Tap to capture"), /*#__PURE__*/React.createElement("div", {
|
|
1623
|
-
style: {
|
|
1624
|
-
fontSize: "12px",
|
|
1625
|
-
color: "#667085"
|
|
2037
|
+
border: "1px solid #EAECF0"
|
|
1626
2038
|
}
|
|
1627
|
-
},
|
|
2039
|
+
}, /*#__PURE__*/React.createElement("img", {
|
|
1628
2040
|
src: doorPhoto,
|
|
1629
|
-
alt: "Door",
|
|
2041
|
+
alt: "Door Preview",
|
|
1630
2042
|
style: {
|
|
1631
2043
|
width: "100%",
|
|
1632
|
-
maxHeight: "
|
|
1633
|
-
objectFit: "cover"
|
|
1634
|
-
display: "block"
|
|
1635
|
-
}
|
|
1636
|
-
}), /*#__PURE__*/React.createElement("button", {
|
|
1637
|
-
onClick: e => {
|
|
1638
|
-
e.stopPropagation();
|
|
1639
|
-
removePhoto();
|
|
1640
|
-
},
|
|
1641
|
-
style: {
|
|
1642
|
-
position: "absolute",
|
|
1643
|
-
top: "10px",
|
|
1644
|
-
right: "10px",
|
|
1645
|
-
background: "#fff",
|
|
1646
|
-
border: "0.5px solid #EAECF0",
|
|
1647
|
-
borderRadius: "7px",
|
|
1648
|
-
padding: "6px 10px",
|
|
1649
|
-
display: "flex",
|
|
1650
|
-
alignItems: "center",
|
|
1651
|
-
gap: "5px",
|
|
1652
|
-
cursor: "pointer",
|
|
1653
|
-
fontSize: "12px",
|
|
1654
|
-
color: "#D92D20",
|
|
1655
|
-
fontWeight: "500"
|
|
2044
|
+
maxHeight: "250px",
|
|
2045
|
+
objectFit: "cover"
|
|
1656
2046
|
}
|
|
1657
|
-
}, /*#__PURE__*/React.createElement(
|
|
1658
|
-
size: 13
|
|
1659
|
-
}), " ", t("EKYC_REMOVE") || "Remove"))), _isSection ? /*#__PURE__*/React.createElement("div", {
|
|
2047
|
+
})), _isSection ? /*#__PURE__*/React.createElement("div", {
|
|
1660
2048
|
style: {
|
|
1661
2049
|
marginTop: "24px"
|
|
1662
2050
|
}
|
|
1663
2051
|
}, /*#__PURE__*/React.createElement(SubmitBar, {
|
|
1664
|
-
label: t("
|
|
2052
|
+
label: t("ES_COMMON_SAVE_CONTINUE"),
|
|
1665
2053
|
onSubmit: handleCompleteVerification
|
|
1666
2054
|
})) : /*#__PURE__*/React.createElement(ActionBar, null, /*#__PURE__*/React.createElement(SubmitBar, {
|
|
1667
|
-
label: t("EKYC_COMPLETE_VERIFICATION")
|
|
2055
|
+
label: t("EKYC_COMPLETE_VERIFICATION"),
|
|
1668
2056
|
onSubmit: handleCompleteVerification
|
|
1669
2057
|
})), /*#__PURE__*/React.createElement("div", {
|
|
1670
2058
|
style: {
|
|
@@ -1692,7 +2080,13 @@ const AddressDetails = ({
|
|
|
1692
2080
|
rx: "2"
|
|
1693
2081
|
}), /*#__PURE__*/React.createElement("path", {
|
|
1694
2082
|
d: "M7 11V7a5 5 0 0 1 10 0v4"
|
|
1695
|
-
})), 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
|
+
}));
|
|
1696
2090
|
if (_isSection) {
|
|
1697
2091
|
return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("hr", {
|
|
1698
2092
|
style: {
|
|
@@ -2056,7 +2450,6 @@ const RadioToggleRow = ({
|
|
|
2056
2450
|
}
|
|
2057
2451
|
}));
|
|
2058
2452
|
const AadhaarVerification = () => {
|
|
2059
|
-
var _connectionDetails$ad;
|
|
2060
2453
|
const {
|
|
2061
2454
|
t
|
|
2062
2455
|
} = useTranslation();
|
|
@@ -2082,23 +2475,63 @@ const AadhaarVerification = () => {
|
|
|
2082
2475
|
}
|
|
2083
2476
|
}
|
|
2084
2477
|
};
|
|
2085
|
-
const
|
|
2086
|
-
const [
|
|
2087
|
-
|
|
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");
|
|
2088
2506
|
const [isVerifying, setIsVerifying] = useState(false);
|
|
2089
|
-
const [
|
|
2507
|
+
const [showOtpField, setShowOtpField] = useState(false);
|
|
2508
|
+
const [otp, setOtp] = useState("");
|
|
2509
|
+
const [otpError, setOtpError] = useState(false);
|
|
2510
|
+
const [nameCorrect, setNameCorrect] = useState(() => getSavedData("EKYC_NAME_CORRECT", {
|
|
2090
2511
|
code: "NO",
|
|
2091
2512
|
name: "CORE_COMMON_NO"
|
|
2092
|
-
});
|
|
2093
|
-
const [userName, setUserName] = useState(
|
|
2094
|
-
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", {
|
|
2095
2516
|
code: "NO",
|
|
2096
2517
|
name: "CORE_COMMON_NO"
|
|
2097
|
-
});
|
|
2098
|
-
const [mobileNumber, setMobileNumber] = useState(
|
|
2099
|
-
const [whatsappNumber, setWhatsappNumber] = useState(
|
|
2100
|
-
const [email, setEmail] = useState(
|
|
2101
|
-
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]);
|
|
2102
2535
|
const [showAddressSection, setShowAddressSection] = useState(false);
|
|
2103
2536
|
const [addressData, setAddressData] = useState(null);
|
|
2104
2537
|
const yesNoOptions = [{
|
|
@@ -2109,11 +2542,18 @@ const AadhaarVerification = () => {
|
|
|
2109
2542
|
name: "CORE_COMMON_NO"
|
|
2110
2543
|
}];
|
|
2111
2544
|
const handleVerifyAadhaar = () => {
|
|
2112
|
-
if (aadhaarLastFour.length !==
|
|
2545
|
+
if (aadhaarLastFour.length !== 12 || isVerifying) return;
|
|
2113
2546
|
setIsVerifying(true);
|
|
2114
2547
|
setTimeout(() => {
|
|
2115
2548
|
setIsVerifying(false);
|
|
2549
|
+
setShowOtpField(true);
|
|
2550
|
+
}, 1200);
|
|
2551
|
+
};
|
|
2552
|
+
const handleVerifyOtp = () => {
|
|
2553
|
+
if (otp === "123456") {
|
|
2116
2554
|
setIsAadhaarVerified(true);
|
|
2555
|
+
setShowOtpField(false);
|
|
2556
|
+
setOtpError(false);
|
|
2117
2557
|
setShowAddressSection(true);
|
|
2118
2558
|
setTimeout(() => {
|
|
2119
2559
|
var _addressSectionRef$cu;
|
|
@@ -2122,7 +2562,9 @@ const AadhaarVerification = () => {
|
|
|
2122
2562
|
block: "start"
|
|
2123
2563
|
});
|
|
2124
2564
|
}, 100);
|
|
2125
|
-
}
|
|
2565
|
+
} else {
|
|
2566
|
+
setOtpError(true);
|
|
2567
|
+
}
|
|
2126
2568
|
};
|
|
2127
2569
|
const handleSaveAndContinue = () => {
|
|
2128
2570
|
setShowAddressSection(true);
|
|
@@ -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 {
|
|
@@ -2330,14 +2775,48 @@ const AadhaarVerification = () => {
|
|
|
2330
2775
|
maxLength: 12,
|
|
2331
2776
|
disabled: isAadhaarVerified,
|
|
2332
2777
|
inputStyle: isAadhaarVerified ? styles.verifiedInput : {}
|
|
2333
|
-
}))), !isAadhaarVerified && /*#__PURE__*/React.createElement(SubmitBar, {
|
|
2778
|
+
}))), !isAadhaarVerified && !showOtpField && /*#__PURE__*/React.createElement(SubmitBar, {
|
|
2334
2779
|
label: isVerifying ? t("EKYC_VERIFYING") || "Verifying..." : t("EKYC_VERIFY_AADHAAR_BTN") || "Verify Aadhaar",
|
|
2335
2780
|
onSubmit: handleVerifyAadhaar,
|
|
2336
|
-
disabled: aadhaarLastFour.length !==
|
|
2781
|
+
disabled: aadhaarLastFour.length !== 12 || isVerifying,
|
|
2337
2782
|
style: {
|
|
2338
2783
|
marginTop: "12px"
|
|
2339
2784
|
}
|
|
2340
|
-
}), isAadhaarVerified && /*#__PURE__*/React.createElement("div", {
|
|
2785
|
+
}), !isAadhaarVerified && showOtpField && /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
2786
|
+
className: "ekyc-field-label",
|
|
2787
|
+
style: {
|
|
2788
|
+
marginTop: "16px"
|
|
2789
|
+
}
|
|
2790
|
+
}, t("EKYC_ENTER_OTP")), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement("div", {
|
|
2791
|
+
className: "field"
|
|
2792
|
+
}, /*#__PURE__*/React.createElement(IconInput$1, {
|
|
2793
|
+
icon: /*#__PURE__*/React.createElement(LockIcon, {
|
|
2794
|
+
size: 15
|
|
2795
|
+
}),
|
|
2796
|
+
value: otp,
|
|
2797
|
+
onChange: e => {
|
|
2798
|
+
const val = e.target.value;
|
|
2799
|
+
if (/^\d*$/.test(val)) {
|
|
2800
|
+
setOtp(val);
|
|
2801
|
+
if (otpError) setOtpError(false);
|
|
2802
|
+
}
|
|
2803
|
+
},
|
|
2804
|
+
placeholder: t("EKYC_ENTER_OTP_PLACEHOLDER") || "Enter 123456",
|
|
2805
|
+
maxLength: 6
|
|
2806
|
+
}))), otpError && /*#__PURE__*/React.createElement("div", {
|
|
2807
|
+
style: {
|
|
2808
|
+
color: "#D4351C",
|
|
2809
|
+
fontSize: "12px",
|
|
2810
|
+
marginTop: "4px"
|
|
2811
|
+
}
|
|
2812
|
+
}, t("EKYC_INVALID_OTP") || "Invalid OTP. Please enter 123456."), /*#__PURE__*/React.createElement(SubmitBar, {
|
|
2813
|
+
label: t("EKYC_VERIFY_OTP_BTN") || "Verify OTP",
|
|
2814
|
+
onSubmit: handleVerifyOtp,
|
|
2815
|
+
disabled: otp.length !== 6,
|
|
2816
|
+
style: {
|
|
2817
|
+
marginTop: "12px"
|
|
2818
|
+
}
|
|
2819
|
+
})), isAadhaarVerified && /*#__PURE__*/React.createElement("div", {
|
|
2341
2820
|
style: styles.verifiedCard
|
|
2342
2821
|
}, /*#__PURE__*/React.createElement("div", {
|
|
2343
2822
|
style: {
|
|
@@ -2377,11 +2856,11 @@ const AadhaarVerification = () => {
|
|
|
2377
2856
|
style: styles.infoLabel
|
|
2378
2857
|
}, t("EKYC_NAME") || "Name"), /*#__PURE__*/React.createElement("div", {
|
|
2379
2858
|
style: styles.infoValue
|
|
2380
|
-
},
|
|
2859
|
+
}, initialDetails.consumerName)), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
2381
2860
|
style: styles.infoLabel
|
|
2382
2861
|
}, t("EKYC_AADHAAR") || "Aadhaar"), /*#__PURE__*/React.createElement("div", {
|
|
2383
2862
|
style: styles.infoValue
|
|
2384
|
-
},
|
|
2863
|
+
}, aadhaarLastFour)), /*#__PURE__*/React.createElement("div", {
|
|
2385
2864
|
style: {
|
|
2386
2865
|
gridColumn: "span 2"
|
|
2387
2866
|
}
|
|
@@ -2392,7 +2871,7 @@ const AadhaarVerification = () => {
|
|
|
2392
2871
|
...styles.infoValue,
|
|
2393
2872
|
fontSize: "13px"
|
|
2394
2873
|
}
|
|
2395
|
-
},
|
|
2874
|
+
}, initialDetails.address)))), /*#__PURE__*/React.createElement("hr", {
|
|
2396
2875
|
style: {
|
|
2397
2876
|
margin: "24px 0",
|
|
2398
2877
|
border: 0,
|
|
@@ -2519,7 +2998,7 @@ const AadhaarVerification = () => {
|
|
|
2519
2998
|
}
|
|
2520
2999
|
}, /*#__PURE__*/React.createElement(LockIcon, {
|
|
2521
3000
|
size: 11
|
|
2522
|
-
}), t("EKYC_SECURE_DATA_NOTICE") || "Your data is encrypted and secure"))));
|
|
3001
|
+
}), t("EKYC_SECURE_DATA_NOTICE") || "Your data is encrypted and secure")))));
|
|
2523
3002
|
};
|
|
2524
3003
|
|
|
2525
3004
|
const CheckIcon$2 = ({
|
|
@@ -2566,35 +3045,6 @@ const DocumentIcon = ({
|
|
|
2566
3045
|
}, /*#__PURE__*/React.createElement("path", {
|
|
2567
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"
|
|
2568
3047
|
}));
|
|
2569
|
-
const CameraIcon$1 = ({
|
|
2570
|
-
size: _size5 = 24
|
|
2571
|
-
}) => /*#__PURE__*/React.createElement("svg", {
|
|
2572
|
-
width: _size5,
|
|
2573
|
-
height: _size5,
|
|
2574
|
-
viewBox: "0 0 24 24",
|
|
2575
|
-
fill: "currentColor"
|
|
2576
|
-
}, /*#__PURE__*/React.createElement("path", {
|
|
2577
|
-
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"
|
|
2578
|
-
}));
|
|
2579
|
-
const TrashIcon$1 = ({
|
|
2580
|
-
size: _size6 = 14
|
|
2581
|
-
}) => /*#__PURE__*/React.createElement("svg", {
|
|
2582
|
-
width: _size6,
|
|
2583
|
-
height: _size6,
|
|
2584
|
-
viewBox: "0 0 24 24",
|
|
2585
|
-
fill: "none",
|
|
2586
|
-
stroke: "#D92D20",
|
|
2587
|
-
strokeWidth: "2",
|
|
2588
|
-
strokeLinecap: "round"
|
|
2589
|
-
}, /*#__PURE__*/React.createElement("polyline", {
|
|
2590
|
-
points: "3 6 5 6 21 6"
|
|
2591
|
-
}), /*#__PURE__*/React.createElement("path", {
|
|
2592
|
-
d: "M19 6l-1 14a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2L5 6"
|
|
2593
|
-
}), /*#__PURE__*/React.createElement("path", {
|
|
2594
|
-
d: "M10 11v6M14 11v6"
|
|
2595
|
-
}), /*#__PURE__*/React.createElement("path", {
|
|
2596
|
-
d: "M9 6V4a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v2"
|
|
2597
|
-
}));
|
|
2598
3048
|
const PidIcon = ({
|
|
2599
3049
|
size: _size7 = 16
|
|
2600
3050
|
}) => /*#__PURE__*/React.createElement("svg", {
|
|
@@ -2677,11 +3127,13 @@ const PropertyInfo = () => {
|
|
|
2677
3127
|
const history = useHistory();
|
|
2678
3128
|
const location = useLocation();
|
|
2679
3129
|
const flowState = location.state || {
|
|
2680
|
-
kNumber: "EKYC-1234567890"
|
|
3130
|
+
kNumber: sessionStorage.getItem("EKYC_K_NUMBER") || "EKYC-1234567890",
|
|
3131
|
+
initialData: getSavedData("EKYC_INITIAL_DATA", {})
|
|
2681
3132
|
};
|
|
2682
3133
|
const {
|
|
2683
3134
|
kNumber
|
|
2684
3135
|
} = flowState;
|
|
3136
|
+
const initialData = flowState.initialData || getSavedData("EKYC_INITIAL_DATA", {});
|
|
2685
3137
|
const tenantId = Digit.ULBService.getCurrentTenantId();
|
|
2686
3138
|
const {
|
|
2687
3139
|
data: dataV0
|
|
@@ -2695,14 +3147,137 @@ const PropertyInfo = () => {
|
|
|
2695
3147
|
const {
|
|
2696
3148
|
data: dataV2
|
|
2697
3149
|
} = Digit.Hooks.ekyc.useGetFloorCount(tenantId);
|
|
2698
|
-
const [ownerType, setOwnerType] = useState("OWNER");
|
|
2699
|
-
const [pidNumber, setPidNumber] = useState("");
|
|
2700
|
-
const [connectionCategory, setConnectionCategory] = useState(
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
|
|
2704
|
-
const [
|
|
2705
|
-
|
|
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]);
|
|
2706
3281
|
const fileRef = useRef(null);
|
|
2707
3282
|
const cameraRef = useRef(null);
|
|
2708
3283
|
const handleSaveAndContinue = () => {
|
|
@@ -2716,22 +3291,21 @@ const PropertyInfo = () => {
|
|
|
2716
3291
|
userType,
|
|
2717
3292
|
noOfFloors,
|
|
2718
3293
|
propertyDocument,
|
|
2719
|
-
|
|
2720
|
-
|
|
3294
|
+
propertyDocumentFileStoreId,
|
|
3295
|
+
buildingPhoto,
|
|
3296
|
+
buildingPhotoFileStoreId
|
|
3297
|
+
},
|
|
3298
|
+
initialData
|
|
2721
3299
|
});
|
|
2722
3300
|
};
|
|
2723
|
-
|
|
2724
|
-
|
|
2725
|
-
|
|
2726
|
-
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
|
|
2730
|
-
|
|
2731
|
-
const reader = new FileReader();
|
|
2732
|
-
reader.onloadend = () => setBuildingPhoto(reader.result);
|
|
2733
|
-
reader.readAsDataURL(file);
|
|
2734
|
-
};
|
|
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
|
+
}
|
|
2735
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 => ({
|
|
2736
3310
|
label: t(item.code),
|
|
2737
3311
|
value: item.code
|
|
@@ -2749,6 +3323,8 @@ const PropertyInfo = () => {
|
|
|
2749
3323
|
value: item.code
|
|
2750
3324
|
}))) || [];
|
|
2751
3325
|
return /*#__PURE__*/React.createElement("div", {
|
|
3326
|
+
class: "ground-container employee-app-container form-container"
|
|
3327
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
2752
3328
|
className: "inbox-container"
|
|
2753
3329
|
}, /*#__PURE__*/React.createElement("style", null, `
|
|
2754
3330
|
@keyframes fadeSlideIn {
|
|
@@ -3068,70 +3644,26 @@ const PropertyInfo = () => {
|
|
|
3068
3644
|
letterSpacing: "0.04em",
|
|
3069
3645
|
marginBottom: "8px"
|
|
3070
3646
|
}
|
|
3071
|
-
}, t("EKYC_UPLOAD_PROPERTY_DOC") || "Upload property document"), /*#__PURE__*/React.createElement(
|
|
3072
|
-
|
|
3073
|
-
|
|
3647
|
+
}, t("EKYC_UPLOAD_PROPERTY_DOC") || "Upload property document"), /*#__PURE__*/React.createElement(UploadFile, {
|
|
3648
|
+
id: "ekyc-property-doc",
|
|
3649
|
+
extraStyleName: "propertyCreate",
|
|
3074
3650
|
accept: ".pdf",
|
|
3075
|
-
|
|
3076
|
-
|
|
3651
|
+
onUpload: selectpdf,
|
|
3652
|
+
onDelete: () => {
|
|
3653
|
+
setPropertyDocumentFileStoreId(null);
|
|
3654
|
+
setPropertyDocument(null);
|
|
3655
|
+
setFilepdf(null);
|
|
3077
3656
|
},
|
|
3078
|
-
|
|
3079
|
-
|
|
3080
|
-
|
|
3081
|
-
|
|
3082
|
-
onMouseOut: e => e.currentTarget.style.borderColor = "#B5D4F4",
|
|
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", {
|
|
3083
3661
|
style: {
|
|
3084
|
-
|
|
3085
|
-
|
|
3086
|
-
|
|
3087
|
-
textAlign: "center",
|
|
3088
|
-
cursor: "pointer",
|
|
3089
|
-
backgroundColor: "#E6F1FB",
|
|
3090
|
-
minHeight: "160px",
|
|
3091
|
-
display: "flex",
|
|
3092
|
-
flexDirection: "column",
|
|
3093
|
-
alignItems: "center",
|
|
3094
|
-
justifyContent: "center",
|
|
3095
|
-
gap: "10px",
|
|
3096
|
-
transition: "border-color 0.15s"
|
|
3097
|
-
}
|
|
3098
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
3099
|
-
style: {
|
|
3100
|
-
background: "#fff",
|
|
3101
|
-
padding: "10px",
|
|
3102
|
-
borderRadius: "10px",
|
|
3103
|
-
display: "flex"
|
|
3104
|
-
}
|
|
3105
|
-
}, /*#__PURE__*/React.createElement("svg", {
|
|
3106
|
-
width: "32",
|
|
3107
|
-
height: "32",
|
|
3108
|
-
viewBox: "0 0 24 24",
|
|
3109
|
-
fill: "#185FA5"
|
|
3110
|
-
}, /*#__PURE__*/React.createElement("path", {
|
|
3111
|
-
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"
|
|
3112
|
-
}), /*#__PURE__*/React.createElement("path", {
|
|
3113
|
-
d: "M12 18v-4M12 14l-2 2M12 14l2 2",
|
|
3114
|
-
stroke: "#fff",
|
|
3115
|
-
strokeWidth: "1.5",
|
|
3116
|
-
strokeLinecap: "round"
|
|
3117
|
-
}))), propertyDocument ? /*#__PURE__*/React.createElement("div", {
|
|
3118
|
-
style: {
|
|
3119
|
-
fontSize: "13px",
|
|
3120
|
-
fontWeight: "600",
|
|
3121
|
-
color: "#0F6E56"
|
|
3122
|
-
}
|
|
3123
|
-
}, "\u2713 ", propertyDocument.name) : /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
3124
|
-
style: {
|
|
3125
|
-
fontSize: "13px",
|
|
3126
|
-
fontWeight: "600",
|
|
3127
|
-
color: "#185FA5"
|
|
3128
|
-
}
|
|
3129
|
-
}, t("EKYC_UPLOAD_PROPERTY_DOC_CTA") || "Tap to upload"), /*#__PURE__*/React.createElement("div", {
|
|
3130
|
-
style: {
|
|
3131
|
-
fontSize: "12px",
|
|
3132
|
-
color: "#378ADD"
|
|
3662
|
+
fontSize: "11px",
|
|
3663
|
+
color: "#D92D20",
|
|
3664
|
+
marginTop: "4px"
|
|
3133
3665
|
}
|
|
3134
|
-
}, "
|
|
3666
|
+
}, t("EKYC_ENTER_PID_FIRST_CTA") || "Enter PID to upload")), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
3135
3667
|
style: {
|
|
3136
3668
|
fontSize: "11px",
|
|
3137
3669
|
fontWeight: "600",
|
|
@@ -3140,97 +3672,34 @@ const PropertyInfo = () => {
|
|
|
3140
3672
|
letterSpacing: "0.04em",
|
|
3141
3673
|
marginBottom: "8px"
|
|
3142
3674
|
}
|
|
3143
|
-
}, t("EKYC_CAPTURE_BUILDING_IMAGE") || "Capture building image"), /*#__PURE__*/React.createElement(
|
|
3144
|
-
|
|
3145
|
-
|
|
3146
|
-
accept: "
|
|
3147
|
-
|
|
3148
|
-
|
|
3149
|
-
|
|
3150
|
-
|
|
3151
|
-
|
|
3152
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
3153
|
-
onClick: !buildingPhoto ? () => cameraRef.current.click() : undefined,
|
|
3154
|
-
onMouseOver: e => {
|
|
3155
|
-
if (!buildingPhoto) e.currentTarget.style.borderColor = "#185FA5";
|
|
3156
|
-
},
|
|
3157
|
-
onMouseOut: e => {
|
|
3158
|
-
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);
|
|
3159
3684
|
},
|
|
3685
|
+
message: buildingPhotoFileStoreId ? `1 ${t(`EKYC_ACTION_FILEUPLOADED`)}` : t(`EKYC_ACTION_NO_FILEUPLOADED`),
|
|
3686
|
+
error: error
|
|
3687
|
+
}), buildingPhoto && /*#__PURE__*/React.createElement("div", {
|
|
3160
3688
|
style: {
|
|
3161
|
-
|
|
3162
|
-
borderRadius: "
|
|
3163
|
-
minHeight: "160px",
|
|
3164
|
-
display: "flex",
|
|
3165
|
-
flexDirection: "column",
|
|
3166
|
-
alignItems: "center",
|
|
3167
|
-
justifyContent: "center",
|
|
3168
|
-
backgroundColor: "#F9FAFB",
|
|
3169
|
-
cursor: buildingPhoto ? "default" : "pointer",
|
|
3689
|
+
marginTop: "10px",
|
|
3690
|
+
borderRadius: "8px",
|
|
3170
3691
|
overflow: "hidden",
|
|
3171
|
-
|
|
3172
|
-
position: "relative",
|
|
3173
|
-
padding: buildingPhoto ? "0" : "28px 20px"
|
|
3174
|
-
}
|
|
3175
|
-
}, !buildingPhoto ? /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
3176
|
-
style: {
|
|
3177
|
-
background: "#E6F1FB",
|
|
3178
|
-
width: "52px",
|
|
3179
|
-
height: "52px",
|
|
3180
|
-
borderRadius: "50%",
|
|
3181
|
-
display: "flex",
|
|
3182
|
-
alignItems: "center",
|
|
3183
|
-
justifyContent: "center",
|
|
3184
|
-
marginBottom: "10px"
|
|
3185
|
-
}
|
|
3186
|
-
}, /*#__PURE__*/React.createElement(CameraIcon$1, {
|
|
3187
|
-
size: 26
|
|
3188
|
-
})), /*#__PURE__*/React.createElement("div", {
|
|
3189
|
-
style: {
|
|
3190
|
-
fontSize: "13px",
|
|
3191
|
-
fontWeight: "600",
|
|
3192
|
-
color: "#101828"
|
|
3193
|
-
}
|
|
3194
|
-
}, t("EKYC_TAP_TO_CAPTURE") || "Tap to capture"), /*#__PURE__*/React.createElement("div", {
|
|
3195
|
-
style: {
|
|
3196
|
-
fontSize: "12px",
|
|
3197
|
-
color: "#667085",
|
|
3198
|
-
marginTop: "2px"
|
|
3692
|
+
border: "1px solid #EAECF0"
|
|
3199
3693
|
}
|
|
3200
|
-
},
|
|
3694
|
+
}, /*#__PURE__*/React.createElement("img", {
|
|
3201
3695
|
src: buildingPhoto,
|
|
3202
|
-
alt: "Building",
|
|
3696
|
+
alt: "Building Preview",
|
|
3203
3697
|
style: {
|
|
3204
3698
|
width: "100%",
|
|
3205
|
-
maxHeight: "
|
|
3206
|
-
objectFit: "cover"
|
|
3207
|
-
display: "block"
|
|
3208
|
-
}
|
|
3209
|
-
}), /*#__PURE__*/React.createElement("button", {
|
|
3210
|
-
onClick: e => {
|
|
3211
|
-
e.stopPropagation();
|
|
3212
|
-
setBuildingPhoto(null);
|
|
3213
|
-
if (cameraRef.current) cameraRef.current.value = "";
|
|
3214
|
-
},
|
|
3215
|
-
style: {
|
|
3216
|
-
position: "absolute",
|
|
3217
|
-
top: "8px",
|
|
3218
|
-
right: "8px",
|
|
3219
|
-
background: "#fff",
|
|
3220
|
-
border: "0.5px solid #EAECF0",
|
|
3221
|
-
borderRadius: "7px",
|
|
3222
|
-
padding: "5px 10px",
|
|
3223
|
-
display: "flex",
|
|
3224
|
-
alignItems: "center",
|
|
3225
|
-
gap: "5px",
|
|
3226
|
-
cursor: "pointer",
|
|
3227
|
-
fontSize: "12px",
|
|
3228
|
-
color: "#D92D20",
|
|
3229
|
-
fontWeight: "500"
|
|
3699
|
+
maxHeight: "150px",
|
|
3700
|
+
objectFit: "cover"
|
|
3230
3701
|
}
|
|
3231
|
-
}, /*#__PURE__*/React.createElement(
|
|
3232
|
-
size: 13
|
|
3233
|
-
}), " ", t("EKYC_REMOVE") || "Remove"))))), /*#__PURE__*/React.createElement("div", {
|
|
3702
|
+
})))), /*#__PURE__*/React.createElement("div", {
|
|
3234
3703
|
style: {
|
|
3235
3704
|
backgroundColor: "#E6F1FB",
|
|
3236
3705
|
border: "0.5px solid #B5D4F4",
|
|
@@ -3287,7 +3756,13 @@ const PropertyInfo = () => {
|
|
|
3287
3756
|
rx: "2"
|
|
3288
3757
|
}), /*#__PURE__*/React.createElement("path", {
|
|
3289
3758
|
d: "M7 11V7a5 5 0 0 1 10 0v4"
|
|
3290
|
-
})), 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
|
+
}));
|
|
3291
3766
|
};
|
|
3292
3767
|
|
|
3293
3768
|
const CheckIcon$3 = ({
|
|
@@ -3384,7 +3859,8 @@ const ReviewCard = ({
|
|
|
3384
3859
|
title,
|
|
3385
3860
|
onEdit,
|
|
3386
3861
|
editLabel,
|
|
3387
|
-
rows
|
|
3862
|
+
rows,
|
|
3863
|
+
t
|
|
3388
3864
|
}) => /*#__PURE__*/React.createElement("div", {
|
|
3389
3865
|
style: {
|
|
3390
3866
|
border: "0.5px solid #EAECF0",
|
|
@@ -3464,24 +3940,167 @@ const ReviewCard = ({
|
|
|
3464
3940
|
fontSize: "14px",
|
|
3465
3941
|
color: "#101828",
|
|
3466
3942
|
fontWeight: "500",
|
|
3467
|
-
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"
|
|
3468
3958
|
}
|
|
3469
|
-
},
|
|
3959
|
+
}, t("EKYC_MODIFIED") || "Modified"))) : null)));
|
|
3470
3960
|
const Review = () => {
|
|
3471
|
-
var _propertyDetails$
|
|
3961
|
+
var _getSavedData, _getSavedData2, _propertyDetails$conn3, _propertyDetails$conn4, _propertyDetails$conn5, _propertyDetails$conn6, _propertyDetails$user2, _propertyDetails$user3, _propertyDetails$noOf2, _propertyDetails$noOf3;
|
|
3472
3962
|
const {
|
|
3473
3963
|
t
|
|
3474
3964
|
} = useTranslation();
|
|
3475
3965
|
const history = useHistory();
|
|
3476
3966
|
const location = useLocation();
|
|
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
|
+
};
|
|
4008
|
+
const [toast, setToast] = useState(null);
|
|
4009
|
+
const tenantId = Digit.ULBService.getCurrentTenantId() || "dl";
|
|
3477
4010
|
const {
|
|
3478
|
-
|
|
3479
|
-
|
|
3480
|
-
|
|
3481
|
-
|
|
3482
|
-
|
|
3483
|
-
|
|
3484
|
-
|
|
4011
|
+
mutate,
|
|
4012
|
+
isLoading: isMutationLoading
|
|
4013
|
+
} = Digit.Hooks.ekyc.useEkycApplicationUpdate(tenantId);
|
|
4014
|
+
const isSubmitting = isMutationLoading;
|
|
4015
|
+
const uploadFile = async (file, tenantId) => {
|
|
4016
|
+
var _res$data, _res$data$files, _res$data$files$;
|
|
4017
|
+
if (!file) return null;
|
|
4018
|
+
const res = await Digit.UploadServices.Filestorage("EKYC", file, tenantId);
|
|
4019
|
+
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;
|
|
4020
|
+
};
|
|
4021
|
+
const dataUrlToFile = (dataUrl, filename) => {
|
|
4022
|
+
const arr = dataUrl.split(",");
|
|
4023
|
+
const mime = arr[0].match(/:(.*?);/)[1];
|
|
4024
|
+
const bstr = atob(arr[1]);
|
|
4025
|
+
let n = bstr.length;
|
|
4026
|
+
const u8arr = new Uint8Array(n);
|
|
4027
|
+
while (n--) u8arr[n] = bstr.charCodeAt(n);
|
|
4028
|
+
return new File([u8arr], filename, {
|
|
4029
|
+
type: mime
|
|
4030
|
+
});
|
|
4031
|
+
};
|
|
4032
|
+
const handleSubmit = async () => {
|
|
4033
|
+
setToast(null);
|
|
4034
|
+
try {
|
|
4035
|
+
var _Digit$UserService$ge, _propertyDetails$user, _propertyDetails$noOf, _propertyDetails$conn, _propertyDetails$conn2;
|
|
4036
|
+
const userInfo = ((_Digit$UserService$ge = Digit.UserService.getUser()) === null || _Digit$UserService$ge === void 0 ? void 0 : _Digit$UserService$ge.info) || {};
|
|
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) {
|
|
4043
|
+
const photoFile = dataUrlToFile(propertyDetails.buildingPhoto, "building_photo.jpg");
|
|
4044
|
+
buildingImageFileStoreId = await uploadFile(photoFile, tenantId);
|
|
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
|
+
}
|
|
4051
|
+
const requestBody = {
|
|
4052
|
+
updateType: "PROPERTY",
|
|
4053
|
+
kno: kNumber,
|
|
4054
|
+
pidNumber: propertyDetails.pidNumber || null,
|
|
4055
|
+
propertyDocumentFileStoreId: propertyDocFileStoreId,
|
|
4056
|
+
buildingImageFileStoreId: buildingImageFileStoreId,
|
|
4057
|
+
userType: ((_propertyDetails$user = propertyDetails.userType) === null || _propertyDetails$user === void 0 ? void 0 : _propertyDetails$user.value) || null,
|
|
4058
|
+
noOfFloor: (_propertyDetails$noOf = propertyDetails.noOfFloors) !== null && _propertyDetails$noOf !== void 0 && _propertyDetails$noOf.value ? parseInt(propertyDetails.noOfFloors.value, 10) : null,
|
|
4059
|
+
typeOfConnection: ((_propertyDetails$conn = propertyDetails.connectionCategory) === null || _propertyDetails$conn === void 0 ? void 0 : _propertyDetails$conn.value) || null,
|
|
4060
|
+
connectionCategory: ((_propertyDetails$conn2 = propertyDetails.connectionType) === null || _propertyDetails$conn2 === void 0 ? void 0 : _propertyDetails$conn2.value) || 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
|
|
4074
|
+
};
|
|
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);
|
|
4087
|
+
},
|
|
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
|
+
}
|
|
4096
|
+
});
|
|
4097
|
+
} catch (err) {
|
|
4098
|
+
console.error("eKYC Frontend Error:", err);
|
|
4099
|
+
setToast({
|
|
4100
|
+
type: "error",
|
|
4101
|
+
message: t("EKYC_SUBMIT_ERROR") || "An error occurred during submission."
|
|
4102
|
+
});
|
|
4103
|
+
}
|
|
3485
4104
|
};
|
|
3486
4105
|
const handleEditAadhaar = () => {
|
|
3487
4106
|
history.push("/digit-ui/employee/ekyc/aadhaar-verification", location.state);
|
|
@@ -3493,6 +4112,8 @@ const Review = () => {
|
|
|
3493
4112
|
history.push("/digit-ui/employee/ekyc/property-info", location.state);
|
|
3494
4113
|
};
|
|
3495
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", {
|
|
3496
4117
|
className: "inbox-container"
|
|
3497
4118
|
}, /*#__PURE__*/React.createElement("style", null, `
|
|
3498
4119
|
@keyframes fadeSlideIn {
|
|
@@ -3675,18 +4296,22 @@ const Review = () => {
|
|
|
3675
4296
|
title: t("EKYC_AADHAAR_VERIFICATION_HEADER") || "Aadhaar details",
|
|
3676
4297
|
onEdit: handleEditAadhaar,
|
|
3677
4298
|
editLabel: t("CS_COMMON_EDIT") || "Edit",
|
|
4299
|
+
t: t,
|
|
3678
4300
|
rows: [{
|
|
3679
4301
|
label: t("EKYC_NAME") || "Name",
|
|
3680
|
-
value: aadhaarDetails.userName || "Rajesh Kumar Singh"
|
|
4302
|
+
value: aadhaarDetails.userName || "Rajesh Kumar Singh",
|
|
4303
|
+
isModified: isFieldModified("userName", aadhaarDetails.userName)
|
|
3681
4304
|
}, {
|
|
3682
4305
|
label: t("EKYC_AADHAAR") || "Aadhaar no.",
|
|
3683
|
-
value: aadhaarDetails.aadhaarLastFour ?
|
|
4306
|
+
value: aadhaarDetails.aadhaarLastFour ? `${aadhaarDetails.aadhaarLastFour}` : "XXXX XXXX 1234"
|
|
3684
4307
|
}, {
|
|
3685
4308
|
label: t("EKYC_MOBILE_NO") || "Mobile no.",
|
|
3686
|
-
value: aadhaarDetails.mobileNumber || "XXXXXXXXXX"
|
|
4309
|
+
value: aadhaarDetails.mobileNumber || "XXXXXXXXXX",
|
|
4310
|
+
isModified: isFieldModified("mobileNumber", aadhaarDetails.mobileNumber)
|
|
3687
4311
|
}, {
|
|
3688
4312
|
label: t("EKYC_EMAIL_ADDRESS") || "Email",
|
|
3689
|
-
value: aadhaarDetails.email || null
|
|
4313
|
+
value: aadhaarDetails.email || null,
|
|
4314
|
+
isModified: isFieldModified("email", aadhaarDetails.email)
|
|
3690
4315
|
}]
|
|
3691
4316
|
}), /*#__PURE__*/React.createElement("hr", {
|
|
3692
4317
|
style: {
|
|
@@ -3706,27 +4331,35 @@ const Review = () => {
|
|
|
3706
4331
|
title: t("EKYC_ADDRESS_DETAILS_HEADER") || "Address details",
|
|
3707
4332
|
onEdit: handleEditAddress,
|
|
3708
4333
|
editLabel: t("CS_COMMON_EDIT") || "Edit",
|
|
4334
|
+
t: t,
|
|
3709
4335
|
rows: [{
|
|
3710
4336
|
label: t("EKYC_FULL_ADDRESS") || "Full address",
|
|
3711
|
-
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)
|
|
3712
4339
|
}, {
|
|
3713
4340
|
label: t("EKYC_FLAT_HOUSE_NUMBER") || "Flat / House no.",
|
|
3714
|
-
value: addressDetails.flatNo || null
|
|
4341
|
+
value: addressDetails.flatNo || null,
|
|
4342
|
+
isModified: isFieldModified("flatNo", addressDetails.flatNo)
|
|
3715
4343
|
}, {
|
|
3716
4344
|
label: t("EKYC_BUILDING_TOWER") || "Building",
|
|
3717
|
-
value: addressDetails.building || null
|
|
4345
|
+
value: addressDetails.building || null,
|
|
4346
|
+
isModified: isFieldModified("building", addressDetails.building)
|
|
3718
4347
|
}, {
|
|
3719
4348
|
label: t("EKYC_LANDMARK") || "Landmark",
|
|
3720
|
-
value: addressDetails.landmark || null
|
|
4349
|
+
value: addressDetails.landmark || null,
|
|
4350
|
+
isModified: isFieldModified("landmark", addressDetails.landmark)
|
|
3721
4351
|
}, {
|
|
3722
4352
|
label: t("EKYC_PINCODE") || "Pincode",
|
|
3723
|
-
value: addressDetails.pincode || "110085"
|
|
4353
|
+
value: addressDetails.pincode || "110085",
|
|
4354
|
+
isModified: isFieldModified("pincode", addressDetails.pincode)
|
|
3724
4355
|
}, {
|
|
3725
4356
|
label: t("EKYC_ASSEMBLY") || "Assembly",
|
|
3726
|
-
value: addressDetails.assembly || "AC-12 Chandni Chowk"
|
|
4357
|
+
value: addressDetails.assembly || "AC-12 Chandni Chowk",
|
|
4358
|
+
isModified: isFieldModified("assembly", addressDetails.assembly)
|
|
3727
4359
|
}, {
|
|
3728
4360
|
label: t("EKYC_WARD") || "Ward",
|
|
3729
|
-
value: addressDetails.ward || "WARD-45 Civil Lines"
|
|
4361
|
+
value: addressDetails.ward || "WARD-45 Civil Lines",
|
|
4362
|
+
isModified: isFieldModified("ward", addressDetails.ward)
|
|
3730
4363
|
}]
|
|
3731
4364
|
}), /*#__PURE__*/React.createElement("hr", {
|
|
3732
4365
|
style: {
|
|
@@ -3746,32 +4379,39 @@ const Review = () => {
|
|
|
3746
4379
|
title: t("EKYC_PROPERTY_INFO") || "Property details",
|
|
3747
4380
|
onEdit: handleEditProperty,
|
|
3748
4381
|
editLabel: t("CS_COMMON_EDIT") || "Edit",
|
|
4382
|
+
t: t,
|
|
3749
4383
|
rows: [{
|
|
3750
4384
|
label: t("EKYC_PROPERTY_OWNER") || "Property owner",
|
|
3751
4385
|
value: propertyDetails.ownerType || "Owner"
|
|
3752
4386
|
}, {
|
|
3753
4387
|
label: t("EKYC_PID_NUMBER") || "PID number",
|
|
3754
|
-
value: propertyDetails.pidNumber || null
|
|
4388
|
+
value: propertyDetails.pidNumber || null,
|
|
4389
|
+
isModified: isFieldModified("pidNumber", propertyDetails.pidNumber)
|
|
3755
4390
|
}, {
|
|
3756
4391
|
label: t("EKYC_TYPE_OF_CONNECTION") || "Type of connection",
|
|
3757
|
-
value: ((_propertyDetails$
|
|
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)
|
|
3758
4394
|
}, {
|
|
3759
4395
|
label: t("EKYC_CONNECTION_CATEGORY") || "Connection category",
|
|
3760
|
-
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)
|
|
3761
4398
|
}, {
|
|
3762
4399
|
label: t("EKYC_USER_TYPE") || "User type",
|
|
3763
|
-
value: ((_propertyDetails$
|
|
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)
|
|
3764
4402
|
}, {
|
|
3765
4403
|
label: t("EKYC_NO_OF_FLOORS") || "No. of floors",
|
|
3766
|
-
value: ((_propertyDetails$
|
|
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)
|
|
3767
4406
|
}]
|
|
3768
4407
|
})), /*#__PURE__*/React.createElement("div", {
|
|
3769
4408
|
style: {
|
|
3770
4409
|
marginTop: "24px"
|
|
3771
4410
|
}
|
|
3772
4411
|
}, /*#__PURE__*/React.createElement(SubmitBar, {
|
|
3773
|
-
label: t("ES_COMMON_SUBMIT") || "Submit",
|
|
3774
|
-
onSubmit: handleSubmit
|
|
4412
|
+
label: isSubmitting ? t("EKYC_SUBMITTING") || "Submitting..." : t("ES_COMMON_SUBMIT") || "Submit",
|
|
4413
|
+
onSubmit: handleSubmit,
|
|
4414
|
+
disabled: isSubmitting
|
|
3775
4415
|
})), /*#__PURE__*/React.createElement("div", {
|
|
3776
4416
|
style: {
|
|
3777
4417
|
display: "flex",
|
|
@@ -3798,7 +4438,12 @@ const Review = () => {
|
|
|
3798
4438
|
rx: "2"
|
|
3799
4439
|
}), /*#__PURE__*/React.createElement("path", {
|
|
3800
4440
|
d: "M7 11V7a5 5 0 0 1 10 0v4"
|
|
3801
|
-
})), t("EKYC_SECURE_DATA_NOTICE") || "Your data is encrypted and secure"))))
|
|
4441
|
+
})), t("EKYC_SECURE_DATA_NOTICE") || "Your data is encrypted and secure")))), toast && /*#__PURE__*/React.createElement(Toast, {
|
|
4442
|
+
label: toast.message,
|
|
4443
|
+
error: toast.type === "error",
|
|
4444
|
+
success: toast.type === "success",
|
|
4445
|
+
onClose: () => setToast(null)
|
|
4446
|
+
})));
|
|
3802
4447
|
};
|
|
3803
4448
|
|
|
3804
4449
|
const EmployeeApp = ({
|