@djb25/digit-ui-module-ekyc 1.0.5 → 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +217 -89
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
- package/src/components/DesktopInbox.js +2 -2
- package/src/components/Filter.js +5 -4
- package/src/pages/employee/AadhaarVerification.js +54 -5
- package/src/pages/employee/AddressDetails.js +28 -28
- package/src/pages/employee/Inbox.js +3 -4
- package/src/pages/employee/PropertyInfo.js +31 -14
- package/src/pages/employee/Review.js +103 -5
package/dist/index.modern.js
CHANGED
|
@@ -117,14 +117,17 @@ const DesktopInbox = ({
|
|
|
117
117
|
const status = ((_row$original3 = row.original) === null || _row$original3 === void 0 ? void 0 : _row$original3.status) || "DEFAULT";
|
|
118
118
|
return /*#__PURE__*/React.createElement("span", {
|
|
119
119
|
className: `ekyc-status-tag ${status}`
|
|
120
|
-
}, t(
|
|
120
|
+
}, t(`${status}`));
|
|
121
121
|
}
|
|
122
122
|
}], [t, parentRoute]);
|
|
123
123
|
const tableData = useMemo(() => {
|
|
124
124
|
return (data === null || data === void 0 ? void 0 : data.items) || [];
|
|
125
125
|
}, [data]);
|
|
126
126
|
return /*#__PURE__*/React.createElement("div", {
|
|
127
|
-
className: "inbox-container"
|
|
127
|
+
className: "inbox-container",
|
|
128
|
+
style: {
|
|
129
|
+
paddingBottom: "16px"
|
|
130
|
+
}
|
|
128
131
|
}, /*#__PURE__*/React.createElement("div", {
|
|
129
132
|
className: "filters-container"
|
|
130
133
|
}, /*#__PURE__*/React.createElement(Card, {
|
|
@@ -453,18 +456,6 @@ const Filter = ({
|
|
|
453
456
|
const [_searchParams, setSearchParams] = useState(() => ({
|
|
454
457
|
...searchParams
|
|
455
458
|
}));
|
|
456
|
-
const localParamChange = filterParam => {
|
|
457
|
-
let keys_to_delete = filterParam.delete;
|
|
458
|
-
let _new = {
|
|
459
|
-
..._searchParams,
|
|
460
|
-
...filterParam
|
|
461
|
-
};
|
|
462
|
-
if (keys_to_delete) keys_to_delete.forEach(key => delete _new[key]);
|
|
463
|
-
delete filterParam.delete;
|
|
464
|
-
setSearchParams({
|
|
465
|
-
..._new
|
|
466
|
-
});
|
|
467
|
-
};
|
|
468
459
|
const applyLocalFilters = () => {
|
|
469
460
|
onFilterChange(_searchParams);
|
|
470
461
|
};
|
|
@@ -477,9 +468,12 @@ const Filter = ({
|
|
|
477
468
|
});
|
|
478
469
|
};
|
|
479
470
|
const onStatusChange = value => {
|
|
480
|
-
|
|
471
|
+
const newParams = {
|
|
472
|
+
..._searchParams,
|
|
481
473
|
status: value
|
|
482
|
-
}
|
|
474
|
+
};
|
|
475
|
+
setSearchParams(newParams);
|
|
476
|
+
onFilterChange(newParams);
|
|
483
477
|
};
|
|
484
478
|
return /*#__PURE__*/React.createElement(FilterForm, {
|
|
485
479
|
onSubmit: applyLocalFilters,
|
|
@@ -500,14 +494,11 @@ const Filter = ({
|
|
|
500
494
|
label: t("EKYC_STATUS_ALL"),
|
|
501
495
|
value: ""
|
|
502
496
|
}, {
|
|
503
|
-
label: t("
|
|
504
|
-
value: "
|
|
497
|
+
label: t("EKYC_STATUS_ACTIVE"),
|
|
498
|
+
value: "ACTIVE"
|
|
505
499
|
}, {
|
|
506
500
|
label: t("EKYC_STATUS_PENDING"),
|
|
507
|
-
value: "PENDING"
|
|
508
|
-
}, {
|
|
509
|
-
label: t("EKYC_STATUS_REJECTED"),
|
|
510
|
-
value: "REJECTED"
|
|
501
|
+
value: "PENDING START"
|
|
511
502
|
}],
|
|
512
503
|
optionKey: "label",
|
|
513
504
|
select: onStatusChange,
|
|
@@ -596,17 +587,14 @@ const Inbox = ({
|
|
|
596
587
|
name: "status",
|
|
597
588
|
type: "dropdown",
|
|
598
589
|
options: [{
|
|
599
|
-
label: t("
|
|
590
|
+
label: t("EKYC_STATUS_ALL"),
|
|
600
591
|
value: ""
|
|
601
592
|
}, {
|
|
602
|
-
label: t("
|
|
603
|
-
value: "
|
|
593
|
+
label: t("EKYC_STATUS_ACTIVE"),
|
|
594
|
+
value: "ACTIVE"
|
|
604
595
|
}, {
|
|
605
596
|
label: t("EKYC_STATUS_PENDING"),
|
|
606
|
-
value: "PENDING"
|
|
607
|
-
}, {
|
|
608
|
-
label: t("EKYC_STATUS_REJECTED"),
|
|
609
|
-
value: "REJECTED"
|
|
597
|
+
value: "PENDING START"
|
|
610
598
|
}],
|
|
611
599
|
optionsKey: "label"
|
|
612
600
|
}], [t]);
|
|
@@ -1153,7 +1141,7 @@ const AddressDetails = ({
|
|
|
1153
1141
|
};
|
|
1154
1142
|
const handleUseCurrentLocation = () => {
|
|
1155
1143
|
if (!("geolocation" in navigator)) {
|
|
1156
|
-
alert(t("GEOLOCATION_NOT_SUPPORTED")
|
|
1144
|
+
alert(t("GEOLOCATION_NOT_SUPPORTED"));
|
|
1157
1145
|
return;
|
|
1158
1146
|
}
|
|
1159
1147
|
setIsLocationFetching(true);
|
|
@@ -1182,7 +1170,7 @@ const AddressDetails = ({
|
|
|
1182
1170
|
}, err => {
|
|
1183
1171
|
console.error("Geolocation error:", err);
|
|
1184
1172
|
setIsLocationFetching(false);
|
|
1185
|
-
alert(t("LOCATION_FETCH_FAILED")
|
|
1173
|
+
alert(t("LOCATION_FETCH_FAILED"));
|
|
1186
1174
|
}, {
|
|
1187
1175
|
enableHighAccuracy: true,
|
|
1188
1176
|
timeout: 10000,
|
|
@@ -1202,7 +1190,7 @@ const AddressDetails = ({
|
|
|
1202
1190
|
height: "16px"
|
|
1203
1191
|
}
|
|
1204
1192
|
}),
|
|
1205
|
-
label: t("EKYC_ADDRESS_DETAILS_HEADER")
|
|
1193
|
+
label: t("EKYC_ADDRESS_DETAILS_HEADER")
|
|
1206
1194
|
}), /*#__PURE__*/React.createElement("div", {
|
|
1207
1195
|
style: {
|
|
1208
1196
|
marginBottom: "20px"
|
|
@@ -1255,7 +1243,7 @@ const AddressDetails = ({
|
|
|
1255
1243
|
color: "#04342C",
|
|
1256
1244
|
fontWeight: "500"
|
|
1257
1245
|
}
|
|
1258
|
-
}, addrDetails.fullAddress
|
|
1246
|
+
}, addrDetails.fullAddress)), addressType.code === "OLD" && /*#__PURE__*/React.createElement("div", {
|
|
1259
1247
|
style: {
|
|
1260
1248
|
animation: "fadeSlideIn 0.3s ease"
|
|
1261
1249
|
}
|
|
@@ -1273,7 +1261,7 @@ const AddressDetails = ({
|
|
|
1273
1261
|
fontSize: "13px",
|
|
1274
1262
|
color: "#505A5F"
|
|
1275
1263
|
}
|
|
1276
|
-
}, t("EKYC_ADDRESS_CORRECTION_PROMPT")
|
|
1264
|
+
}, t("EKYC_ADDRESS_CORRECTION_PROMPT")), /*#__PURE__*/React.createElement(RadioButtons, {
|
|
1277
1265
|
options: yesNoOptions,
|
|
1278
1266
|
optionsKey: "name",
|
|
1279
1267
|
selectedOption: correctAddress,
|
|
@@ -1337,7 +1325,7 @@ const AddressDetails = ({
|
|
|
1337
1325
|
fontSize: "14px",
|
|
1338
1326
|
color: "#344054"
|
|
1339
1327
|
}
|
|
1340
|
-
}, isLocationFetching ? t("EKYC_FETCHING_LOCATION")
|
|
1328
|
+
}, isLocationFetching ? t("EKYC_FETCHING_LOCATION") : t("EKYC_USE_CURRENT_LOCATION"))), !isLocationFetching && /*#__PURE__*/React.createElement("span", {
|
|
1341
1329
|
style: {
|
|
1342
1330
|
fontSize: "18px",
|
|
1343
1331
|
color: "#98A2B3",
|
|
@@ -1356,7 +1344,7 @@ const AddressDetails = ({
|
|
|
1356
1344
|
letterSpacing: "0.04em",
|
|
1357
1345
|
marginBottom: "6px"
|
|
1358
1346
|
}
|
|
1359
|
-
}, t("EKYC_FULL_ADDRESS")
|
|
1347
|
+
}, t("EKYC_FULL_ADDRESS")), /*#__PURE__*/React.createElement(IconInput, {
|
|
1360
1348
|
icon: /*#__PURE__*/React.createElement(PropertyHouse, {
|
|
1361
1349
|
styles: {
|
|
1362
1350
|
fill: "#0068fa",
|
|
@@ -1367,7 +1355,7 @@ const AddressDetails = ({
|
|
|
1367
1355
|
topAligned: true,
|
|
1368
1356
|
value: fullAddress,
|
|
1369
1357
|
onChange: e => setFullAddress(e.target.value),
|
|
1370
|
-
placeholder: t("EKYC_ENTER_FULL_ADDRESS")
|
|
1358
|
+
placeholder: t("EKYC_ENTER_FULL_ADDRESS"),
|
|
1371
1359
|
inputStyle: {
|
|
1372
1360
|
minHeight: "72px"
|
|
1373
1361
|
}
|
|
@@ -1387,7 +1375,7 @@ const AddressDetails = ({
|
|
|
1387
1375
|
letterSpacing: "0.04em",
|
|
1388
1376
|
marginBottom: "6px"
|
|
1389
1377
|
}
|
|
1390
|
-
}, t("EKYC_FLAT_HOUSE_NUMBER")
|
|
1378
|
+
}, t("EKYC_FLAT_HOUSE_NUMBER")), /*#__PURE__*/React.createElement(IconInput, {
|
|
1391
1379
|
icon: /*#__PURE__*/React.createElement(PropertyHouse, {
|
|
1392
1380
|
styles: {
|
|
1393
1381
|
fill: "#0068fa",
|
|
@@ -1397,7 +1385,7 @@ const AddressDetails = ({
|
|
|
1397
1385
|
}),
|
|
1398
1386
|
value: flatNo,
|
|
1399
1387
|
onChange: e => setFlatNo(e.target.value),
|
|
1400
|
-
placeholder: t("EKYC_ENTER_FLAT_NO")
|
|
1388
|
+
placeholder: t("EKYC_ENTER_FLAT_NO")
|
|
1401
1389
|
})), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
1402
1390
|
style: {
|
|
1403
1391
|
fontSize: "11px",
|
|
@@ -1407,7 +1395,7 @@ const AddressDetails = ({
|
|
|
1407
1395
|
letterSpacing: "0.04em",
|
|
1408
1396
|
marginBottom: "6px"
|
|
1409
1397
|
}
|
|
1410
|
-
}, t("EKYC_BUILDING_TOWER")
|
|
1398
|
+
}, t("EKYC_BUILDING_TOWER")), /*#__PURE__*/React.createElement(IconInput, {
|
|
1411
1399
|
icon: /*#__PURE__*/React.createElement(PropertyHouse, {
|
|
1412
1400
|
styles: {
|
|
1413
1401
|
fill: "#0068fa",
|
|
@@ -1417,7 +1405,7 @@ const AddressDetails = ({
|
|
|
1417
1405
|
}),
|
|
1418
1406
|
value: building,
|
|
1419
1407
|
onChange: e => setBuilding(e.target.value),
|
|
1420
|
-
placeholder: t("EKYC_ENTER_BUILDING")
|
|
1408
|
+
placeholder: t("EKYC_ENTER_BUILDING")
|
|
1421
1409
|
}))), /*#__PURE__*/React.createElement("div", {
|
|
1422
1410
|
style: {
|
|
1423
1411
|
display: "grid",
|
|
@@ -1434,7 +1422,7 @@ const AddressDetails = ({
|
|
|
1434
1422
|
letterSpacing: "0.04em",
|
|
1435
1423
|
marginBottom: "6px"
|
|
1436
1424
|
}
|
|
1437
|
-
}, t("EKYC_LANDMARK")
|
|
1425
|
+
}, t("EKYC_LANDMARK")), /*#__PURE__*/React.createElement(IconInput, {
|
|
1438
1426
|
icon: /*#__PURE__*/React.createElement(LocationIcon, {
|
|
1439
1427
|
className: "icon",
|
|
1440
1428
|
styles: {
|
|
@@ -1445,7 +1433,7 @@ const AddressDetails = ({
|
|
|
1445
1433
|
}),
|
|
1446
1434
|
value: landmark,
|
|
1447
1435
|
onChange: e => setLandmark(e.target.value),
|
|
1448
|
-
placeholder: t("EKYC_ENTER_LANDMARK")
|
|
1436
|
+
placeholder: t("EKYC_ENTER_LANDMARK")
|
|
1449
1437
|
})), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
1450
1438
|
style: {
|
|
1451
1439
|
fontSize: "11px",
|
|
@@ -1455,7 +1443,7 @@ const AddressDetails = ({
|
|
|
1455
1443
|
letterSpacing: "0.04em",
|
|
1456
1444
|
marginBottom: "6px"
|
|
1457
1445
|
}
|
|
1458
|
-
}, t("EKYC_PINCODE")
|
|
1446
|
+
}, t("EKYC_PINCODE")), /*#__PURE__*/React.createElement(IconInput, {
|
|
1459
1447
|
icon: /*#__PURE__*/React.createElement(PincodeIcon, {
|
|
1460
1448
|
size: 15
|
|
1461
1449
|
}),
|
|
@@ -1463,7 +1451,7 @@ const AddressDetails = ({
|
|
|
1463
1451
|
onChange: e => {
|
|
1464
1452
|
if (/^\d*$/.test(e.target.value)) setPincode(e.target.value);
|
|
1465
1453
|
},
|
|
1466
|
-
placeholder: t("EKYC_ENTER_PINCODE")
|
|
1454
|
+
placeholder: t("EKYC_ENTER_PINCODE"),
|
|
1467
1455
|
maxLength: 6
|
|
1468
1456
|
})))), /*#__PURE__*/React.createElement("hr", {
|
|
1469
1457
|
style: {
|
|
@@ -1479,7 +1467,7 @@ const AddressDetails = ({
|
|
|
1479
1467
|
height: "16px"
|
|
1480
1468
|
}
|
|
1481
1469
|
}),
|
|
1482
|
-
label: t("EKYC_ADMINISTRATIVE_DIVISION")
|
|
1470
|
+
label: t("EKYC_ADMINISTRATIVE_DIVISION")
|
|
1483
1471
|
}), isMdmsLoading ? /*#__PURE__*/React.createElement(Loader, null) : /*#__PURE__*/React.createElement("div", {
|
|
1484
1472
|
style: {
|
|
1485
1473
|
display: "grid",
|
|
@@ -1496,7 +1484,7 @@ const AddressDetails = ({
|
|
|
1496
1484
|
letterSpacing: "0.04em",
|
|
1497
1485
|
marginBottom: "6px"
|
|
1498
1486
|
}
|
|
1499
|
-
}, t("EKYC_ASSEMBLY")
|
|
1487
|
+
}, t("EKYC_ASSEMBLY")), /*#__PURE__*/React.createElement(Dropdown, {
|
|
1500
1488
|
option: assemblies,
|
|
1501
1489
|
optionKey: "name",
|
|
1502
1490
|
selected: assembly,
|
|
@@ -1531,14 +1519,14 @@ const AddressDetails = ({
|
|
|
1531
1519
|
icon: /*#__PURE__*/React.createElement(CameraIcon, {
|
|
1532
1520
|
size: 16
|
|
1533
1521
|
}),
|
|
1534
|
-
label: t("EKYC_DOOR_PHOTO_HEADER")
|
|
1522
|
+
label: t("EKYC_DOOR_PHOTO_HEADER")
|
|
1535
1523
|
}), /*#__PURE__*/React.createElement("div", {
|
|
1536
1524
|
style: {
|
|
1537
1525
|
fontSize: "12px",
|
|
1538
1526
|
color: "#667085",
|
|
1539
1527
|
marginBottom: "12px"
|
|
1540
1528
|
}
|
|
1541
|
-
}, t("EKYC_REQUIRED_FOR_VERIFICATION")
|
|
1529
|
+
}, t("EKYC_REQUIRED_FOR_VERIFICATION")), /*#__PURE__*/React.createElement("div", {
|
|
1542
1530
|
style: {
|
|
1543
1531
|
backgroundColor: "#FFFAEB",
|
|
1544
1532
|
border: "0.5px solid #FEDF89",
|
|
@@ -1563,12 +1551,12 @@ const AddressDetails = ({
|
|
|
1563
1551
|
fontSize: "13px",
|
|
1564
1552
|
marginBottom: "2px"
|
|
1565
1553
|
}
|
|
1566
|
-
}, t("EKYC_IMPORTANT")
|
|
1554
|
+
}, t("EKYC_IMPORTANT")), /*#__PURE__*/React.createElement("div", {
|
|
1567
1555
|
style: {
|
|
1568
1556
|
fontSize: "12px",
|
|
1569
1557
|
color: "#92400E"
|
|
1570
1558
|
}
|
|
1571
|
-
}, t("EKYC_CAPTURE_LIVE_CAMERA")
|
|
1559
|
+
}, t("EKYC_CAPTURE_LIVE_CAMERA")))), /*#__PURE__*/React.createElement("input", {
|
|
1572
1560
|
type: "file",
|
|
1573
1561
|
ref: fileInputRef,
|
|
1574
1562
|
onChange: handleCapture,
|
|
@@ -1624,7 +1612,7 @@ const AddressDetails = ({
|
|
|
1624
1612
|
fontSize: "12px",
|
|
1625
1613
|
color: "#667085"
|
|
1626
1614
|
}
|
|
1627
|
-
}, t("EKYC_CAPTURE_DOOR_IMAGE")
|
|
1615
|
+
}, t("EKYC_CAPTURE_DOOR_IMAGE"))) : /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("img", {
|
|
1628
1616
|
src: doorPhoto,
|
|
1629
1617
|
alt: "Door",
|
|
1630
1618
|
style: {
|
|
@@ -1656,15 +1644,15 @@ const AddressDetails = ({
|
|
|
1656
1644
|
}
|
|
1657
1645
|
}, /*#__PURE__*/React.createElement(TrashIcon, {
|
|
1658
1646
|
size: 13
|
|
1659
|
-
}), " ", t("EKYC_REMOVE")
|
|
1647
|
+
}), " ", t("EKYC_REMOVE")))), _isSection ? /*#__PURE__*/React.createElement("div", {
|
|
1660
1648
|
style: {
|
|
1661
1649
|
marginTop: "24px"
|
|
1662
1650
|
}
|
|
1663
1651
|
}, /*#__PURE__*/React.createElement(SubmitBar, {
|
|
1664
|
-
label: t("EKYC_COMPLETE_VERIFICATION_AND_PROCEED")
|
|
1652
|
+
label: t("EKYC_COMPLETE_VERIFICATION_AND_PROCEED"),
|
|
1665
1653
|
onSubmit: handleCompleteVerification
|
|
1666
1654
|
})) : /*#__PURE__*/React.createElement(ActionBar, null, /*#__PURE__*/React.createElement(SubmitBar, {
|
|
1667
|
-
label: t("EKYC_COMPLETE_VERIFICATION")
|
|
1655
|
+
label: t("EKYC_COMPLETE_VERIFICATION"),
|
|
1668
1656
|
onSubmit: handleCompleteVerification
|
|
1669
1657
|
})), /*#__PURE__*/React.createElement("div", {
|
|
1670
1658
|
style: {
|
|
@@ -1692,7 +1680,7 @@ const AddressDetails = ({
|
|
|
1692
1680
|
rx: "2"
|
|
1693
1681
|
}), /*#__PURE__*/React.createElement("path", {
|
|
1694
1682
|
d: "M7 11V7a5 5 0 0 1 10 0v4"
|
|
1695
|
-
})), t("EKYC_SECURE_DATA_NOTICE")
|
|
1683
|
+
})), t("EKYC_SECURE_DATA_NOTICE")));
|
|
1696
1684
|
if (_isSection) {
|
|
1697
1685
|
return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("hr", {
|
|
1698
1686
|
style: {
|
|
@@ -2086,6 +2074,9 @@ const AadhaarVerification = () => {
|
|
|
2086
2074
|
const [aadhaarLastFour, setAadhaarLastFour] = useState("");
|
|
2087
2075
|
const [isAadhaarVerified, setIsAadhaarVerified] = useState(false);
|
|
2088
2076
|
const [isVerifying, setIsVerifying] = useState(false);
|
|
2077
|
+
const [showOtpField, setShowOtpField] = useState(false);
|
|
2078
|
+
const [otp, setOtp] = useState("");
|
|
2079
|
+
const [otpError, setOtpError] = useState(false);
|
|
2089
2080
|
const [nameCorrect, setNameCorrect] = useState({
|
|
2090
2081
|
code: "NO",
|
|
2091
2082
|
name: "CORE_COMMON_NO"
|
|
@@ -2109,11 +2100,18 @@ const AadhaarVerification = () => {
|
|
|
2109
2100
|
name: "CORE_COMMON_NO"
|
|
2110
2101
|
}];
|
|
2111
2102
|
const handleVerifyAadhaar = () => {
|
|
2112
|
-
if (aadhaarLastFour.length !==
|
|
2103
|
+
if (aadhaarLastFour.length !== 12 || isVerifying) return;
|
|
2113
2104
|
setIsVerifying(true);
|
|
2114
2105
|
setTimeout(() => {
|
|
2115
2106
|
setIsVerifying(false);
|
|
2107
|
+
setShowOtpField(true);
|
|
2108
|
+
}, 1200);
|
|
2109
|
+
};
|
|
2110
|
+
const handleVerifyOtp = () => {
|
|
2111
|
+
if (otp === "123456") {
|
|
2116
2112
|
setIsAadhaarVerified(true);
|
|
2113
|
+
setShowOtpField(false);
|
|
2114
|
+
setOtpError(false);
|
|
2117
2115
|
setShowAddressSection(true);
|
|
2118
2116
|
setTimeout(() => {
|
|
2119
2117
|
var _addressSectionRef$cu;
|
|
@@ -2122,7 +2120,9 @@ const AadhaarVerification = () => {
|
|
|
2122
2120
|
block: "start"
|
|
2123
2121
|
});
|
|
2124
2122
|
}, 100);
|
|
2125
|
-
}
|
|
2123
|
+
} else {
|
|
2124
|
+
setOtpError(true);
|
|
2125
|
+
}
|
|
2126
2126
|
};
|
|
2127
2127
|
const handleSaveAndContinue = () => {
|
|
2128
2128
|
setShowAddressSection(true);
|
|
@@ -2330,14 +2330,48 @@ const AadhaarVerification = () => {
|
|
|
2330
2330
|
maxLength: 12,
|
|
2331
2331
|
disabled: isAadhaarVerified,
|
|
2332
2332
|
inputStyle: isAadhaarVerified ? styles.verifiedInput : {}
|
|
2333
|
-
}))), !isAadhaarVerified && /*#__PURE__*/React.createElement(SubmitBar, {
|
|
2333
|
+
}))), !isAadhaarVerified && !showOtpField && /*#__PURE__*/React.createElement(SubmitBar, {
|
|
2334
2334
|
label: isVerifying ? t("EKYC_VERIFYING") || "Verifying..." : t("EKYC_VERIFY_AADHAAR_BTN") || "Verify Aadhaar",
|
|
2335
2335
|
onSubmit: handleVerifyAadhaar,
|
|
2336
|
-
disabled: aadhaarLastFour.length !==
|
|
2336
|
+
disabled: aadhaarLastFour.length !== 12 || isVerifying,
|
|
2337
|
+
style: {
|
|
2338
|
+
marginTop: "12px"
|
|
2339
|
+
}
|
|
2340
|
+
}), !isAadhaarVerified && showOtpField && /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
2341
|
+
className: "ekyc-field-label",
|
|
2342
|
+
style: {
|
|
2343
|
+
marginTop: "16px"
|
|
2344
|
+
}
|
|
2345
|
+
}, t("EKYC_ENTER_OTP") || "Enter OTP"), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement("div", {
|
|
2346
|
+
className: "field"
|
|
2347
|
+
}, /*#__PURE__*/React.createElement(IconInput$1, {
|
|
2348
|
+
icon: /*#__PURE__*/React.createElement(LockIcon, {
|
|
2349
|
+
size: 15
|
|
2350
|
+
}),
|
|
2351
|
+
value: otp,
|
|
2352
|
+
onChange: e => {
|
|
2353
|
+
const val = e.target.value;
|
|
2354
|
+
if (/^\d*$/.test(val)) {
|
|
2355
|
+
setOtp(val);
|
|
2356
|
+
if (otpError) setOtpError(false);
|
|
2357
|
+
}
|
|
2358
|
+
},
|
|
2359
|
+
placeholder: t("EKYC_ENTER_OTP_PLACEHOLDER") || "Enter 123456",
|
|
2360
|
+
maxLength: 6
|
|
2361
|
+
}))), otpError && /*#__PURE__*/React.createElement("div", {
|
|
2362
|
+
style: {
|
|
2363
|
+
color: "#D4351C",
|
|
2364
|
+
fontSize: "12px",
|
|
2365
|
+
marginTop: "4px"
|
|
2366
|
+
}
|
|
2367
|
+
}, t("EKYC_INVALID_OTP") || "Invalid OTP. Please enter 123456."), /*#__PURE__*/React.createElement(SubmitBar, {
|
|
2368
|
+
label: t("EKYC_VERIFY_OTP_BTN") || "Verify OTP",
|
|
2369
|
+
onSubmit: handleVerifyOtp,
|
|
2370
|
+
disabled: otp.length !== 6,
|
|
2337
2371
|
style: {
|
|
2338
2372
|
marginTop: "12px"
|
|
2339
2373
|
}
|
|
2340
|
-
}), isAadhaarVerified && /*#__PURE__*/React.createElement("div", {
|
|
2374
|
+
})), isAadhaarVerified && /*#__PURE__*/React.createElement("div", {
|
|
2341
2375
|
style: styles.verifiedCard
|
|
2342
2376
|
}, /*#__PURE__*/React.createElement("div", {
|
|
2343
2377
|
style: {
|
|
@@ -2381,7 +2415,7 @@ const AadhaarVerification = () => {
|
|
|
2381
2415
|
style: styles.infoLabel
|
|
2382
2416
|
}, t("EKYC_AADHAAR") || "Aadhaar"), /*#__PURE__*/React.createElement("div", {
|
|
2383
2417
|
style: styles.infoValue
|
|
2384
|
-
},
|
|
2418
|
+
}, aadhaarLastFour)), /*#__PURE__*/React.createElement("div", {
|
|
2385
2419
|
style: {
|
|
2386
2420
|
gridColumn: "span 2"
|
|
2387
2421
|
}
|
|
@@ -3077,36 +3111,42 @@ const PropertyInfo = () => {
|
|
|
3077
3111
|
},
|
|
3078
3112
|
onChange: handleFileUpload
|
|
3079
3113
|
}), /*#__PURE__*/React.createElement("div", {
|
|
3080
|
-
onClick: () => fileRef.current.click(),
|
|
3081
|
-
onMouseOver: e =>
|
|
3082
|
-
|
|
3114
|
+
onClick: () => pidNumber && fileRef.current.click(),
|
|
3115
|
+
onMouseOver: e => {
|
|
3116
|
+
if (pidNumber) e.currentTarget.style.borderColor = "#185FA5";
|
|
3117
|
+
},
|
|
3118
|
+
onMouseOut: e => {
|
|
3119
|
+
if (pidNumber) e.currentTarget.style.borderColor = "#B5D4F4";
|
|
3120
|
+
},
|
|
3083
3121
|
style: {
|
|
3084
|
-
border: "1.5px dashed #B5D4F4",
|
|
3122
|
+
border: pidNumber ? "1.5px dashed #B5D4F4" : "1.5px dashed #D0D5DD",
|
|
3085
3123
|
borderRadius: "10px",
|
|
3086
3124
|
padding: "28px 20px",
|
|
3087
3125
|
textAlign: "center",
|
|
3088
|
-
cursor: "pointer",
|
|
3089
|
-
backgroundColor: "#E6F1FB",
|
|
3126
|
+
cursor: pidNumber ? "pointer" : "not-allowed",
|
|
3127
|
+
backgroundColor: pidNumber ? "#E6F1FB" : "#F9FAFB",
|
|
3090
3128
|
minHeight: "160px",
|
|
3091
3129
|
display: "flex",
|
|
3092
3130
|
flexDirection: "column",
|
|
3093
3131
|
alignItems: "center",
|
|
3094
3132
|
justifyContent: "center",
|
|
3095
3133
|
gap: "10px",
|
|
3096
|
-
transition: "
|
|
3134
|
+
transition: "all 0.15s",
|
|
3135
|
+
opacity: pidNumber ? 1 : 0.6
|
|
3097
3136
|
}
|
|
3098
3137
|
}, /*#__PURE__*/React.createElement("div", {
|
|
3099
3138
|
style: {
|
|
3100
|
-
background: "#fff",
|
|
3139
|
+
background: pidNumber ? "#fff" : "#EAECF0",
|
|
3101
3140
|
padding: "10px",
|
|
3102
3141
|
borderRadius: "10px",
|
|
3103
|
-
display: "flex"
|
|
3142
|
+
display: "flex",
|
|
3143
|
+
filter: pidNumber ? "none" : "grayscale(100%)"
|
|
3104
3144
|
}
|
|
3105
3145
|
}, /*#__PURE__*/React.createElement("svg", {
|
|
3106
3146
|
width: "32",
|
|
3107
3147
|
height: "32",
|
|
3108
3148
|
viewBox: "0 0 24 24",
|
|
3109
|
-
fill: "#185FA5"
|
|
3149
|
+
fill: pidNumber ? "#185FA5" : "#98A2B3"
|
|
3110
3150
|
}, /*#__PURE__*/React.createElement("path", {
|
|
3111
3151
|
d: "M14 2H6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V8l-6-6zm-1 7V3.5L18.5 9H13z"
|
|
3112
3152
|
}), /*#__PURE__*/React.createElement("path", {
|
|
@@ -3124,14 +3164,14 @@ const PropertyInfo = () => {
|
|
|
3124
3164
|
style: {
|
|
3125
3165
|
fontSize: "13px",
|
|
3126
3166
|
fontWeight: "600",
|
|
3127
|
-
color: "#185FA5"
|
|
3167
|
+
color: pidNumber ? "#185FA5" : "#98A2B3"
|
|
3128
3168
|
}
|
|
3129
|
-
}, t("EKYC_UPLOAD_PROPERTY_DOC_CTA") || "Tap to upload"), /*#__PURE__*/React.createElement("div", {
|
|
3169
|
+
}, pidNumber ? t("EKYC_UPLOAD_PROPERTY_DOC_CTA") || "Tap to upload" : t("EKYC_ENTER_PID_FIRST_CTA") || "Enter PID to upload"), /*#__PURE__*/React.createElement("div", {
|
|
3130
3170
|
style: {
|
|
3131
3171
|
fontSize: "12px",
|
|
3132
|
-
color: "#378ADD"
|
|
3172
|
+
color: pidNumber ? "#378ADD" : "#98A2B3"
|
|
3133
3173
|
}
|
|
3134
|
-
}, "PDF
|
|
3174
|
+
}, pidNumber ? "PDF | Max 5MB" : "Requires PID")))), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
3135
3175
|
style: {
|
|
3136
3176
|
fontSize: "11px",
|
|
3137
3177
|
fontWeight: "600",
|
|
@@ -3197,7 +3237,13 @@ const PropertyInfo = () => {
|
|
|
3197
3237
|
color: "#667085",
|
|
3198
3238
|
marginTop: "2px"
|
|
3199
3239
|
}
|
|
3200
|
-
}, t("EKYC_BUILDING_PHOTO") || "Building photo with GPS")
|
|
3240
|
+
}, t("EKYC_BUILDING_PHOTO") || "Building photo with GPS"), /*#__PURE__*/React.createElement("div", {
|
|
3241
|
+
style: {
|
|
3242
|
+
fontSize: "11px",
|
|
3243
|
+
color: "#98A2B3",
|
|
3244
|
+
marginTop: "2px"
|
|
3245
|
+
}
|
|
3246
|
+
}, "JPG, PNG | Max 2MB")) : /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("img", {
|
|
3201
3247
|
src: buildingPhoto,
|
|
3202
3248
|
alt: "Building",
|
|
3203
3249
|
style: {
|
|
@@ -3468,7 +3514,7 @@ const ReviewCard = ({
|
|
|
3468
3514
|
}
|
|
3469
3515
|
}, row.value)) : null)));
|
|
3470
3516
|
const Review = () => {
|
|
3471
|
-
var _propertyDetails$
|
|
3517
|
+
var _propertyDetails$conn3, _propertyDetails$conn4, _propertyDetails$user2, _propertyDetails$noOf2;
|
|
3472
3518
|
const {
|
|
3473
3519
|
t
|
|
3474
3520
|
} = useTranslation();
|
|
@@ -3480,8 +3526,84 @@ const Review = () => {
|
|
|
3480
3526
|
addressDetails = {},
|
|
3481
3527
|
propertyDetails = {}
|
|
3482
3528
|
} = location.state || {};
|
|
3483
|
-
const
|
|
3484
|
-
|
|
3529
|
+
const [isSubmitting, setIsSubmitting] = useState(false);
|
|
3530
|
+
const [toast, setToast] = useState(null);
|
|
3531
|
+
const uploadFile = async (file, tenantId) => {
|
|
3532
|
+
var _res$data, _res$data$files, _res$data$files$;
|
|
3533
|
+
if (!file) return null;
|
|
3534
|
+
const res = await Digit.UploadServices.Filestorage("EKYC", file, tenantId);
|
|
3535
|
+
return (res === null || res === void 0 ? void 0 : (_res$data = res.data) === null || _res$data === void 0 ? void 0 : (_res$data$files = _res$data.files) === null || _res$data$files === void 0 ? void 0 : (_res$data$files$ = _res$data$files[0]) === null || _res$data$files$ === void 0 ? void 0 : _res$data$files$.fileStoreId) || null;
|
|
3536
|
+
};
|
|
3537
|
+
const dataUrlToFile = (dataUrl, filename) => {
|
|
3538
|
+
const arr = dataUrl.split(",");
|
|
3539
|
+
const mime = arr[0].match(/:(.*?);/)[1];
|
|
3540
|
+
const bstr = atob(arr[1]);
|
|
3541
|
+
let n = bstr.length;
|
|
3542
|
+
const u8arr = new Uint8Array(n);
|
|
3543
|
+
while (n--) u8arr[n] = bstr.charCodeAt(n);
|
|
3544
|
+
return new File([u8arr], filename, {
|
|
3545
|
+
type: mime
|
|
3546
|
+
});
|
|
3547
|
+
};
|
|
3548
|
+
const handleSubmit = async () => {
|
|
3549
|
+
setIsSubmitting(true);
|
|
3550
|
+
setToast(null);
|
|
3551
|
+
try {
|
|
3552
|
+
var _Digit$UserService$ge, _Digit$UserService$ge2, _propertyDetails$user, _propertyDetails$noOf, _propertyDetails$conn, _propertyDetails$conn2;
|
|
3553
|
+
const tenantId = Digit.ULBService.getCurrentTenantId() || "dl.djb";
|
|
3554
|
+
const userInfo = ((_Digit$UserService$ge = Digit.UserService.getUser()) === null || _Digit$UserService$ge === void 0 ? void 0 : _Digit$UserService$ge.info) || {};
|
|
3555
|
+
const propertyDocFile = propertyDetails.propertyDocument || null;
|
|
3556
|
+
const propertyDocFileStoreId = await uploadFile(propertyDocFile, tenantId);
|
|
3557
|
+
let buildingImageFileStoreId = null;
|
|
3558
|
+
if (propertyDetails.buildingPhoto) {
|
|
3559
|
+
const photoFile = dataUrlToFile(propertyDetails.buildingPhoto, "building_photo.jpg");
|
|
3560
|
+
buildingImageFileStoreId = await uploadFile(photoFile, tenantId);
|
|
3561
|
+
}
|
|
3562
|
+
const requestBody = {
|
|
3563
|
+
RequestInfo: {
|
|
3564
|
+
apiId: "Rainmaker",
|
|
3565
|
+
ver: "1.0",
|
|
3566
|
+
msgId: `${Date.now()}|${navigator.language || "en_IN"}`,
|
|
3567
|
+
tenantId,
|
|
3568
|
+
authToken: userInfo.access_token || ((_Digit$UserService$ge2 = Digit.UserService.getUser()) === null || _Digit$UserService$ge2 === void 0 ? void 0 : _Digit$UserService$ge2.access_token) || ""
|
|
3569
|
+
},
|
|
3570
|
+
updateType: "PROPERTY",
|
|
3571
|
+
kno: kNumber,
|
|
3572
|
+
pidNumber: propertyDetails.pidNumber || null,
|
|
3573
|
+
propertyDocumentFileStoreId: propertyDocFileStoreId,
|
|
3574
|
+
buildingImageFileStoreId: buildingImageFileStoreId,
|
|
3575
|
+
userType: ((_propertyDetails$user = propertyDetails.userType) === null || _propertyDetails$user === void 0 ? void 0 : _propertyDetails$user.value) || null,
|
|
3576
|
+
noOfFloor: (_propertyDetails$noOf = propertyDetails.noOfFloors) !== null && _propertyDetails$noOf !== void 0 && _propertyDetails$noOf.value ? parseInt(propertyDetails.noOfFloors.value, 10) : null,
|
|
3577
|
+
typeOfConnection: ((_propertyDetails$conn = propertyDetails.connectionCategory) === null || _propertyDetails$conn === void 0 ? void 0 : _propertyDetails$conn.value) || null,
|
|
3578
|
+
connectionCategory: ((_propertyDetails$conn2 = propertyDetails.connectionType) === null || _propertyDetails$conn2 === void 0 ? void 0 : _propertyDetails$conn2.value) || null,
|
|
3579
|
+
modifiedBy: userInfo.name || userInfo.userName || null
|
|
3580
|
+
};
|
|
3581
|
+
await Digit.CustomService.getResponse({
|
|
3582
|
+
url: "/ekyc-service/user/application/_update",
|
|
3583
|
+
params: {
|
|
3584
|
+
tenantId
|
|
3585
|
+
},
|
|
3586
|
+
body: requestBody,
|
|
3587
|
+
useCache: false,
|
|
3588
|
+
method: "POST"
|
|
3589
|
+
});
|
|
3590
|
+
setToast({
|
|
3591
|
+
type: "success",
|
|
3592
|
+
message: t("EKYC_SUBMIT_SUCCESS") || "Application submitted successfully!"
|
|
3593
|
+
});
|
|
3594
|
+
setTimeout(() => {
|
|
3595
|
+
history.push("/digit-ui/employee/ekyc/dashboard");
|
|
3596
|
+
}, 1800);
|
|
3597
|
+
} catch (err) {
|
|
3598
|
+
var _err$response, _err$response$data, _err$response$data$Er, _err$response$data$Er2;
|
|
3599
|
+
console.error("eKYC Submit Error:", err);
|
|
3600
|
+
setToast({
|
|
3601
|
+
type: "error",
|
|
3602
|
+
message: (err === null || err === void 0 ? void 0 : (_err$response = err.response) === null || _err$response === void 0 ? void 0 : (_err$response$data = _err$response.data) === null || _err$response$data === void 0 ? void 0 : (_err$response$data$Er = _err$response$data.Errors) === null || _err$response$data$Er === void 0 ? void 0 : (_err$response$data$Er2 = _err$response$data$Er[0]) === null || _err$response$data$Er2 === void 0 ? void 0 : _err$response$data$Er2.message) || t("EKYC_SUBMIT_ERROR") || "Submission failed. Please try again."
|
|
3603
|
+
});
|
|
3604
|
+
} finally {
|
|
3605
|
+
setIsSubmitting(false);
|
|
3606
|
+
}
|
|
3485
3607
|
};
|
|
3486
3608
|
const handleEditAadhaar = () => {
|
|
3487
3609
|
history.push("/digit-ui/employee/ekyc/aadhaar-verification", location.state);
|
|
@@ -3492,7 +3614,7 @@ const Review = () => {
|
|
|
3492
3614
|
const handleEditProperty = () => {
|
|
3493
3615
|
history.push("/digit-ui/employee/ekyc/property-info", location.state);
|
|
3494
3616
|
};
|
|
3495
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
3617
|
+
return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
3496
3618
|
className: "inbox-container"
|
|
3497
3619
|
}, /*#__PURE__*/React.createElement("style", null, `
|
|
3498
3620
|
@keyframes fadeSlideIn {
|
|
@@ -3680,7 +3802,7 @@ const Review = () => {
|
|
|
3680
3802
|
value: aadhaarDetails.userName || "Rajesh Kumar Singh"
|
|
3681
3803
|
}, {
|
|
3682
3804
|
label: t("EKYC_AADHAAR") || "Aadhaar no.",
|
|
3683
|
-
value: aadhaarDetails.aadhaarLastFour ?
|
|
3805
|
+
value: aadhaarDetails.aadhaarLastFour ? `${aadhaarDetails.aadhaarLastFour}` : "XXXX XXXX 1234"
|
|
3684
3806
|
}, {
|
|
3685
3807
|
label: t("EKYC_MOBILE_NO") || "Mobile no.",
|
|
3686
3808
|
value: aadhaarDetails.mobileNumber || "XXXXXXXXXX"
|
|
@@ -3754,24 +3876,25 @@ const Review = () => {
|
|
|
3754
3876
|
value: propertyDetails.pidNumber || null
|
|
3755
3877
|
}, {
|
|
3756
3878
|
label: t("EKYC_TYPE_OF_CONNECTION") || "Type of connection",
|
|
3757
|
-
value: ((_propertyDetails$
|
|
3879
|
+
value: ((_propertyDetails$conn3 = propertyDetails.connectionCategory) === null || _propertyDetails$conn3 === void 0 ? void 0 : _propertyDetails$conn3.label) || null
|
|
3758
3880
|
}, {
|
|
3759
3881
|
label: t("EKYC_CONNECTION_CATEGORY") || "Connection category",
|
|
3760
|
-
value: ((_propertyDetails$
|
|
3882
|
+
value: ((_propertyDetails$conn4 = propertyDetails.connectionType) === null || _propertyDetails$conn4 === void 0 ? void 0 : _propertyDetails$conn4.label) || null
|
|
3761
3883
|
}, {
|
|
3762
3884
|
label: t("EKYC_USER_TYPE") || "User type",
|
|
3763
|
-
value: ((_propertyDetails$
|
|
3885
|
+
value: ((_propertyDetails$user2 = propertyDetails.userType) === null || _propertyDetails$user2 === void 0 ? void 0 : _propertyDetails$user2.label) || null
|
|
3764
3886
|
}, {
|
|
3765
3887
|
label: t("EKYC_NO_OF_FLOORS") || "No. of floors",
|
|
3766
|
-
value: ((_propertyDetails$
|
|
3888
|
+
value: ((_propertyDetails$noOf2 = propertyDetails.noOfFloors) === null || _propertyDetails$noOf2 === void 0 ? void 0 : _propertyDetails$noOf2.label) || null
|
|
3767
3889
|
}]
|
|
3768
3890
|
})), /*#__PURE__*/React.createElement("div", {
|
|
3769
3891
|
style: {
|
|
3770
3892
|
marginTop: "24px"
|
|
3771
3893
|
}
|
|
3772
3894
|
}, /*#__PURE__*/React.createElement(SubmitBar, {
|
|
3773
|
-
label: t("ES_COMMON_SUBMIT") || "Submit",
|
|
3774
|
-
onSubmit: handleSubmit
|
|
3895
|
+
label: isSubmitting ? t("EKYC_SUBMITTING") || "Submitting..." : t("ES_COMMON_SUBMIT") || "Submit",
|
|
3896
|
+
onSubmit: handleSubmit,
|
|
3897
|
+
disabled: isSubmitting
|
|
3775
3898
|
})), /*#__PURE__*/React.createElement("div", {
|
|
3776
3899
|
style: {
|
|
3777
3900
|
display: "flex",
|
|
@@ -3798,7 +3921,12 @@ const Review = () => {
|
|
|
3798
3921
|
rx: "2"
|
|
3799
3922
|
}), /*#__PURE__*/React.createElement("path", {
|
|
3800
3923
|
d: "M7 11V7a5 5 0 0 1 10 0v4"
|
|
3801
|
-
})), t("EKYC_SECURE_DATA_NOTICE") || "Your data is encrypted and secure"))))
|
|
3924
|
+
})), t("EKYC_SECURE_DATA_NOTICE") || "Your data is encrypted and secure")))), toast && /*#__PURE__*/React.createElement(Toast, {
|
|
3925
|
+
label: toast.message,
|
|
3926
|
+
error: toast.type === "error",
|
|
3927
|
+
success: toast.type === "success",
|
|
3928
|
+
onClose: () => setToast(null)
|
|
3929
|
+
}));
|
|
3802
3930
|
};
|
|
3803
3931
|
|
|
3804
3932
|
const EmployeeApp = ({
|