@djb25/digit-ui-module-ekyc 1.0.0 → 1.0.2
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 -0
- package/dist/index.modern.js +3290 -0
- package/dist/index.modern.js.map +1 -0
- package/package.json +1 -1
- package/src/Module.js +7 -23
- package/src/components/ConnectionDetailsView.js +114 -0
- package/src/components/DesktopInbox.js +84 -84
- package/src/components/Filter.js +59 -0
- package/src/components/MobileInbox.js +73 -0
- package/src/components/SearchConsumer.js +122 -0
- package/src/components/StatusCards.js +13 -22
- package/src/pages/employee/AadhaarVerification.js +357 -0
- package/src/pages/employee/AddressDetails.js +452 -0
- package/src/pages/employee/Create.js +94 -0
- package/src/pages/employee/Inbox.js +37 -20
- package/src/pages/employee/PropertyInfo.js +405 -0
- package/src/pages/employee/Review.js +118 -0
- package/src/pages/employee/index.js +104 -0
- package/src/components/Search.js +0 -77
|
@@ -0,0 +1,3290 @@
|
|
|
1
|
+
import React, { useMemo, useState, useCallback, useRef, Fragment } from 'react';
|
|
2
|
+
import { Link, useHistory, useRouteMatch, useLocation, Switch } from 'react-router-dom';
|
|
3
|
+
import { PersonIcon, EmployeeModuleCard, Card, HomeIcon, Table, Header, TextInput, SubmitBar, Loader, DetailsCard, FilterForm, FilterFormField, Dropdown, CardHeader, StatusTable, Row, CardLabel, Modal, RadioButtons, Toast, LocationIcon, LabelFieldPair, PropertyHouse, InfoBannerIcon, RemoveableTag, ActionBar, ConnectingCheckPoints, CheckPoint, TickMark, AppContainer, ModuleHeader, ArrowLeft, PrivateRoute } from '@djb25/digit-ui-react-components';
|
|
4
|
+
import { useTranslation } from 'react-i18next';
|
|
5
|
+
|
|
6
|
+
const EKYCCard = () => {
|
|
7
|
+
const {
|
|
8
|
+
t
|
|
9
|
+
} = useTranslation();
|
|
10
|
+
const propsForModuleCard = {
|
|
11
|
+
Icon: /*#__PURE__*/React.createElement(PersonIcon, null),
|
|
12
|
+
moduleName: t("ACTION_TEST_EKYC"),
|
|
13
|
+
kpis: [{
|
|
14
|
+
count: "-",
|
|
15
|
+
label: t("TOTAL_EKYC"),
|
|
16
|
+
link: `/digit-ui/employee/ekyc/dashboard`
|
|
17
|
+
}],
|
|
18
|
+
links: [{
|
|
19
|
+
label: t("EKYC_DASHBOARD"),
|
|
20
|
+
link: `/digit-ui/employee/ekyc/dashboard`
|
|
21
|
+
}, {
|
|
22
|
+
label: t("EKYC_CREATE_KYC"),
|
|
23
|
+
link: `/digit-ui/employee/ekyc/create-kyc`
|
|
24
|
+
}]
|
|
25
|
+
};
|
|
26
|
+
return /*#__PURE__*/React.createElement(EmployeeModuleCard, propsForModuleCard);
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
const StatusCards = ({
|
|
30
|
+
countData
|
|
31
|
+
}) => {
|
|
32
|
+
const {
|
|
33
|
+
t
|
|
34
|
+
} = useTranslation();
|
|
35
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
36
|
+
className: "ekyc-status-container"
|
|
37
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
38
|
+
className: "ekyc-status-card"
|
|
39
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
40
|
+
className: "count"
|
|
41
|
+
}, (countData === null || countData === void 0 ? void 0 : countData.total) || 0), /*#__PURE__*/React.createElement("div", {
|
|
42
|
+
className: "label"
|
|
43
|
+
}, t("EKYC_TOTAL"))), /*#__PURE__*/React.createElement("div", {
|
|
44
|
+
className: "ekyc-status-card"
|
|
45
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
46
|
+
className: "count pending"
|
|
47
|
+
}, (countData === null || countData === void 0 ? void 0 : countData.pending) || 0), /*#__PURE__*/React.createElement("div", {
|
|
48
|
+
className: "label"
|
|
49
|
+
}, t("EKYC_PENDING"))), /*#__PURE__*/React.createElement("div", {
|
|
50
|
+
className: "ekyc-status-card"
|
|
51
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
52
|
+
className: "count completed"
|
|
53
|
+
}, (countData === null || countData === void 0 ? void 0 : countData.completed) || 0), /*#__PURE__*/React.createElement("div", {
|
|
54
|
+
className: "label"
|
|
55
|
+
}, t("EKYC_COMPLETED"))));
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
const DesktopInbox = ({
|
|
59
|
+
tableConfig,
|
|
60
|
+
filterComponent,
|
|
61
|
+
...props
|
|
62
|
+
}) => {
|
|
63
|
+
const {
|
|
64
|
+
data,
|
|
65
|
+
isLoading,
|
|
66
|
+
onSort,
|
|
67
|
+
onNextPage,
|
|
68
|
+
onPrevPage,
|
|
69
|
+
currentPage,
|
|
70
|
+
pageSizeLimit,
|
|
71
|
+
onPageSizeChange,
|
|
72
|
+
parentRoute,
|
|
73
|
+
searchParams,
|
|
74
|
+
sortParams,
|
|
75
|
+
totalRecords,
|
|
76
|
+
countData,
|
|
77
|
+
onSearch,
|
|
78
|
+
searchFields
|
|
79
|
+
} = props;
|
|
80
|
+
const {
|
|
81
|
+
t
|
|
82
|
+
} = useTranslation();
|
|
83
|
+
const [FilterComponent, setComp] = React.useState(() => {
|
|
84
|
+
var _Digit$ComponentRegis;
|
|
85
|
+
return (_Digit$ComponentRegis = Digit.ComponentRegistryService) === null || _Digit$ComponentRegis === void 0 ? void 0 : _Digit$ComponentRegis.getComponent(filterComponent);
|
|
86
|
+
});
|
|
87
|
+
const columns = useMemo(() => [{
|
|
88
|
+
Header: t("EKYC_APPLICATION_NO"),
|
|
89
|
+
accessor: "applicationNumber",
|
|
90
|
+
Cell: ({
|
|
91
|
+
row
|
|
92
|
+
}) => {
|
|
93
|
+
var _row$original;
|
|
94
|
+
const applicationNumber = ((_row$original = row.original) === null || _row$original === void 0 ? void 0 : _row$original.applicationNumber) || "NA";
|
|
95
|
+
return /*#__PURE__*/React.createElement(Link, {
|
|
96
|
+
to: `${parentRoute}/application-details/${applicationNumber}`
|
|
97
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
98
|
+
className: "ekyc-application-link"
|
|
99
|
+
}, applicationNumber));
|
|
100
|
+
}
|
|
101
|
+
}, {
|
|
102
|
+
Header: t("EKYC_CITIZEN_NAME"),
|
|
103
|
+
accessor: "citizenName",
|
|
104
|
+
Cell: ({
|
|
105
|
+
row
|
|
106
|
+
}) => {
|
|
107
|
+
var _row$original2;
|
|
108
|
+
return /*#__PURE__*/React.createElement("span", null, ((_row$original2 = row.original) === null || _row$original2 === void 0 ? void 0 : _row$original2.citizenName) || "NA");
|
|
109
|
+
}
|
|
110
|
+
}, {
|
|
111
|
+
Header: t("EKYC_MOBILE_NO"),
|
|
112
|
+
accessor: "mobileNumber",
|
|
113
|
+
Cell: ({
|
|
114
|
+
row
|
|
115
|
+
}) => {
|
|
116
|
+
var _row$original3;
|
|
117
|
+
return /*#__PURE__*/React.createElement("span", null, ((_row$original3 = row.original) === null || _row$original3 === void 0 ? void 0 : _row$original3.mobileNumber) || "NA");
|
|
118
|
+
}
|
|
119
|
+
}, {
|
|
120
|
+
Header: t("EKYC_STATUS"),
|
|
121
|
+
accessor: "status",
|
|
122
|
+
Cell: ({
|
|
123
|
+
row
|
|
124
|
+
}) => {
|
|
125
|
+
var _row$original4;
|
|
126
|
+
const status = ((_row$original4 = row.original) === null || _row$original4 === void 0 ? void 0 : _row$original4.status) || "DEFAULT";
|
|
127
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
128
|
+
className: `ekyc-status-tag ${status}`
|
|
129
|
+
}, t(`EKYC_STATUS_${status}`));
|
|
130
|
+
}
|
|
131
|
+
}], [t, parentRoute]);
|
|
132
|
+
const tableData = useMemo(() => {
|
|
133
|
+
return (data === null || data === void 0 ? void 0 : data.items) || [];
|
|
134
|
+
}, [data]);
|
|
135
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
136
|
+
className: "inbox-container"
|
|
137
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
138
|
+
className: "filters-container"
|
|
139
|
+
}, /*#__PURE__*/React.createElement(Card, {
|
|
140
|
+
className: "sidebar-title-card",
|
|
141
|
+
style: {
|
|
142
|
+
display: "flex",
|
|
143
|
+
alignItems: "center",
|
|
144
|
+
padding: "16px",
|
|
145
|
+
marginBottom: "16px",
|
|
146
|
+
borderRadius: "4px"
|
|
147
|
+
}
|
|
148
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
149
|
+
className: "icon-container",
|
|
150
|
+
style: {
|
|
151
|
+
color: "#F47738",
|
|
152
|
+
marginRight: "12px"
|
|
153
|
+
}
|
|
154
|
+
}, /*#__PURE__*/React.createElement(HomeIcon, {
|
|
155
|
+
style: {
|
|
156
|
+
width: "24px",
|
|
157
|
+
height: "24px"
|
|
158
|
+
}
|
|
159
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
160
|
+
style: {
|
|
161
|
+
fontWeight: "700",
|
|
162
|
+
fontSize: "18px",
|
|
163
|
+
color: "#0B0C0C"
|
|
164
|
+
}
|
|
165
|
+
}, t("ACTION_TEST_EKYC"))), /*#__PURE__*/React.createElement("div", null, FilterComponent && /*#__PURE__*/React.createElement(FilterComponent, {
|
|
166
|
+
defaultSearchParams: props.defaultSearchParams,
|
|
167
|
+
onFilterChange: props.onSearch,
|
|
168
|
+
searchParams: searchParams,
|
|
169
|
+
type: "desktop",
|
|
170
|
+
moduleCode: "EKYC"
|
|
171
|
+
}))), /*#__PURE__*/React.createElement("div", {
|
|
172
|
+
style: {
|
|
173
|
+
flex: 1,
|
|
174
|
+
marginLeft: "16px"
|
|
175
|
+
}
|
|
176
|
+
}, /*#__PURE__*/React.createElement(Card, {
|
|
177
|
+
className: "ekyc-metrics-card",
|
|
178
|
+
style: {
|
|
179
|
+
marginBottom: "16px",
|
|
180
|
+
padding: "16px"
|
|
181
|
+
}
|
|
182
|
+
}, /*#__PURE__*/React.createElement(StatusCards, {
|
|
183
|
+
countData: countData
|
|
184
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
185
|
+
className: "result",
|
|
186
|
+
style: {
|
|
187
|
+
flex: 1
|
|
188
|
+
}
|
|
189
|
+
}, /*#__PURE__*/React.createElement(Card, {
|
|
190
|
+
className: "ekyc-table-card",
|
|
191
|
+
style: {
|
|
192
|
+
padding: 0
|
|
193
|
+
}
|
|
194
|
+
}, /*#__PURE__*/React.createElement(Table, {
|
|
195
|
+
t: t,
|
|
196
|
+
data: tableData,
|
|
197
|
+
columns: columns,
|
|
198
|
+
isLoading: isLoading,
|
|
199
|
+
onSort: onSort,
|
|
200
|
+
sortParams: sortParams,
|
|
201
|
+
totalRecords: totalRecords,
|
|
202
|
+
onNextPage: onNextPage,
|
|
203
|
+
onPrevPage: onPrevPage,
|
|
204
|
+
currentPage: currentPage,
|
|
205
|
+
pageSizeLimit: pageSizeLimit,
|
|
206
|
+
onPageSizeChange: onPageSizeChange,
|
|
207
|
+
getCellProps: cellInfo => {
|
|
208
|
+
return {
|
|
209
|
+
className: "ekyc-table-cell"
|
|
210
|
+
};
|
|
211
|
+
}
|
|
212
|
+
})))));
|
|
213
|
+
};
|
|
214
|
+
|
|
215
|
+
const SearchConsumer = ({
|
|
216
|
+
onSearch,
|
|
217
|
+
searchParams,
|
|
218
|
+
FilterComponent,
|
|
219
|
+
children,
|
|
220
|
+
...props
|
|
221
|
+
}) => {
|
|
222
|
+
const {
|
|
223
|
+
t
|
|
224
|
+
} = useTranslation();
|
|
225
|
+
const [_searchParams, setSearchParams] = useState(() => ({
|
|
226
|
+
...searchParams
|
|
227
|
+
}));
|
|
228
|
+
const onChange = (key, value) => {
|
|
229
|
+
setSearchParams(prev => ({
|
|
230
|
+
...prev,
|
|
231
|
+
[key]: value
|
|
232
|
+
}));
|
|
233
|
+
};
|
|
234
|
+
const onSubmit = e => {
|
|
235
|
+
if (e && e.preventDefault) e.preventDefault();
|
|
236
|
+
onSearch(_searchParams);
|
|
237
|
+
};
|
|
238
|
+
const onClear = () => {
|
|
239
|
+
const cleared = {
|
|
240
|
+
kNumber: "",
|
|
241
|
+
kName: ""
|
|
242
|
+
};
|
|
243
|
+
setSearchParams(cleared);
|
|
244
|
+
onSearch(cleared);
|
|
245
|
+
};
|
|
246
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
247
|
+
className: "inbox-container"
|
|
248
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
249
|
+
className: "filters-container"
|
|
250
|
+
}, /*#__PURE__*/React.createElement(Card, {
|
|
251
|
+
className: "sidebar-title-card",
|
|
252
|
+
style: {
|
|
253
|
+
display: "flex",
|
|
254
|
+
alignItems: "center",
|
|
255
|
+
padding: "16px",
|
|
256
|
+
marginBottom: "16px",
|
|
257
|
+
borderRadius: "4px"
|
|
258
|
+
}
|
|
259
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
260
|
+
className: "icon-container",
|
|
261
|
+
style: {
|
|
262
|
+
color: "#F47738",
|
|
263
|
+
marginRight: "12px"
|
|
264
|
+
}
|
|
265
|
+
}, /*#__PURE__*/React.createElement(HomeIcon, {
|
|
266
|
+
style: {
|
|
267
|
+
width: "24px",
|
|
268
|
+
height: "24px"
|
|
269
|
+
}
|
|
270
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
271
|
+
style: {
|
|
272
|
+
fontWeight: "700",
|
|
273
|
+
fontSize: "18px",
|
|
274
|
+
color: "#0B0C0C"
|
|
275
|
+
}
|
|
276
|
+
}, t("ACTION_CREATE_EKYC"))), /*#__PURE__*/React.createElement("div", null, FilterComponent && /*#__PURE__*/React.createElement(FilterComponent, {
|
|
277
|
+
defaultSearchParams: props.defaultSearchParams,
|
|
278
|
+
onFilterChange: props.onSearch,
|
|
279
|
+
searchParams: searchParams,
|
|
280
|
+
type: "desktop",
|
|
281
|
+
moduleCode: "EKYC"
|
|
282
|
+
}))), /*#__PURE__*/React.createElement("div", {
|
|
283
|
+
style: {
|
|
284
|
+
flex: 1,
|
|
285
|
+
marginLeft: "16px"
|
|
286
|
+
}
|
|
287
|
+
}, /*#__PURE__*/React.createElement(Card, {
|
|
288
|
+
className: "ekyc-search-card",
|
|
289
|
+
style: {
|
|
290
|
+
padding: "24px",
|
|
291
|
+
marginBottom: "24px",
|
|
292
|
+
borderRadius: "12px",
|
|
293
|
+
boxShadow: "0 4px 12px rgba(0,0,0,0.05)"
|
|
294
|
+
}
|
|
295
|
+
}, /*#__PURE__*/React.createElement(Header, {
|
|
296
|
+
style: {
|
|
297
|
+
fontSize: "24px",
|
|
298
|
+
marginBottom: "20px",
|
|
299
|
+
fontWeight: "700",
|
|
300
|
+
color: "#0B0C0C"
|
|
301
|
+
}
|
|
302
|
+
}, t("EKYC_SEARCH_CONSUMER_HEADER")), /*#__PURE__*/React.createElement("form", {
|
|
303
|
+
onSubmit: onSubmit
|
|
304
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
305
|
+
style: {
|
|
306
|
+
display: "flex",
|
|
307
|
+
gap: "24px",
|
|
308
|
+
alignItems: "flex-end",
|
|
309
|
+
flexWrap: "wrap"
|
|
310
|
+
}
|
|
311
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
312
|
+
style: {
|
|
313
|
+
flex: "1",
|
|
314
|
+
minWidth: "250px"
|
|
315
|
+
}
|
|
316
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
317
|
+
className: "filter-label",
|
|
318
|
+
style: {
|
|
319
|
+
fontWeight: "600",
|
|
320
|
+
marginBottom: "8px",
|
|
321
|
+
fontSize: "14px",
|
|
322
|
+
color: "#505A5F"
|
|
323
|
+
}
|
|
324
|
+
}, t("EKYC_K_NUMBER")), /*#__PURE__*/React.createElement("div", {
|
|
325
|
+
style: {
|
|
326
|
+
position: "relative"
|
|
327
|
+
}
|
|
328
|
+
}, /*#__PURE__*/React.createElement(TextInput, {
|
|
329
|
+
value: _searchParams === null || _searchParams === void 0 ? void 0 : _searchParams.kNumber,
|
|
330
|
+
onChange: e => onChange("kNumber", e.target.value),
|
|
331
|
+
placeholder: t("EKYC_K_NUMBER_PLACEHOLDER"),
|
|
332
|
+
style: {
|
|
333
|
+
borderRadius: "8px",
|
|
334
|
+
paddingLeft: "12px",
|
|
335
|
+
height: "44px"
|
|
336
|
+
}
|
|
337
|
+
}))), /*#__PURE__*/React.createElement("div", {
|
|
338
|
+
style: {
|
|
339
|
+
flex: "1",
|
|
340
|
+
minWidth: "250px"
|
|
341
|
+
}
|
|
342
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
343
|
+
className: "filter-label",
|
|
344
|
+
style: {
|
|
345
|
+
fontWeight: "600",
|
|
346
|
+
marginBottom: "8px",
|
|
347
|
+
fontSize: "14px",
|
|
348
|
+
color: "#505A5F"
|
|
349
|
+
}
|
|
350
|
+
}, t("EKYC_K_NAME")), /*#__PURE__*/React.createElement("div", {
|
|
351
|
+
style: {
|
|
352
|
+
position: "relative"
|
|
353
|
+
}
|
|
354
|
+
}, /*#__PURE__*/React.createElement(TextInput, {
|
|
355
|
+
value: _searchParams === null || _searchParams === void 0 ? void 0 : _searchParams.kName,
|
|
356
|
+
onChange: e => onChange("kName", e.target.value),
|
|
357
|
+
placeholder: t("EKYC_K_NAME_PLACEHOLDER"),
|
|
358
|
+
style: {
|
|
359
|
+
borderRadius: "8px",
|
|
360
|
+
paddingLeft: "12px",
|
|
361
|
+
height: "44px"
|
|
362
|
+
}
|
|
363
|
+
}))), /*#__PURE__*/React.createElement("div", {
|
|
364
|
+
style: {
|
|
365
|
+
display: "flex",
|
|
366
|
+
gap: "12px",
|
|
367
|
+
alignItems: "center"
|
|
368
|
+
}
|
|
369
|
+
}, /*#__PURE__*/React.createElement("button", {
|
|
370
|
+
type: "button",
|
|
371
|
+
onClick: onClear,
|
|
372
|
+
style: {
|
|
373
|
+
background: "none",
|
|
374
|
+
border: "none",
|
|
375
|
+
color: "#0076f3ff",
|
|
376
|
+
fontWeight: "600",
|
|
377
|
+
cursor: "pointer",
|
|
378
|
+
fontSize: "14px",
|
|
379
|
+
padding: "10px"
|
|
380
|
+
}
|
|
381
|
+
}, t("ES_COMMON_CLEAR")), /*#__PURE__*/React.createElement(SubmitBar, {
|
|
382
|
+
label: t("ES_COMMON_SEARCH"),
|
|
383
|
+
onSubmit: onSubmit,
|
|
384
|
+
style: {
|
|
385
|
+
margin: 0,
|
|
386
|
+
borderRadius: "8px",
|
|
387
|
+
height: "44px",
|
|
388
|
+
padding: "0 32px",
|
|
389
|
+
marginTop: "-55px"
|
|
390
|
+
}
|
|
391
|
+
}))))), children));
|
|
392
|
+
};
|
|
393
|
+
|
|
394
|
+
const MobileInbox = ({
|
|
395
|
+
data,
|
|
396
|
+
isLoading,
|
|
397
|
+
onSearch,
|
|
398
|
+
searchParams,
|
|
399
|
+
parentRoute,
|
|
400
|
+
countData
|
|
401
|
+
}) => {
|
|
402
|
+
var _data$items;
|
|
403
|
+
const {
|
|
404
|
+
t
|
|
405
|
+
} = useTranslation();
|
|
406
|
+
const mobileData = (data === null || data === void 0 ? void 0 : (_data$items = data.items) === null || _data$items === void 0 ? void 0 : _data$items.map(item => ({
|
|
407
|
+
[t("EKYC_APPLICATION_NO")]: item.applicationNumber,
|
|
408
|
+
[t("EKYC_CITIZEN_NAME")]: item.citizenName,
|
|
409
|
+
[t("EKYC_MOBILE_NO")]: item.mobileNumber,
|
|
410
|
+
[t("EKYC_STATUS")]: /*#__PURE__*/React.createElement("span", {
|
|
411
|
+
className: `ekyc-status-tag ${item.status}`
|
|
412
|
+
}, t(`EKYC_STATUS_${item.status}`))
|
|
413
|
+
}))) || [];
|
|
414
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
415
|
+
className: "inbox-wrapper"
|
|
416
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
417
|
+
className: "ekyc-header-container module-header"
|
|
418
|
+
}, /*#__PURE__*/React.createElement(Header, {
|
|
419
|
+
className: "title"
|
|
420
|
+
}, t("EKYC_INBOX_HEADER")), /*#__PURE__*/React.createElement(Link, {
|
|
421
|
+
to: `${parentRoute}/create-kyc`
|
|
422
|
+
}, /*#__PURE__*/React.createElement(SubmitBar, {
|
|
423
|
+
label: t("EKYC_CREATE_KYC")
|
|
424
|
+
}))), /*#__PURE__*/React.createElement("div", {
|
|
425
|
+
className: "ekyc-metrics-section"
|
|
426
|
+
}, /*#__PURE__*/React.createElement(StatusCards, {
|
|
427
|
+
countData: countData
|
|
428
|
+
})), /*#__PURE__*/React.createElement(SearchConsumer, {
|
|
429
|
+
onSearch: onSearch,
|
|
430
|
+
searchParams: searchParams
|
|
431
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
432
|
+
className: "mobile-data-container"
|
|
433
|
+
}, isLoading ? /*#__PURE__*/React.createElement(Loader, null) : (mobileData === null || mobileData === void 0 ? void 0 : mobileData.length) > 0 ? /*#__PURE__*/React.createElement(DetailsCard, {
|
|
434
|
+
data: mobileData,
|
|
435
|
+
t: t,
|
|
436
|
+
serviceRequestIdKey: t("EKYC_APPLICATION_NO"),
|
|
437
|
+
linkPrefix: `${parentRoute}/application-details/`
|
|
438
|
+
}) : /*#__PURE__*/React.createElement(Card, null, t("ES_COMMON_NO_DATA").split("\\n").map((text, index) => /*#__PURE__*/React.createElement("p", {
|
|
439
|
+
key: index,
|
|
440
|
+
style: {
|
|
441
|
+
textAlign: "center"
|
|
442
|
+
}
|
|
443
|
+
}, text)))));
|
|
444
|
+
};
|
|
445
|
+
|
|
446
|
+
const Filter = ({
|
|
447
|
+
searchParams,
|
|
448
|
+
onFilterChange,
|
|
449
|
+
defaultSearchParams,
|
|
450
|
+
statusMap,
|
|
451
|
+
moduleCode,
|
|
452
|
+
...props
|
|
453
|
+
}) => {
|
|
454
|
+
const {
|
|
455
|
+
t
|
|
456
|
+
} = useTranslation();
|
|
457
|
+
const [_searchParams, setSearchParams] = useState(() => ({
|
|
458
|
+
...searchParams
|
|
459
|
+
}));
|
|
460
|
+
const localParamChange = filterParam => {
|
|
461
|
+
let keys_to_delete = filterParam.delete;
|
|
462
|
+
let _new = {
|
|
463
|
+
..._searchParams,
|
|
464
|
+
...filterParam
|
|
465
|
+
};
|
|
466
|
+
if (keys_to_delete) keys_to_delete.forEach(key => delete _new[key]);
|
|
467
|
+
delete filterParam.delete;
|
|
468
|
+
setSearchParams({
|
|
469
|
+
..._new
|
|
470
|
+
});
|
|
471
|
+
};
|
|
472
|
+
const applyLocalFilters = () => {
|
|
473
|
+
onFilterChange(_searchParams);
|
|
474
|
+
};
|
|
475
|
+
const clearAll = () => {
|
|
476
|
+
setSearchParams({
|
|
477
|
+
...defaultSearchParams
|
|
478
|
+
});
|
|
479
|
+
onFilterChange({
|
|
480
|
+
...defaultSearchParams
|
|
481
|
+
});
|
|
482
|
+
};
|
|
483
|
+
const onStatusChange = value => {
|
|
484
|
+
localParamChange({
|
|
485
|
+
status: value
|
|
486
|
+
});
|
|
487
|
+
};
|
|
488
|
+
return /*#__PURE__*/React.createElement(FilterForm, {
|
|
489
|
+
onSubmit: applyLocalFilters,
|
|
490
|
+
handleSubmit: fn => e => {
|
|
491
|
+
e && e.preventDefault();
|
|
492
|
+
fn();
|
|
493
|
+
},
|
|
494
|
+
onResetFilterForm: clearAll,
|
|
495
|
+
id: "ekyc-filter-form",
|
|
496
|
+
onMobileExclusiveFilterPopupFormClose: props.onClose
|
|
497
|
+
}, /*#__PURE__*/React.createElement(FilterFormField, null, /*#__PURE__*/React.createElement("div", {
|
|
498
|
+
className: "filter-label",
|
|
499
|
+
style: {
|
|
500
|
+
fontWeight: "normal"
|
|
501
|
+
}
|
|
502
|
+
}, t("EKYC_STATUS"), ":"), /*#__PURE__*/React.createElement(Dropdown, {
|
|
503
|
+
option: [{
|
|
504
|
+
label: t("EKYC_STATUS_ALL"),
|
|
505
|
+
value: ""
|
|
506
|
+
}, {
|
|
507
|
+
label: t("EKYC_STATUS_COMPLETED"),
|
|
508
|
+
value: "COMPLETED"
|
|
509
|
+
}, {
|
|
510
|
+
label: t("EKYC_STATUS_PENDING"),
|
|
511
|
+
value: "PENDING"
|
|
512
|
+
}, {
|
|
513
|
+
label: t("EKYC_STATUS_REJECTED"),
|
|
514
|
+
value: "REJECTED"
|
|
515
|
+
}],
|
|
516
|
+
optionKey: "label",
|
|
517
|
+
select: onStatusChange,
|
|
518
|
+
selected: (_searchParams === null || _searchParams === void 0 ? void 0 : _searchParams.status) || {
|
|
519
|
+
label: t("EKYC_STATUS_ALL"),
|
|
520
|
+
value: ""
|
|
521
|
+
}
|
|
522
|
+
})));
|
|
523
|
+
};
|
|
524
|
+
|
|
525
|
+
const MOCK_DATA_ITEMS = [{
|
|
526
|
+
applicationNumber: "EKYC-2024-001",
|
|
527
|
+
citizenName: "Rahul Sharma",
|
|
528
|
+
mobileNumber: "9876543210",
|
|
529
|
+
status: "COMPLETED"
|
|
530
|
+
}, {
|
|
531
|
+
applicationNumber: "EKYC-2024-002",
|
|
532
|
+
citizenName: "Anjali Devi",
|
|
533
|
+
mobileNumber: "9123456789",
|
|
534
|
+
status: "PENDING"
|
|
535
|
+
}, {
|
|
536
|
+
applicationNumber: "EKYC-2024-003",
|
|
537
|
+
citizenName: "Amit Kumar",
|
|
538
|
+
mobileNumber: "8888888888",
|
|
539
|
+
status: "REJECTED"
|
|
540
|
+
}, {
|
|
541
|
+
applicationNumber: "EKYC-2024-004",
|
|
542
|
+
citizenName: "Priya Singh",
|
|
543
|
+
mobileNumber: "7777777777",
|
|
544
|
+
status: "COMPLETED"
|
|
545
|
+
}, {
|
|
546
|
+
applicationNumber: "EKYC-2024-005",
|
|
547
|
+
citizenName: "Suresh Gupta",
|
|
548
|
+
mobileNumber: "6666666666",
|
|
549
|
+
status: "PENDING"
|
|
550
|
+
}];
|
|
551
|
+
const Inbox = ({
|
|
552
|
+
parentRoute,
|
|
553
|
+
businessService: _businessService = "EKYC",
|
|
554
|
+
initialStates: _initialStates = {},
|
|
555
|
+
filterComponent,
|
|
556
|
+
isInbox
|
|
557
|
+
}) => {
|
|
558
|
+
const tenantId = Digit.ULBService.getCurrentTenantId();
|
|
559
|
+
const {
|
|
560
|
+
t
|
|
561
|
+
} = useTranslation();
|
|
562
|
+
const [pageOffset, setPageOffset] = useState(_initialStates.pageOffset || 0);
|
|
563
|
+
const [pageSize, setPageSize] = useState(_initialStates.pageSize || 10);
|
|
564
|
+
const [sortParams, setSortParams] = useState(_initialStates.sortParams || [{
|
|
565
|
+
id: "createdTime",
|
|
566
|
+
desc: true
|
|
567
|
+
}]);
|
|
568
|
+
const defaultStatusOption = useMemo(() => ({
|
|
569
|
+
label: t("EKYC_STATUS_ALL"),
|
|
570
|
+
value: ""
|
|
571
|
+
}), [t]);
|
|
572
|
+
const [searchParams, setSearchParams] = useState(_initialStates.searchParams || {
|
|
573
|
+
status: defaultStatusOption
|
|
574
|
+
});
|
|
575
|
+
const filteredStaticData = useMemo(() => {
|
|
576
|
+
return MOCK_DATA_ITEMS.filter(item => {
|
|
577
|
+
var _searchParams$status;
|
|
578
|
+
let match = true;
|
|
579
|
+
const currentStatus = ((_searchParams$status = searchParams.status) === null || _searchParams$status === void 0 ? void 0 : _searchParams$status.value) !== undefined ? searchParams.status.value : searchParams.status;
|
|
580
|
+
if (currentStatus && item.status !== currentStatus) {
|
|
581
|
+
match = false;
|
|
582
|
+
}
|
|
583
|
+
return match;
|
|
584
|
+
});
|
|
585
|
+
}, [searchParams]);
|
|
586
|
+
const staticCountData = useMemo(() => {
|
|
587
|
+
return {
|
|
588
|
+
total: MOCK_DATA_ITEMS.length,
|
|
589
|
+
completed: MOCK_DATA_ITEMS.filter(i => i.status === "COMPLETED").length,
|
|
590
|
+
pending: MOCK_DATA_ITEMS.filter(i => i.status === "PENDING").length,
|
|
591
|
+
rejected: MOCK_DATA_ITEMS.filter(i => i.status === "REJECTED").length
|
|
592
|
+
};
|
|
593
|
+
}, []);
|
|
594
|
+
const handleSearch = useCallback(filterParam => {
|
|
595
|
+
setSearchParams(prev => ({
|
|
596
|
+
...prev,
|
|
597
|
+
...filterParam
|
|
598
|
+
}));
|
|
599
|
+
setPageOffset(0);
|
|
600
|
+
}, []);
|
|
601
|
+
const fetchNextPage = () => setPageOffset(prev => prev + pageSize);
|
|
602
|
+
const fetchPrevPage = () => setPageOffset(prev => Math.max(prev - pageSize, 0));
|
|
603
|
+
const handlePageSizeChange = e => {
|
|
604
|
+
const newSize = Number(e.target.value);
|
|
605
|
+
setPageSize(newSize);
|
|
606
|
+
setPageOffset(0);
|
|
607
|
+
};
|
|
608
|
+
const handleSort = useCallback(args => {
|
|
609
|
+
if (args.length > 0) setSortParams(args);
|
|
610
|
+
}, []);
|
|
611
|
+
const searchFields = useMemo(() => [{
|
|
612
|
+
label: t("EKYC_STATUS"),
|
|
613
|
+
name: "status",
|
|
614
|
+
type: "dropdown",
|
|
615
|
+
options: [{
|
|
616
|
+
label: t("CHOOSE_STATUS"),
|
|
617
|
+
value: ""
|
|
618
|
+
}, {
|
|
619
|
+
label: t("EKYC_STATUS_COMPLETED"),
|
|
620
|
+
value: "COMPLETED"
|
|
621
|
+
}, {
|
|
622
|
+
label: t("EKYC_STATUS_PENDING"),
|
|
623
|
+
value: "PENDING"
|
|
624
|
+
}, {
|
|
625
|
+
label: t("EKYC_STATUS_REJECTED"),
|
|
626
|
+
value: "REJECTED"
|
|
627
|
+
}],
|
|
628
|
+
optionsKey: "label"
|
|
629
|
+
}], [t]);
|
|
630
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
631
|
+
className: "ekyc-employee-container"
|
|
632
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
633
|
+
className: "inbox-main-container"
|
|
634
|
+
}, Digit.Utils.browser.isMobile() ? /*#__PURE__*/React.createElement(MobileInbox, {
|
|
635
|
+
data: {
|
|
636
|
+
items: filteredStaticData,
|
|
637
|
+
totalCount: filteredStaticData.length
|
|
638
|
+
},
|
|
639
|
+
isLoading: false,
|
|
640
|
+
onSearch: handleSearch,
|
|
641
|
+
searchFields: searchFields,
|
|
642
|
+
searchParams: searchParams,
|
|
643
|
+
parentRoute: parentRoute,
|
|
644
|
+
countData: staticCountData
|
|
645
|
+
}) : /*#__PURE__*/React.createElement(DesktopInbox, {
|
|
646
|
+
businessService: _businessService,
|
|
647
|
+
data: {
|
|
648
|
+
items: filteredStaticData,
|
|
649
|
+
totalCount: filteredStaticData.length
|
|
650
|
+
},
|
|
651
|
+
isLoading: false,
|
|
652
|
+
searchFields: searchFields,
|
|
653
|
+
onSearch: handleSearch,
|
|
654
|
+
onSort: handleSort,
|
|
655
|
+
onNextPage: fetchNextPage,
|
|
656
|
+
onPrevPage: fetchPrevPage,
|
|
657
|
+
currentPage: Math.floor(pageOffset / pageSize),
|
|
658
|
+
pageSizeLimit: pageSize,
|
|
659
|
+
onPageSizeChange: handlePageSizeChange,
|
|
660
|
+
parentRoute: parentRoute,
|
|
661
|
+
searchParams: searchParams,
|
|
662
|
+
sortParams: sortParams,
|
|
663
|
+
totalRecords: filteredStaticData.length,
|
|
664
|
+
countData: staticCountData,
|
|
665
|
+
filterComponent: "EKYC_INBOX_FILTER"
|
|
666
|
+
})));
|
|
667
|
+
};
|
|
668
|
+
|
|
669
|
+
const ConnectionDetailsView = ({
|
|
670
|
+
kNumber,
|
|
671
|
+
kName,
|
|
672
|
+
connectionDetails,
|
|
673
|
+
isLoading
|
|
674
|
+
}) => {
|
|
675
|
+
const {
|
|
676
|
+
t
|
|
677
|
+
} = useTranslation();
|
|
678
|
+
const history = useHistory();
|
|
679
|
+
const {
|
|
680
|
+
path
|
|
681
|
+
} = useRouteMatch();
|
|
682
|
+
const [showModal, setShowModal] = useState(false);
|
|
683
|
+
const [selectedOption, setSelectedOption] = useState({
|
|
684
|
+
code: "SELF",
|
|
685
|
+
name: "EKYC_SELF"
|
|
686
|
+
});
|
|
687
|
+
const options = [{
|
|
688
|
+
code: "SELF",
|
|
689
|
+
name: "EKYC_SELF"
|
|
690
|
+
}, {
|
|
691
|
+
code: "OTHER",
|
|
692
|
+
name: "EKYC_OTHER"
|
|
693
|
+
}];
|
|
694
|
+
const handleStartVerification = () => {
|
|
695
|
+
setShowModal(true);
|
|
696
|
+
};
|
|
697
|
+
const onModalConfirm = () => {
|
|
698
|
+
const parentPath = path.includes("/create-kyc") ? path.replace("/create-kyc", "") : path.replace("/k-details", "");
|
|
699
|
+
history.push(`${parentPath}/aadhaar-verification`, {
|
|
700
|
+
kNumber,
|
|
701
|
+
selectedOption,
|
|
702
|
+
connectionDetails
|
|
703
|
+
});
|
|
704
|
+
setShowModal(false);
|
|
705
|
+
};
|
|
706
|
+
if (isLoading) {
|
|
707
|
+
return /*#__PURE__*/React.createElement(Loader, null);
|
|
708
|
+
}
|
|
709
|
+
if (!connectionDetails) {
|
|
710
|
+
return null;
|
|
711
|
+
}
|
|
712
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Card, {
|
|
713
|
+
className: "ekyc-create-card",
|
|
714
|
+
style: {
|
|
715
|
+
padding: "24px"
|
|
716
|
+
}
|
|
717
|
+
}, /*#__PURE__*/React.createElement(CardHeader, null, t("EKYC_K_NUMBER_DETAILS")), /*#__PURE__*/React.createElement(StatusTable, null, /*#__PURE__*/React.createElement(Row, {
|
|
718
|
+
label: t("EKYC_K_NUMBER"),
|
|
719
|
+
text: kNumber || t("CS_NA")
|
|
720
|
+
}), /*#__PURE__*/React.createElement(Row, {
|
|
721
|
+
label: t("EKYC_K_NAME"),
|
|
722
|
+
text: kName || t("CS_NA")
|
|
723
|
+
})), /*#__PURE__*/React.createElement(CardHeader, {
|
|
724
|
+
style: {
|
|
725
|
+
marginTop: "24px"
|
|
726
|
+
}
|
|
727
|
+
}, t("EKYC_CONNECTION_DETAILS")), connectionDetails !== null && connectionDetails !== void 0 && connectionDetails.connectionDetailsInfo ? /*#__PURE__*/React.createElement(StatusTable, null, /*#__PURE__*/React.createElement(Row, {
|
|
728
|
+
label: t("EKYC_CONSUMER_NAME"),
|
|
729
|
+
text: connectionDetails.connectionDetailsInfo.consumerName || t("CS_NA")
|
|
730
|
+
}), /*#__PURE__*/React.createElement(Row, {
|
|
731
|
+
label: t("EKYC_ADDRESS"),
|
|
732
|
+
text: connectionDetails.connectionDetailsInfo.address || t("CS_NA")
|
|
733
|
+
}), /*#__PURE__*/React.createElement(Row, {
|
|
734
|
+
label: t("EKYC_CONNECTION_TYPE"),
|
|
735
|
+
text: connectionDetails.connectionDetailsInfo.connectionType || t("CS_NA")
|
|
736
|
+
}), /*#__PURE__*/React.createElement(Row, {
|
|
737
|
+
label: t("EKYC_METER_NO"),
|
|
738
|
+
text: connectionDetails.connectionDetailsInfo.meterNumber || t("CS_NA")
|
|
739
|
+
}), /*#__PURE__*/React.createElement(Row, {
|
|
740
|
+
label: t("EKYC_PHONE_NO"),
|
|
741
|
+
text: connectionDetails.connectionDetailsInfo.phoneNumber || t("CS_NA")
|
|
742
|
+
}), /*#__PURE__*/React.createElement(Row, {
|
|
743
|
+
label: t("EKYC_EMAIL"),
|
|
744
|
+
text: connectionDetails.connectionDetailsInfo.email || t("CS_NA")
|
|
745
|
+
}), /*#__PURE__*/React.createElement(Row, {
|
|
746
|
+
label: t("EKYC_STATUS"),
|
|
747
|
+
text: connectionDetails.connectionDetailsInfo.statusflag || t("CS_NA")
|
|
748
|
+
})) : /*#__PURE__*/React.createElement(CardLabel, null, t("EKYC_NO_CONNECTION_DETAILS_FOUND")), /*#__PURE__*/React.createElement("div", {
|
|
749
|
+
style: {
|
|
750
|
+
display: "flex",
|
|
751
|
+
justifyContent: "flex-end",
|
|
752
|
+
marginTop: "16px"
|
|
753
|
+
}
|
|
754
|
+
}, /*#__PURE__*/React.createElement(SubmitBar, {
|
|
755
|
+
label: t("EKYC_START_VERIFICATION"),
|
|
756
|
+
onSubmit: handleStartVerification,
|
|
757
|
+
style: {
|
|
758
|
+
borderRadius: "12px",
|
|
759
|
+
margin: 0
|
|
760
|
+
}
|
|
761
|
+
}))), showModal && /*#__PURE__*/React.createElement(Modal, {
|
|
762
|
+
headerBarMain: t("EKYC_SELECT_VERIFICATION_TYPE"),
|
|
763
|
+
headerBarEnd: /*#__PURE__*/React.createElement("span", {
|
|
764
|
+
onClick: () => setShowModal(false),
|
|
765
|
+
style: {
|
|
766
|
+
cursor: "pointer",
|
|
767
|
+
padding: "8px"
|
|
768
|
+
}
|
|
769
|
+
}, "X"),
|
|
770
|
+
actionSaveLabel: t("ES_COMMON_CONFIRM"),
|
|
771
|
+
actionSaveOnSubmit: onModalConfirm,
|
|
772
|
+
actionCancelLabel: t("ES_COMMON_CANCEL"),
|
|
773
|
+
actionCancelOnSubmit: () => setShowModal(false),
|
|
774
|
+
style: {
|
|
775
|
+
borderRadius: "12px"
|
|
776
|
+
}
|
|
777
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
778
|
+
style: {
|
|
779
|
+
padding: "24px"
|
|
780
|
+
}
|
|
781
|
+
}, /*#__PURE__*/React.createElement(RadioButtons, {
|
|
782
|
+
options: options,
|
|
783
|
+
optionsKey: "name",
|
|
784
|
+
selectedOption: selectedOption,
|
|
785
|
+
onSelect: setSelectedOption,
|
|
786
|
+
style: {
|
|
787
|
+
display: "flex",
|
|
788
|
+
flexDirection: "column",
|
|
789
|
+
gap: "12px",
|
|
790
|
+
buttonStyle: {
|
|
791
|
+
borderRadius: "5px"
|
|
792
|
+
}
|
|
793
|
+
},
|
|
794
|
+
t: t
|
|
795
|
+
}))));
|
|
796
|
+
};
|
|
797
|
+
|
|
798
|
+
const Create = () => {
|
|
799
|
+
const {
|
|
800
|
+
t
|
|
801
|
+
} = useTranslation();
|
|
802
|
+
const [searchParams, setSearchParams] = useState(() => {
|
|
803
|
+
const saved = sessionStorage.getItem("EKYC_CREATE_SEARCH_PARAMS");
|
|
804
|
+
return saved ? JSON.parse(saved) : {
|
|
805
|
+
kNumber: "",
|
|
806
|
+
kName: ""
|
|
807
|
+
};
|
|
808
|
+
});
|
|
809
|
+
const [searchPerformed, setSearchPerformed] = useState(() => {
|
|
810
|
+
return sessionStorage.getItem("EKYC_CREATE_SEARCH_PERFORMED") === "true";
|
|
811
|
+
});
|
|
812
|
+
const [showToast, setShowToast] = useState(null);
|
|
813
|
+
const tenantId = Digit.ULBService.getCurrentTenantId();
|
|
814
|
+
const {
|
|
815
|
+
isLoading: isSearching,
|
|
816
|
+
data: connectionDetails,
|
|
817
|
+
error,
|
|
818
|
+
revalidate
|
|
819
|
+
} = Digit.Hooks.ekyc.useGetConnection({
|
|
820
|
+
tenantId,
|
|
821
|
+
details: {
|
|
822
|
+
kno: searchParams.kNumber
|
|
823
|
+
}
|
|
824
|
+
}, {
|
|
825
|
+
enabled: searchPerformed && !!searchParams.kNumber
|
|
826
|
+
});
|
|
827
|
+
const {
|
|
828
|
+
mutate: validateUser,
|
|
829
|
+
isLoading: isValidating
|
|
830
|
+
} = Digit.Hooks.ekyc.useValidateUser(tenantId, {
|
|
831
|
+
onSuccess: data => {
|
|
832
|
+
var _data$responseInfo;
|
|
833
|
+
if ((data === null || data === void 0 ? void 0 : (_data$responseInfo = data.responseInfo) === null || _data$responseInfo === void 0 ? void 0 : _data$responseInfo.status) === "successful") ; else {
|
|
834
|
+
setShowToast({
|
|
835
|
+
error: true,
|
|
836
|
+
label: (data === null || data === void 0 ? void 0 : data.message) || t("EKYC_VALIDATION_FAILED")
|
|
837
|
+
});
|
|
838
|
+
setSearchPerformed(false);
|
|
839
|
+
sessionStorage.removeItem("EKYC_CREATE_SEARCH_PERFORMED");
|
|
840
|
+
}
|
|
841
|
+
},
|
|
842
|
+
onError: error => {
|
|
843
|
+
var _error$response, _error$response$data, _error$response$data$, _error$response$data$2;
|
|
844
|
+
setShowToast({
|
|
845
|
+
error: true,
|
|
846
|
+
label: (error === null || error === void 0 ? void 0 : (_error$response = error.response) === null || _error$response === void 0 ? void 0 : (_error$response$data = _error$response.data) === null || _error$response$data === void 0 ? void 0 : (_error$response$data$ = _error$response$data.Errors) === null || _error$response$data$ === void 0 ? void 0 : (_error$response$data$2 = _error$response$data$[0]) === null || _error$response$data$2 === void 0 ? void 0 : _error$response$data$2.message) || t("EKYC_VALIDATION_ERROR_PLEASE_ENTER_THE_CORRECT_CREDENTIALS")
|
|
847
|
+
});
|
|
848
|
+
setSearchPerformed(false);
|
|
849
|
+
sessionStorage.removeItem("EKYC_CREATE_SEARCH_PERFORMED");
|
|
850
|
+
}
|
|
851
|
+
});
|
|
852
|
+
const handleSearch = params => {
|
|
853
|
+
if (!params.kNumber && !params.kName) {
|
|
854
|
+
setSearchParams({
|
|
855
|
+
kNumber: "",
|
|
856
|
+
kName: ""
|
|
857
|
+
});
|
|
858
|
+
setSearchPerformed(false);
|
|
859
|
+
sessionStorage.removeItem("EKYC_CREATE_SEARCH_PARAMS");
|
|
860
|
+
sessionStorage.removeItem("EKYC_CREATE_SEARCH_PERFORMED");
|
|
861
|
+
return;
|
|
862
|
+
}
|
|
863
|
+
if (!params.kNumber || !params.kName) {
|
|
864
|
+
setShowToast({
|
|
865
|
+
error: true,
|
|
866
|
+
label: t("EKYC_FILL_ALL_FIELDS")
|
|
867
|
+
});
|
|
868
|
+
return;
|
|
869
|
+
}
|
|
870
|
+
setSearchParams(params);
|
|
871
|
+
setSearchPerformed(true);
|
|
872
|
+
sessionStorage.setItem("EKYC_CREATE_SEARCH_PARAMS", JSON.stringify(params));
|
|
873
|
+
sessionStorage.setItem("EKYC_CREATE_SEARCH_PERFORMED", "true");
|
|
874
|
+
validateUser({
|
|
875
|
+
kno: params.kNumber,
|
|
876
|
+
name: params.kName
|
|
877
|
+
});
|
|
878
|
+
};
|
|
879
|
+
const closeToast = () => {
|
|
880
|
+
setShowToast(null);
|
|
881
|
+
};
|
|
882
|
+
return /*#__PURE__*/React.createElement(SearchConsumer, {
|
|
883
|
+
onSearch: handleSearch,
|
|
884
|
+
searchParams: searchParams
|
|
885
|
+
}, searchPerformed && /*#__PURE__*/React.createElement(ConnectionDetailsView, {
|
|
886
|
+
kNumber: searchParams.kNumber,
|
|
887
|
+
kName: searchParams.kName,
|
|
888
|
+
connectionDetails: connectionDetails,
|
|
889
|
+
isLoading: isSearching || isValidating
|
|
890
|
+
}), !searchPerformed && !isSearching && /*#__PURE__*/React.createElement(Card, {
|
|
891
|
+
style: {
|
|
892
|
+
textAlign: "center",
|
|
893
|
+
padding: "40px"
|
|
894
|
+
}
|
|
895
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
896
|
+
style: {
|
|
897
|
+
color: "#667085"
|
|
898
|
+
}
|
|
899
|
+
}, t("EKYC_SEARCH_TO_VIEW_DETAILS"))), showToast && /*#__PURE__*/React.createElement(Toast, {
|
|
900
|
+
error: showToast.error,
|
|
901
|
+
label: showToast.label,
|
|
902
|
+
onClose: closeToast,
|
|
903
|
+
isDsc: true
|
|
904
|
+
}));
|
|
905
|
+
};
|
|
906
|
+
|
|
907
|
+
const AddressDetails = ({
|
|
908
|
+
isSection: _isSection = false,
|
|
909
|
+
onComplete,
|
|
910
|
+
parentState
|
|
911
|
+
}) => {
|
|
912
|
+
const {
|
|
913
|
+
t
|
|
914
|
+
} = useTranslation();
|
|
915
|
+
const history = useHistory();
|
|
916
|
+
const location = useLocation();
|
|
917
|
+
const flowState = parentState || location.state || {
|
|
918
|
+
kNumber: "EKYC-1234567890",
|
|
919
|
+
selectedOption: {
|
|
920
|
+
code: "SELF",
|
|
921
|
+
name: "EKYC_SELF"
|
|
922
|
+
},
|
|
923
|
+
connectionDetails: null
|
|
924
|
+
};
|
|
925
|
+
const [addressType, setAddressType] = useState({
|
|
926
|
+
code: "AADHAAR",
|
|
927
|
+
name: "EKYC_AADHAAR_ADDRESS"
|
|
928
|
+
});
|
|
929
|
+
const [correctAddress, setCorrectAddress] = useState({
|
|
930
|
+
code: "NO",
|
|
931
|
+
name: "CORE_COMMON_NO"
|
|
932
|
+
});
|
|
933
|
+
const [fullAddress, setFullAddress] = useState("");
|
|
934
|
+
const [flatNo, setFlatNo] = useState("");
|
|
935
|
+
const [building, setBuilding] = useState("");
|
|
936
|
+
const [landmark, setLandmark] = useState("");
|
|
937
|
+
const [pincode, setPincode] = useState("");
|
|
938
|
+
const [doorPhoto, setDoorPhoto] = useState(null);
|
|
939
|
+
const [isLocationFetching, setIsLocationFetching] = useState(false);
|
|
940
|
+
const fileInputRef = useRef(null);
|
|
941
|
+
const addressOptions = [{
|
|
942
|
+
code: "AADHAAR",
|
|
943
|
+
name: "EKYC_AADHAAR_ADDRESS"
|
|
944
|
+
}, {
|
|
945
|
+
code: "OLD",
|
|
946
|
+
name: "EKYC_OLD_ADDRESS"
|
|
947
|
+
}];
|
|
948
|
+
const yesNoOptions = [{
|
|
949
|
+
code: "YES",
|
|
950
|
+
name: "CORE_COMMON_YES"
|
|
951
|
+
}, {
|
|
952
|
+
code: "NO",
|
|
953
|
+
name: "CORE_COMMON_NO"
|
|
954
|
+
}];
|
|
955
|
+
const handleCompleteVerification = () => {
|
|
956
|
+
if (onComplete) {
|
|
957
|
+
onComplete({
|
|
958
|
+
addressType,
|
|
959
|
+
fullAddress,
|
|
960
|
+
flatNo,
|
|
961
|
+
building,
|
|
962
|
+
landmark,
|
|
963
|
+
pincode,
|
|
964
|
+
doorPhoto
|
|
965
|
+
});
|
|
966
|
+
} else {
|
|
967
|
+
const {
|
|
968
|
+
kNumber,
|
|
969
|
+
selectedOption,
|
|
970
|
+
connectionDetails
|
|
971
|
+
} = flowState;
|
|
972
|
+
history.push("/digit-ui/employee/ekyc/property-info", {
|
|
973
|
+
kNumber,
|
|
974
|
+
selectedOption,
|
|
975
|
+
connectionDetails,
|
|
976
|
+
addressDetails: {
|
|
977
|
+
addressType,
|
|
978
|
+
fullAddress,
|
|
979
|
+
flatNo,
|
|
980
|
+
building,
|
|
981
|
+
landmark,
|
|
982
|
+
pincode,
|
|
983
|
+
doorPhoto
|
|
984
|
+
}
|
|
985
|
+
});
|
|
986
|
+
}
|
|
987
|
+
};
|
|
988
|
+
const handleCapture = e => {
|
|
989
|
+
const file = e.target.files[0];
|
|
990
|
+
if (file) {
|
|
991
|
+
const reader = new FileReader();
|
|
992
|
+
reader.onloadend = () => {
|
|
993
|
+
setDoorPhoto(reader.result);
|
|
994
|
+
};
|
|
995
|
+
reader.readAsDataURL(file);
|
|
996
|
+
}
|
|
997
|
+
};
|
|
998
|
+
const openGallery = () => {
|
|
999
|
+
fileInputRef.current.click();
|
|
1000
|
+
};
|
|
1001
|
+
const removePhoto = () => {
|
|
1002
|
+
setDoorPhoto(null);
|
|
1003
|
+
if (fileInputRef.current) fileInputRef.current.value = "";
|
|
1004
|
+
};
|
|
1005
|
+
const handleUseCurrentLocation = () => {
|
|
1006
|
+
if (!("geolocation" in navigator)) {
|
|
1007
|
+
alert(t("GEOLOCATION_NOT_SUPPORTED") || "Geolocation is not supported by your browser");
|
|
1008
|
+
return;
|
|
1009
|
+
}
|
|
1010
|
+
setIsLocationFetching(true);
|
|
1011
|
+
navigator.geolocation.getCurrentPosition(async position => {
|
|
1012
|
+
const {
|
|
1013
|
+
latitude,
|
|
1014
|
+
longitude
|
|
1015
|
+
} = position.coords;
|
|
1016
|
+
try {
|
|
1017
|
+
const response = await fetch(`https://nominatim.openstreetmap.org/reverse?format=json&lat=${latitude}&lon=${longitude}&zoom=18&addressdetails=1`);
|
|
1018
|
+
if (!response.ok) throw new Error("Failed to fetch address");
|
|
1019
|
+
const data = await response.json();
|
|
1020
|
+
if (data && data.address) {
|
|
1021
|
+
var _data$address, _data$address2, _data$address3, _data$address4, _data$address5, _data$address6, _data$address7, _data$address8, _data$address9, _data$address0, _data$address1;
|
|
1022
|
+
const addr = [(_data$address = data.address) === null || _data$address === void 0 ? void 0 : _data$address.amenity, (_data$address2 = data.address) === null || _data$address2 === void 0 ? void 0 : _data$address2.road, (_data$address3 = data.address) === null || _data$address3 === void 0 ? void 0 : _data$address3.neighbourhood, (_data$address4 = data.address) === null || _data$address4 === void 0 ? void 0 : _data$address4.suburb, (_data$address5 = data.address) === null || _data$address5 === void 0 ? void 0 : _data$address5.city, (_data$address6 = data.address) === null || _data$address6 === void 0 ? void 0 : _data$address6.state, (_data$address7 = data.address) === null || _data$address7 === void 0 ? void 0 : _data$address7.postcode].filter(Boolean).join(", ");
|
|
1023
|
+
setFullAddress(addr || "");
|
|
1024
|
+
setPincode(((_data$address8 = data.address) === null || _data$address8 === void 0 ? void 0 : _data$address8.postcode) || "");
|
|
1025
|
+
setLandmark(((_data$address9 = data.address) === null || _data$address9 === void 0 ? void 0 : _data$address9.suburb) || ((_data$address0 = data.address) === null || _data$address0 === void 0 ? void 0 : _data$address0.neighbourhood) || "");
|
|
1026
|
+
setFlatNo(((_data$address1 = data.address) === null || _data$address1 === void 0 ? void 0 : _data$address1.amenity) || "");
|
|
1027
|
+
}
|
|
1028
|
+
} catch (error) {
|
|
1029
|
+
console.error("Error reverse geocoding:", error);
|
|
1030
|
+
} finally {
|
|
1031
|
+
setIsLocationFetching(false);
|
|
1032
|
+
}
|
|
1033
|
+
}, error => {
|
|
1034
|
+
console.error("Error getting location:", error);
|
|
1035
|
+
setIsLocationFetching(false);
|
|
1036
|
+
alert(t("LOCATION_FETCH_FAILED") || "Failed to fetch your current location. Please ensure location permissions are granted.");
|
|
1037
|
+
}, {
|
|
1038
|
+
enableHighAccuracy: true,
|
|
1039
|
+
timeout: 10000,
|
|
1040
|
+
maximumAge: 0
|
|
1041
|
+
});
|
|
1042
|
+
};
|
|
1043
|
+
const FlagIcon = () => /*#__PURE__*/React.createElement("svg", {
|
|
1044
|
+
width: "24",
|
|
1045
|
+
height: "24",
|
|
1046
|
+
viewBox: "0 0 24 24",
|
|
1047
|
+
fill: "none",
|
|
1048
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
1049
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
1050
|
+
d: "M14.4 6L13.6 4H5V21H7V14H12.6L13.4 16H20V6H14.4Z",
|
|
1051
|
+
fill: "#00703C"
|
|
1052
|
+
}));
|
|
1053
|
+
const IdCardIcon = () => /*#__PURE__*/React.createElement("svg", {
|
|
1054
|
+
width: "24",
|
|
1055
|
+
height: "24",
|
|
1056
|
+
viewBox: "0 0 24 24",
|
|
1057
|
+
fill: "none",
|
|
1058
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
1059
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
1060
|
+
d: "M2 7V17C2 18.1 2.9 19 4 19H20C21.1 19 22 18.1 22 17V7C22 5.9 21.1 5 20 5H4C2.9 5 2 5.9 2 7ZM12 11H14V13H12V11ZM12 7H14V9H12V7ZM16 11H20V13H16V11ZM16 7H20V9H16V7ZM4 7H10V15H4V7ZM20 17H4V16H20V17Z",
|
|
1061
|
+
fill: "#3D51B0"
|
|
1062
|
+
}));
|
|
1063
|
+
const CameraIcon = () => /*#__PURE__*/React.createElement("svg", {
|
|
1064
|
+
width: "32",
|
|
1065
|
+
height: "32",
|
|
1066
|
+
viewBox: "0 0 24 24",
|
|
1067
|
+
fill: "none",
|
|
1068
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
1069
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
1070
|
+
d: "M9 2L7.17 4H4C2.9 4 2 4.9 2 6V18C2 19.1 2.9 20 4 20H20C21.1 20 22 19.1 22 18V6C22 4.9 21.1 4 20 4H16.83L15 2H9ZM12 17C9.24 17 7 14.76 7 12C7 9.24 9.24 7 12 7C14.76 7 17 9.24 17 12C17 14.76 14.76 17 12 17ZM12 9C10.34 9 9 10.34 9 12C9 13.66 10.34 15 12 15C13.66 15 15 13.66 15 12C15 10.34 13.66 9 12 9Z",
|
|
1071
|
+
fill: "#0068faff"
|
|
1072
|
+
}));
|
|
1073
|
+
const TargetIcon = () => /*#__PURE__*/React.createElement("svg", {
|
|
1074
|
+
width: "24",
|
|
1075
|
+
height: "24",
|
|
1076
|
+
viewBox: "0 0 24 24",
|
|
1077
|
+
fill: "none",
|
|
1078
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
1079
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
1080
|
+
d: "M12 8C9.79 8 8 9.79 8 12C8 14.21 9.79 16 12 16C14.21 16 16 14.21 16 12C16 9.79 14.21 8 12 8ZM20.94 11C20.48 6.83 17.17 3.52 13 3.06V1H11V3.06C6.83 3.52 3.52 6.83 3.06 11H1V13H3.06C3.52 17.17 6.83 20.48 11 20.94V23H13V20.94C17.17 20.48 20.48 17.17 20.94 13H23V11H20.94ZM12 19C8.13 19 5 15.87 5 12C5 8.13 8.13 5 12 5C15.87 5 19 8.13 19 12C19 15.87 15.87 19 12 19Z",
|
|
1081
|
+
fill: "#0068faff"
|
|
1082
|
+
}));
|
|
1083
|
+
const PincodeIcon = () => /*#__PURE__*/React.createElement("svg", {
|
|
1084
|
+
width: "24",
|
|
1085
|
+
height: "24",
|
|
1086
|
+
viewBox: "0 0 24 24",
|
|
1087
|
+
fill: "none",
|
|
1088
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
1089
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
1090
|
+
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",
|
|
1091
|
+
fill: "#0068faff"
|
|
1092
|
+
}));
|
|
1093
|
+
const renderContent = () => /*#__PURE__*/React.createElement("div", {
|
|
1094
|
+
style: {
|
|
1095
|
+
animation: "fadeSlideIn 0.3s ease"
|
|
1096
|
+
}
|
|
1097
|
+
}, _isSection && /*#__PURE__*/React.createElement("hr", {
|
|
1098
|
+
style: {
|
|
1099
|
+
margin: "40px 0",
|
|
1100
|
+
border: "0",
|
|
1101
|
+
borderTop: "2px solid #EAECF0"
|
|
1102
|
+
}
|
|
1103
|
+
}), /*#__PURE__*/React.createElement(Header, {
|
|
1104
|
+
style: {
|
|
1105
|
+
marginBottom: "24px"
|
|
1106
|
+
}
|
|
1107
|
+
}, t("EKYC_ADDRESS_DETAILS_HEADER") || "Address Details"), /*#__PURE__*/React.createElement("div", {
|
|
1108
|
+
style: {
|
|
1109
|
+
marginBottom: "32px"
|
|
1110
|
+
}
|
|
1111
|
+
}, /*#__PURE__*/React.createElement(RadioButtons, {
|
|
1112
|
+
options: addressOptions,
|
|
1113
|
+
optionsKey: "name",
|
|
1114
|
+
selectedOption: addressType,
|
|
1115
|
+
onSelect: setAddressType,
|
|
1116
|
+
t: t,
|
|
1117
|
+
innerStyles: {
|
|
1118
|
+
display: "flex",
|
|
1119
|
+
alignItems: "center"
|
|
1120
|
+
},
|
|
1121
|
+
style: {
|
|
1122
|
+
display: "flex",
|
|
1123
|
+
gap: "50px",
|
|
1124
|
+
justifyContent: "flex-start"
|
|
1125
|
+
}
|
|
1126
|
+
})), addressType.code === "AADHAAR" && /*#__PURE__*/React.createElement("div", {
|
|
1127
|
+
style: {
|
|
1128
|
+
backgroundColor: "#F9FAFB",
|
|
1129
|
+
padding: "16px",
|
|
1130
|
+
borderRadius: "12px",
|
|
1131
|
+
marginBottom: "24px",
|
|
1132
|
+
border: "1px solid #EAECF0",
|
|
1133
|
+
display: "flex",
|
|
1134
|
+
alignItems: "flex-start",
|
|
1135
|
+
gap: "12px",
|
|
1136
|
+
animation: "fadeSlideIn 0.3s ease"
|
|
1137
|
+
}
|
|
1138
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
1139
|
+
style: {
|
|
1140
|
+
backgroundColor: "#E7F4EE",
|
|
1141
|
+
padding: "8px",
|
|
1142
|
+
borderRadius: "8px"
|
|
1143
|
+
}
|
|
1144
|
+
}, /*#__PURE__*/React.createElement(LocationIcon, {
|
|
1145
|
+
className: "icon",
|
|
1146
|
+
styles: {
|
|
1147
|
+
fill: "#00703C",
|
|
1148
|
+
width: "20px",
|
|
1149
|
+
height: "20px"
|
|
1150
|
+
}
|
|
1151
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
1152
|
+
style: {
|
|
1153
|
+
fontSize: "16px",
|
|
1154
|
+
lineHeight: "1.6",
|
|
1155
|
+
color: "#344054",
|
|
1156
|
+
fontWeight: "500"
|
|
1157
|
+
}
|
|
1158
|
+
}, "H.No. 123, Sector 15, Rohini", /*#__PURE__*/React.createElement("br", null), "Delhi - 110085")), addressType.code === "OLD" && /*#__PURE__*/React.createElement("div", {
|
|
1159
|
+
style: {
|
|
1160
|
+
animation: "fadeSlideIn 0.3s ease"
|
|
1161
|
+
}
|
|
1162
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
1163
|
+
style: {
|
|
1164
|
+
marginBottom: "24px"
|
|
1165
|
+
}
|
|
1166
|
+
}, /*#__PURE__*/React.createElement(CardLabel, {
|
|
1167
|
+
style: {
|
|
1168
|
+
marginBottom: "12px",
|
|
1169
|
+
fontWeight: "600",
|
|
1170
|
+
color: "#344054"
|
|
1171
|
+
}
|
|
1172
|
+
}, t("EKYC_ADDRESS_CORRECTION_PROMPT") || "Do you want to correct the address?"), /*#__PURE__*/React.createElement(RadioButtons, {
|
|
1173
|
+
options: yesNoOptions,
|
|
1174
|
+
optionsKey: "name",
|
|
1175
|
+
selectedOption: correctAddress,
|
|
1176
|
+
onSelect: setCorrectAddress,
|
|
1177
|
+
t: t,
|
|
1178
|
+
innerStyles: {
|
|
1179
|
+
display: "flex",
|
|
1180
|
+
alignItems: "center"
|
|
1181
|
+
},
|
|
1182
|
+
style: {
|
|
1183
|
+
display: "flex",
|
|
1184
|
+
gap: "50px",
|
|
1185
|
+
justifyContent: "flex-start"
|
|
1186
|
+
}
|
|
1187
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
1188
|
+
style: {
|
|
1189
|
+
border: "1px solid #D0D5DD",
|
|
1190
|
+
borderRadius: "12px",
|
|
1191
|
+
padding: "14px 16px",
|
|
1192
|
+
display: "flex",
|
|
1193
|
+
alignItems: "center",
|
|
1194
|
+
justifyContent: "space-between",
|
|
1195
|
+
marginBottom: "24px",
|
|
1196
|
+
cursor: isLocationFetching ? "not-allowed" : "pointer",
|
|
1197
|
+
backgroundColor: isLocationFetching ? "#F2F4F7" : "#FFFFFF",
|
|
1198
|
+
transition: "all 0.2s ease",
|
|
1199
|
+
opacity: isLocationFetching ? 0.7 : 1,
|
|
1200
|
+
boxShadow: "0px 1px 2px rgba(16, 24, 40, 0.05)"
|
|
1201
|
+
},
|
|
1202
|
+
onClick: !isLocationFetching ? handleUseCurrentLocation : undefined,
|
|
1203
|
+
onMouseOver: e => !isLocationFetching ? e.currentTarget.style.backgroundColor = "#F9FAFB" : null,
|
|
1204
|
+
onMouseOut: e => !isLocationFetching ? e.currentTarget.style.backgroundColor = "#FFFFFF" : null
|
|
1205
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
1206
|
+
style: {
|
|
1207
|
+
display: "flex",
|
|
1208
|
+
alignItems: "center",
|
|
1209
|
+
gap: "12px"
|
|
1210
|
+
}
|
|
1211
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
1212
|
+
style: {
|
|
1213
|
+
backgroundColor: "#EEF4FF",
|
|
1214
|
+
padding: "8px",
|
|
1215
|
+
borderRadius: "8px"
|
|
1216
|
+
}
|
|
1217
|
+
}, isLocationFetching ? /*#__PURE__*/React.createElement("div", {
|
|
1218
|
+
className: "location-loader",
|
|
1219
|
+
style: {
|
|
1220
|
+
width: "20px",
|
|
1221
|
+
height: "20px",
|
|
1222
|
+
border: "2px solid #0068faff",
|
|
1223
|
+
borderTopColor: "transparent",
|
|
1224
|
+
borderRadius: "50%",
|
|
1225
|
+
animation: "spin 1s linear infinite"
|
|
1226
|
+
}
|
|
1227
|
+
}) : /*#__PURE__*/React.createElement(TargetIcon, null)), /*#__PURE__*/React.createElement("span", {
|
|
1228
|
+
style: {
|
|
1229
|
+
fontWeight: "600",
|
|
1230
|
+
color: "#344054"
|
|
1231
|
+
}
|
|
1232
|
+
}, isLocationFetching ? t("EKYC_FETCHING_LOCATION") || "Fetching Location..." : t("EKYC_USE_CURRENT_LOCATION") || "Use Current Location")), !isLocationFetching && /*#__PURE__*/React.createElement("span", {
|
|
1233
|
+
style: {
|
|
1234
|
+
fontSize: "20px",
|
|
1235
|
+
color: "#98A2B3"
|
|
1236
|
+
}
|
|
1237
|
+
}, "\u203A")), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
|
|
1238
|
+
style: {
|
|
1239
|
+
fontWeight: "600"
|
|
1240
|
+
}
|
|
1241
|
+
}, t("EKYC_FULL_ADDRESS") || "Full Address"), /*#__PURE__*/React.createElement("div", {
|
|
1242
|
+
className: "field",
|
|
1243
|
+
style: {
|
|
1244
|
+
position: "relative"
|
|
1245
|
+
}
|
|
1246
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
1247
|
+
style: {
|
|
1248
|
+
position: "absolute",
|
|
1249
|
+
left: "12px",
|
|
1250
|
+
top: "16px",
|
|
1251
|
+
zIndex: 1,
|
|
1252
|
+
opacity: 0.6
|
|
1253
|
+
}
|
|
1254
|
+
}, /*#__PURE__*/React.createElement(PropertyHouse, {
|
|
1255
|
+
styles: {
|
|
1256
|
+
fill: "#0068faff",
|
|
1257
|
+
width: "20px",
|
|
1258
|
+
height: "20px"
|
|
1259
|
+
}
|
|
1260
|
+
})), /*#__PURE__*/React.createElement(TextInput, {
|
|
1261
|
+
value: fullAddress,
|
|
1262
|
+
onChange: e => setFullAddress(e.target.value),
|
|
1263
|
+
placeholder: t("EKYC_ENTER_FULL_ADDRESS") || "Enter Full Address",
|
|
1264
|
+
textInputStyle: {
|
|
1265
|
+
paddingLeft: "40px",
|
|
1266
|
+
minHeight: "80px"
|
|
1267
|
+
}
|
|
1268
|
+
}))), /*#__PURE__*/React.createElement("div", {
|
|
1269
|
+
style: {
|
|
1270
|
+
display: "grid",
|
|
1271
|
+
gridTemplateColumns: "1fr 1fr",
|
|
1272
|
+
gap: "24px"
|
|
1273
|
+
}
|
|
1274
|
+
}, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
|
|
1275
|
+
style: {
|
|
1276
|
+
fontWeight: "600"
|
|
1277
|
+
}
|
|
1278
|
+
}, t("EKYC_FLAT_HOUSE_NUMBER") || "Flat/House Number"), /*#__PURE__*/React.createElement("div", {
|
|
1279
|
+
className: "field",
|
|
1280
|
+
style: {
|
|
1281
|
+
position: "relative"
|
|
1282
|
+
}
|
|
1283
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
1284
|
+
style: {
|
|
1285
|
+
position: "absolute",
|
|
1286
|
+
left: "12px",
|
|
1287
|
+
top: "50%",
|
|
1288
|
+
transform: "translateY(-50%)",
|
|
1289
|
+
zIndex: 1,
|
|
1290
|
+
opacity: 0.6
|
|
1291
|
+
}
|
|
1292
|
+
}, /*#__PURE__*/React.createElement(PropertyHouse, {
|
|
1293
|
+
styles: {
|
|
1294
|
+
fill: "#0068faff",
|
|
1295
|
+
width: "20px",
|
|
1296
|
+
height: "20px"
|
|
1297
|
+
}
|
|
1298
|
+
})), /*#__PURE__*/React.createElement(TextInput, {
|
|
1299
|
+
value: flatNo,
|
|
1300
|
+
onChange: e => setFlatNo(e.target.value),
|
|
1301
|
+
placeholder: t("EKYC_ENTER_FLAT_NO") || "e.g. 45-B",
|
|
1302
|
+
textInputStyle: {
|
|
1303
|
+
paddingLeft: "40px"
|
|
1304
|
+
}
|
|
1305
|
+
}))), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
|
|
1306
|
+
style: {
|
|
1307
|
+
fontWeight: "600"
|
|
1308
|
+
}
|
|
1309
|
+
}, t("EKYC_BUILDING_TOWER") || "Building/Tower"), /*#__PURE__*/React.createElement("div", {
|
|
1310
|
+
className: "field",
|
|
1311
|
+
style: {
|
|
1312
|
+
position: "relative"
|
|
1313
|
+
}
|
|
1314
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
1315
|
+
style: {
|
|
1316
|
+
position: "absolute",
|
|
1317
|
+
left: "12px",
|
|
1318
|
+
top: "50%",
|
|
1319
|
+
transform: "translateY(-50%)",
|
|
1320
|
+
zIndex: 1,
|
|
1321
|
+
opacity: 0.6
|
|
1322
|
+
}
|
|
1323
|
+
}, /*#__PURE__*/React.createElement(PropertyHouse, {
|
|
1324
|
+
styles: {
|
|
1325
|
+
fill: "#0068faff",
|
|
1326
|
+
width: "20px",
|
|
1327
|
+
height: "20px"
|
|
1328
|
+
}
|
|
1329
|
+
})), /*#__PURE__*/React.createElement(TextInput, {
|
|
1330
|
+
value: building,
|
|
1331
|
+
onChange: e => setBuilding(e.target.value),
|
|
1332
|
+
placeholder: t("EKYC_ENTER_BUILDING") || "e.g. Tower 4",
|
|
1333
|
+
textInputStyle: {
|
|
1334
|
+
paddingLeft: "40px"
|
|
1335
|
+
}
|
|
1336
|
+
})))), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
|
|
1337
|
+
style: {
|
|
1338
|
+
fontWeight: "600"
|
|
1339
|
+
}
|
|
1340
|
+
}, t("EKYC_LANDMARK") || "Landmark"), /*#__PURE__*/React.createElement("div", {
|
|
1341
|
+
className: "field",
|
|
1342
|
+
style: {
|
|
1343
|
+
position: "relative"
|
|
1344
|
+
}
|
|
1345
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
1346
|
+
style: {
|
|
1347
|
+
position: "absolute",
|
|
1348
|
+
left: "12px",
|
|
1349
|
+
top: "50%",
|
|
1350
|
+
transform: "translateY(-50%)",
|
|
1351
|
+
zIndex: 1,
|
|
1352
|
+
opacity: 0.6
|
|
1353
|
+
}
|
|
1354
|
+
}, /*#__PURE__*/React.createElement(LocationIcon, {
|
|
1355
|
+
className: "icon",
|
|
1356
|
+
styles: {
|
|
1357
|
+
fill: "#0068faff",
|
|
1358
|
+
width: "20px",
|
|
1359
|
+
height: "20px"
|
|
1360
|
+
}
|
|
1361
|
+
})), /*#__PURE__*/React.createElement(TextInput, {
|
|
1362
|
+
value: landmark,
|
|
1363
|
+
onChange: e => setLandmark(e.target.value),
|
|
1364
|
+
placeholder: t("EKYC_ENTER_LANDMARK") || "Near Central Park",
|
|
1365
|
+
textInputStyle: {
|
|
1366
|
+
paddingLeft: "40px"
|
|
1367
|
+
}
|
|
1368
|
+
}))), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
|
|
1369
|
+
style: {
|
|
1370
|
+
fontWeight: "600"
|
|
1371
|
+
}
|
|
1372
|
+
}, t("EKYC_PINCODE") || "Pincode"), /*#__PURE__*/React.createElement("div", {
|
|
1373
|
+
className: "field",
|
|
1374
|
+
style: {
|
|
1375
|
+
position: "relative"
|
|
1376
|
+
}
|
|
1377
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
1378
|
+
style: {
|
|
1379
|
+
position: "absolute",
|
|
1380
|
+
left: "12px",
|
|
1381
|
+
top: "50%",
|
|
1382
|
+
transform: "translateY(-50%)",
|
|
1383
|
+
zIndex: 1,
|
|
1384
|
+
opacity: 0.6
|
|
1385
|
+
}
|
|
1386
|
+
}, /*#__PURE__*/React.createElement(PincodeIcon, null)), /*#__PURE__*/React.createElement(TextInput, {
|
|
1387
|
+
value: pincode,
|
|
1388
|
+
onChange: e => setPincode(e.target.value),
|
|
1389
|
+
placeholder: t("EKYC_ENTER_PINCODE") || "6-digit pincode",
|
|
1390
|
+
textInputStyle: {
|
|
1391
|
+
paddingLeft: "40px"
|
|
1392
|
+
},
|
|
1393
|
+
maxLength: 6
|
|
1394
|
+
})))), /*#__PURE__*/React.createElement("hr", {
|
|
1395
|
+
style: {
|
|
1396
|
+
margin: "32px 0",
|
|
1397
|
+
border: "0",
|
|
1398
|
+
borderTop: "1px solid #EAECF0"
|
|
1399
|
+
}
|
|
1400
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
1401
|
+
style: {
|
|
1402
|
+
display: "flex",
|
|
1403
|
+
alignItems: "center",
|
|
1404
|
+
gap: "10px",
|
|
1405
|
+
marginBottom: "20px"
|
|
1406
|
+
}
|
|
1407
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
1408
|
+
style: {
|
|
1409
|
+
backgroundColor: "#EEF4FF",
|
|
1410
|
+
padding: "8px",
|
|
1411
|
+
borderRadius: "8px"
|
|
1412
|
+
}
|
|
1413
|
+
}, /*#__PURE__*/React.createElement(PropertyHouse, {
|
|
1414
|
+
styles: {
|
|
1415
|
+
fill: "#0068faff",
|
|
1416
|
+
width: "24px",
|
|
1417
|
+
height: "24px"
|
|
1418
|
+
}
|
|
1419
|
+
})), /*#__PURE__*/React.createElement(CardHeader, {
|
|
1420
|
+
style: {
|
|
1421
|
+
margin: 0,
|
|
1422
|
+
fontSize: "20px"
|
|
1423
|
+
}
|
|
1424
|
+
}, t("EKYC_ADMINISTRATIVE_DIVISION") || "Administrative Division")), /*#__PURE__*/React.createElement("div", {
|
|
1425
|
+
style: {
|
|
1426
|
+
display: "grid",
|
|
1427
|
+
gridTemplateColumns: "1fr 1fr",
|
|
1428
|
+
gap: "24px",
|
|
1429
|
+
marginBottom: "32px"
|
|
1430
|
+
}
|
|
1431
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
1432
|
+
style: {
|
|
1433
|
+
backgroundColor: "#F9FAFB",
|
|
1434
|
+
padding: "16px",
|
|
1435
|
+
borderRadius: "12px",
|
|
1436
|
+
display: "flex",
|
|
1437
|
+
alignItems: "center",
|
|
1438
|
+
gap: "16px",
|
|
1439
|
+
border: "1px solid #EAECF0"
|
|
1440
|
+
}
|
|
1441
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
1442
|
+
style: {
|
|
1443
|
+
backgroundColor: "#E7F4EE",
|
|
1444
|
+
padding: "10px",
|
|
1445
|
+
borderRadius: "10px",
|
|
1446
|
+
display: "flex"
|
|
1447
|
+
}
|
|
1448
|
+
}, /*#__PURE__*/React.createElement(FlagIcon, null)), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
1449
|
+
style: {
|
|
1450
|
+
color: "#00703C",
|
|
1451
|
+
fontSize: "12px",
|
|
1452
|
+
fontWeight: "700",
|
|
1453
|
+
textTransform: "uppercase",
|
|
1454
|
+
letterSpacing: "0.5px"
|
|
1455
|
+
}
|
|
1456
|
+
}, t("EKYC_ASSEMBLY") || "ASSEMBLY"), /*#__PURE__*/React.createElement("div", {
|
|
1457
|
+
style: {
|
|
1458
|
+
fontSize: "15px",
|
|
1459
|
+
fontWeight: "700",
|
|
1460
|
+
color: "#101828",
|
|
1461
|
+
marginTop: "2px"
|
|
1462
|
+
}
|
|
1463
|
+
}, "AC-12 Chandni Chowk"))), /*#__PURE__*/React.createElement("div", {
|
|
1464
|
+
style: {
|
|
1465
|
+
backgroundColor: "#F9FAFB",
|
|
1466
|
+
padding: "16px",
|
|
1467
|
+
borderRadius: "12px",
|
|
1468
|
+
display: "flex",
|
|
1469
|
+
alignItems: "center",
|
|
1470
|
+
gap: "16px",
|
|
1471
|
+
border: "1px solid #EAECF0"
|
|
1472
|
+
}
|
|
1473
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
1474
|
+
style: {
|
|
1475
|
+
backgroundColor: "#EEF4FF",
|
|
1476
|
+
padding: "10px",
|
|
1477
|
+
borderRadius: "10px",
|
|
1478
|
+
display: "flex"
|
|
1479
|
+
}
|
|
1480
|
+
}, /*#__PURE__*/React.createElement(IdCardIcon, null)), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
1481
|
+
style: {
|
|
1482
|
+
color: "#0068faff",
|
|
1483
|
+
fontSize: "12px",
|
|
1484
|
+
fontWeight: "700",
|
|
1485
|
+
textTransform: "uppercase",
|
|
1486
|
+
letterSpacing: "0.5px"
|
|
1487
|
+
}
|
|
1488
|
+
}, t("EKYC_WARD") || "WARD"), /*#__PURE__*/React.createElement("div", {
|
|
1489
|
+
style: {
|
|
1490
|
+
fontSize: "15px",
|
|
1491
|
+
fontWeight: "700",
|
|
1492
|
+
color: "#101828",
|
|
1493
|
+
marginTop: "2px"
|
|
1494
|
+
}
|
|
1495
|
+
}, "WARD-45 Civil Lines")))), /*#__PURE__*/React.createElement(CardHeader, {
|
|
1496
|
+
style: {
|
|
1497
|
+
fontSize: "18px",
|
|
1498
|
+
color: "#101828",
|
|
1499
|
+
marginBottom: "4px"
|
|
1500
|
+
}
|
|
1501
|
+
}, t("EKYC_DOOR_PHOTO_HEADER") || "Door Photo with GPS Stamp"), /*#__PURE__*/React.createElement("div", {
|
|
1502
|
+
style: {
|
|
1503
|
+
color: "#667085",
|
|
1504
|
+
fontSize: "14px",
|
|
1505
|
+
marginBottom: "16px"
|
|
1506
|
+
}
|
|
1507
|
+
}, t("EKYC_REQUIRED_FOR_VERIFICATION") || "Required for verification"), /*#__PURE__*/React.createElement("div", {
|
|
1508
|
+
style: {
|
|
1509
|
+
backgroundColor: "#FFFAEB",
|
|
1510
|
+
padding: "14px",
|
|
1511
|
+
borderRadius: "12px",
|
|
1512
|
+
display: "flex",
|
|
1513
|
+
alignItems: "center",
|
|
1514
|
+
gap: "12px",
|
|
1515
|
+
marginBottom: "20px",
|
|
1516
|
+
border: "1px solid #FEDF89"
|
|
1517
|
+
}
|
|
1518
|
+
}, /*#__PURE__*/React.createElement(InfoBannerIcon, {
|
|
1519
|
+
fill: "#B54708"
|
|
1520
|
+
}), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
1521
|
+
style: {
|
|
1522
|
+
fontWeight: "700",
|
|
1523
|
+
color: "#B54708",
|
|
1524
|
+
fontSize: "14px"
|
|
1525
|
+
}
|
|
1526
|
+
}, t("EKYC_IMPORTANT") || "Important"), /*#__PURE__*/React.createElement("div", {
|
|
1527
|
+
style: {
|
|
1528
|
+
fontSize: "13px",
|
|
1529
|
+
color: "#B54708",
|
|
1530
|
+
marginTop: "2px"
|
|
1531
|
+
}
|
|
1532
|
+
}, t("EKYC_CAPTURE_LIVE_CAMERA") || "Capture with live camera for GPS metadata"))), /*#__PURE__*/React.createElement("div", {
|
|
1533
|
+
style: {
|
|
1534
|
+
border: "2px dashed #D0D5DD",
|
|
1535
|
+
borderRadius: "16px",
|
|
1536
|
+
padding: doorPhoto ? "12px" : "40px 24px",
|
|
1537
|
+
textAlign: "center",
|
|
1538
|
+
cursor: "pointer",
|
|
1539
|
+
position: "relative",
|
|
1540
|
+
overflow: "hidden",
|
|
1541
|
+
minHeight: "180px",
|
|
1542
|
+
display: "flex",
|
|
1543
|
+
flexDirection: "column",
|
|
1544
|
+
alignItems: "center",
|
|
1545
|
+
justifyContent: "center",
|
|
1546
|
+
backgroundColor: "#F9FAFB",
|
|
1547
|
+
transition: "all 0.2s ease",
|
|
1548
|
+
boxShadow: "inset 0px 2px 4px rgba(0, 0, 0, 0.02)"
|
|
1549
|
+
},
|
|
1550
|
+
onClick: !doorPhoto ? openGallery : undefined,
|
|
1551
|
+
onMouseOver: e => !doorPhoto ? e.currentTarget.style.borderColor = "#0068faff" : null,
|
|
1552
|
+
onMouseOut: e => !doorPhoto ? e.currentTarget.style.borderColor = "#D0D5DD" : null
|
|
1553
|
+
}, /*#__PURE__*/React.createElement("input", {
|
|
1554
|
+
type: "file",
|
|
1555
|
+
ref: fileInputRef,
|
|
1556
|
+
onChange: handleCapture,
|
|
1557
|
+
accept: "image/*",
|
|
1558
|
+
style: {
|
|
1559
|
+
display: "none"
|
|
1560
|
+
}
|
|
1561
|
+
}), !doorPhoto ? /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
1562
|
+
style: {
|
|
1563
|
+
backgroundColor: "#FFFFFF",
|
|
1564
|
+
width: "64px",
|
|
1565
|
+
height: "64px",
|
|
1566
|
+
borderRadius: "50%",
|
|
1567
|
+
display: "flex",
|
|
1568
|
+
alignItems: "center",
|
|
1569
|
+
justifyContent: "center",
|
|
1570
|
+
margin: "0 auto 16px",
|
|
1571
|
+
boxShadow: "0px 1px 3px rgba(16, 24, 40, 0.1)"
|
|
1572
|
+
}
|
|
1573
|
+
}, /*#__PURE__*/React.createElement(CameraIcon, null)), /*#__PURE__*/React.createElement("div", {
|
|
1574
|
+
style: {
|
|
1575
|
+
fontWeight: "700",
|
|
1576
|
+
fontSize: "16px",
|
|
1577
|
+
marginBottom: "4px",
|
|
1578
|
+
color: "#101828"
|
|
1579
|
+
}
|
|
1580
|
+
}, t("EKYC_TAP_TO_CAPTURE") || "Tap to Capture"), /*#__PURE__*/React.createElement("div", {
|
|
1581
|
+
style: {
|
|
1582
|
+
color: "#667085",
|
|
1583
|
+
fontSize: "14px"
|
|
1584
|
+
}
|
|
1585
|
+
}, t("EKYC_CAPTURE_DOOR_IMAGE") || "Capture Door Image")) : /*#__PURE__*/React.createElement("div", {
|
|
1586
|
+
style: {
|
|
1587
|
+
position: "relative",
|
|
1588
|
+
width: "100%",
|
|
1589
|
+
height: "100%",
|
|
1590
|
+
display: "flex",
|
|
1591
|
+
justifyContent: "center"
|
|
1592
|
+
}
|
|
1593
|
+
}, /*#__PURE__*/React.createElement("img", {
|
|
1594
|
+
src: doorPhoto,
|
|
1595
|
+
alt: "Door",
|
|
1596
|
+
style: {
|
|
1597
|
+
width: "100%",
|
|
1598
|
+
maxHeight: "300px",
|
|
1599
|
+
objectFit: "cover",
|
|
1600
|
+
borderRadius: "12px",
|
|
1601
|
+
display: "block"
|
|
1602
|
+
}
|
|
1603
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
1604
|
+
style: {
|
|
1605
|
+
position: "absolute",
|
|
1606
|
+
top: "12px",
|
|
1607
|
+
right: "12px"
|
|
1608
|
+
}
|
|
1609
|
+
}, /*#__PURE__*/React.createElement("button", {
|
|
1610
|
+
onClick: e => {
|
|
1611
|
+
e.stopPropagation();
|
|
1612
|
+
removePhoto();
|
|
1613
|
+
},
|
|
1614
|
+
style: {
|
|
1615
|
+
background: "#FFFFFF",
|
|
1616
|
+
border: "1px solid #EAECF0",
|
|
1617
|
+
borderRadius: "8px",
|
|
1618
|
+
padding: "8px",
|
|
1619
|
+
display: "flex",
|
|
1620
|
+
boxShadow: "0px 1px 2px rgba(16, 24, 40, 0.05)",
|
|
1621
|
+
cursor: "pointer"
|
|
1622
|
+
}
|
|
1623
|
+
}, /*#__PURE__*/React.createElement(RemoveableTag, {
|
|
1624
|
+
text: "",
|
|
1625
|
+
onClick: () => {},
|
|
1626
|
+
extraStyles: {
|
|
1627
|
+
tagStyles: {
|
|
1628
|
+
margin: 0,
|
|
1629
|
+
padding: 0
|
|
1630
|
+
}
|
|
1631
|
+
}
|
|
1632
|
+
}))))), /*#__PURE__*/React.createElement(ActionBar, null, /*#__PURE__*/React.createElement(SubmitBar, {
|
|
1633
|
+
label: _isSection ? t("EKYC_COMPLETE_VERIFICATION_AND_PROCEED") || "Complete & Proceed" : t("EKYC_COMPLETE_VERIFICATION") || "Complete Verification",
|
|
1634
|
+
onSubmit: handleCompleteVerification
|
|
1635
|
+
})));
|
|
1636
|
+
if (_isSection) return renderContent();
|
|
1637
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
1638
|
+
className: "inbox-container"
|
|
1639
|
+
}, /*#__PURE__*/React.createElement("style", null, `
|
|
1640
|
+
@keyframes spin { to { transform: rotate(360deg); } }
|
|
1641
|
+
@keyframes fadeSlideIn { from { opacity:0; transform:translateY(10px); } to { opacity:1; transform:translateY(0); } }
|
|
1642
|
+
`), /*#__PURE__*/React.createElement("div", {
|
|
1643
|
+
className: "filters-container"
|
|
1644
|
+
}, /*#__PURE__*/React.createElement(Card, {
|
|
1645
|
+
className: "sidebar-title-card",
|
|
1646
|
+
style: {
|
|
1647
|
+
display: "flex",
|
|
1648
|
+
alignItems: "center",
|
|
1649
|
+
padding: "16px",
|
|
1650
|
+
marginBottom: "16px",
|
|
1651
|
+
borderRadius: "4px"
|
|
1652
|
+
}
|
|
1653
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
1654
|
+
className: "icon-container",
|
|
1655
|
+
style: {
|
|
1656
|
+
color: "#0068faff",
|
|
1657
|
+
marginRight: "12px"
|
|
1658
|
+
}
|
|
1659
|
+
}, /*#__PURE__*/React.createElement(HomeIcon, {
|
|
1660
|
+
style: {
|
|
1661
|
+
width: "24px",
|
|
1662
|
+
height: "24px"
|
|
1663
|
+
}
|
|
1664
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
1665
|
+
style: {
|
|
1666
|
+
fontWeight: "700",
|
|
1667
|
+
fontSize: "18px",
|
|
1668
|
+
color: "#0B0C0C"
|
|
1669
|
+
}
|
|
1670
|
+
}, t("EKYC_PROCESS"))), /*#__PURE__*/React.createElement("div", {
|
|
1671
|
+
style: {
|
|
1672
|
+
backgroundColor: "#FFFFFF",
|
|
1673
|
+
padding: "16px",
|
|
1674
|
+
borderRadius: "8px",
|
|
1675
|
+
border: "1px solid #EAECF0",
|
|
1676
|
+
boxShadow: "0 2px 4px rgba(0,0,0,0.02)"
|
|
1677
|
+
}
|
|
1678
|
+
}, /*#__PURE__*/React.createElement(ConnectingCheckPoints, null, /*#__PURE__*/React.createElement(CheckPoint, {
|
|
1679
|
+
label: t("EKYC_STEP_AADHAAR") || "Aadhaar",
|
|
1680
|
+
isCompleted: true
|
|
1681
|
+
}), /*#__PURE__*/React.createElement(CheckPoint, {
|
|
1682
|
+
label: t("EKYC_STEP_ADDRESS") || "Address",
|
|
1683
|
+
isCompleted: true
|
|
1684
|
+
}), /*#__PURE__*/React.createElement(CheckPoint, {
|
|
1685
|
+
label: t("EKYC_STEP_PROPERTY") || "Property",
|
|
1686
|
+
isCompleted: false
|
|
1687
|
+
}), /*#__PURE__*/React.createElement(CheckPoint, {
|
|
1688
|
+
label: t("EKYC_STEP_REVIEW") || "Review"
|
|
1689
|
+
})))), /*#__PURE__*/React.createElement("div", {
|
|
1690
|
+
style: {
|
|
1691
|
+
flex: 1,
|
|
1692
|
+
marginLeft: "16px"
|
|
1693
|
+
}
|
|
1694
|
+
}, /*#__PURE__*/React.createElement(Card, null, /*#__PURE__*/React.createElement("div", {
|
|
1695
|
+
style: {
|
|
1696
|
+
display: "flex",
|
|
1697
|
+
justifyContent: "space-between",
|
|
1698
|
+
alignItems: "center",
|
|
1699
|
+
marginBottom: "24px"
|
|
1700
|
+
}
|
|
1701
|
+
}, /*#__PURE__*/React.createElement(Header, null, t("EKYC_ADDRESS_DETAILS_HEADER") || "Address Details"), /*#__PURE__*/React.createElement("div", {
|
|
1702
|
+
style: {
|
|
1703
|
+
fontSize: "14px",
|
|
1704
|
+
fontWeight: "700",
|
|
1705
|
+
color: "#505A5F"
|
|
1706
|
+
}
|
|
1707
|
+
}, t("EKYC_K_NUMBER"), ": ", /*#__PURE__*/React.createElement("span", {
|
|
1708
|
+
style: {
|
|
1709
|
+
color: "#0B0C0C"
|
|
1710
|
+
}
|
|
1711
|
+
}, flowState === null || flowState === void 0 ? void 0 : flowState.kNumber))), renderContent())));
|
|
1712
|
+
};
|
|
1713
|
+
|
|
1714
|
+
const FingerprintIcon = ({
|
|
1715
|
+
size: _size = 22,
|
|
1716
|
+
color: _color = "#6366f1"
|
|
1717
|
+
}) => /*#__PURE__*/React.createElement("svg", {
|
|
1718
|
+
width: _size,
|
|
1719
|
+
height: _size,
|
|
1720
|
+
viewBox: "0 0 24 24",
|
|
1721
|
+
fill: "none"
|
|
1722
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
1723
|
+
d: "M17.81 4.47c-.08 0-.16-.02-.23-.06C15.66 3.42 14 3 12.01 3c-1.98 0-3.86.47-5.57 1.41-.24.13-.54.04-.67-.2-.13-.24-.04-.55.2-.68C7.82 2.52 9.86 2 12.01 2c2.13 0 3.96.46 5.57 1.41.24.13.33.43.2.67-.09.13-.24.39-.39.39zM12 21c-.28 0-.5-.22-.5-.5v-4.42c-2.33-.21-4.44-1.35-5.94-3.21-1.5-1.86-2.22-4.18-2.02-6.52.05-.59.55-1.03 1.14-.98s1.03.55.98 1.14c-.15 1.76.39 3.51 1.52 4.91 1.12 1.4 2.7 2.26 4.45 2.42.21.02.37.19.37.4v6.26c0 .28-.22.5-.5.5z",
|
|
1724
|
+
fill: _color
|
|
1725
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
1726
|
+
d: "M12 11c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1z",
|
|
1727
|
+
fill: _color
|
|
1728
|
+
}));
|
|
1729
|
+
const UserIcon = ({
|
|
1730
|
+
size: _size2 = 16,
|
|
1731
|
+
color: _color2 = "#64748b"
|
|
1732
|
+
}) => /*#__PURE__*/React.createElement("svg", {
|
|
1733
|
+
width: _size2,
|
|
1734
|
+
height: _size2,
|
|
1735
|
+
viewBox: "0 0 24 24",
|
|
1736
|
+
fill: "none"
|
|
1737
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
1738
|
+
d: "M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2",
|
|
1739
|
+
stroke: _color2,
|
|
1740
|
+
strokeWidth: "2",
|
|
1741
|
+
strokeLinecap: "round"
|
|
1742
|
+
}), /*#__PURE__*/React.createElement("circle", {
|
|
1743
|
+
cx: "12",
|
|
1744
|
+
cy: "7",
|
|
1745
|
+
r: "4",
|
|
1746
|
+
stroke: _color2,
|
|
1747
|
+
strokeWidth: "2"
|
|
1748
|
+
}));
|
|
1749
|
+
const PhoneIcon = ({
|
|
1750
|
+
size: _size3 = 16,
|
|
1751
|
+
color: _color3 = "#64748b"
|
|
1752
|
+
}) => /*#__PURE__*/React.createElement("svg", {
|
|
1753
|
+
width: _size3,
|
|
1754
|
+
height: _size3,
|
|
1755
|
+
viewBox: "0 0 24 24",
|
|
1756
|
+
fill: "none"
|
|
1757
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
1758
|
+
d: "M22 16.92v3a2 2 0 01-2.18 2 19.79 19.79 0 01-8.63-3.07A19.5 19.5 0 013.07 10.6 19.79 19.79 0 0 0 3 1.82C3 .72 3.72 0 4.82 0h3a2 2 0 012 1.72c.127.96.361 1.903.7 2.81a2 2 0 01-.45 2.11L8.91 7.91a16 16 0 006.16 6.16l1.27-1.27a2 2 0 012.11-.45c.907.339 1.85.573 2.81.7A2 2 0 0122 16.92z",
|
|
1759
|
+
stroke: _color3,
|
|
1760
|
+
strokeWidth: "2",
|
|
1761
|
+
strokeLinecap: "round"
|
|
1762
|
+
}));
|
|
1763
|
+
const WhatsappIcon = ({
|
|
1764
|
+
size: _size4 = 16
|
|
1765
|
+
}) => /*#__PURE__*/React.createElement("svg", {
|
|
1766
|
+
width: _size4,
|
|
1767
|
+
height: _size4,
|
|
1768
|
+
viewBox: "0 0 24 24",
|
|
1769
|
+
fill: "none"
|
|
1770
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
1771
|
+
d: "M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347z",
|
|
1772
|
+
fill: "#25D366"
|
|
1773
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
1774
|
+
d: "M12 2C6.477 2 2 6.477 2 12c0 1.89.525 3.66 1.438 5.168L2 22l4.832-1.438A9.96 9.96 0 0012 22c5.523 0 10-4.477 10-10S17.523 2 12 2z",
|
|
1775
|
+
stroke: "#25D366",
|
|
1776
|
+
strokeWidth: "2",
|
|
1777
|
+
strokeLinecap: "round"
|
|
1778
|
+
}));
|
|
1779
|
+
const MailIcon = ({
|
|
1780
|
+
size: _size5 = 16,
|
|
1781
|
+
color: _color4 = "#64748b"
|
|
1782
|
+
}) => /*#__PURE__*/React.createElement("svg", {
|
|
1783
|
+
width: _size5,
|
|
1784
|
+
height: _size5,
|
|
1785
|
+
viewBox: "0 0 24 24",
|
|
1786
|
+
fill: "none"
|
|
1787
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
1788
|
+
d: "M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z",
|
|
1789
|
+
stroke: _color4,
|
|
1790
|
+
strokeWidth: "2",
|
|
1791
|
+
strokeLinecap: "round"
|
|
1792
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
1793
|
+
d: "M22 6l-10 7L2 6",
|
|
1794
|
+
stroke: _color4,
|
|
1795
|
+
strokeWidth: "2",
|
|
1796
|
+
strokeLinecap: "round"
|
|
1797
|
+
}));
|
|
1798
|
+
const UsersIcon = ({
|
|
1799
|
+
size: _size6 = 16,
|
|
1800
|
+
color: _color5 = "#64748b"
|
|
1801
|
+
}) => /*#__PURE__*/React.createElement("svg", {
|
|
1802
|
+
width: _size6,
|
|
1803
|
+
height: _size6,
|
|
1804
|
+
viewBox: "0 0 24 24",
|
|
1805
|
+
fill: "none"
|
|
1806
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
1807
|
+
d: "M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2",
|
|
1808
|
+
stroke: _color5,
|
|
1809
|
+
strokeWidth: "2",
|
|
1810
|
+
strokeLinecap: "round"
|
|
1811
|
+
}), /*#__PURE__*/React.createElement("circle", {
|
|
1812
|
+
cx: "9",
|
|
1813
|
+
cy: "7",
|
|
1814
|
+
r: "4",
|
|
1815
|
+
stroke: _color5,
|
|
1816
|
+
strokeWidth: "2"
|
|
1817
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
1818
|
+
d: "M23 21v-2a4 4 0 0 0-3-3.87",
|
|
1819
|
+
stroke: _color5,
|
|
1820
|
+
strokeWidth: "2",
|
|
1821
|
+
strokeLinecap: "round"
|
|
1822
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
1823
|
+
d: "M16 3.13a4 4 0 0 1 0 7.75",
|
|
1824
|
+
stroke: _color5,
|
|
1825
|
+
strokeWidth: "2",
|
|
1826
|
+
strokeLinecap: "round"
|
|
1827
|
+
}));
|
|
1828
|
+
const AadhaarVerification = () => {
|
|
1829
|
+
var _connectionDetails$co, _connectionDetails$co2, _connectionDetails$co3, _connectionDetails$co4;
|
|
1830
|
+
const {
|
|
1831
|
+
t
|
|
1832
|
+
} = useTranslation();
|
|
1833
|
+
const location = useLocation();
|
|
1834
|
+
const history = useHistory();
|
|
1835
|
+
const addressSectionRef = useRef(null);
|
|
1836
|
+
const {
|
|
1837
|
+
kNumber,
|
|
1838
|
+
selectedOption,
|
|
1839
|
+
connectionDetails
|
|
1840
|
+
} = location.state || {
|
|
1841
|
+
kNumber: "EKYC-1234567890",
|
|
1842
|
+
selectedOption: {
|
|
1843
|
+
code: "SELF",
|
|
1844
|
+
name: "EKYC_SELF"
|
|
1845
|
+
},
|
|
1846
|
+
connectionDetails: {
|
|
1847
|
+
connectionDetailsInfo: {
|
|
1848
|
+
consumerName: "Rajesh Kumar Singh",
|
|
1849
|
+
address: "House No. 45, Sector 12, New Delhi - 110001",
|
|
1850
|
+
phoneNumber: "9876543210",
|
|
1851
|
+
email: "rajesh.singh@example.com"
|
|
1852
|
+
}
|
|
1853
|
+
}
|
|
1854
|
+
};
|
|
1855
|
+
const [aadhaarLastFour, setAadhaarLastFour] = useState("");
|
|
1856
|
+
const [isAadhaarVerified, setIsAadhaarVerified] = useState(false);
|
|
1857
|
+
const [isVerifying, setIsVerifying] = useState(false);
|
|
1858
|
+
const [nameCorrect, setNameCorrect] = useState({
|
|
1859
|
+
code: "NO",
|
|
1860
|
+
name: "CORE_COMMON_NO"
|
|
1861
|
+
});
|
|
1862
|
+
const [userName, setUserName] = useState((connectionDetails === null || connectionDetails === void 0 ? void 0 : (_connectionDetails$co = connectionDetails.connectionDetailsInfo) === null || _connectionDetails$co === void 0 ? void 0 : _connectionDetails$co.consumerName) || "");
|
|
1863
|
+
const [mobileChange, setMobileChange] = useState({
|
|
1864
|
+
code: "NO",
|
|
1865
|
+
name: "CORE_COMMON_NO"
|
|
1866
|
+
});
|
|
1867
|
+
const [mobileNumber, setMobileNumber] = useState((connectionDetails === null || connectionDetails === void 0 ? void 0 : (_connectionDetails$co2 = connectionDetails.connectionDetailsInfo) === null || _connectionDetails$co2 === void 0 ? void 0 : _connectionDetails$co2.phoneNumber) || "");
|
|
1868
|
+
const [whatsappNumber, setWhatsappNumber] = useState((connectionDetails === null || connectionDetails === void 0 ? void 0 : (_connectionDetails$co3 = connectionDetails.connectionDetailsInfo) === null || _connectionDetails$co3 === void 0 ? void 0 : _connectionDetails$co3.phoneNumber) || "");
|
|
1869
|
+
const [email, setEmail] = useState((connectionDetails === null || connectionDetails === void 0 ? void 0 : (_connectionDetails$co4 = connectionDetails.connectionDetailsInfo) === null || _connectionDetails$co4 === void 0 ? void 0 : _connectionDetails$co4.email) || "");
|
|
1870
|
+
const [noOfPersons, setNoOfPersons] = useState("");
|
|
1871
|
+
const [showAddressSection, setShowAddressSection] = useState(false);
|
|
1872
|
+
const [addressData, setAddressData] = useState(null);
|
|
1873
|
+
const yesNoOptions = [{
|
|
1874
|
+
code: "YES",
|
|
1875
|
+
name: "CORE_COMMON_YES"
|
|
1876
|
+
}, {
|
|
1877
|
+
code: "NO",
|
|
1878
|
+
name: "CORE_COMMON_NO"
|
|
1879
|
+
}];
|
|
1880
|
+
const handleVerifyAadhaar = () => {
|
|
1881
|
+
if (aadhaarLastFour.length === 4) {
|
|
1882
|
+
setIsVerifying(true);
|
|
1883
|
+
setTimeout(() => {
|
|
1884
|
+
setIsVerifying(false);
|
|
1885
|
+
setIsAadhaarVerified(true);
|
|
1886
|
+
}, 1200);
|
|
1887
|
+
}
|
|
1888
|
+
};
|
|
1889
|
+
const handleSaveAndContinueAadhaar = () => {
|
|
1890
|
+
setShowAddressSection(true);
|
|
1891
|
+
setTimeout(() => {
|
|
1892
|
+
var _addressSectionRef$cu;
|
|
1893
|
+
(_addressSectionRef$cu = addressSectionRef.current) === null || _addressSectionRef$cu === void 0 ? void 0 : _addressSectionRef$cu.scrollIntoView({
|
|
1894
|
+
behavior: "smooth",
|
|
1895
|
+
block: "start"
|
|
1896
|
+
});
|
|
1897
|
+
}, 100);
|
|
1898
|
+
};
|
|
1899
|
+
const handleCompleteAll = addressDetails => {
|
|
1900
|
+
setAddressData(addressDetails);
|
|
1901
|
+
history.push("/digit-ui/employee/ekyc/property-info", {
|
|
1902
|
+
kNumber,
|
|
1903
|
+
selectedOption,
|
|
1904
|
+
connectionDetails,
|
|
1905
|
+
aadhaarDetails: {
|
|
1906
|
+
aadhaarLastFour,
|
|
1907
|
+
isAadhaarVerified,
|
|
1908
|
+
userName,
|
|
1909
|
+
mobileNumber,
|
|
1910
|
+
whatsappNumber,
|
|
1911
|
+
email,
|
|
1912
|
+
noOfPersons
|
|
1913
|
+
},
|
|
1914
|
+
addressDetails
|
|
1915
|
+
});
|
|
1916
|
+
};
|
|
1917
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
1918
|
+
className: "inbox-container"
|
|
1919
|
+
}, /*#__PURE__*/React.createElement("style", null, `
|
|
1920
|
+
@keyframes spin { to { transform: rotate(360deg); } }
|
|
1921
|
+
@keyframes fadeSlideIn { from { opacity:0; transform:translateY(10px); } to { opacity:1; transform:translateY(0); } }
|
|
1922
|
+
@keyframes pulseGreen { 0%,100% { box-shadow:0 0 0 0 rgba(22,163,74,0.4); } 50% { box-shadow:0 0 0 8px rgba(22,163,74,0); } }
|
|
1923
|
+
`), /*#__PURE__*/React.createElement("div", {
|
|
1924
|
+
className: "filters-container"
|
|
1925
|
+
}, /*#__PURE__*/React.createElement(Card, {
|
|
1926
|
+
className: "sidebar-title-card",
|
|
1927
|
+
style: {
|
|
1928
|
+
display: "flex",
|
|
1929
|
+
alignItems: "center",
|
|
1930
|
+
padding: "16px",
|
|
1931
|
+
marginBottom: "16px",
|
|
1932
|
+
borderRadius: "4px"
|
|
1933
|
+
}
|
|
1934
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
1935
|
+
className: "icon-container",
|
|
1936
|
+
style: {
|
|
1937
|
+
color: "#0068faff",
|
|
1938
|
+
marginRight: "12px"
|
|
1939
|
+
}
|
|
1940
|
+
}, /*#__PURE__*/React.createElement(HomeIcon, {
|
|
1941
|
+
style: {
|
|
1942
|
+
width: "24px",
|
|
1943
|
+
height: "24px"
|
|
1944
|
+
}
|
|
1945
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
1946
|
+
style: {
|
|
1947
|
+
fontWeight: "700",
|
|
1948
|
+
fontSize: "18px",
|
|
1949
|
+
color: "#0B0C0C"
|
|
1950
|
+
}
|
|
1951
|
+
}, t("EKYC_PROCESS"))), /*#__PURE__*/React.createElement("div", {
|
|
1952
|
+
style: {
|
|
1953
|
+
backgroundColor: "#FFFFFF",
|
|
1954
|
+
padding: "16px",
|
|
1955
|
+
borderRadius: "8px",
|
|
1956
|
+
border: "1px solid #EAECF0",
|
|
1957
|
+
boxShadow: "0 2px 4px rgba(0,0,0,0.02)"
|
|
1958
|
+
}
|
|
1959
|
+
}, /*#__PURE__*/React.createElement(ConnectingCheckPoints, null, /*#__PURE__*/React.createElement(CheckPoint, {
|
|
1960
|
+
label: t("EKYC_STEP_AADHAAR") || "Aadhaar",
|
|
1961
|
+
isCompleted: showAddressSection
|
|
1962
|
+
}), /*#__PURE__*/React.createElement(CheckPoint, {
|
|
1963
|
+
label: t("EKYC_STEP_ADDRESS") || "Address",
|
|
1964
|
+
isCompleted: addressData !== null
|
|
1965
|
+
}), /*#__PURE__*/React.createElement(CheckPoint, {
|
|
1966
|
+
label: t("EKYC_STEP_PROPERTY") || "Property",
|
|
1967
|
+
isCompleted: false
|
|
1968
|
+
}), /*#__PURE__*/React.createElement(CheckPoint, {
|
|
1969
|
+
label: t("EKYC_STEP_REVIEW") || "Review"
|
|
1970
|
+
})))), /*#__PURE__*/React.createElement("div", {
|
|
1971
|
+
style: {
|
|
1972
|
+
flex: 1,
|
|
1973
|
+
marginLeft: "16px"
|
|
1974
|
+
}
|
|
1975
|
+
}, /*#__PURE__*/React.createElement(Card, null, /*#__PURE__*/React.createElement("div", {
|
|
1976
|
+
style: {
|
|
1977
|
+
display: "flex",
|
|
1978
|
+
justifyContent: "space-between",
|
|
1979
|
+
alignItems: "center",
|
|
1980
|
+
marginBottom: "24px"
|
|
1981
|
+
}
|
|
1982
|
+
}, /*#__PURE__*/React.createElement(Header, null, t("EKYC_AADHAAR_VERIFICATION_HEADER") || "Aadhaar Verification"), /*#__PURE__*/React.createElement("div", {
|
|
1983
|
+
style: {
|
|
1984
|
+
fontSize: "14px",
|
|
1985
|
+
fontWeight: "700",
|
|
1986
|
+
color: "#505A5F"
|
|
1987
|
+
}
|
|
1988
|
+
}, t("EKYC_K_NUMBER"), ": ", /*#__PURE__*/React.createElement("span", {
|
|
1989
|
+
style: {
|
|
1990
|
+
color: "#0B0C0C"
|
|
1991
|
+
}
|
|
1992
|
+
}, kNumber))), /*#__PURE__*/React.createElement(CardHeader, {
|
|
1993
|
+
style: {
|
|
1994
|
+
fontSize: "20px",
|
|
1995
|
+
marginBottom: "16px"
|
|
1996
|
+
}
|
|
1997
|
+
}, t("EKYC_AADHAAR_NUMBER_HEADER") || "Aadhaar Number"), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
|
|
1998
|
+
style: {
|
|
1999
|
+
fontWeight: "600"
|
|
2000
|
+
}
|
|
2001
|
+
}, t("EKYC_LAST_4_DIGIT_AADHAAR") || "Last 4-digit Aadhaar Number"), /*#__PURE__*/React.createElement("div", {
|
|
2002
|
+
className: "field",
|
|
2003
|
+
style: {
|
|
2004
|
+
position: "relative"
|
|
2005
|
+
}
|
|
2006
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
2007
|
+
style: {
|
|
2008
|
+
position: "absolute",
|
|
2009
|
+
left: "12px",
|
|
2010
|
+
top: "50%",
|
|
2011
|
+
transform: "translateY(-50%)",
|
|
2012
|
+
zIndex: 1,
|
|
2013
|
+
opacity: 0.6
|
|
2014
|
+
}
|
|
2015
|
+
}, /*#__PURE__*/React.createElement(FingerprintIcon, {
|
|
2016
|
+
size: 20
|
|
2017
|
+
})), /*#__PURE__*/React.createElement(TextInput, {
|
|
2018
|
+
value: aadhaarLastFour,
|
|
2019
|
+
onChange: e => {
|
|
2020
|
+
const val = e.target.value;
|
|
2021
|
+
if (val.length <= 4 && /^\d*$/.test(val)) setAadhaarLastFour(val);
|
|
2022
|
+
},
|
|
2023
|
+
placeholder: t("EKYC_ENTER_LAST_4_DIGIT") || "Enter last 4 digits",
|
|
2024
|
+
textInputStyle: {
|
|
2025
|
+
paddingLeft: "40px"
|
|
2026
|
+
},
|
|
2027
|
+
maxLength: 4
|
|
2028
|
+
}), isAadhaarVerified && /*#__PURE__*/React.createElement("div", {
|
|
2029
|
+
style: {
|
|
2030
|
+
position: "absolute",
|
|
2031
|
+
right: "12px",
|
|
2032
|
+
top: "50%",
|
|
2033
|
+
transform: "translateY(-50%)"
|
|
2034
|
+
}
|
|
2035
|
+
}, /*#__PURE__*/React.createElement(TickMark, {
|
|
2036
|
+
fillColor: "#00703C"
|
|
2037
|
+
})))), !isAadhaarVerified && /*#__PURE__*/React.createElement(SubmitBar, {
|
|
2038
|
+
label: isVerifying ? t("EKYC_VERIFYING") || "Verifying..." : t("EKYC_VERIFY_AADHAAR_BTN") || "Verify Aadhaar",
|
|
2039
|
+
onSubmit: handleVerifyAadhaar,
|
|
2040
|
+
disabled: aadhaarLastFour.length !== 4 || isVerifying,
|
|
2041
|
+
style: {
|
|
2042
|
+
marginTop: "16px",
|
|
2043
|
+
opacity: aadhaarLastFour.length !== 4 ? 0.6 : 1
|
|
2044
|
+
}
|
|
2045
|
+
}), isAadhaarVerified && /*#__PURE__*/React.createElement("div", {
|
|
2046
|
+
style: {
|
|
2047
|
+
backgroundColor: "#E7F4EE",
|
|
2048
|
+
padding: "20px",
|
|
2049
|
+
borderRadius: "8px",
|
|
2050
|
+
marginTop: "24px",
|
|
2051
|
+
marginBottom: "24px",
|
|
2052
|
+
border: "1px solid #D1E9DB",
|
|
2053
|
+
animation: "fadeSlideIn 0.4s ease"
|
|
2054
|
+
}
|
|
2055
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
2056
|
+
style: {
|
|
2057
|
+
display: "flex",
|
|
2058
|
+
alignItems: "center",
|
|
2059
|
+
gap: "10px",
|
|
2060
|
+
marginBottom: "16px"
|
|
2061
|
+
}
|
|
2062
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
2063
|
+
style: {
|
|
2064
|
+
backgroundColor: "#D1E9DB",
|
|
2065
|
+
padding: "4px",
|
|
2066
|
+
borderRadius: "50%",
|
|
2067
|
+
display: "flex",
|
|
2068
|
+
animation: "pulseGreen 2s ease infinite"
|
|
2069
|
+
}
|
|
2070
|
+
}, /*#__PURE__*/React.createElement(TickMark, {
|
|
2071
|
+
fillColor: "#00703C"
|
|
2072
|
+
})), /*#__PURE__*/React.createElement("span", {
|
|
2073
|
+
style: {
|
|
2074
|
+
fontWeight: "700",
|
|
2075
|
+
color: "#00703C",
|
|
2076
|
+
fontSize: "18px"
|
|
2077
|
+
}
|
|
2078
|
+
}, t("EKYC_AADHAAR_VERIFIED_SUCCESS") || "Aadhaar Verified Successfully")), /*#__PURE__*/React.createElement("div", {
|
|
2079
|
+
style: {
|
|
2080
|
+
display: "grid",
|
|
2081
|
+
gridTemplateColumns: "1fr 1fr",
|
|
2082
|
+
gap: "16px"
|
|
2083
|
+
}
|
|
2084
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
2085
|
+
style: {
|
|
2086
|
+
display: "flex",
|
|
2087
|
+
flexDirection: "column"
|
|
2088
|
+
}
|
|
2089
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
2090
|
+
style: {
|
|
2091
|
+
color: "#667085",
|
|
2092
|
+
fontSize: "12px",
|
|
2093
|
+
fontWeight: "700",
|
|
2094
|
+
textTransform: "uppercase"
|
|
2095
|
+
}
|
|
2096
|
+
}, t("EKYC_NAME")), /*#__PURE__*/React.createElement("span", {
|
|
2097
|
+
style: {
|
|
2098
|
+
fontWeight: "700",
|
|
2099
|
+
fontSize: "16px",
|
|
2100
|
+
color: "#101828"
|
|
2101
|
+
}
|
|
2102
|
+
}, "Rajesh Kumar Singh")), /*#__PURE__*/React.createElement("div", {
|
|
2103
|
+
style: {
|
|
2104
|
+
display: "flex",
|
|
2105
|
+
flexDirection: "column"
|
|
2106
|
+
}
|
|
2107
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
2108
|
+
style: {
|
|
2109
|
+
color: "#667085",
|
|
2110
|
+
fontSize: "12px",
|
|
2111
|
+
fontWeight: "700",
|
|
2112
|
+
textTransform: "uppercase"
|
|
2113
|
+
}
|
|
2114
|
+
}, t("EKYC_AADHAAR")), /*#__PURE__*/React.createElement("span", {
|
|
2115
|
+
style: {
|
|
2116
|
+
fontWeight: "700",
|
|
2117
|
+
fontSize: "16px",
|
|
2118
|
+
color: "#101828"
|
|
2119
|
+
}
|
|
2120
|
+
}, "XXXX XXXX ", aadhaarLastFour)), /*#__PURE__*/React.createElement("div", {
|
|
2121
|
+
style: {
|
|
2122
|
+
display: "flex",
|
|
2123
|
+
flexDirection: "column",
|
|
2124
|
+
gridColumn: "span 2"
|
|
2125
|
+
}
|
|
2126
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
2127
|
+
style: {
|
|
2128
|
+
color: "#667085",
|
|
2129
|
+
fontSize: "12px",
|
|
2130
|
+
fontWeight: "700",
|
|
2131
|
+
textTransform: "uppercase"
|
|
2132
|
+
}
|
|
2133
|
+
}, t("EKYC_ADDRESS")), /*#__PURE__*/React.createElement("span", {
|
|
2134
|
+
style: {
|
|
2135
|
+
fontWeight: "500",
|
|
2136
|
+
fontSize: "15px",
|
|
2137
|
+
color: "#344054"
|
|
2138
|
+
}
|
|
2139
|
+
}, "House No. 45, Sector 12, New Delhi - 110001")))), /*#__PURE__*/React.createElement("hr", {
|
|
2140
|
+
style: {
|
|
2141
|
+
margin: "32px 0",
|
|
2142
|
+
border: "0",
|
|
2143
|
+
borderTop: "1px solid #EAECF0"
|
|
2144
|
+
}
|
|
2145
|
+
}), /*#__PURE__*/React.createElement(CardHeader, {
|
|
2146
|
+
style: {
|
|
2147
|
+
fontSize: "20px",
|
|
2148
|
+
marginBottom: "16px"
|
|
2149
|
+
}
|
|
2150
|
+
}, t("EKYC_CONTACT_DETAILS_HEADER") || "Contact Details"), /*#__PURE__*/React.createElement(LabelFieldPair, {
|
|
2151
|
+
style: {
|
|
2152
|
+
animation: "fadeSlideIn 0.3s ease"
|
|
2153
|
+
}
|
|
2154
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
2155
|
+
style: {
|
|
2156
|
+
display: "flex",
|
|
2157
|
+
alignItems: "center",
|
|
2158
|
+
gap: "20px"
|
|
2159
|
+
}
|
|
2160
|
+
}, /*#__PURE__*/React.createElement(CardLabel, {
|
|
2161
|
+
style: {
|
|
2162
|
+
fontWeight: "600",
|
|
2163
|
+
marginBottom: "0"
|
|
2164
|
+
}
|
|
2165
|
+
}, t("EKYC_USER_NAME") || "Corrected Name"), /*#__PURE__*/React.createElement(RadioButtons, {
|
|
2166
|
+
options: yesNoOptions,
|
|
2167
|
+
optionsKey: "name",
|
|
2168
|
+
selectedOption: nameCorrect,
|
|
2169
|
+
onSelect: setNameCorrect,
|
|
2170
|
+
t: t,
|
|
2171
|
+
innerStyles: {
|
|
2172
|
+
display: "flex",
|
|
2173
|
+
gap: "24px"
|
|
2174
|
+
},
|
|
2175
|
+
style: {
|
|
2176
|
+
display: "flex",
|
|
2177
|
+
gap: "50px",
|
|
2178
|
+
marginBottom: "0"
|
|
2179
|
+
}
|
|
2180
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
2181
|
+
className: "field",
|
|
2182
|
+
style: {
|
|
2183
|
+
position: "relative"
|
|
2184
|
+
}
|
|
2185
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
2186
|
+
style: {
|
|
2187
|
+
position: "absolute",
|
|
2188
|
+
left: "12px",
|
|
2189
|
+
top: "50%",
|
|
2190
|
+
transform: "translateY(-50%)",
|
|
2191
|
+
zIndex: 1,
|
|
2192
|
+
opacity: nameCorrect.code === "YES" ? 0.6 : 0.3
|
|
2193
|
+
}
|
|
2194
|
+
}, /*#__PURE__*/React.createElement(UserIcon, {
|
|
2195
|
+
size: 18,
|
|
2196
|
+
color: nameCorrect.code === "YES" ? "#64748b" : "#94a3b8"
|
|
2197
|
+
})), /*#__PURE__*/React.createElement(TextInput, {
|
|
2198
|
+
value: userName,
|
|
2199
|
+
onChange: e => setUserName(e.target.value),
|
|
2200
|
+
placeholder: t("EKYC_ENTER_NAME_PLACEHOLDER") || "Enter full name",
|
|
2201
|
+
textInputStyle: {
|
|
2202
|
+
paddingLeft: "40px"
|
|
2203
|
+
},
|
|
2204
|
+
disabled: nameCorrect.code !== "YES"
|
|
2205
|
+
}))), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement("div", {
|
|
2206
|
+
style: {
|
|
2207
|
+
display: "flex",
|
|
2208
|
+
alignItems: "center",
|
|
2209
|
+
gap: "20px",
|
|
2210
|
+
padding: "10px"
|
|
2211
|
+
}
|
|
2212
|
+
}, /*#__PURE__*/React.createElement(CardLabel, {
|
|
2213
|
+
style: {
|
|
2214
|
+
fontWeight: "600",
|
|
2215
|
+
marginBottom: "0"
|
|
2216
|
+
}
|
|
2217
|
+
}, t("EKYC_USER_MOBILE_NUMBER") || "User Mobile Number"), /*#__PURE__*/React.createElement(RadioButtons, {
|
|
2218
|
+
options: yesNoOptions,
|
|
2219
|
+
optionsKey: "name",
|
|
2220
|
+
selectedOption: mobileChange,
|
|
2221
|
+
onSelect: setMobileChange,
|
|
2222
|
+
t: t,
|
|
2223
|
+
innerStyles: {
|
|
2224
|
+
display: "flex",
|
|
2225
|
+
gap: "24px"
|
|
2226
|
+
},
|
|
2227
|
+
style: {
|
|
2228
|
+
display: "flex",
|
|
2229
|
+
gap: "50px",
|
|
2230
|
+
marginBottom: "0"
|
|
2231
|
+
}
|
|
2232
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
2233
|
+
className: "field",
|
|
2234
|
+
style: {
|
|
2235
|
+
position: "relative"
|
|
2236
|
+
}
|
|
2237
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
2238
|
+
style: {
|
|
2239
|
+
position: "absolute",
|
|
2240
|
+
left: "12px",
|
|
2241
|
+
top: "50%",
|
|
2242
|
+
transform: "translateY(-50%)",
|
|
2243
|
+
zIndex: 1,
|
|
2244
|
+
opacity: mobileChange.code === "YES" ? 0.6 : 0.3
|
|
2245
|
+
}
|
|
2246
|
+
}, /*#__PURE__*/React.createElement(PhoneIcon, {
|
|
2247
|
+
size: 18,
|
|
2248
|
+
color: mobileChange.code === "YES" ? "#64748b" : "#94a3b8"
|
|
2249
|
+
})), /*#__PURE__*/React.createElement(TextInput, {
|
|
2250
|
+
value: mobileNumber,
|
|
2251
|
+
onChange: e => setMobileNumber(e.target.value),
|
|
2252
|
+
placeholder: "+91 XXXXX XXXXX",
|
|
2253
|
+
textInputStyle: {
|
|
2254
|
+
paddingLeft: "40px"
|
|
2255
|
+
},
|
|
2256
|
+
disabled: mobileChange.code !== "YES"
|
|
2257
|
+
}))), /*#__PURE__*/React.createElement("div", {
|
|
2258
|
+
style: {
|
|
2259
|
+
display: "grid",
|
|
2260
|
+
gridTemplateColumns: "1fr 1fr",
|
|
2261
|
+
gap: "24px",
|
|
2262
|
+
marginTop: "24px"
|
|
2263
|
+
}
|
|
2264
|
+
}, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
|
|
2265
|
+
style: {
|
|
2266
|
+
fontWeight: "600"
|
|
2267
|
+
}
|
|
2268
|
+
}, t("EKYC_WHATSAPP_NUMBER") || "WhatsApp Number"), /*#__PURE__*/React.createElement("div", {
|
|
2269
|
+
className: "field",
|
|
2270
|
+
style: {
|
|
2271
|
+
position: "relative"
|
|
2272
|
+
}
|
|
2273
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
2274
|
+
style: {
|
|
2275
|
+
position: "absolute",
|
|
2276
|
+
left: "12px",
|
|
2277
|
+
top: "50%",
|
|
2278
|
+
transform: "translateY(-50%)",
|
|
2279
|
+
zIndex: 1,
|
|
2280
|
+
opacity: 0.6
|
|
2281
|
+
}
|
|
2282
|
+
}, /*#__PURE__*/React.createElement(WhatsappIcon, {
|
|
2283
|
+
size: 18
|
|
2284
|
+
})), /*#__PURE__*/React.createElement(TextInput, {
|
|
2285
|
+
value: whatsappNumber,
|
|
2286
|
+
onChange: e => setWhatsappNumber(e.target.value),
|
|
2287
|
+
placeholder: "+91 XXXXX XXXXX",
|
|
2288
|
+
textInputStyle: {
|
|
2289
|
+
paddingLeft: "40px"
|
|
2290
|
+
}
|
|
2291
|
+
}))), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
|
|
2292
|
+
style: {
|
|
2293
|
+
fontWeight: "600"
|
|
2294
|
+
}
|
|
2295
|
+
}, t("EKYC_EMAIL_ADDRESS") || "Email Address", " ", /*#__PURE__*/React.createElement("span", {
|
|
2296
|
+
style: {
|
|
2297
|
+
fontWeight: "400",
|
|
2298
|
+
color: "#667085"
|
|
2299
|
+
}
|
|
2300
|
+
}, "(", t("EKYC_OPTIONAL") || "Optional", ")")), /*#__PURE__*/React.createElement("div", {
|
|
2301
|
+
className: "field",
|
|
2302
|
+
style: {
|
|
2303
|
+
position: "relative"
|
|
2304
|
+
}
|
|
2305
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
2306
|
+
style: {
|
|
2307
|
+
position: "absolute",
|
|
2308
|
+
left: "12px",
|
|
2309
|
+
top: "50%",
|
|
2310
|
+
transform: "translateY(-50%)",
|
|
2311
|
+
zIndex: 1,
|
|
2312
|
+
opacity: 0.6
|
|
2313
|
+
}
|
|
2314
|
+
}, /*#__PURE__*/React.createElement(MailIcon, {
|
|
2315
|
+
size: 18
|
|
2316
|
+
})), /*#__PURE__*/React.createElement(TextInput, {
|
|
2317
|
+
value: email,
|
|
2318
|
+
onChange: e => setEmail(e.target.value),
|
|
2319
|
+
placeholder: t("EKYC_EMAIL_ADDRESS_PLACEHOLDER") || "example@email.com",
|
|
2320
|
+
textInputStyle: {
|
|
2321
|
+
paddingLeft: "40px"
|
|
2322
|
+
}
|
|
2323
|
+
})))), /*#__PURE__*/React.createElement("hr", {
|
|
2324
|
+
style: {
|
|
2325
|
+
margin: "32px 0",
|
|
2326
|
+
border: "0",
|
|
2327
|
+
borderTop: "1px solid #EAECF0"
|
|
2328
|
+
}
|
|
2329
|
+
}), /*#__PURE__*/React.createElement(CardHeader, {
|
|
2330
|
+
style: {
|
|
2331
|
+
fontSize: "20px",
|
|
2332
|
+
marginBottom: "16px"
|
|
2333
|
+
}
|
|
2334
|
+
}, t("EKYC_FAMILY_DETAILS_HEADER") || "Family Details"), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
|
|
2335
|
+
style: {
|
|
2336
|
+
fontWeight: "600"
|
|
2337
|
+
}
|
|
2338
|
+
}, t("EKYC_NO_OF_PERSONS") || "Number of Family Members"), /*#__PURE__*/React.createElement("div", {
|
|
2339
|
+
className: "field",
|
|
2340
|
+
style: {
|
|
2341
|
+
position: "relative"
|
|
2342
|
+
}
|
|
2343
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
2344
|
+
style: {
|
|
2345
|
+
position: "absolute",
|
|
2346
|
+
left: "12px",
|
|
2347
|
+
top: "50%",
|
|
2348
|
+
transform: "translateY(-50%)",
|
|
2349
|
+
zIndex: 1,
|
|
2350
|
+
opacity: 0.6
|
|
2351
|
+
}
|
|
2352
|
+
}, /*#__PURE__*/React.createElement(UsersIcon, {
|
|
2353
|
+
size: 18
|
|
2354
|
+
})), /*#__PURE__*/React.createElement(TextInput, {
|
|
2355
|
+
value: noOfPersons,
|
|
2356
|
+
onChange: e => {
|
|
2357
|
+
if (/^\d*$/.test(e.target.value)) setNoOfPersons(e.target.value);
|
|
2358
|
+
},
|
|
2359
|
+
placeholder: t("EKYC_ENTER_NO_OF_PERSONS") || "Enter total number of persons",
|
|
2360
|
+
textInputStyle: {
|
|
2361
|
+
paddingLeft: "40px"
|
|
2362
|
+
}
|
|
2363
|
+
}))), !showAddressSection && /*#__PURE__*/React.createElement(ActionBar, null, /*#__PURE__*/React.createElement(SubmitBar, {
|
|
2364
|
+
label: t("ES_COMMON_SAVE_CONTINUE") || "Save & Continue",
|
|
2365
|
+
onSubmit: handleSaveAndContinueAadhaar
|
|
2366
|
+
})), showAddressSection && /*#__PURE__*/React.createElement("div", {
|
|
2367
|
+
ref: addressSectionRef
|
|
2368
|
+
}, /*#__PURE__*/React.createElement(AddressDetails, {
|
|
2369
|
+
isSection: true,
|
|
2370
|
+
onComplete: handleCompleteAll,
|
|
2371
|
+
parentState: {
|
|
2372
|
+
kNumber,
|
|
2373
|
+
selectedOption,
|
|
2374
|
+
connectionDetails
|
|
2375
|
+
}
|
|
2376
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
2377
|
+
style: {
|
|
2378
|
+
textAlign: "center",
|
|
2379
|
+
marginTop: "24px"
|
|
2380
|
+
}
|
|
2381
|
+
}, /*#__PURE__*/React.createElement("p", {
|
|
2382
|
+
style: {
|
|
2383
|
+
fontSize: "12px",
|
|
2384
|
+
color: "#667085",
|
|
2385
|
+
display: "flex",
|
|
2386
|
+
alignItems: "center",
|
|
2387
|
+
justifyContent: "center",
|
|
2388
|
+
gap: "4px"
|
|
2389
|
+
}
|
|
2390
|
+
}, /*#__PURE__*/React.createElement("svg", {
|
|
2391
|
+
width: "12",
|
|
2392
|
+
height: "12",
|
|
2393
|
+
viewBox: "0 0 24 24",
|
|
2394
|
+
fill: "none",
|
|
2395
|
+
stroke: "currentColor",
|
|
2396
|
+
strokeWidth: "2"
|
|
2397
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
2398
|
+
d: "M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z"
|
|
2399
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
2400
|
+
d: "M12 11V17M12 7H12.01",
|
|
2401
|
+
strokeLinecap: "round"
|
|
2402
|
+
})), t("EKYC_SECURE_DATA_NOTICE") || "Your data is encrypted and secure")))));
|
|
2403
|
+
};
|
|
2404
|
+
|
|
2405
|
+
const PropertyInfo = () => {
|
|
2406
|
+
var _dataV0$wsServicesC, _dataV0$wsServicesC$p, _data$wsServicesCal, _data$wsServicesCal$c, _dataV1$wsServicesC, _dataV1$wsServicesC$u, _dataV2$wsServicesC, _dataV2$wsServicesC$f;
|
|
2407
|
+
const {
|
|
2408
|
+
t
|
|
2409
|
+
} = useTranslation();
|
|
2410
|
+
const history = useHistory();
|
|
2411
|
+
const location = useLocation();
|
|
2412
|
+
const {
|
|
2413
|
+
kNumber
|
|
2414
|
+
} = location.state || {
|
|
2415
|
+
kNumber: "EKYC-1234567890"
|
|
2416
|
+
};
|
|
2417
|
+
const tenantId = Digit.ULBService.getCurrentTenantId();
|
|
2418
|
+
const {
|
|
2419
|
+
data: dataV0,
|
|
2420
|
+
isLoading: isLoadingV0
|
|
2421
|
+
} = Digit.Hooks.ekyc.useGetPropertyType(tenantId);
|
|
2422
|
+
const {
|
|
2423
|
+
data,
|
|
2424
|
+
isLoading
|
|
2425
|
+
} = Digit.Hooks.ekyc.useGetConnectionTypeV2(tenantId);
|
|
2426
|
+
const {
|
|
2427
|
+
data: dataV1,
|
|
2428
|
+
isLoading: isLoadingV1
|
|
2429
|
+
} = Digit.Hooks.ekyc.useGetUserType(tenantId);
|
|
2430
|
+
const {
|
|
2431
|
+
data: dataV2,
|
|
2432
|
+
isLoading: isLoadingV2
|
|
2433
|
+
} = Digit.Hooks.ekyc.useGetFloorCount(tenantId);
|
|
2434
|
+
const [ownerType, setOwnerType] = useState("OWNER");
|
|
2435
|
+
const [pidNumber, setPidNumber] = useState("");
|
|
2436
|
+
const [connectionType, setConnectionType] = useState(null);
|
|
2437
|
+
const [connectionCategory, setConnectionCategory] = useState(null);
|
|
2438
|
+
const [userType, setUserType] = useState(null);
|
|
2439
|
+
const [noOfFloors, setNoOfFloors] = useState(null);
|
|
2440
|
+
const [propertyDocument, setPropertyDocument] = useState(null);
|
|
2441
|
+
const [buildingPhoto, setBuildingPhoto] = useState(null);
|
|
2442
|
+
const fileRef = useRef(null);
|
|
2443
|
+
const cameraRef = useRef(null);
|
|
2444
|
+
const handleSaveAndContinue = () => {
|
|
2445
|
+
history.push("/digit-ui/employee/ekyc/review", {
|
|
2446
|
+
...location.state,
|
|
2447
|
+
propertyDetails: {
|
|
2448
|
+
ownerType,
|
|
2449
|
+
pidNumber,
|
|
2450
|
+
connectionType,
|
|
2451
|
+
connectionCategory,
|
|
2452
|
+
userType,
|
|
2453
|
+
noOfFloors,
|
|
2454
|
+
propertyDocument,
|
|
2455
|
+
buildingPhoto
|
|
2456
|
+
}
|
|
2457
|
+
});
|
|
2458
|
+
};
|
|
2459
|
+
const SuitcaseIcon = () => /*#__PURE__*/React.createElement("div", {
|
|
2460
|
+
style: {
|
|
2461
|
+
backgroundColor: "#E8EAF6",
|
|
2462
|
+
padding: "8px",
|
|
2463
|
+
borderRadius: "8px",
|
|
2464
|
+
display: "flex",
|
|
2465
|
+
alignItems: "center",
|
|
2466
|
+
justifyContent: "center"
|
|
2467
|
+
}
|
|
2468
|
+
}, /*#__PURE__*/React.createElement("svg", {
|
|
2469
|
+
width: "24",
|
|
2470
|
+
height: "24",
|
|
2471
|
+
viewBox: "0 0 24 24",
|
|
2472
|
+
fill: "none",
|
|
2473
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
2474
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
2475
|
+
d: "M20 6H16V4C16 2.89 15.11 2 14 2H10C8.89 2 8 2.89 8 4V6H4C2.89 6 2 6.89 2 8V19C2 20.11 2.89 21 4 21H20C21.11 21 22 20.11 22 19V8C22 6.89 21.11 6 20 6ZM10 4H14V6H10V4ZM20 19H4V8H20V19ZM13 13V10H11V13H8L12 17L16 13H13Z",
|
|
2476
|
+
fill: "#3D51B0"
|
|
2477
|
+
})));
|
|
2478
|
+
const BuildingIcon = () => /*#__PURE__*/React.createElement("div", {
|
|
2479
|
+
style: {
|
|
2480
|
+
backgroundColor: "#E8EAF6",
|
|
2481
|
+
padding: "8px",
|
|
2482
|
+
borderRadius: "8px",
|
|
2483
|
+
display: "flex",
|
|
2484
|
+
alignItems: "center",
|
|
2485
|
+
justifyContent: "center"
|
|
2486
|
+
}
|
|
2487
|
+
}, /*#__PURE__*/React.createElement("svg", {
|
|
2488
|
+
width: "24",
|
|
2489
|
+
height: "24",
|
|
2490
|
+
viewBox: "0 0 24 24",
|
|
2491
|
+
fill: "none",
|
|
2492
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
2493
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
2494
|
+
d: "M12 7V3H2V21H22V7H12ZM6 19H4V17H6V19ZM6 15H4V13H6V15ZM6 11H4V9H6V11ZM6 7H4V5H6V7ZM10 19H8V17H10V19ZM10 15H8V13H10V15ZM10 11H8V9H10V11ZM10 7H8V5H10V7ZM20 19H12V9H20V19ZM18 11H14V13H18V11ZM18 15H14V17H18V15Z",
|
|
2495
|
+
fill: "#3D51B0"
|
|
2496
|
+
})));
|
|
2497
|
+
const PdfIcon = () => /*#__PURE__*/React.createElement("svg", {
|
|
2498
|
+
width: "48",
|
|
2499
|
+
height: "48",
|
|
2500
|
+
viewBox: "0 0 24 24",
|
|
2501
|
+
fill: "none",
|
|
2502
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
2503
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
2504
|
+
d: "M14 2H6C4.9 2 4 2.9 4 4V20C4 21.1 4.9 22 6 22H18C19.1 22 20 21.1 20 20V8L14 2ZM13 9V3.5L18.5 9H13Z",
|
|
2505
|
+
fill: "#1976D2"
|
|
2506
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
2507
|
+
d: "M11 14H13V18H11V14ZM11 12H13V13H11V12Z",
|
|
2508
|
+
fill: "white"
|
|
2509
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
2510
|
+
d: "M8 16H9V17H8V16Z",
|
|
2511
|
+
fill: "white"
|
|
2512
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
2513
|
+
d: "M15 16H16V17H15V16Z",
|
|
2514
|
+
fill: "white"
|
|
2515
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
2516
|
+
d: "M12 15.5L14 13.5H10L12 15.5Z",
|
|
2517
|
+
fill: "white"
|
|
2518
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
2519
|
+
d: "M12 18V14M12 14L10 16M12 14L14 16",
|
|
2520
|
+
stroke: "white",
|
|
2521
|
+
strokeWidth: "2",
|
|
2522
|
+
strokeLinecap: "round",
|
|
2523
|
+
strokeLinejoin: "round"
|
|
2524
|
+
}));
|
|
2525
|
+
const CameraIcon = () => /*#__PURE__*/React.createElement("svg", {
|
|
2526
|
+
width: "32",
|
|
2527
|
+
height: "32",
|
|
2528
|
+
viewBox: "0 0 24 24",
|
|
2529
|
+
fill: "none",
|
|
2530
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
2531
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
2532
|
+
d: "M9 2L7.17 4H4C2.9 4 2 4.9 2 6V18C2 19.1 2.9 20 4 20H20C21.1 20 22 19.1 22 18V6C22 4.9 21.1 4 20 4H16.83L15 2H9ZM12 17C9.24 17 7 14.76 7 12C7 9.24 9.24 7 12 7C14.76 7 17 9.24 17 12C17 14.76 14.76 17 12 17ZM12 9C10.34 9 9 10.34 9 12C9 13.66 10.34 15 12 15C13.66 15 15 13.66 15 12C15 10.34 13.66 9 12 9Z",
|
|
2533
|
+
fill: "#3D51B0"
|
|
2534
|
+
}));
|
|
2535
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
2536
|
+
className: "inbox-container"
|
|
2537
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
2538
|
+
className: "filters-container"
|
|
2539
|
+
}, /*#__PURE__*/React.createElement(Card, {
|
|
2540
|
+
className: "sidebar-title-card",
|
|
2541
|
+
style: {
|
|
2542
|
+
display: "flex",
|
|
2543
|
+
alignItems: "center",
|
|
2544
|
+
padding: "16px",
|
|
2545
|
+
marginBottom: "16px",
|
|
2546
|
+
borderRadius: "4px"
|
|
2547
|
+
}
|
|
2548
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
2549
|
+
className: "icon-container",
|
|
2550
|
+
style: {
|
|
2551
|
+
color: "#0068faff",
|
|
2552
|
+
marginRight: "12px"
|
|
2553
|
+
}
|
|
2554
|
+
}, /*#__PURE__*/React.createElement(HomeIcon, {
|
|
2555
|
+
style: {
|
|
2556
|
+
width: "24px",
|
|
2557
|
+
height: "24px"
|
|
2558
|
+
}
|
|
2559
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
2560
|
+
style: {
|
|
2561
|
+
fontWeight: "700",
|
|
2562
|
+
fontSize: "18px",
|
|
2563
|
+
color: "#0B0C0C"
|
|
2564
|
+
}
|
|
2565
|
+
}, t("EKYC_PROCESS"))), /*#__PURE__*/React.createElement("div", {
|
|
2566
|
+
style: {
|
|
2567
|
+
backgroundColor: "#FFFFFF",
|
|
2568
|
+
padding: "16px",
|
|
2569
|
+
borderRadius: "8px",
|
|
2570
|
+
border: "1px solid #EAECF0",
|
|
2571
|
+
boxShadow: "0 2px 4px rgba(0,0,0,0.02)"
|
|
2572
|
+
}
|
|
2573
|
+
}, /*#__PURE__*/React.createElement(ConnectingCheckPoints, null, /*#__PURE__*/React.createElement(CheckPoint, {
|
|
2574
|
+
label: t("EKYC_STEP_AADHAAR") || "Aadhaar",
|
|
2575
|
+
isCompleted: true
|
|
2576
|
+
}), /*#__PURE__*/React.createElement(CheckPoint, {
|
|
2577
|
+
label: t("EKYC_STEP_ADDRESS") || "Address",
|
|
2578
|
+
isCompleted: true
|
|
2579
|
+
}), /*#__PURE__*/React.createElement(CheckPoint, {
|
|
2580
|
+
label: t("EKYC_STEP_PROPERTY") || "Property",
|
|
2581
|
+
isCompleted: false
|
|
2582
|
+
}), /*#__PURE__*/React.createElement(CheckPoint, {
|
|
2583
|
+
label: t("EKYC_STEP_REVIEW") || "Review"
|
|
2584
|
+
})))), /*#__PURE__*/React.createElement("div", {
|
|
2585
|
+
style: {
|
|
2586
|
+
flex: 1,
|
|
2587
|
+
marginLeft: "16px"
|
|
2588
|
+
}
|
|
2589
|
+
}, /*#__PURE__*/React.createElement(Card, null, /*#__PURE__*/React.createElement("div", {
|
|
2590
|
+
style: {
|
|
2591
|
+
display: "flex",
|
|
2592
|
+
justifyContent: "space-between",
|
|
2593
|
+
alignItems: "center",
|
|
2594
|
+
marginBottom: "24px"
|
|
2595
|
+
}
|
|
2596
|
+
}, /*#__PURE__*/React.createElement(Header, null, t("Property Details")), /*#__PURE__*/React.createElement("div", {
|
|
2597
|
+
style: {
|
|
2598
|
+
fontSize: "14px",
|
|
2599
|
+
fontWeight: "700",
|
|
2600
|
+
color: "#505A5F"
|
|
2601
|
+
}
|
|
2602
|
+
}, t("EKYC_K_NUMBER"), ": ", /*#__PURE__*/React.createElement("span", {
|
|
2603
|
+
style: {
|
|
2604
|
+
color: "#0B0C0C"
|
|
2605
|
+
}
|
|
2606
|
+
}, kNumber))), /*#__PURE__*/React.createElement("div", {
|
|
2607
|
+
style: {
|
|
2608
|
+
display: "flex",
|
|
2609
|
+
alignItems: "center",
|
|
2610
|
+
gap: "12px",
|
|
2611
|
+
marginBottom: "24px"
|
|
2612
|
+
}
|
|
2613
|
+
}, /*#__PURE__*/React.createElement(SuitcaseIcon, null), /*#__PURE__*/React.createElement("span", {
|
|
2614
|
+
style: {
|
|
2615
|
+
fontSize: "20px",
|
|
2616
|
+
fontWeight: "700",
|
|
2617
|
+
color: "#101828"
|
|
2618
|
+
}
|
|
2619
|
+
}, t("Property Details"))), /*#__PURE__*/React.createElement(Card, {
|
|
2620
|
+
style: {
|
|
2621
|
+
padding: "20px",
|
|
2622
|
+
borderRadius: "16px",
|
|
2623
|
+
border: "1px solid #EAECF0",
|
|
2624
|
+
marginBottom: "24px"
|
|
2625
|
+
}
|
|
2626
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
2627
|
+
style: {
|
|
2628
|
+
marginBottom: "24px"
|
|
2629
|
+
}
|
|
2630
|
+
}, /*#__PURE__*/React.createElement(CardLabel, {
|
|
2631
|
+
style: {
|
|
2632
|
+
fontSize: "14px",
|
|
2633
|
+
fontWeight: "600",
|
|
2634
|
+
color: "#667085",
|
|
2635
|
+
marginBottom: "12px"
|
|
2636
|
+
}
|
|
2637
|
+
}, t("Property_Owner")), /*#__PURE__*/React.createElement("div", {
|
|
2638
|
+
style: {
|
|
2639
|
+
display: "flex",
|
|
2640
|
+
backgroundColor: "#F2F4F7",
|
|
2641
|
+
padding: "4px",
|
|
2642
|
+
borderRadius: "12px"
|
|
2643
|
+
}
|
|
2644
|
+
}, /*#__PURE__*/React.createElement("button", {
|
|
2645
|
+
onClick: () => setOwnerType("OWNER"),
|
|
2646
|
+
style: {
|
|
2647
|
+
flex: 1,
|
|
2648
|
+
padding: "10px",
|
|
2649
|
+
borderRadius: "10px",
|
|
2650
|
+
border: "none",
|
|
2651
|
+
backgroundColor: ownerType === "OWNER" ? "#3D51B0" : "transparent",
|
|
2652
|
+
color: ownerType === "OWNER" ? "#FFFFFF" : "#667085",
|
|
2653
|
+
fontWeight: "600",
|
|
2654
|
+
cursor: "pointer",
|
|
2655
|
+
transition: "all 0.2s"
|
|
2656
|
+
}
|
|
2657
|
+
}, t("Owner")), /*#__PURE__*/React.createElement("button", {
|
|
2658
|
+
onClick: () => setOwnerType("TENANT"),
|
|
2659
|
+
style: {
|
|
2660
|
+
flex: 1,
|
|
2661
|
+
padding: "10px",
|
|
2662
|
+
borderRadius: "10px",
|
|
2663
|
+
border: "none",
|
|
2664
|
+
backgroundColor: ownerType === "TENANT" ? "#3D51B0" : "transparent",
|
|
2665
|
+
color: ownerType === "TENANT" ? "#FFFFFF" : "#667085",
|
|
2666
|
+
fontWeight: "600",
|
|
2667
|
+
cursor: "pointer",
|
|
2668
|
+
transition: "all 0.2s"
|
|
2669
|
+
}
|
|
2670
|
+
}, t("Tenant")))), /*#__PURE__*/React.createElement("div", {
|
|
2671
|
+
style: {
|
|
2672
|
+
marginBottom: "8px"
|
|
2673
|
+
}
|
|
2674
|
+
}, /*#__PURE__*/React.createElement(CardLabel, {
|
|
2675
|
+
style: {
|
|
2676
|
+
fontSize: "14px",
|
|
2677
|
+
fontWeight: "600",
|
|
2678
|
+
color: "#667085",
|
|
2679
|
+
marginBottom: "12px"
|
|
2680
|
+
}
|
|
2681
|
+
}, t("PID_Number"), " ", /*#__PURE__*/React.createElement("span", {
|
|
2682
|
+
style: {
|
|
2683
|
+
fontStyle: "italic",
|
|
2684
|
+
fontWeight: "400",
|
|
2685
|
+
color: "#98A2B3"
|
|
2686
|
+
}
|
|
2687
|
+
}, t("Optional"))), /*#__PURE__*/React.createElement("div", {
|
|
2688
|
+
className: "field",
|
|
2689
|
+
style: {
|
|
2690
|
+
position: "relative"
|
|
2691
|
+
}
|
|
2692
|
+
}, /*#__PURE__*/React.createElement(TextInput, {
|
|
2693
|
+
value: pidNumber,
|
|
2694
|
+
onChange: e => setPidNumber(e.target.value),
|
|
2695
|
+
placeholder: t("Enter_PID_Number"),
|
|
2696
|
+
textInputStyle: {
|
|
2697
|
+
paddingLeft: "44px",
|
|
2698
|
+
borderRadius: "12px",
|
|
2699
|
+
border: "1px solid #D0D5DD",
|
|
2700
|
+
height: "56px"
|
|
2701
|
+
}
|
|
2702
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
2703
|
+
style: {
|
|
2704
|
+
position: "absolute",
|
|
2705
|
+
left: "16px",
|
|
2706
|
+
top: "50%",
|
|
2707
|
+
transform: "translateY(-50%)",
|
|
2708
|
+
color: "#3D51B0",
|
|
2709
|
+
fontSize: "20px",
|
|
2710
|
+
fontWeight: "600"
|
|
2711
|
+
}
|
|
2712
|
+
}, "#")))), /*#__PURE__*/React.createElement("div", {
|
|
2713
|
+
style: {
|
|
2714
|
+
display: "flex",
|
|
2715
|
+
alignItems: "center",
|
|
2716
|
+
gap: "12px",
|
|
2717
|
+
marginBottom: "24px"
|
|
2718
|
+
}
|
|
2719
|
+
}, /*#__PURE__*/React.createElement(BuildingIcon, null), /*#__PURE__*/React.createElement("span", {
|
|
2720
|
+
style: {
|
|
2721
|
+
fontSize: "20px",
|
|
2722
|
+
fontWeight: "700",
|
|
2723
|
+
color: "#101828"
|
|
2724
|
+
}
|
|
2725
|
+
}, t("Building_Info"))), /*#__PURE__*/React.createElement(Card, {
|
|
2726
|
+
style: {
|
|
2727
|
+
padding: "20px",
|
|
2728
|
+
borderRadius: "16px",
|
|
2729
|
+
border: "1px solid #EAECF0",
|
|
2730
|
+
marginBottom: "24px"
|
|
2731
|
+
}
|
|
2732
|
+
}, [{
|
|
2733
|
+
label: "Type_of_Connection",
|
|
2734
|
+
state: connectionCategory,
|
|
2735
|
+
setState: setConnectionCategory,
|
|
2736
|
+
options: (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 => ({
|
|
2737
|
+
label: t(item.code),
|
|
2738
|
+
value: item.code
|
|
2739
|
+
}))) || []
|
|
2740
|
+
}, {
|
|
2741
|
+
label: "Connection_Category",
|
|
2742
|
+
state: connectionType,
|
|
2743
|
+
setState: setConnectionType,
|
|
2744
|
+
options: (data === null || data === void 0 ? void 0 : (_data$wsServicesCal = data["ws-services-calculation"]) === null || _data$wsServicesCal === void 0 ? void 0 : (_data$wsServicesCal$c = _data$wsServicesCal.connectionTypeV2) === null || _data$wsServicesCal$c === void 0 ? void 0 : _data$wsServicesCal$c.map(item => ({
|
|
2745
|
+
label: t(item.code),
|
|
2746
|
+
value: item.code
|
|
2747
|
+
}))) || []
|
|
2748
|
+
}, {
|
|
2749
|
+
label: "User_Type",
|
|
2750
|
+
state: userType,
|
|
2751
|
+
setState: setUserType,
|
|
2752
|
+
options: (dataV1 === null || dataV1 === void 0 ? void 0 : (_dataV1$wsServicesC = dataV1["ws-services-calculation"]) === null || _dataV1$wsServicesC === void 0 ? void 0 : (_dataV1$wsServicesC$u = _dataV1$wsServicesC.userTypeV2) === null || _dataV1$wsServicesC$u === void 0 ? void 0 : _dataV1$wsServicesC$u.map(item => ({
|
|
2753
|
+
label: t(item.code),
|
|
2754
|
+
value: item.code
|
|
2755
|
+
}))) || []
|
|
2756
|
+
}, {
|
|
2757
|
+
label: "No_of_Floor",
|
|
2758
|
+
state: noOfFloors,
|
|
2759
|
+
setState: setNoOfFloors,
|
|
2760
|
+
options: (dataV2 === null || dataV2 === void 0 ? void 0 : (_dataV2$wsServicesC = dataV2["ws-services-calculation"]) === null || _dataV2$wsServicesC === void 0 ? void 0 : (_dataV2$wsServicesC$f = _dataV2$wsServicesC.floorCount) === null || _dataV2$wsServicesC$f === void 0 ? void 0 : _dataV2$wsServicesC$f.map(item => ({
|
|
2761
|
+
label: t(item.code),
|
|
2762
|
+
value: item.code
|
|
2763
|
+
}))) || []
|
|
2764
|
+
}].map((item, idx) => /*#__PURE__*/React.createElement("div", {
|
|
2765
|
+
key: idx,
|
|
2766
|
+
style: {
|
|
2767
|
+
marginBottom: "20px"
|
|
2768
|
+
}
|
|
2769
|
+
}, /*#__PURE__*/React.createElement(CardLabel, {
|
|
2770
|
+
style: {
|
|
2771
|
+
fontSize: "14px",
|
|
2772
|
+
fontWeight: "600",
|
|
2773
|
+
color: "#344054",
|
|
2774
|
+
marginBottom: "8px"
|
|
2775
|
+
}
|
|
2776
|
+
}, t(item.label)), /*#__PURE__*/React.createElement(Dropdown, {
|
|
2777
|
+
selected: item.state,
|
|
2778
|
+
select: item.setState,
|
|
2779
|
+
option: item.options || [{
|
|
2780
|
+
label: `Select ${item.label}`,
|
|
2781
|
+
value: ""
|
|
2782
|
+
}],
|
|
2783
|
+
optionKey: "label",
|
|
2784
|
+
t: t,
|
|
2785
|
+
style: {
|
|
2786
|
+
borderRadius: "12px",
|
|
2787
|
+
border: "1px solid #D0D5DD",
|
|
2788
|
+
height: "48px"
|
|
2789
|
+
}
|
|
2790
|
+
}))), /*#__PURE__*/React.createElement("div", {
|
|
2791
|
+
style: {
|
|
2792
|
+
display: "flex",
|
|
2793
|
+
gap: "24px",
|
|
2794
|
+
alignItems: "stretch",
|
|
2795
|
+
flexWrap: "wrap"
|
|
2796
|
+
}
|
|
2797
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
2798
|
+
style: {
|
|
2799
|
+
flex: 1,
|
|
2800
|
+
minWidth: "300px",
|
|
2801
|
+
display: "flex",
|
|
2802
|
+
flexDirection: "column"
|
|
2803
|
+
}
|
|
2804
|
+
}, /*#__PURE__*/React.createElement(CardLabel, {
|
|
2805
|
+
style: {
|
|
2806
|
+
fontSize: "14px",
|
|
2807
|
+
fontWeight: "600",
|
|
2808
|
+
color: "#344054",
|
|
2809
|
+
marginBottom: "8px"
|
|
2810
|
+
}
|
|
2811
|
+
}, t("Upload_Property_Document")), /*#__PURE__*/React.createElement("div", {
|
|
2812
|
+
style: {
|
|
2813
|
+
flex: 1,
|
|
2814
|
+
backgroundColor: "#EBF5FF",
|
|
2815
|
+
border: "1px solid #B2DDFF",
|
|
2816
|
+
borderRadius: "16px",
|
|
2817
|
+
padding: "32px 24px",
|
|
2818
|
+
textAlign: "center",
|
|
2819
|
+
cursor: "pointer",
|
|
2820
|
+
display: "flex",
|
|
2821
|
+
flexDirection: "column",
|
|
2822
|
+
justifyContent: "center"
|
|
2823
|
+
},
|
|
2824
|
+
onClick: () => fileRef.current.click()
|
|
2825
|
+
}, /*#__PURE__*/React.createElement("input", {
|
|
2826
|
+
type: "file",
|
|
2827
|
+
ref: fileRef,
|
|
2828
|
+
style: {
|
|
2829
|
+
display: "none"
|
|
2830
|
+
},
|
|
2831
|
+
accept: ".pdf"
|
|
2832
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
2833
|
+
style: {
|
|
2834
|
+
color: "#1570EF",
|
|
2835
|
+
fontWeight: "600",
|
|
2836
|
+
fontSize: "16px",
|
|
2837
|
+
marginBottom: "20px",
|
|
2838
|
+
lineHeight: "1.5"
|
|
2839
|
+
}
|
|
2840
|
+
}, t("Upload_your_property_document_in_PDF_Only")), /*#__PURE__*/React.createElement("div", {
|
|
2841
|
+
style: {
|
|
2842
|
+
display: "flex",
|
|
2843
|
+
justifyContent: "center"
|
|
2844
|
+
}
|
|
2845
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
2846
|
+
style: {
|
|
2847
|
+
backgroundColor: "#FFFFFF",
|
|
2848
|
+
padding: "12px",
|
|
2849
|
+
borderRadius: "12px",
|
|
2850
|
+
boxShadow: "0px 1px 2px rgba(16, 24, 40, 0.05)"
|
|
2851
|
+
}
|
|
2852
|
+
}, /*#__PURE__*/React.createElement(PdfIcon, null))))), /*#__PURE__*/React.createElement("div", {
|
|
2853
|
+
style: {
|
|
2854
|
+
flex: 1,
|
|
2855
|
+
minWidth: "300px",
|
|
2856
|
+
display: "flex",
|
|
2857
|
+
flexDirection: "column"
|
|
2858
|
+
}
|
|
2859
|
+
}, /*#__PURE__*/React.createElement(CardLabel, {
|
|
2860
|
+
style: {
|
|
2861
|
+
fontSize: "14px",
|
|
2862
|
+
fontWeight: "600",
|
|
2863
|
+
color: "#344054",
|
|
2864
|
+
marginBottom: "8px"
|
|
2865
|
+
}
|
|
2866
|
+
}, t("Capture_Building_Image")), /*#__PURE__*/React.createElement("div", {
|
|
2867
|
+
style: {
|
|
2868
|
+
flex: 1,
|
|
2869
|
+
border: "1px solid #D0D5DD",
|
|
2870
|
+
borderRadius: "16px",
|
|
2871
|
+
padding: "40px 24px",
|
|
2872
|
+
textAlign: "center",
|
|
2873
|
+
cursor: "pointer",
|
|
2874
|
+
backgroundColor: "#FFFFFF",
|
|
2875
|
+
display: "flex",
|
|
2876
|
+
flexDirection: "column",
|
|
2877
|
+
justifyContent: "center"
|
|
2878
|
+
},
|
|
2879
|
+
onClick: () => cameraRef.current.click()
|
|
2880
|
+
}, /*#__PURE__*/React.createElement("input", {
|
|
2881
|
+
type: "file",
|
|
2882
|
+
ref: cameraRef,
|
|
2883
|
+
style: {
|
|
2884
|
+
display: "none"
|
|
2885
|
+
},
|
|
2886
|
+
accept: "image/*",
|
|
2887
|
+
capture: "environment"
|
|
2888
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
2889
|
+
style: {
|
|
2890
|
+
backgroundColor: "#EEF4FF",
|
|
2891
|
+
width: "56px",
|
|
2892
|
+
height: "56px",
|
|
2893
|
+
borderRadius: "50%",
|
|
2894
|
+
display: "flex",
|
|
2895
|
+
alignItems: "center",
|
|
2896
|
+
justifyContent: "center",
|
|
2897
|
+
margin: "0 auto 16px"
|
|
2898
|
+
}
|
|
2899
|
+
}, /*#__PURE__*/React.createElement(CameraIcon, null)), /*#__PURE__*/React.createElement("div", {
|
|
2900
|
+
style: {
|
|
2901
|
+
fontWeight: "600",
|
|
2902
|
+
color: "#101828",
|
|
2903
|
+
fontSize: "16px",
|
|
2904
|
+
marginBottom: "4px"
|
|
2905
|
+
}
|
|
2906
|
+
}, t("Tap_to_Capture")), /*#__PURE__*/React.createElement("div", {
|
|
2907
|
+
style: {
|
|
2908
|
+
color: "#667085",
|
|
2909
|
+
fontSize: "14px"
|
|
2910
|
+
}
|
|
2911
|
+
}, t("Building_Photo"))))), /*#__PURE__*/React.createElement("div", {
|
|
2912
|
+
style: {
|
|
2913
|
+
marginTop: "24px",
|
|
2914
|
+
backgroundColor: "#EFF8FF",
|
|
2915
|
+
padding: "16px",
|
|
2916
|
+
borderRadius: "12px",
|
|
2917
|
+
display: "flex",
|
|
2918
|
+
gap: "12px",
|
|
2919
|
+
border: "1px solid #B2DDFF"
|
|
2920
|
+
}
|
|
2921
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
2922
|
+
style: {
|
|
2923
|
+
color: "#1570EF"
|
|
2924
|
+
}
|
|
2925
|
+
}, /*#__PURE__*/React.createElement("svg", {
|
|
2926
|
+
width: "20",
|
|
2927
|
+
height: "20",
|
|
2928
|
+
viewBox: "0 0 20 20",
|
|
2929
|
+
fill: "none",
|
|
2930
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
2931
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
2932
|
+
d: "M10 0C4.48 0 0 4.48 0 10C0 15.52 4.48 20 10 20C15.52 20 20 15.52 20 10C20 4.48 15.52 0 10 0ZM11 15H9V9H11V15ZM11 7H9V5H11V7Z",
|
|
2933
|
+
fill: "currentColor"
|
|
2934
|
+
}))), /*#__PURE__*/React.createElement("div", {
|
|
2935
|
+
style: {
|
|
2936
|
+
color: "#175CD3",
|
|
2937
|
+
fontSize: "14px",
|
|
2938
|
+
fontWeight: "500",
|
|
2939
|
+
lineHeight: "1.4"
|
|
2940
|
+
}
|
|
2941
|
+
}, t("This_section_is_enabled_only_if_user_is_not_the_owner."))), /*#__PURE__*/React.createElement("div", {
|
|
2942
|
+
style: {
|
|
2943
|
+
display: "flex",
|
|
2944
|
+
justifyContent: "flex-start",
|
|
2945
|
+
marginTop: "24px"
|
|
2946
|
+
}
|
|
2947
|
+
}, /*#__PURE__*/React.createElement(SubmitBar, {
|
|
2948
|
+
label: t("Save_&_Continue"),
|
|
2949
|
+
onSubmit: handleSaveAndContinue,
|
|
2950
|
+
style: {
|
|
2951
|
+
borderRadius: "8px",
|
|
2952
|
+
height: "48px",
|
|
2953
|
+
margin: 0
|
|
2954
|
+
}
|
|
2955
|
+
}))))));
|
|
2956
|
+
};
|
|
2957
|
+
|
|
2958
|
+
const Review = () => {
|
|
2959
|
+
var _propertyDetails$conn, _propertyDetails$conn2;
|
|
2960
|
+
const {
|
|
2961
|
+
t
|
|
2962
|
+
} = useTranslation();
|
|
2963
|
+
const history = useHistory();
|
|
2964
|
+
const location = useLocation();
|
|
2965
|
+
const {
|
|
2966
|
+
kNumber = "NA",
|
|
2967
|
+
aadhaarDetails = {},
|
|
2968
|
+
addressDetails = {},
|
|
2969
|
+
propertyDetails = {}
|
|
2970
|
+
} = location.state || {};
|
|
2971
|
+
const handleSubmit = () => {
|
|
2972
|
+
history.push("/digit-ui/employee/ekyc/dashboard");
|
|
2973
|
+
};
|
|
2974
|
+
const handleEditAadhaar = () => {
|
|
2975
|
+
history.push("/digit-ui/employee/ekyc/aadhaar-verification", location.state);
|
|
2976
|
+
};
|
|
2977
|
+
const handleEditAddress = () => {
|
|
2978
|
+
history.push("/digit-ui/employee/ekyc/address-details", location.state);
|
|
2979
|
+
};
|
|
2980
|
+
const handleEditProperty = () => {
|
|
2981
|
+
history.push("/digit-ui/employee/ekyc/property-info", location.state);
|
|
2982
|
+
};
|
|
2983
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
2984
|
+
className: "inbox-container"
|
|
2985
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
2986
|
+
className: "filters-container"
|
|
2987
|
+
}, /*#__PURE__*/React.createElement(Card, {
|
|
2988
|
+
className: "sidebar-title-card",
|
|
2989
|
+
style: {
|
|
2990
|
+
display: "flex",
|
|
2991
|
+
alignItems: "center",
|
|
2992
|
+
padding: "16px",
|
|
2993
|
+
marginBottom: "16px",
|
|
2994
|
+
borderRadius: "4px"
|
|
2995
|
+
}
|
|
2996
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
2997
|
+
className: "icon-container",
|
|
2998
|
+
style: {
|
|
2999
|
+
color: "#0068faff",
|
|
3000
|
+
marginRight: "12px"
|
|
3001
|
+
}
|
|
3002
|
+
}, /*#__PURE__*/React.createElement(HomeIcon, {
|
|
3003
|
+
style: {
|
|
3004
|
+
width: "24px",
|
|
3005
|
+
height: "24px"
|
|
3006
|
+
}
|
|
3007
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
3008
|
+
style: {
|
|
3009
|
+
fontWeight: "700",
|
|
3010
|
+
fontSize: "18px",
|
|
3011
|
+
color: "#0B0C0C"
|
|
3012
|
+
}
|
|
3013
|
+
}, t("EKYC_PROCESS"))), /*#__PURE__*/React.createElement("div", {
|
|
3014
|
+
style: {
|
|
3015
|
+
backgroundColor: "#FFFFFF",
|
|
3016
|
+
padding: "16px",
|
|
3017
|
+
borderRadius: "8px",
|
|
3018
|
+
border: "1px solid #EAECF0",
|
|
3019
|
+
boxShadow: "0 2px 4px rgba(0,0,0,0.02)"
|
|
3020
|
+
}
|
|
3021
|
+
}, /*#__PURE__*/React.createElement(ConnectingCheckPoints, null, /*#__PURE__*/React.createElement(CheckPoint, {
|
|
3022
|
+
label: t("EKYC_STEP_AADHAAR") || "Aadhaar",
|
|
3023
|
+
isCompleted: true
|
|
3024
|
+
}), /*#__PURE__*/React.createElement(CheckPoint, {
|
|
3025
|
+
label: t("EKYC_STEP_ADDRESS") || "Address",
|
|
3026
|
+
isCompleted: true
|
|
3027
|
+
}), /*#__PURE__*/React.createElement(CheckPoint, {
|
|
3028
|
+
label: t("EKYC_STEP_PROPERTY") || "Property",
|
|
3029
|
+
isCompleted: true
|
|
3030
|
+
}), /*#__PURE__*/React.createElement(CheckPoint, {
|
|
3031
|
+
label: t("EKYC_STEP_REVIEW") || "Review",
|
|
3032
|
+
isCompleted: false
|
|
3033
|
+
})))), /*#__PURE__*/React.createElement("div", {
|
|
3034
|
+
style: {
|
|
3035
|
+
flex: 1,
|
|
3036
|
+
marginLeft: "16px"
|
|
3037
|
+
}
|
|
3038
|
+
}, /*#__PURE__*/React.createElement(Card, null, /*#__PURE__*/React.createElement("div", {
|
|
3039
|
+
style: {
|
|
3040
|
+
display: "flex",
|
|
3041
|
+
justifyContent: "space-between",
|
|
3042
|
+
alignItems: "center",
|
|
3043
|
+
marginBottom: "24px"
|
|
3044
|
+
}
|
|
3045
|
+
}, /*#__PURE__*/React.createElement(Header, null, t("EKYC_REVIEW_DETAILS") || "Review Details"), /*#__PURE__*/React.createElement("div", {
|
|
3046
|
+
style: {
|
|
3047
|
+
fontSize: "14px",
|
|
3048
|
+
fontWeight: "700",
|
|
3049
|
+
color: "#505A5F"
|
|
3050
|
+
}
|
|
3051
|
+
}, t("EKYC_K_NUMBER"), ": ", /*#__PURE__*/React.createElement("span", {
|
|
3052
|
+
style: {
|
|
3053
|
+
color: "#0B0C0C"
|
|
3054
|
+
}
|
|
3055
|
+
}, kNumber))), /*#__PURE__*/React.createElement(Card, {
|
|
3056
|
+
style: {
|
|
3057
|
+
padding: "24px",
|
|
3058
|
+
marginBottom: "24px",
|
|
3059
|
+
borderRadius: "12px",
|
|
3060
|
+
border: "1px solid #EAECF0"
|
|
3061
|
+
}
|
|
3062
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
3063
|
+
style: {
|
|
3064
|
+
display: "flex",
|
|
3065
|
+
justifyContent: "space-between",
|
|
3066
|
+
alignItems: "center",
|
|
3067
|
+
marginBottom: "16px"
|
|
3068
|
+
}
|
|
3069
|
+
}, /*#__PURE__*/React.createElement(CardHeader, {
|
|
3070
|
+
style: {
|
|
3071
|
+
margin: 0,
|
|
3072
|
+
fontSize: "18px",
|
|
3073
|
+
color: "#0B0C0C"
|
|
3074
|
+
}
|
|
3075
|
+
}, t("EKYC_AADHAAR_VERIFICATION_HEADER") || "Aadhaar Details"), /*#__PURE__*/React.createElement("span", {
|
|
3076
|
+
onClick: handleEditAadhaar,
|
|
3077
|
+
style: {
|
|
3078
|
+
color: "#F47738",
|
|
3079
|
+
fontWeight: "600",
|
|
3080
|
+
cursor: "pointer",
|
|
3081
|
+
fontSize: "14px"
|
|
3082
|
+
}
|
|
3083
|
+
}, t("CS_COMMON_EDIT"))), /*#__PURE__*/React.createElement(StatusTable, null, /*#__PURE__*/React.createElement(Row, {
|
|
3084
|
+
label: t("EKYC_NAME"),
|
|
3085
|
+
text: aadhaarDetails.userName || "Rajesh Kumar Singh"
|
|
3086
|
+
}), /*#__PURE__*/React.createElement(Row, {
|
|
3087
|
+
label: t("EKYC_AADHAAR"),
|
|
3088
|
+
text: aadhaarDetails.aadhaarLastFour ? `XXXX XXXX ${aadhaarDetails.aadhaarLastFour}` : t("CS_NA")
|
|
3089
|
+
}), /*#__PURE__*/React.createElement(Row, {
|
|
3090
|
+
label: t("EKYC_MOBILE_NO"),
|
|
3091
|
+
text: aadhaarDetails.mobileNumber || t("CS_NA")
|
|
3092
|
+
}), /*#__PURE__*/React.createElement(Row, {
|
|
3093
|
+
label: t("EKYC_EMAIL_ADDRESS"),
|
|
3094
|
+
text: aadhaarDetails.email || t("CS_NA")
|
|
3095
|
+
}))), /*#__PURE__*/React.createElement(Card, {
|
|
3096
|
+
style: {
|
|
3097
|
+
padding: "24px",
|
|
3098
|
+
marginBottom: "24px",
|
|
3099
|
+
borderRadius: "12px",
|
|
3100
|
+
border: "1px solid #EAECF0"
|
|
3101
|
+
}
|
|
3102
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
3103
|
+
style: {
|
|
3104
|
+
display: "flex",
|
|
3105
|
+
justifyContent: "space-between",
|
|
3106
|
+
alignItems: "center",
|
|
3107
|
+
marginBottom: "16px"
|
|
3108
|
+
}
|
|
3109
|
+
}, /*#__PURE__*/React.createElement(CardHeader, {
|
|
3110
|
+
style: {
|
|
3111
|
+
margin: 0,
|
|
3112
|
+
fontSize: "18px",
|
|
3113
|
+
color: "#0B0C0C"
|
|
3114
|
+
}
|
|
3115
|
+
}, t("EKYC_ADDRESS_DETAILS_HEADER") || "Address Details"), /*#__PURE__*/React.createElement("span", {
|
|
3116
|
+
onClick: handleEditAddress,
|
|
3117
|
+
style: {
|
|
3118
|
+
color: "#F47738",
|
|
3119
|
+
fontWeight: "600",
|
|
3120
|
+
cursor: "pointer",
|
|
3121
|
+
fontSize: "14px"
|
|
3122
|
+
}
|
|
3123
|
+
}, t("CS_COMMON_EDIT"))), /*#__PURE__*/React.createElement(StatusTable, null, /*#__PURE__*/React.createElement(Row, {
|
|
3124
|
+
label: t("EKYC_FULL_ADDRESS"),
|
|
3125
|
+
text: addressDetails.fullAddress || "H.No. 123, Sector 15, Rohini"
|
|
3126
|
+
}), /*#__PURE__*/React.createElement(Row, {
|
|
3127
|
+
label: t("EKYC_PINCODE"),
|
|
3128
|
+
text: addressDetails.pincode || "110085"
|
|
3129
|
+
}))), /*#__PURE__*/React.createElement(Card, {
|
|
3130
|
+
style: {
|
|
3131
|
+
padding: "24px",
|
|
3132
|
+
marginBottom: "24px",
|
|
3133
|
+
borderRadius: "12px",
|
|
3134
|
+
border: "1px solid #EAECF0"
|
|
3135
|
+
}
|
|
3136
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
3137
|
+
style: {
|
|
3138
|
+
display: "flex",
|
|
3139
|
+
justifyContent: "space-between",
|
|
3140
|
+
alignItems: "center",
|
|
3141
|
+
marginBottom: "16px"
|
|
3142
|
+
}
|
|
3143
|
+
}, /*#__PURE__*/React.createElement(CardHeader, {
|
|
3144
|
+
style: {
|
|
3145
|
+
margin: 0,
|
|
3146
|
+
fontSize: "18px",
|
|
3147
|
+
color: "#0B0C0C"
|
|
3148
|
+
}
|
|
3149
|
+
}, t("EKYC_PROPERTY_INFO") || "Property Information"), /*#__PURE__*/React.createElement("span", {
|
|
3150
|
+
onClick: handleEditProperty,
|
|
3151
|
+
style: {
|
|
3152
|
+
color: "#F47738",
|
|
3153
|
+
fontWeight: "600",
|
|
3154
|
+
cursor: "pointer",
|
|
3155
|
+
fontSize: "14px"
|
|
3156
|
+
}
|
|
3157
|
+
}, t("CS_COMMON_EDIT"))), /*#__PURE__*/React.createElement(StatusTable, null, /*#__PURE__*/React.createElement(Row, {
|
|
3158
|
+
label: t("Property_Owner"),
|
|
3159
|
+
text: propertyDetails.ownerType || "OWNER"
|
|
3160
|
+
}), /*#__PURE__*/React.createElement(Row, {
|
|
3161
|
+
label: t("PID_Number"),
|
|
3162
|
+
text: propertyDetails.pidNumber || t("CS_NA")
|
|
3163
|
+
}), /*#__PURE__*/React.createElement(Row, {
|
|
3164
|
+
label: t("Type_of_Connection"),
|
|
3165
|
+
text: ((_propertyDetails$conn = propertyDetails.connectionType) === null || _propertyDetails$conn === void 0 ? void 0 : _propertyDetails$conn.label) || t("CS_NA")
|
|
3166
|
+
}), /*#__PURE__*/React.createElement(Row, {
|
|
3167
|
+
label: t("Connection_Category"),
|
|
3168
|
+
text: ((_propertyDetails$conn2 = propertyDetails.connectionCategory) === null || _propertyDetails$conn2 === void 0 ? void 0 : _propertyDetails$conn2.label) || t("CS_NA")
|
|
3169
|
+
}))), /*#__PURE__*/React.createElement(ActionBar, null, /*#__PURE__*/React.createElement(SubmitBar, {
|
|
3170
|
+
label: t("ES_COMMON_SUBMIT") || "Submit",
|
|
3171
|
+
onSubmit: handleSubmit
|
|
3172
|
+
})))));
|
|
3173
|
+
};
|
|
3174
|
+
|
|
3175
|
+
const EmployeeApp = ({
|
|
3176
|
+
path
|
|
3177
|
+
}) => {
|
|
3178
|
+
const {
|
|
3179
|
+
t
|
|
3180
|
+
} = useTranslation();
|
|
3181
|
+
const location = useLocation();
|
|
3182
|
+
sessionStorage.removeItem("revalidateddone");
|
|
3183
|
+
const getBreadcrumbLabel = () => {
|
|
3184
|
+
const pathname = location.pathname;
|
|
3185
|
+
if (pathname.includes("/dashboard")) return "ES_COMMON_INBOX";
|
|
3186
|
+
if (pathname.includes("/create-kyc")) return "EKYC_CREATE_KYC";
|
|
3187
|
+
if (pathname.includes("/k-details")) return "EKYC_K_DETAILS";
|
|
3188
|
+
if (pathname.includes("/aadhaar-verification")) return "EKYC_AADHAAR_VERIFICATION";
|
|
3189
|
+
if (pathname.includes("/address-details")) return "EKYC_ADDRESS_DETAILS";
|
|
3190
|
+
if (pathname.includes("/property-info")) return "EKYC_PROPERTY_INFO";
|
|
3191
|
+
if (pathname.includes("/review")) return "EKYC_REVIEW";
|
|
3192
|
+
return "ES_COMMON_INBOX";
|
|
3193
|
+
};
|
|
3194
|
+
const breadcrumbs = [{
|
|
3195
|
+
icon: HomeIcon,
|
|
3196
|
+
path: "/digit-ui/employee"
|
|
3197
|
+
}, {
|
|
3198
|
+
label: t(getBreadcrumbLabel())
|
|
3199
|
+
}];
|
|
3200
|
+
return /*#__PURE__*/React.createElement(AppContainer, null, /*#__PURE__*/React.createElement("div", {
|
|
3201
|
+
className: "ground-container employee-app-container"
|
|
3202
|
+
}, /*#__PURE__*/React.createElement(ModuleHeader, {
|
|
3203
|
+
leftContent: /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ArrowLeft, {
|
|
3204
|
+
className: "icon"
|
|
3205
|
+
}), "Back"),
|
|
3206
|
+
onLeftClick: () => window.history.back(),
|
|
3207
|
+
breadcrumbs: breadcrumbs
|
|
3208
|
+
}), /*#__PURE__*/React.createElement(Switch, null, /*#__PURE__*/React.createElement(PrivateRoute, {
|
|
3209
|
+
path: `${path}/dashboard`,
|
|
3210
|
+
component: () => /*#__PURE__*/React.createElement(Inbox, {
|
|
3211
|
+
parentRoute: path,
|
|
3212
|
+
businessService: "EKYC",
|
|
3213
|
+
moduleCode: "EKYC",
|
|
3214
|
+
isInbox: true
|
|
3215
|
+
})
|
|
3216
|
+
}), /*#__PURE__*/React.createElement(PrivateRoute, {
|
|
3217
|
+
path: `${path}/create-kyc`,
|
|
3218
|
+
component: () => /*#__PURE__*/React.createElement(Create, null)
|
|
3219
|
+
}), /*#__PURE__*/React.createElement(PrivateRoute, {
|
|
3220
|
+
path: `${path}/aadhaar-verification`,
|
|
3221
|
+
component: () => /*#__PURE__*/React.createElement(AadhaarVerification, null)
|
|
3222
|
+
}), /*#__PURE__*/React.createElement(PrivateRoute, {
|
|
3223
|
+
path: `${path}/address-details`,
|
|
3224
|
+
component: () => /*#__PURE__*/React.createElement(AddressDetails, null)
|
|
3225
|
+
}), /*#__PURE__*/React.createElement(PrivateRoute, {
|
|
3226
|
+
path: `${path}/property-info`,
|
|
3227
|
+
component: () => /*#__PURE__*/React.createElement(PropertyInfo, null)
|
|
3228
|
+
}), /*#__PURE__*/React.createElement(PrivateRoute, {
|
|
3229
|
+
path: `${path}/review`,
|
|
3230
|
+
component: () => /*#__PURE__*/React.createElement(Review, null)
|
|
3231
|
+
}), /*#__PURE__*/React.createElement(PrivateRoute, {
|
|
3232
|
+
path: `${path}/`,
|
|
3233
|
+
component: () => /*#__PURE__*/React.createElement(Inbox, {
|
|
3234
|
+
parentRoute: path,
|
|
3235
|
+
businessService: "EKYC",
|
|
3236
|
+
moduleCode: "EKYC",
|
|
3237
|
+
isInbox: true
|
|
3238
|
+
})
|
|
3239
|
+
}))));
|
|
3240
|
+
};
|
|
3241
|
+
|
|
3242
|
+
const EkycModule = ({
|
|
3243
|
+
stateCode,
|
|
3244
|
+
userType,
|
|
3245
|
+
tenants
|
|
3246
|
+
}) => {
|
|
3247
|
+
const {
|
|
3248
|
+
path,
|
|
3249
|
+
url
|
|
3250
|
+
} = useRouteMatch();
|
|
3251
|
+
const moduleCode = "EKYC";
|
|
3252
|
+
const language = Digit.StoreData.getCurrentLanguage();
|
|
3253
|
+
const {
|
|
3254
|
+
isLoading,
|
|
3255
|
+
data: store
|
|
3256
|
+
} = Digit.Services.useStore({
|
|
3257
|
+
stateCode,
|
|
3258
|
+
moduleCode,
|
|
3259
|
+
language
|
|
3260
|
+
});
|
|
3261
|
+
Digit.SessionStorage.set("EKYC_TENANTS", tenants);
|
|
3262
|
+
if (isLoading) {
|
|
3263
|
+
return null;
|
|
3264
|
+
}
|
|
3265
|
+
if (userType === "employee") {
|
|
3266
|
+
return /*#__PURE__*/React.createElement(EmployeeApp, {
|
|
3267
|
+
path: path,
|
|
3268
|
+
url: url,
|
|
3269
|
+
userType: userType,
|
|
3270
|
+
tenants: tenants
|
|
3271
|
+
});
|
|
3272
|
+
} else return null;
|
|
3273
|
+
};
|
|
3274
|
+
const componentsToRegister = {
|
|
3275
|
+
EKYCModule: EkycModule,
|
|
3276
|
+
EKYCCard,
|
|
3277
|
+
EKYCInbox: Inbox,
|
|
3278
|
+
EKYCDesktopInbox: DesktopInbox,
|
|
3279
|
+
EKYCMobileInbox: MobileInbox,
|
|
3280
|
+
EKYC_INBOX_FILTER: props => /*#__PURE__*/React.createElement(Filter, props)
|
|
3281
|
+
};
|
|
3282
|
+
const initEkycComponents = () => {
|
|
3283
|
+
Object.entries(componentsToRegister).forEach(([key, value]) => {
|
|
3284
|
+
Digit.ComponentRegistryService.setComponent(key, value);
|
|
3285
|
+
});
|
|
3286
|
+
};
|
|
3287
|
+
|
|
3288
|
+
export default EkycModule;
|
|
3289
|
+
export { EkycModule, initEkycComponents };
|
|
3290
|
+
//# sourceMappingURL=index.modern.js.map
|