@djb25/digit-ui-module-ekyc 1.0.55 → 1.0.57
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 +54 -23
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +54 -23
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -223,7 +223,7 @@ const StatusCards = _ref => {
|
|
|
223
223
|
alert(t("NO_DATA_FOUND") || "No data found for download.");
|
|
224
224
|
return;
|
|
225
225
|
}
|
|
226
|
-
const excludedKeys = ["status", "source", "
|
|
226
|
+
const excludedKeys = ["status", "source", "assignedAt", "connectionType", "approvedAt", "alternateMobileNo", "city", "state", "addressType", "addressProofType", "mrcode", "areacode", "verificationStatus", "surveyorId", "supervisorId", "vendorId", "assignmentType", "assignmentValue", "assignedTime", "isSelfAssigned", "userType", "tenantName", "tenantMobile", "doorPhotoFilestoreId", "panFilestoreId", "documentProofFilestoreId", "buildingImageFileStoreId", "propertyDocumentFileStoreId", "meterPhotoFileStoreId", "modifiedBy", "zoneCode", "propertyType", "subPropertyCategory"];
|
|
227
227
|
const headerMapping = {
|
|
228
228
|
kno: t("KNO"),
|
|
229
229
|
firstName: t("FIRST_NAME"),
|
|
@@ -352,9 +352,16 @@ const StatusCards = _ref => {
|
|
|
352
352
|
if (name) {
|
|
353
353
|
cleanObj[t("CONSUMER_NAME") || "Consumer Name"] = toTitleCase(name);
|
|
354
354
|
}
|
|
355
|
-
Object.keys(item)
|
|
355
|
+
const keys = Object.keys(item);
|
|
356
|
+
const orderedKeys = [...keys.filter(key => key !== "submittedAt"), ...(keys.includes("submittedAt") ? ["submittedAt"] : [])];
|
|
357
|
+
orderedKeys.forEach(key => {
|
|
356
358
|
if (excludedKeys.includes(key)) return;
|
|
357
359
|
let val = item[key];
|
|
360
|
+
if (key === "submittedAt" && val) {
|
|
361
|
+
const date = new Date(Number(val));
|
|
362
|
+
const pad = n => String(n).padStart(2, "0");
|
|
363
|
+
val = pad(date.getDate()) + "/" + pad(date.getMonth() + 1) + "/" + date.getFullYear() + " " + pad(date.getHours()) + ":" + pad(date.getMinutes()) + ":" + pad(date.getSeconds());
|
|
364
|
+
}
|
|
358
365
|
if (typeof val === "object" && val !== null) {
|
|
359
366
|
return;
|
|
360
367
|
}
|
|
@@ -2105,7 +2112,7 @@ const VendorDetailsCard = () => {
|
|
|
2105
2112
|
alert(t("NO_EKYC_DATA_FOUND") || "No eKYC data found to download.");
|
|
2106
2113
|
return;
|
|
2107
2114
|
}
|
|
2108
|
-
const excludedKeys = ["status", "source", "
|
|
2115
|
+
const excludedKeys = ["status", "source", "assignedAt", "connectionType", "approvedAt", "alternateMobileNo", "city", "state", "addressType", "addressProofType", "mrcode", "areacode", "verificationStatus", "surveyorId", "supervisorId", "vendorId", "assignmentType", "assignmentValue", "assignedTime", "isSelfAssigned", "userType", "tenantName", "tenantMobile", "doorPhotoFilestoreId", "panFilestoreId", "documentProofFilestoreId", "buildingImageFileStoreId", "propertyDocumentFileStoreId", "meterPhotoFileStoreId", "modifiedBy", "zoneCode", "propertyType", "subPropertyCategory"];
|
|
2109
2116
|
const headerMapping = {
|
|
2110
2117
|
kno: t("KNO"),
|
|
2111
2118
|
firstName: t("FIRST_NAME"),
|
|
@@ -3782,7 +3789,7 @@ const ReviewSection = _ref2 => {
|
|
|
3782
3789
|
})))));
|
|
3783
3790
|
};
|
|
3784
3791
|
const Review = () => {
|
|
3785
|
-
var _Digit$SessionStorage, _Digit$SessionStorage2, _Digit$SessionStorage3, _newDataRaw$connectio, _newDataRaw$connectio2, _newDataRaw$connectio3, _newDataRaw$address, _newDataRaw$address2, _newDataRaw$address3, _newDataRaw$address4, _newDataRaw$address5, _newDataRaw$address6, _newDataRaw$address7, _newDataRaw$address8, _newDataRaw$address9, _newDataRaw$address0, _newDataRaw$address1, _newDataRaw$address10, _newDataRaw$address11, _newDataRaw$address12, _newDataRaw$address13, _newDataRaw$address14, _newDataRaw$property, _newDataRaw$property2, _editedProperty$conne, _newDataRaw$property3, _editedProperty$conne2, _newDataRaw$property4, _editedProperty$userT, _newDataRaw$property5, _editedProperty$noOfF, _newDataRaw$property6, _newDataRaw$property7, _newDataRaw$meter, _editedMeter$meterSta, _newDataRaw$meter2, _newDataRaw$meter3, _newDataRaw$meter4, _newDataRaw$meter5, _editedMeter$workingS, _newDataRaw$meter6, _editedMeter$lastBill, _newDataRaw$meter7, _newDataRaw$meter8;
|
|
3792
|
+
var _Digit$SessionStorage, _Digit$SessionStorage2, _Digit$SessionStorage3, _newDataRaw$connectio, _newDataRaw$connectio2, _newDataRaw$connectio3, _newDataRaw$address, _newDataRaw$address2, _newDataRaw$address3, _newDataRaw$address4, _newDataRaw$address5, _newDataRaw$address6, _newDataRaw$address7, _newDataRaw$address8, _newDataRaw$address9, _newDataRaw$address0, _newDataRaw$address1, _newDataRaw$address10, _newDataRaw$address11, _newDataRaw$address12, _newDataRaw$address13, _newDataRaw$address14, _newDataRaw$property, _newDataRaw$property2, _editedProperty$conne, _newDataRaw$property3, _editedProperty$conne2, _newDataRaw$property4, _editedProperty$userT, _newDataRaw$property5, _editedProperty$noOfF, _newDataRaw$property6, _newDataRaw$property7, _newDataRaw$meter, _editedMeter$meterSta, _newDataRaw$meter2, _newDataRaw$meter3, _newDataRaw$meter4, _newDataRaw$meter5, _editedMeter$workingS, _newDataRaw$meter6, _editedMeter$lastBill, _newDataRaw$meter7, _newDataRaw$meter8, _Digit$UserService$ge;
|
|
3786
3793
|
const _useTranslation = useTranslation(),
|
|
3787
3794
|
t = _useTranslation.t;
|
|
3788
3795
|
const history = useHistory();
|
|
@@ -3843,7 +3850,9 @@ const Review = () => {
|
|
|
3843
3850
|
isSearchLoading = _Digit$Hooks$ekyc$use.isLoading;
|
|
3844
3851
|
const userRoles = ((_Digit$SessionStorage = Digit.SessionStorage.get("User")) === null || _Digit$SessionStorage === void 0 ? void 0 : (_Digit$SessionStorage2 = _Digit$SessionStorage.info) === null || _Digit$SessionStorage2 === void 0 ? void 0 : (_Digit$SessionStorage3 = _Digit$SessionStorage2.roles) === null || _Digit$SessionStorage3 === void 0 ? void 0 : _Digit$SessionStorage3.map(ele => ele.code)) || [];
|
|
3845
3852
|
const isZRO = userRoles.includes("EKYC_ZRO") || userRoles.includes("ZRO");
|
|
3846
|
-
const isSupervisorOrSurveyorOrVendor = userRoles.includes("
|
|
3853
|
+
const isSupervisorOrSurveyorOrVendor = userRoles.includes("EKYC_SURVEYOR") || userRoles.includes("EKYC_VENDOR");
|
|
3854
|
+
const EKYC_ROLE_PRIORITY = ["EKYC_ZRO", "ZRO", "EKYC_SUPERVISOR", "EKYC_SURVEYOR", "EKYC_VENDOR"];
|
|
3855
|
+
const currentUserRole = EKYC_ROLE_PRIORITY.find(r => userRoles.includes(r)) || userRoles[0] || "EMPLOYEE";
|
|
3847
3856
|
const isStatusView = location.pathname.includes("/status/");
|
|
3848
3857
|
const hideEditButton = isSupervisorOrSurveyorOrVendor && !isZRO || isStatusView;
|
|
3849
3858
|
const _extractReviewData = extractReviewData(searchData, flowState),
|
|
@@ -4277,34 +4286,55 @@ const Review = () => {
|
|
|
4277
4286
|
label: "EKYC_METER_LONGITUDE1"
|
|
4278
4287
|
}];
|
|
4279
4288
|
const handleDeclaration = () => setAgree(!agree);
|
|
4289
|
+
const loggedInUserInfo = (_Digit$UserService$ge = Digit.UserService.getUser()) === null || _Digit$UserService$ge === void 0 ? void 0 : _Digit$UserService$ge.info;
|
|
4290
|
+
const _Digit$Hooks$useUserS = Digit.Hooks.useUserSearch(tenantId, {
|
|
4291
|
+
uuid: [loggedInUserInfo === null || loggedInUserInfo === void 0 ? void 0 : loggedInUserInfo.uuid]
|
|
4292
|
+
}, {}, {
|
|
4293
|
+
enabled: !!(loggedInUserInfo !== null && loggedInUserInfo !== void 0 && loggedInUserInfo.uuid)
|
|
4294
|
+
}),
|
|
4295
|
+
userData = _Digit$Hooks$useUserS.data;
|
|
4296
|
+
const supervisorData = (userData === null || userData === void 0 ? void 0 : userData.user) || [];
|
|
4297
|
+
const matchedSupervisor = supervisorData === null || supervisorData === void 0 ? void 0 : supervisorData.find(s => (s === null || s === void 0 ? void 0 : s.uuid) === (loggedInUserInfo === null || loggedInUserInfo === void 0 ? void 0 : loggedInUserInfo.uuid) || (s === null || s === void 0 ? void 0 : s.userName) === (loggedInUserInfo === null || loggedInUserInfo === void 0 ? void 0 : loggedInUserInfo.userName));
|
|
4298
|
+
const supervisorId = (matchedSupervisor === null || matchedSupervisor === void 0 ? void 0 : matchedSupervisor.uuid) || (loggedInUserInfo === null || loggedInUserInfo === void 0 ? void 0 : loggedInUserInfo.uuid);
|
|
4280
4299
|
const handleReject = function () {
|
|
4281
4300
|
try {
|
|
4282
|
-
var _Digit$UserService$
|
|
4301
|
+
var _Digit$UserService$ge2;
|
|
4283
4302
|
const payload = {
|
|
4284
4303
|
RequestInfo: {
|
|
4285
4304
|
apiId: "Rainmaker",
|
|
4286
4305
|
ver: "1.0",
|
|
4287
4306
|
msgId: "message-id",
|
|
4288
4307
|
tenantId: tenantId,
|
|
4289
|
-
authToken: (_Digit$UserService$
|
|
4308
|
+
authToken: (_Digit$UserService$ge2 = Digit.UserService.getUser()) === null || _Digit$UserService$ge2 === void 0 ? void 0 : _Digit$UserService$ge2.access_token
|
|
4290
4309
|
},
|
|
4291
4310
|
kno: activeKno,
|
|
4292
4311
|
action: "REJECTED",
|
|
4293
4312
|
remarks: "Application rejected by reviewer",
|
|
4294
|
-
reviewedBy:
|
|
4295
|
-
role:
|
|
4313
|
+
reviewedBy: supervisorId,
|
|
4314
|
+
role: currentUserRole
|
|
4296
4315
|
};
|
|
4297
4316
|
const _temp = _catch(function () {
|
|
4298
4317
|
return Promise.resolve(workflowMutation.mutateAsync(payload)).then(function (result) {
|
|
4299
4318
|
if (result) {
|
|
4300
|
-
|
|
4301
|
-
|
|
4302
|
-
|
|
4319
|
+
setToastData({
|
|
4320
|
+
error: true,
|
|
4321
|
+
label: t("EKYC_APPLICATION_REJECT_SUCCESSFUL") || "Application Rejected Successfully"
|
|
4303
4322
|
});
|
|
4323
|
+
setShowToast(true);
|
|
4324
|
+
setTimeout(() => {
|
|
4325
|
+
history.push("/digit-ui/employee/ekyc/inbox");
|
|
4326
|
+
}, 2000);
|
|
4304
4327
|
}
|
|
4305
4328
|
});
|
|
4306
4329
|
}, function (err) {
|
|
4330
|
+
var _err$response, _err$response$data, _err$response2, _err$response2$data, _err$response2$data$E, _err$response2$data$E2, _err$Errors, _err$Errors$;
|
|
4307
4331
|
console.error("Reject Error:", err);
|
|
4332
|
+
const errMsg = (err === null || err === void 0 ? void 0 : err.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.message) || (err === null || err === void 0 ? void 0 : (_err$response2 = err.response) === null || _err$response2 === void 0 ? void 0 : (_err$response2$data = _err$response2.data) === null || _err$response2$data === void 0 ? void 0 : (_err$response2$data$E = _err$response2$data.Errors) === null || _err$response2$data$E === void 0 ? void 0 : (_err$response2$data$E2 = _err$response2$data$E[0]) === null || _err$response2$data$E2 === void 0 ? void 0 : _err$response2$data$E2.message) || (err === null || err === void 0 ? void 0 : (_err$Errors = err.Errors) === null || _err$Errors === void 0 ? void 0 : (_err$Errors$ = _err$Errors[0]) === null || _err$Errors$ === void 0 ? void 0 : _err$Errors$.message) || t("EKYC_REJECT_ERROR") || "Reject failed. Please try again.";
|
|
4333
|
+
setToastData({
|
|
4334
|
+
error: true,
|
|
4335
|
+
label: errMsg
|
|
4336
|
+
});
|
|
4337
|
+
setShowToast(true);
|
|
4308
4338
|
});
|
|
4309
4339
|
return Promise.resolve(_temp && _temp.then ? _temp.then(function () {}) : void 0);
|
|
4310
4340
|
} catch (e) {
|
|
@@ -4313,20 +4343,20 @@ const Review = () => {
|
|
|
4313
4343
|
};
|
|
4314
4344
|
const handleApprove = function () {
|
|
4315
4345
|
try {
|
|
4316
|
-
var _Digit$UserService$
|
|
4346
|
+
var _Digit$UserService$ge3;
|
|
4317
4347
|
const payload = {
|
|
4318
4348
|
RequestInfo: {
|
|
4319
4349
|
apiId: "Rainmaker",
|
|
4320
4350
|
ver: "1.0",
|
|
4321
4351
|
msgId: "message-id",
|
|
4322
4352
|
tenantId: tenantId,
|
|
4323
|
-
authToken: (_Digit$UserService$
|
|
4353
|
+
authToken: (_Digit$UserService$ge3 = Digit.UserService.getUser()) === null || _Digit$UserService$ge3 === void 0 ? void 0 : _Digit$UserService$ge3.access_token
|
|
4324
4354
|
},
|
|
4325
4355
|
kno: activeKno,
|
|
4326
4356
|
action: "APPROVED",
|
|
4327
4357
|
remarks: "All documents verified",
|
|
4328
|
-
reviewedBy:
|
|
4329
|
-
role:
|
|
4358
|
+
reviewedBy: supervisorId,
|
|
4359
|
+
role: currentUserRole
|
|
4330
4360
|
};
|
|
4331
4361
|
const _temp2 = _catch(function () {
|
|
4332
4362
|
return Promise.resolve(workflowMutation.mutateAsync(payload)).then(function (result) {
|
|
@@ -4342,11 +4372,12 @@ const Review = () => {
|
|
|
4342
4372
|
}
|
|
4343
4373
|
});
|
|
4344
4374
|
}, function (err) {
|
|
4345
|
-
var _err$
|
|
4375
|
+
var _err$response3, _err$response3$data, _err$response3$data$E, _err$response3$data$E2, _err$Errors2, _err$Errors2$;
|
|
4346
4376
|
console.error("Approve Error:", err);
|
|
4377
|
+
const errMsg = (err === null || err === void 0 ? void 0 : (_err$response3 = err.response) === null || _err$response3 === void 0 ? void 0 : (_err$response3$data = _err$response3.data) === null || _err$response3$data === void 0 ? void 0 : (_err$response3$data$E = _err$response3$data.Errors) === null || _err$response3$data$E === void 0 ? void 0 : (_err$response3$data$E2 = _err$response3$data$E[0]) === null || _err$response3$data$E2 === void 0 ? void 0 : _err$response3$data$E2.message) || (err === null || err === void 0 ? void 0 : (_err$Errors2 = err.Errors) === null || _err$Errors2 === void 0 ? void 0 : (_err$Errors2$ = _err$Errors2[0]) === null || _err$Errors2$ === void 0 ? void 0 : _err$Errors2$.message) || (err === null || err === void 0 ? void 0 : err.message) || t("EKYC_APPROVE_ERROR") || "Approve failed. Please try again.";
|
|
4347
4378
|
setToastData({
|
|
4348
4379
|
error: true,
|
|
4349
|
-
label:
|
|
4380
|
+
label: errMsg
|
|
4350
4381
|
});
|
|
4351
4382
|
setShowToast(true);
|
|
4352
4383
|
});
|
|
@@ -4376,9 +4407,9 @@ const Review = () => {
|
|
|
4376
4407
|
};
|
|
4377
4408
|
const handleMenuSelect = option => {
|
|
4378
4409
|
setShowOptions(false);
|
|
4379
|
-
if (option.action === t("
|
|
4410
|
+
if (option.action === t("APPROVE")) {
|
|
4380
4411
|
handleApprove();
|
|
4381
|
-
} else if (option.action === t("
|
|
4412
|
+
} else if (option.action === t("REJECT")) {
|
|
4382
4413
|
handleReject();
|
|
4383
4414
|
}
|
|
4384
4415
|
};
|
|
@@ -5908,7 +5939,7 @@ const SupervisorDetailsCard = () => {
|
|
|
5908
5939
|
alert(t("NO_DATA_FOUND") || "No data found for download.");
|
|
5909
5940
|
return;
|
|
5910
5941
|
}
|
|
5911
|
-
const excludedKeys = ["status", "source", "
|
|
5942
|
+
const excludedKeys = ["status", "source", "assignedAt", "connectionType", "approvedAt", "alternateMobileNo", "city", "state", "addressType", "addressProofType", "mrcode", "areacode", "verificationStatus", "surveyorId", "supervisorId", "vendorId", "assignmentType", "assignmentValue", "assignedTime", "isSelfAssigned", "userType", "tenantName", "tenantMobile", "doorPhotoFilestoreId", "panFilestoreId", "documentProofFilestoreId", "buildingImageFileStoreId", "propertyDocumentFileStoreId", "meterPhotoFileStoreId", "modifiedBy", "zoneCode", "propertyType", "subPropertyCategory"];
|
|
5912
5943
|
const headerMapping = {
|
|
5913
5944
|
kno: t("KNO"),
|
|
5914
5945
|
firstName: t("FIRST_NAME"),
|
|
@@ -7172,7 +7203,7 @@ const SurveyorDetailsDashboard = () => {
|
|
|
7172
7203
|
alert(t("NO_DATA_FOUND") || "No data found for download.");
|
|
7173
7204
|
return;
|
|
7174
7205
|
}
|
|
7175
|
-
const excludedKeys = ["status", "source", "
|
|
7206
|
+
const excludedKeys = ["status", "source", "assignedAt", "connectionType", "approvedAt", "alternateMobileNo", "city", "state", "addressType", "addressProofType", "mrcode", "areacode", "verificationStatus", "surveyorId", "supervisorId", "vendorId", "assignmentType", "assignmentValue", "assignedTime", "isSelfAssigned", "userType", "tenantName", "tenantMobile", "doorPhotoFilestoreId", "panFilestoreId", "documentProofFilestoreId", "buildingImageFileStoreId", "propertyDocumentFileStoreId", "meterPhotoFileStoreId", "modifiedBy", "zoneCode", "propertyType", "subPropertyCategory"];
|
|
7176
7207
|
const headerMapping = {
|
|
7177
7208
|
kno: t("KNO"),
|
|
7178
7209
|
firstName: t("FIRST_NAME"),
|
|
@@ -9989,7 +10020,7 @@ const CitizenApp = () => {
|
|
|
9989
10020
|
}), /*#__PURE__*/React.createElement(PrivateRoute, {
|
|
9990
10021
|
path: path + "/review",
|
|
9991
10022
|
component: () => /*#__PURE__*/React.createElement(LayoutWrapper, {
|
|
9992
|
-
layoutClass: "
|
|
10023
|
+
layoutClass: "action"
|
|
9993
10024
|
}, /*#__PURE__*/React.createElement(Review, null))
|
|
9994
10025
|
}), /*#__PURE__*/React.createElement(PrivateRoute, {
|
|
9995
10026
|
path: path + "/assign",
|