@djb25/digit-ui-module-ekyc 1.0.55 → 1.0.56
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 +47 -23
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +47 -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, _supervisorData;
|
|
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,48 @@ 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 matchedSupervisor = (_supervisorData = 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));
|
|
4291
|
+
const supervisorId = (matchedSupervisor === null || matchedSupervisor === void 0 ? void 0 : matchedSupervisor.uuid) || (loggedInUserInfo === null || loggedInUserInfo === void 0 ? void 0 : loggedInUserInfo.uuid);
|
|
4280
4292
|
const handleReject = function () {
|
|
4281
4293
|
try {
|
|
4282
|
-
var _Digit$UserService$
|
|
4294
|
+
var _Digit$UserService$ge2;
|
|
4283
4295
|
const payload = {
|
|
4284
4296
|
RequestInfo: {
|
|
4285
4297
|
apiId: "Rainmaker",
|
|
4286
4298
|
ver: "1.0",
|
|
4287
4299
|
msgId: "message-id",
|
|
4288
4300
|
tenantId: tenantId,
|
|
4289
|
-
authToken: (_Digit$UserService$
|
|
4301
|
+
authToken: (_Digit$UserService$ge2 = Digit.UserService.getUser()) === null || _Digit$UserService$ge2 === void 0 ? void 0 : _Digit$UserService$ge2.access_token
|
|
4290
4302
|
},
|
|
4291
4303
|
kno: activeKno,
|
|
4292
4304
|
action: "REJECTED",
|
|
4293
4305
|
remarks: "Application rejected by reviewer",
|
|
4294
|
-
reviewedBy:
|
|
4295
|
-
role:
|
|
4306
|
+
reviewedBy: supervisorId,
|
|
4307
|
+
role: currentUserRole
|
|
4296
4308
|
};
|
|
4297
4309
|
const _temp = _catch(function () {
|
|
4298
4310
|
return Promise.resolve(workflowMutation.mutateAsync(payload)).then(function (result) {
|
|
4299
4311
|
if (result) {
|
|
4300
|
-
|
|
4301
|
-
|
|
4302
|
-
|
|
4312
|
+
setToastData({
|
|
4313
|
+
error: true,
|
|
4314
|
+
label: t("EKYC_APPLICATION_REJECT_SUCCESSFUL") || "Application Rejected Successfully"
|
|
4303
4315
|
});
|
|
4316
|
+
setShowToast(true);
|
|
4317
|
+
setTimeout(() => {
|
|
4318
|
+
history.push("/digit-ui/employee/ekyc/inbox");
|
|
4319
|
+
}, 2000);
|
|
4304
4320
|
}
|
|
4305
4321
|
});
|
|
4306
4322
|
}, function (err) {
|
|
4323
|
+
var _err$response, _err$response$data, _err$response2, _err$response2$data, _err$response2$data$E, _err$response2$data$E2, _err$Errors, _err$Errors$;
|
|
4307
4324
|
console.error("Reject Error:", err);
|
|
4325
|
+
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.";
|
|
4326
|
+
setToastData({
|
|
4327
|
+
error: true,
|
|
4328
|
+
label: errMsg
|
|
4329
|
+
});
|
|
4330
|
+
setShowToast(true);
|
|
4308
4331
|
});
|
|
4309
4332
|
return Promise.resolve(_temp && _temp.then ? _temp.then(function () {}) : void 0);
|
|
4310
4333
|
} catch (e) {
|
|
@@ -4313,20 +4336,20 @@ const Review = () => {
|
|
|
4313
4336
|
};
|
|
4314
4337
|
const handleApprove = function () {
|
|
4315
4338
|
try {
|
|
4316
|
-
var _Digit$UserService$
|
|
4339
|
+
var _Digit$UserService$ge3;
|
|
4317
4340
|
const payload = {
|
|
4318
4341
|
RequestInfo: {
|
|
4319
4342
|
apiId: "Rainmaker",
|
|
4320
4343
|
ver: "1.0",
|
|
4321
4344
|
msgId: "message-id",
|
|
4322
4345
|
tenantId: tenantId,
|
|
4323
|
-
authToken: (_Digit$UserService$
|
|
4346
|
+
authToken: (_Digit$UserService$ge3 = Digit.UserService.getUser()) === null || _Digit$UserService$ge3 === void 0 ? void 0 : _Digit$UserService$ge3.access_token
|
|
4324
4347
|
},
|
|
4325
4348
|
kno: activeKno,
|
|
4326
4349
|
action: "APPROVED",
|
|
4327
4350
|
remarks: "All documents verified",
|
|
4328
|
-
reviewedBy:
|
|
4329
|
-
role:
|
|
4351
|
+
reviewedBy: supervisorId,
|
|
4352
|
+
role: currentUserRole
|
|
4330
4353
|
};
|
|
4331
4354
|
const _temp2 = _catch(function () {
|
|
4332
4355
|
return Promise.resolve(workflowMutation.mutateAsync(payload)).then(function (result) {
|
|
@@ -4342,11 +4365,12 @@ const Review = () => {
|
|
|
4342
4365
|
}
|
|
4343
4366
|
});
|
|
4344
4367
|
}, function (err) {
|
|
4345
|
-
var _err$
|
|
4368
|
+
var _err$response3, _err$response3$data, _err$response3$data$E, _err$response3$data$E2, _err$Errors2, _err$Errors2$;
|
|
4346
4369
|
console.error("Approve Error:", err);
|
|
4370
|
+
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
4371
|
setToastData({
|
|
4348
4372
|
error: true,
|
|
4349
|
-
label:
|
|
4373
|
+
label: errMsg
|
|
4350
4374
|
});
|
|
4351
4375
|
setShowToast(true);
|
|
4352
4376
|
});
|
|
@@ -4376,9 +4400,9 @@ const Review = () => {
|
|
|
4376
4400
|
};
|
|
4377
4401
|
const handleMenuSelect = option => {
|
|
4378
4402
|
setShowOptions(false);
|
|
4379
|
-
if (option.action === t("
|
|
4403
|
+
if (option.action === t("APPROVE")) {
|
|
4380
4404
|
handleApprove();
|
|
4381
|
-
} else if (option.action === t("
|
|
4405
|
+
} else if (option.action === t("REJECT")) {
|
|
4382
4406
|
handleReject();
|
|
4383
4407
|
}
|
|
4384
4408
|
};
|
|
@@ -5908,7 +5932,7 @@ const SupervisorDetailsCard = () => {
|
|
|
5908
5932
|
alert(t("NO_DATA_FOUND") || "No data found for download.");
|
|
5909
5933
|
return;
|
|
5910
5934
|
}
|
|
5911
|
-
const excludedKeys = ["status", "source", "
|
|
5935
|
+
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
5936
|
const headerMapping = {
|
|
5913
5937
|
kno: t("KNO"),
|
|
5914
5938
|
firstName: t("FIRST_NAME"),
|
|
@@ -7172,7 +7196,7 @@ const SurveyorDetailsDashboard = () => {
|
|
|
7172
7196
|
alert(t("NO_DATA_FOUND") || "No data found for download.");
|
|
7173
7197
|
return;
|
|
7174
7198
|
}
|
|
7175
|
-
const excludedKeys = ["status", "source", "
|
|
7199
|
+
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
7200
|
const headerMapping = {
|
|
7177
7201
|
kno: t("KNO"),
|
|
7178
7202
|
firstName: t("FIRST_NAME"),
|
|
@@ -9989,7 +10013,7 @@ const CitizenApp = () => {
|
|
|
9989
10013
|
}), /*#__PURE__*/React.createElement(PrivateRoute, {
|
|
9990
10014
|
path: path + "/review",
|
|
9991
10015
|
component: () => /*#__PURE__*/React.createElement(LayoutWrapper, {
|
|
9992
|
-
layoutClass: "
|
|
10016
|
+
layoutClass: "action"
|
|
9993
10017
|
}, /*#__PURE__*/React.createElement(Review, null))
|
|
9994
10018
|
}), /*#__PURE__*/React.createElement(PrivateRoute, {
|
|
9995
10019
|
path: path + "/assign",
|