@djb25/digit-ui-module-ekyc 1.0.52 → 1.0.54
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 +706 -297
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +706 -297
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -99,6 +99,25 @@ const EKYCCard = () => {
|
|
|
99
99
|
return /*#__PURE__*/React__default.createElement(digitUiReactComponents.EmployeeModuleCard, propsForModuleCard);
|
|
100
100
|
};
|
|
101
101
|
|
|
102
|
+
function _extends() {
|
|
103
|
+
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
|
104
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
105
|
+
var t = arguments[e];
|
|
106
|
+
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
107
|
+
}
|
|
108
|
+
return n;
|
|
109
|
+
}, _extends.apply(null, arguments);
|
|
110
|
+
}
|
|
111
|
+
function _objectWithoutPropertiesLoose(r, e) {
|
|
112
|
+
if (null == r) return {};
|
|
113
|
+
var t = {};
|
|
114
|
+
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
|
|
115
|
+
if (-1 !== e.indexOf(n)) continue;
|
|
116
|
+
t[n] = r[n];
|
|
117
|
+
}
|
|
118
|
+
return t;
|
|
119
|
+
}
|
|
120
|
+
|
|
102
121
|
const _iteratorSymbol = /*#__PURE__*/typeof Symbol !== "undefined" ? Symbol.iterator || (Symbol.iterator = Symbol("Symbol.iterator")) : "@@iterator";
|
|
103
122
|
const _asyncIteratorSymbol = /*#__PURE__*/typeof Symbol !== "undefined" ? Symbol.asyncIterator || (Symbol.asyncIterator = Symbol("Symbol.asyncIterator")) : "@@asyncIterator";
|
|
104
123
|
function _catch(body, recover) {
|
|
@@ -136,6 +155,29 @@ const StatusCards = _ref => {
|
|
|
136
155
|
const _useState = React.useState(false),
|
|
137
156
|
ekycDownloadLoading = _useState[0],
|
|
138
157
|
setEkycDownloadLoading = _useState[1];
|
|
158
|
+
const _useState2 = React.useState(false),
|
|
159
|
+
showReportMenu = _useState2[0],
|
|
160
|
+
setShowReportMenu = _useState2[1];
|
|
161
|
+
const _useState3 = React.useState({
|
|
162
|
+
from: "",
|
|
163
|
+
to: ""
|
|
164
|
+
}),
|
|
165
|
+
customDate = _useState3[0],
|
|
166
|
+
setCustomDate = _useState3[1];
|
|
167
|
+
const _useState4 = React.useState(false),
|
|
168
|
+
showCustomPicker = _useState4[0],
|
|
169
|
+
setShowCustomPicker = _useState4[1];
|
|
170
|
+
const reportMenuRef = React.useRef(null);
|
|
171
|
+
React.useEffect(() => {
|
|
172
|
+
const handler = e => {
|
|
173
|
+
if (reportMenuRef.current && !reportMenuRef.current.contains(e.target)) {
|
|
174
|
+
setShowReportMenu(false);
|
|
175
|
+
setShowCustomPicker(false);
|
|
176
|
+
}
|
|
177
|
+
};
|
|
178
|
+
document.addEventListener("mousedown", handler);
|
|
179
|
+
return () => document.removeEventListener("mousedown", handler);
|
|
180
|
+
}, []);
|
|
139
181
|
let tenantId = Digit.ULBService.getCurrentTenantId();
|
|
140
182
|
if (!tenantId || tenantId === "dl") {
|
|
141
183
|
tenantId = "dl.djb";
|
|
@@ -164,50 +206,149 @@ const StatusCards = _ref => {
|
|
|
164
206
|
active: info.active || 0
|
|
165
207
|
};
|
|
166
208
|
}, [dashboardData]);
|
|
167
|
-
const handleDownloadEkycData = function () {
|
|
209
|
+
const handleDownloadEkycData = function (fromDate, toDate) {
|
|
168
210
|
try {
|
|
169
211
|
setEkycDownloadLoading(true);
|
|
170
212
|
return Promise.resolve(_finallyRethrows(function () {
|
|
171
213
|
return _catch(function () {
|
|
172
|
-
return Promise.resolve(Digit.EkycService.application_list({
|
|
214
|
+
return Promise.resolve(Digit.EkycService.application_list(_extends({
|
|
173
215
|
tenantId: tenantId,
|
|
174
216
|
offset: 0,
|
|
175
217
|
limit: 10000,
|
|
176
218
|
reportDownload: true
|
|
177
|
-
}
|
|
219
|
+
}, fromDate && {
|
|
220
|
+
fromDate
|
|
221
|
+
}, toDate && {
|
|
222
|
+
toDate
|
|
223
|
+
}))).then(function (response) {
|
|
178
224
|
const consumerList = (response === null || response === void 0 ? void 0 : response.consumerList) || [];
|
|
179
225
|
if (consumerList.length === 0) {
|
|
180
226
|
alert(t("NO_DATA_FOUND") || "No data found for download.");
|
|
181
227
|
return;
|
|
182
228
|
}
|
|
183
|
-
const excludedKeys = ["status", "source", "submittedAt", "assignedAt", "connectionType", "approvedAt", "alternateMobileNo", "city", "state", "addressType", "addressProofType", "mrcode", "areacode", "verificationStatus", "surveyorId", "supervisorId", "vendorId", "assignmentType", "assignmentValue", "assignedTime", "isSelfAssigned", "userType", "tenantName", "tenantMobile"];
|
|
229
|
+
const excludedKeys = ["status", "source", "submittedAt", "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"];
|
|
184
230
|
const headerMapping = {
|
|
185
|
-
kno: t("KNO")
|
|
186
|
-
firstName: t("FIRST_NAME")
|
|
187
|
-
middleName: t("MIDDLE_NAME")
|
|
188
|
-
lastName: t("LAST_NAME")
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
231
|
+
kno: t("KNO"),
|
|
232
|
+
firstName: t("FIRST_NAME"),
|
|
233
|
+
middleName: t("MIDDLE_NAME"),
|
|
234
|
+
lastName: t("LAST_NAME"),
|
|
235
|
+
status: t("STATUS"),
|
|
236
|
+
ekycStatus: t("EKYC_STATUS"),
|
|
237
|
+
zoneName: t("ZONE"),
|
|
238
|
+
zoneCode: t("ZONE_CODE"),
|
|
239
|
+
assembly: t("EKYC_ASSEMBLY"),
|
|
240
|
+
ward: t("WARD"),
|
|
241
|
+
pincode: t("EKYC_PINCODE"),
|
|
242
|
+
addressRaw: t("ADDRESS_RAW"),
|
|
243
|
+
locality: t("EKYC_LOCALITY"),
|
|
244
|
+
subLocality: t("SUB_LOCALITY"),
|
|
245
|
+
flatHouseNumber: t("FLAT_HOUSE_NUMBER"),
|
|
246
|
+
streetName: t("STREET_NAME"),
|
|
247
|
+
landmark: t("EKYC_LANDMARK"),
|
|
248
|
+
city: t("CITY"),
|
|
249
|
+
state: t("STATE"),
|
|
250
|
+
addressType: t("ADDRESS_TYPE"),
|
|
251
|
+
addressProofType: t("ADDRESS_PROOF_TYPE"),
|
|
252
|
+
mobileNo: t("MOBILE_NUMBER"),
|
|
253
|
+
alternateMobileNo: t("ALTERNATE_MOBILE_NUMBER"),
|
|
254
|
+
whatsappNo: t("WHATSAPP_NO"),
|
|
255
|
+
email: t("EMAIL"),
|
|
256
|
+
landlineNo: t("LANDLINE_NO"),
|
|
257
|
+
mrkey: t("MR_KEY"),
|
|
258
|
+
mrcode: t("MR_CODE"),
|
|
259
|
+
areacode: t("AREA_CODE"),
|
|
260
|
+
source: t("SOURCE"),
|
|
261
|
+
submittedAt: t("SUBMITTED_AT"),
|
|
262
|
+
assignedAt: t("ASSIGNED_AT"),
|
|
263
|
+
connectionType: t("CONNECTION_TYPE"),
|
|
264
|
+
Type: t("CONSUMER_TYPE"),
|
|
265
|
+
occupantType: t("OCCUPANT_TYPE"),
|
|
266
|
+
knoCategory: t("KNO_CATEGORY"),
|
|
267
|
+
approvedAt: t("APPROVED_AT"),
|
|
268
|
+
gender: t("GENDER"),
|
|
269
|
+
parentSpouse: t("PARENT_SPOUSE"),
|
|
270
|
+
fatherOrHusbandName: t("FATHER_HUSBUND_NAME"),
|
|
271
|
+
relationship: t("RELATIONSHIP"),
|
|
272
|
+
informantName: t("INFORMANT_NAME"),
|
|
273
|
+
informantRelation: t("INFORMANT_RELATION"),
|
|
274
|
+
informantIs: t("INFORMANT_IS"),
|
|
275
|
+
contactPerson: t("CONTACT_PERSON"),
|
|
276
|
+
relation: t("RELATION"),
|
|
277
|
+
entityName: t("ENTITY_NAME"),
|
|
278
|
+
designation: t("DESIGNATION"),
|
|
279
|
+
department: t("DEPARTMENT"),
|
|
280
|
+
employeeId: t("EMPLOYEE_ID"),
|
|
281
|
+
ownerMobile: t("OWNER_MOBILE"),
|
|
282
|
+
ownerVerificationDone: t("OWNER_VERIFICATION_DONE"),
|
|
283
|
+
consentGiven: t("CONSENT_GIVEN"),
|
|
284
|
+
proofOfIdentityType: t("PROOF_OF_IDENTITY_TYPE"),
|
|
285
|
+
documentNumber: t("DOCUMENT_NUMBER"),
|
|
286
|
+
noOfPerson: t("NUMBER_OF_PERSON"),
|
|
287
|
+
latitude: t("LATITUDE"),
|
|
288
|
+
longitude: t("LONGITUDE"),
|
|
289
|
+
gpsValid: t("GPS_VALID"),
|
|
290
|
+
meterNumber: t("METER_NUMBER"),
|
|
291
|
+
meterMake: t("METER_MAKE"),
|
|
292
|
+
meterStatus: t("METER_STATUS"),
|
|
293
|
+
meterCondition: t("METER_CONDITION"),
|
|
294
|
+
meterLocation: t("METER_LOCATION"),
|
|
295
|
+
meterLocationAddress: t("METER_LOCATION_ADDRESS"),
|
|
296
|
+
workingStatus: t("WORKING_STATUS"),
|
|
297
|
+
sewerConnection: t("SEWER_CONNECTION"),
|
|
298
|
+
septicTank: t("SEPTIC_TANK"),
|
|
299
|
+
lastBillRaised: t("LAST_BILL_RAISED"),
|
|
300
|
+
lastBillReceivedDate: t("LAST_BILL_RECEIVED_DATE"),
|
|
301
|
+
accessToMeter: t("ACCESS_TO_METER"),
|
|
302
|
+
systemMeterId: t("SYSTEM_METER_ID"),
|
|
303
|
+
lastBillNotRaisedReason: t("LAST_BILL_NOT_RAISED_REASON"),
|
|
304
|
+
waterConnectionYears: t("WATER_CONNECTION_YEARS"),
|
|
305
|
+
sewerConnectionYears: t("SEWER_CONNECTION_YEARS"),
|
|
306
|
+
pidNumber: t("PID_NUMBER"),
|
|
307
|
+
propertyType: t("PROPERTY_TYPE"),
|
|
308
|
+
subPropertyCategory: t("SUB_PROPERTY_CATEGORY"),
|
|
309
|
+
noOfFloor: t("NO_OF_FLOOR"),
|
|
310
|
+
noOfRooms: t("NO_OF_ROOMS"),
|
|
311
|
+
noOfBeds: t("NO_OF_BEDS"),
|
|
312
|
+
numberOfDwellingUnits: t("NUMBER_OF_DWELLING_UNITS"),
|
|
313
|
+
floorNo: t("FLOOR_NO"),
|
|
314
|
+
userType: t("USER_TYPE"),
|
|
315
|
+
tenantName: t("TENANT_NAME"),
|
|
316
|
+
tenantMobile: t("TENANT_MOBILE"),
|
|
317
|
+
verificationStatus: t("VERIFICATION_STATUS"),
|
|
318
|
+
houseBuiltDuration: t("HOUSE_BUILT_DURATION"),
|
|
319
|
+
surveyorId: t("SURVEYOR_ID"),
|
|
320
|
+
supervisorId: t("SUPERVISOR_ID"),
|
|
321
|
+
vendorId: t("VENDOR_ID"),
|
|
322
|
+
assignmentType: t("ASSIGNMENT_TYPE"),
|
|
323
|
+
assignmentValue: t("ASSIGNMENT_VALUE"),
|
|
324
|
+
assignedTime: t("ASSIGNED_TIME"),
|
|
325
|
+
isSelfAssigned: t("IS_SELF_ASSIGNED"),
|
|
326
|
+
doorPhotoFilestoreId: t("DOOR_PHOTO_FILESTORE_ID"),
|
|
327
|
+
panFilestoreId: t("PAN_FILESTORE_ID"),
|
|
328
|
+
documentProofFilestoreId: t("DOCUMENT_PROOF_FILESTORE_ID"),
|
|
329
|
+
buildingImageFileStoreId: t("BUILDING_IMAGE_FILESTORE_ID"),
|
|
330
|
+
propertyDocumentFileStoreId: t("PROPERTY_DOCUMENT_FILESTORE_ID"),
|
|
331
|
+
meterPhotoFileStoreId: t("METER_PHOTO_FILESTORE_ID"),
|
|
332
|
+
modifiedBy: t("MODIFIED_BY"),
|
|
333
|
+
emailId: t("EMAIL_ID"),
|
|
334
|
+
fatherOrHusbandName: t("FATHER_HUSBUND_NAME"),
|
|
335
|
+
dob: t("DOB"),
|
|
336
|
+
consumerType: t("CONSUMER_TYPE"),
|
|
337
|
+
createdTime: t("CREATED_TIME"),
|
|
338
|
+
lastModifiedTime: t("LAST_MODIFIED_TIME"),
|
|
339
|
+
meterLatitude: t("EKYC_METER_LATITUDE1"),
|
|
340
|
+
meterLongitude: t("EKYC_METER_LONGITUDE1")
|
|
204
341
|
};
|
|
205
342
|
const toTitleCase = str => {
|
|
206
343
|
if (!str) return "";
|
|
207
|
-
|
|
344
|
+
let cleanStr = String(str);
|
|
345
|
+
if (cleanStr.includes(".") && !cleanStr.includes("@") && isNaN(Number(cleanStr))) {
|
|
346
|
+
cleanStr = cleanStr.split(".").pop();
|
|
347
|
+
}
|
|
208
348
|
return cleanStr.toLowerCase().replace(/_/g, " ").replace(/\b\w/g, c => c.toUpperCase());
|
|
209
349
|
};
|
|
210
|
-
const skipTitleCase = ["kno", "mobileNumber", "emailId", "pincode", "mrkey", "dob", "createdTime", "lastModifiedTime"];
|
|
350
|
+
const skipTitleCase = ["kno", "mobileNumber", "emailId", "email", "pincode", "mrkey", "dob", "createdTime", "lastModifiedTime", "meterLatitude", "meterLongitude"];
|
|
351
|
+
const translatedFields = ["meterMake", "meterLocation"];
|
|
211
352
|
const excelData = consumerList.map(item => {
|
|
212
353
|
const cleanObj = {};
|
|
213
354
|
const name = [item.firstName, item.middleName, item.lastName].filter(Boolean).join(" ");
|
|
@@ -216,12 +357,19 @@ const StatusCards = _ref => {
|
|
|
216
357
|
}
|
|
217
358
|
Object.keys(item).forEach(key => {
|
|
218
359
|
if (excludedKeys.includes(key)) return;
|
|
219
|
-
|
|
360
|
+
let val = item[key];
|
|
220
361
|
if (typeof val === "object" && val !== null) {
|
|
221
362
|
return;
|
|
222
363
|
}
|
|
364
|
+
if (String(val).toLowerCase() === "true") {
|
|
365
|
+
val = t("CS_YES");
|
|
366
|
+
} else if (String(val).toLowerCase() === "false") {
|
|
367
|
+
val = t("CS_NO");
|
|
368
|
+
}
|
|
223
369
|
const friendlyHeader = headerMapping[key] || t(key.toUpperCase()) || key;
|
|
224
|
-
if (typeof val === "string" &&
|
|
370
|
+
if (typeof val === "string" && translatedFields.includes(key)) {
|
|
371
|
+
cleanObj[friendlyHeader] = t(val);
|
|
372
|
+
} else if (typeof val === "string" && !skipTitleCase.includes(key)) {
|
|
225
373
|
cleanObj[friendlyHeader] = toTitleCase(val);
|
|
226
374
|
} else {
|
|
227
375
|
cleanObj[friendlyHeader] = val;
|
|
@@ -244,6 +392,62 @@ const StatusCards = _ref => {
|
|
|
244
392
|
return Promise.reject(e);
|
|
245
393
|
}
|
|
246
394
|
};
|
|
395
|
+
const getDateRange = filter => {
|
|
396
|
+
const now = new Date();
|
|
397
|
+
const start = new Date(now);
|
|
398
|
+
if (filter === "today") {
|
|
399
|
+
start.setHours(0, 0, 0, 0);
|
|
400
|
+
return {
|
|
401
|
+
from: start,
|
|
402
|
+
to: now
|
|
403
|
+
};
|
|
404
|
+
}
|
|
405
|
+
if (filter === "week") {
|
|
406
|
+
start.setDate(now.getDate() - now.getDay());
|
|
407
|
+
start.setHours(0, 0, 0, 0);
|
|
408
|
+
return {
|
|
409
|
+
from: start,
|
|
410
|
+
to: now
|
|
411
|
+
};
|
|
412
|
+
}
|
|
413
|
+
if (filter === "month") {
|
|
414
|
+
start.setDate(1);
|
|
415
|
+
start.setHours(0, 0, 0, 0);
|
|
416
|
+
return {
|
|
417
|
+
from: start,
|
|
418
|
+
to: now
|
|
419
|
+
};
|
|
420
|
+
}
|
|
421
|
+
return null;
|
|
422
|
+
};
|
|
423
|
+
const handlePresetDownload = function (filter) {
|
|
424
|
+
try {
|
|
425
|
+
const range = getDateRange(filter);
|
|
426
|
+
if (!range) return Promise.resolve();
|
|
427
|
+
setShowReportMenu(false);
|
|
428
|
+
setShowCustomPicker(false);
|
|
429
|
+
return Promise.resolve(handleDownloadEkycData(range.from.getTime(), range.to.getTime())).then(function () {});
|
|
430
|
+
} catch (e) {
|
|
431
|
+
return Promise.reject(e);
|
|
432
|
+
}
|
|
433
|
+
};
|
|
434
|
+
const handleCustomDownload = function () {
|
|
435
|
+
try {
|
|
436
|
+
if (!customDate.from || !customDate.to) {
|
|
437
|
+
alert(t("SELECT_DATE_RANGE") || "Please select both From and To dates.");
|
|
438
|
+
return Promise.resolve();
|
|
439
|
+
}
|
|
440
|
+
const from = new Date(customDate.from);
|
|
441
|
+
from.setHours(0, 0, 0, 0);
|
|
442
|
+
const to = new Date(customDate.to);
|
|
443
|
+
to.setHours(23, 59, 59, 999);
|
|
444
|
+
setShowReportMenu(false);
|
|
445
|
+
setShowCustomPicker(false);
|
|
446
|
+
return Promise.resolve(handleDownloadEkycData(from.getTime(), to.getTime())).then(function () {});
|
|
447
|
+
} catch (e) {
|
|
448
|
+
return Promise.reject(e);
|
|
449
|
+
}
|
|
450
|
+
};
|
|
247
451
|
const chartRef1 = React.useRef(null);
|
|
248
452
|
const chartInstance1 = React.useRef(null);
|
|
249
453
|
const total = hasExternalData ? countData.total : (apiCountData === null || apiCountData === void 0 ? void 0 : apiCountData.total) || (countData === null || countData === void 0 ? void 0 : countData.total) || (countData === null || countData === void 0 ? void 0 : countData.totalCount) || 0;
|
|
@@ -327,10 +531,16 @@ const StatusCards = _ref => {
|
|
|
327
531
|
className: "total-label"
|
|
328
532
|
}, t("EKYC_TOTAL_APPLICATIONS") || "Total Applications Processed"), /*#__PURE__*/React__default.createElement("div", {
|
|
329
533
|
className: "total-number"
|
|
330
|
-
}, formatNumber(total)), /*#__PURE__*/React__default.createElement("
|
|
534
|
+
}, formatNumber(total)), /*#__PURE__*/React__default.createElement("div", {
|
|
535
|
+
className: "report-download",
|
|
536
|
+
ref: reportMenuRef
|
|
537
|
+
}, /*#__PURE__*/React__default.createElement("button", {
|
|
331
538
|
className: "download-excel-btn",
|
|
332
539
|
disabled: ekycDownloadLoading,
|
|
333
|
-
onClick:
|
|
540
|
+
onClick: () => {
|
|
541
|
+
setShowReportMenu(p => !p);
|
|
542
|
+
setShowCustomPicker(false);
|
|
543
|
+
}
|
|
334
544
|
}, /*#__PURE__*/React__default.createElement("svg", {
|
|
335
545
|
width: "16",
|
|
336
546
|
height: "16",
|
|
@@ -349,7 +559,63 @@ const StatusCards = _ref => {
|
|
|
349
559
|
y1: "15",
|
|
350
560
|
x2: "12",
|
|
351
561
|
y2: "3"
|
|
352
|
-
})), ekycDownloadLoading ? t("DOWNLOADING") || "Downloading..." : t("DOWNLOAD_EXCEL") || "Download Excel")
|
|
562
|
+
})), ekycDownloadLoading ? t("DOWNLOADING") || "Downloading..." : t("DOWNLOAD_EXCEL") || "Download Excel"), showReportMenu && /*#__PURE__*/React__default.createElement("div", {
|
|
563
|
+
className: "report-menu"
|
|
564
|
+
}, [{
|
|
565
|
+
label: t("TODAY") || "Today",
|
|
566
|
+
key: "today"
|
|
567
|
+
}, {
|
|
568
|
+
label: t("THIS_WEEK") || "This Week",
|
|
569
|
+
key: "week"
|
|
570
|
+
}, {
|
|
571
|
+
label: t("THIS_MONTH") || "This Month",
|
|
572
|
+
key: "month"
|
|
573
|
+
}].map(_ref2 => {
|
|
574
|
+
let label = _ref2.label,
|
|
575
|
+
key = _ref2.key;
|
|
576
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
577
|
+
key: key,
|
|
578
|
+
className: "menu-item",
|
|
579
|
+
onClick: () => handlePresetDownload(key)
|
|
580
|
+
}, label);
|
|
581
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
582
|
+
className: "custom-date-trigger",
|
|
583
|
+
onClick: () => setShowCustomPicker(p => !p)
|
|
584
|
+
}, t("CUSTOM_DATE") || "Custom Date"), showCustomPicker && /*#__PURE__*/React__default.createElement("div", {
|
|
585
|
+
className: "custom-picker"
|
|
586
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
587
|
+
className: "date-inputs"
|
|
588
|
+
}, /*#__PURE__*/React__default.createElement("label", null, /*#__PURE__*/React__default.createElement("span", null, "From"), /*#__PURE__*/React__default.createElement("input", {
|
|
589
|
+
type: "date",
|
|
590
|
+
value: customDate.from,
|
|
591
|
+
onChange: e => setCustomDate(_extends({}, customDate, {
|
|
592
|
+
from: e.target.value
|
|
593
|
+
}))
|
|
594
|
+
})), /*#__PURE__*/React__default.createElement("label", null, /*#__PURE__*/React__default.createElement("span", null, "To"), /*#__PURE__*/React__default.createElement("input", {
|
|
595
|
+
type: "date",
|
|
596
|
+
value: customDate.to,
|
|
597
|
+
onChange: e => setCustomDate(_extends({}, customDate, {
|
|
598
|
+
to: e.target.value
|
|
599
|
+
}))
|
|
600
|
+
}))), /*#__PURE__*/React__default.createElement("div", {
|
|
601
|
+
style: {
|
|
602
|
+
display: "flex",
|
|
603
|
+
gap: "10px",
|
|
604
|
+
marginTop: "10px"
|
|
605
|
+
}
|
|
606
|
+
}, /*#__PURE__*/React__default.createElement("button", {
|
|
607
|
+
className: "picker-cancel-btn",
|
|
608
|
+
onClick: () => {
|
|
609
|
+
setShowCustomPicker(false);
|
|
610
|
+
setCustomDate({
|
|
611
|
+
from: "",
|
|
612
|
+
to: ""
|
|
613
|
+
});
|
|
614
|
+
}
|
|
615
|
+
}, t("CANCEL") || "Cancel"), /*#__PURE__*/React__default.createElement("button", {
|
|
616
|
+
className: "picker-apply-btn",
|
|
617
|
+
onClick: handleCustomDownload
|
|
618
|
+
}, t("APPLY") || "Apply"))))))), /*#__PURE__*/React__default.createElement("div", {
|
|
353
619
|
className: "status-panels-grid"
|
|
354
620
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
355
621
|
className: "status-panel"
|
|
@@ -451,25 +717,6 @@ const Dashboard = () => {
|
|
|
451
717
|
}));
|
|
452
718
|
};
|
|
453
719
|
|
|
454
|
-
function _extends() {
|
|
455
|
-
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
|
456
|
-
for (var e = 1; e < arguments.length; e++) {
|
|
457
|
-
var t = arguments[e];
|
|
458
|
-
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
459
|
-
}
|
|
460
|
-
return n;
|
|
461
|
-
}, _extends.apply(null, arguments);
|
|
462
|
-
}
|
|
463
|
-
function _objectWithoutPropertiesLoose(r, e) {
|
|
464
|
-
if (null == r) return {};
|
|
465
|
-
var t = {};
|
|
466
|
-
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
|
|
467
|
-
if (-1 !== e.indexOf(n)) continue;
|
|
468
|
-
t[n] = r[n];
|
|
469
|
-
}
|
|
470
|
-
return t;
|
|
471
|
-
}
|
|
472
|
-
|
|
473
720
|
const _excluded = ["tableConfig", "filterComponent"];
|
|
474
721
|
const DesktopInbox = _ref => {
|
|
475
722
|
var _Digit$ComponentRegis;
|
|
@@ -2903,25 +3150,10 @@ const Inbox = _ref2 => {
|
|
|
2903
3150
|
targetVendorId: matchedId,
|
|
2904
3151
|
allVendorIds: allIds
|
|
2905
3152
|
};
|
|
2906
|
-
}, [vendorSearchResponse])
|
|
2907
|
-
|
|
2908
|
-
|
|
2909
|
-
|
|
2910
|
-
if (targetVendorId) {
|
|
2911
|
-
return {
|
|
2912
|
-
vendorId: targetVendorId,
|
|
2913
|
-
vendorIds: [targetVendorId]
|
|
2914
|
-
};
|
|
2915
|
-
}
|
|
2916
|
-
if (allVendorIds && allVendorIds.length > 0) {
|
|
2917
|
-
return {
|
|
2918
|
-
vendorId: allVendorIds[0],
|
|
2919
|
-
vendorIds: allVendorIds
|
|
2920
|
-
};
|
|
2921
|
-
}
|
|
2922
|
-
return {};
|
|
2923
|
-
}, [targetVendorId, allVendorIds]);
|
|
2924
|
-
const _Digit$Hooks$ekyc$use3 = Digit.Hooks.ekyc.useEkycAssignmentProgress(progressParams, {
|
|
3153
|
+
}, [vendorSearchResponse]);
|
|
3154
|
+
const _Digit$Hooks$ekyc$use3 = Digit.Hooks.ekyc.useEkycAssignmentProgress({
|
|
3155
|
+
tenantId
|
|
3156
|
+
}, {
|
|
2925
3157
|
enabled: !!tenantId,
|
|
2926
3158
|
keepPreviousData: true
|
|
2927
3159
|
}),
|
|
@@ -2983,65 +3215,56 @@ const Inbox = _ref2 => {
|
|
|
2983
3215
|
}, [sourceData]);
|
|
2984
3216
|
const _useTranslation = reactI18next.useTranslation(),
|
|
2985
3217
|
t = _useTranslation.t;
|
|
2986
|
-
const
|
|
2987
|
-
var
|
|
2988
|
-
|
|
2989
|
-
|
|
2990
|
-
|
|
2991
|
-
|
|
2992
|
-
|
|
2993
|
-
|
|
2994
|
-
|
|
2995
|
-
|
|
2996
|
-
|
|
2997
|
-
|
|
2998
|
-
|
|
2999
|
-
|
|
3000
|
-
|
|
3001
|
-
|
|
3002
|
-
|
|
3003
|
-
|
|
3004
|
-
const progressPercent = totalKnos > 0 ? Math.round(submittedKnos / totalKnos * 100) : 0;
|
|
3005
|
-
return {
|
|
3006
|
-
totalKnos,
|
|
3007
|
-
submittedKnos,
|
|
3008
|
-
pendingKnos,
|
|
3009
|
-
progressPercent
|
|
3010
|
-
};
|
|
3011
|
-
}
|
|
3012
|
-
return null;
|
|
3218
|
+
const progressMetrics = React.useMemo(() => {
|
|
3219
|
+
var _ref3, _progressData$totalKn, _ref4, _progressData$complet, _progressData$pending, _ref5, _progressData$overall;
|
|
3220
|
+
if (!progressData) return {
|
|
3221
|
+
totalKnos: 0,
|
|
3222
|
+
submittedKnos: 0,
|
|
3223
|
+
pendingKnos: 0,
|
|
3224
|
+
progressPercent: 0
|
|
3225
|
+
};
|
|
3226
|
+
const totalKnos = (_ref3 = (_progressData$totalKn = progressData === null || progressData === void 0 ? void 0 : progressData.totalKnos) != null ? _progressData$totalKn : progressData === null || progressData === void 0 ? void 0 : progressData.totalAssignments) != null ? _ref3 : 0;
|
|
3227
|
+
const submittedKnos = (_ref4 = (_progressData$complet = progressData === null || progressData === void 0 ? void 0 : progressData.completedKnos) != null ? _progressData$complet : progressData === null || progressData === void 0 ? void 0 : progressData.submittedKnos) != null ? _ref4 : 0;
|
|
3228
|
+
const pendingKnos = (_progressData$pending = progressData === null || progressData === void 0 ? void 0 : progressData.pendingKnos) != null ? _progressData$pending : totalKnos >= submittedKnos ? totalKnos - submittedKnos : 0;
|
|
3229
|
+
const progressPercent = (_ref5 = (_progressData$overall = progressData === null || progressData === void 0 ? void 0 : progressData.overallProgressPercent) != null ? _progressData$overall : progressData === null || progressData === void 0 ? void 0 : progressData.progressPercent) != null ? _ref5 : totalKnos > 0 ? (submittedKnos / totalKnos * 100).toFixed(1) : 0;
|
|
3230
|
+
return {
|
|
3231
|
+
totalKnos,
|
|
3232
|
+
submittedKnos,
|
|
3233
|
+
pendingKnos,
|
|
3234
|
+
progressPercent
|
|
3235
|
+
};
|
|
3013
3236
|
}, [progressData]);
|
|
3014
3237
|
const cards = React.useMemo(() => [{
|
|
3015
3238
|
label: t("TOTAL_EKYC_APPLICATIONS"),
|
|
3016
|
-
count: (
|
|
3239
|
+
count: (progressMetrics === null || progressMetrics === void 0 ? void 0 : progressMetrics.totalKnos) || 0,
|
|
3017
3240
|
color: "#0B2559",
|
|
3018
3241
|
type: "today",
|
|
3019
3242
|
icon: /*#__PURE__*/React__default.createElement(fa.FaUsers, null)
|
|
3020
3243
|
}, {
|
|
3021
3244
|
label: t("EKYC_COMPLETED"),
|
|
3022
|
-
count: (
|
|
3245
|
+
count: (progressMetrics === null || progressMetrics === void 0 ? void 0 : progressMetrics.submittedKnos) || 0,
|
|
3023
3246
|
color: "#10B981",
|
|
3024
3247
|
type: "month",
|
|
3025
3248
|
icon: /*#__PURE__*/React__default.createElement(fa.FaCheckCircle, null)
|
|
3026
3249
|
}, {
|
|
3027
3250
|
label: t("PENDING_APPLICATIONS"),
|
|
3028
|
-
count: (
|
|
3251
|
+
count: (progressMetrics === null || progressMetrics === void 0 ? void 0 : progressMetrics.pendingKnos) || 0,
|
|
3029
3252
|
color: "#F59E0B",
|
|
3030
3253
|
type: "pending",
|
|
3031
3254
|
icon: /*#__PURE__*/React__default.createElement(fa.FaClock, null)
|
|
3032
3255
|
}, {
|
|
3033
3256
|
label: t("OVERALL_PROGRESS"),
|
|
3034
|
-
count: ((
|
|
3257
|
+
count: ((progressMetrics === null || progressMetrics === void 0 ? void 0 : progressMetrics.progressPercent) || 0) + "%",
|
|
3035
3258
|
color: "#A855F7",
|
|
3036
3259
|
type: "progress",
|
|
3037
3260
|
icon: /*#__PURE__*/React__default.createElement(fa.FaChartLine, null)
|
|
3038
|
-
}], [
|
|
3261
|
+
}], [progressMetrics, t]);
|
|
3039
3262
|
const totalRecords = (listData === null || listData === void 0 ? void 0 : listData.totalCount) || 0;
|
|
3040
3263
|
const checkPathName = location.pathname.includes("ekyc/inbox");
|
|
3041
|
-
const SearchFormFields = React.useCallback(
|
|
3042
|
-
let registerRef =
|
|
3043
|
-
searchFormState =
|
|
3044
|
-
controlSearchForm =
|
|
3264
|
+
const SearchFormFields = React.useCallback(_ref6 => {
|
|
3265
|
+
let registerRef = _ref6.registerRef,
|
|
3266
|
+
searchFormState = _ref6.searchFormState,
|
|
3267
|
+
controlSearchForm = _ref6.controlSearchForm;
|
|
3045
3268
|
return /*#__PURE__*/React__default.createElement(SearchFormFieldsComponents, {
|
|
3046
3269
|
registerRef,
|
|
3047
3270
|
searchFormState,
|
|
@@ -3346,7 +3569,8 @@ const ReviewSection = _ref2 => {
|
|
|
3346
3569
|
}, t("EKYC_PROPOSED_UPDATES")))), /*#__PURE__*/React__default.createElement("tbody", null, fields.map((field, idx) => {
|
|
3347
3570
|
const valNew = newData === null || newData === void 0 ? void 0 : newData[field.key];
|
|
3348
3571
|
const valOld = oldData === null || oldData === void 0 ? void 0 : oldData[field.key];
|
|
3349
|
-
const
|
|
3572
|
+
const normalizeVal = v => v === null || v === undefined || v === "" ? "" : String(v);
|
|
3573
|
+
const isChanged = oldData && valOld !== undefined && normalizeVal(valNew) !== normalizeVal(valOld);
|
|
3350
3574
|
return /*#__PURE__*/React__default.createElement("tr", {
|
|
3351
3575
|
key: idx,
|
|
3352
3576
|
style: {
|
|
@@ -3359,7 +3583,7 @@ const ReviewSection = _ref2 => {
|
|
|
3359
3583
|
color: "#344054",
|
|
3360
3584
|
fontWeight: "500"
|
|
3361
3585
|
}
|
|
3362
|
-
}, t(field.label)), /*#__PURE__*/React__default.createElement("td", {
|
|
3586
|
+
}, field.preTranslated ? field.label : t(field.label)), /*#__PURE__*/React__default.createElement("td", {
|
|
3363
3587
|
style: {
|
|
3364
3588
|
padding: "16px 0",
|
|
3365
3589
|
fontSize: "14px",
|
|
@@ -3458,6 +3682,8 @@ const Review = () => {
|
|
|
3458
3682
|
const _extractReviewData = extractReviewData(searchData, flowState),
|
|
3459
3683
|
apiNewData = _extractReviewData.newData,
|
|
3460
3684
|
apiOldData = _extractReviewData.oldData;
|
|
3685
|
+
const flatNewData = apiNewData ? _extends({}, apiNewData || {}, (apiNewData === null || apiNewData === void 0 ? void 0 : apiNewData.connectionDetails) || {}, (apiNewData === null || apiNewData === void 0 ? void 0 : apiNewData.addressDetails) || {}, (apiNewData === null || apiNewData === void 0 ? void 0 : apiNewData.propertyInfo) || {}, (apiNewData === null || apiNewData === void 0 ? void 0 : apiNewData.meterDetails) || {}) : null;
|
|
3686
|
+
const flatOldData = apiOldData ? _extends({}, apiOldData || {}, (apiOldData === null || apiOldData === void 0 ? void 0 : apiOldData.connectionDetails) || {}, (apiOldData === null || apiOldData === void 0 ? void 0 : apiOldData.addressDetails) || {}, (apiOldData === null || apiOldData === void 0 ? void 0 : apiOldData.propertyInfo) || {}, (apiOldData === null || apiOldData === void 0 ? void 0 : apiOldData.meterDetails) || {}) : null;
|
|
3461
3687
|
const prepareConsolidatedData = data => {
|
|
3462
3688
|
if (!data) return null;
|
|
3463
3689
|
const apiConn = (data === null || data === void 0 ? void 0 : data.connectionDetails) || data || {};
|
|
@@ -3492,7 +3718,7 @@ const Review = () => {
|
|
|
3492
3718
|
email: apiAddr === null || apiAddr === void 0 ? void 0 : apiAddr.email,
|
|
3493
3719
|
noOfPerson: (apiAddr === null || apiAddr === void 0 ? void 0 : apiAddr.noOfPerson) || (apiAddr === null || apiAddr === void 0 ? void 0 : apiAddr.noOfPersons),
|
|
3494
3720
|
knumber: (apiAddr === null || apiAddr === void 0 ? void 0 : apiAddr.knumber) || (apiAddr === null || apiAddr === void 0 ? void 0 : apiAddr.kno),
|
|
3495
|
-
doorPhotoFilestoreId: apiAddr === null || apiAddr === void 0 ? void 0 : apiAddr.doorPhotoFilestoreId
|
|
3721
|
+
doorPhotoFilestoreId: (apiAddr === null || apiAddr === void 0 ? void 0 : apiAddr.doorPhotoFileStoreId) || (apiAddr === null || apiAddr === void 0 ? void 0 : apiAddr.doorPhotoFilestoreId)
|
|
3496
3722
|
},
|
|
3497
3723
|
property: {
|
|
3498
3724
|
kno: apiProp === null || apiProp === void 0 ? void 0 : apiProp.kno,
|
|
@@ -3505,7 +3731,7 @@ const Review = () => {
|
|
|
3505
3731
|
tenantMobile: apiProp === null || apiProp === void 0 ? void 0 : apiProp.tenantMobile,
|
|
3506
3732
|
ekycStatus: apiProp === null || apiProp === void 0 ? void 0 : apiProp.ekycStatus,
|
|
3507
3733
|
propertyDocumentFileStoreId: apiProp === null || apiProp === void 0 ? void 0 : apiProp.propertyDocumentFileStoreId,
|
|
3508
|
-
buildingImageFileStoreId: apiProp === null || apiProp === void 0 ? void 0 : apiProp.buildingImageFileStoreId
|
|
3734
|
+
buildingImageFileStoreId: (apiProp === null || apiProp === void 0 ? void 0 : apiProp.buildingImageFileStoreId) || (apiProp === null || apiProp === void 0 ? void 0 : apiProp.buildingImageFilestoreId)
|
|
3509
3735
|
},
|
|
3510
3736
|
meter: {
|
|
3511
3737
|
kno: apiMeter === null || apiMeter === void 0 ? void 0 : apiMeter.kno,
|
|
@@ -3518,12 +3744,11 @@ const Review = () => {
|
|
|
3518
3744
|
workingStatus: apiMeter === null || apiMeter === void 0 ? void 0 : apiMeter.workingStatus,
|
|
3519
3745
|
lastBillRaised: apiMeter === null || apiMeter === void 0 ? void 0 : apiMeter.lastBillRaised,
|
|
3520
3746
|
systemMeterId: apiMeter === null || apiMeter === void 0 ? void 0 : apiMeter.systemMeterId,
|
|
3521
|
-
meterPhotoFileStoreId: apiMeter === null || apiMeter === void 0 ? void 0 : apiMeter.meterPhotoFileStoreId
|
|
3747
|
+
meterPhotoFileStoreId: (apiMeter === null || apiMeter === void 0 ? void 0 : apiMeter.meterPhotoFileStoreId) || (apiMeter === null || apiMeter === void 0 ? void 0 : apiMeter.meterPhotoFilestoreId)
|
|
3522
3748
|
}
|
|
3523
3749
|
};
|
|
3524
3750
|
};
|
|
3525
3751
|
const newDataRaw = prepareConsolidatedData(apiNewData);
|
|
3526
|
-
const oldDataRaw = prepareConsolidatedData(apiOldData);
|
|
3527
3752
|
const connectionData = _extends({}, newDataRaw === null || newDataRaw === void 0 ? void 0 : newDataRaw.connection, {
|
|
3528
3753
|
consumerName: (aadhaarData === null || aadhaarData === void 0 ? void 0 : aadhaarData.name) || (newDataRaw === null || newDataRaw === void 0 ? void 0 : (_newDataRaw$connectio = newDataRaw.connection) === null || _newDataRaw$connectio === void 0 ? void 0 : _newDataRaw$connectio.consumerName),
|
|
3529
3754
|
phoneNumber: (aadhaarData === null || aadhaarData === void 0 ? void 0 : aadhaarData.mobileNumber) || (newDataRaw === null || newDataRaw === void 0 ? void 0 : (_newDataRaw$connectio2 = newDataRaw.connection) === null || _newDataRaw$connectio2 === void 0 ? void 0 : _newDataRaw$connectio2.phoneNumber),
|
|
@@ -3545,7 +3770,7 @@ const Review = () => {
|
|
|
3545
3770
|
email: (editedAddress === null || editedAddress === void 0 ? void 0 : editedAddress.email) || (newDataRaw === null || newDataRaw === void 0 ? void 0 : (_newDataRaw$address11 = newDataRaw.address) === null || _newDataRaw$address11 === void 0 ? void 0 : _newDataRaw$address11.email),
|
|
3546
3771
|
noOfPerson: (editedAddress === null || editedAddress === void 0 ? void 0 : editedAddress.noOfPerson) || (aadhaarData === null || aadhaarData === void 0 ? void 0 : aadhaarData.noOfPersons) || (newDataRaw === null || newDataRaw === void 0 ? void 0 : (_newDataRaw$address12 = newDataRaw.address) === null || _newDataRaw$address12 === void 0 ? void 0 : _newDataRaw$address12.noOfPerson),
|
|
3547
3772
|
knumber: (editedAddress === null || editedAddress === void 0 ? void 0 : editedAddress.knumber) || (newDataRaw === null || newDataRaw === void 0 ? void 0 : (_newDataRaw$address13 = newDataRaw.address) === null || _newDataRaw$address13 === void 0 ? void 0 : _newDataRaw$address13.knumber) || activeKno,
|
|
3548
|
-
doorPhotoFilestoreId: (editedAddress === null || editedAddress === void 0 ? void 0 : editedAddress.
|
|
3773
|
+
doorPhotoFilestoreId: (editedAddress === null || editedAddress === void 0 ? void 0 : editedAddress.doorPhotoFilestoreId) || (newDataRaw === null || newDataRaw === void 0 ? void 0 : (_newDataRaw$address14 = newDataRaw.address) === null || _newDataRaw$address14 === void 0 ? void 0 : _newDataRaw$address14.doorPhotoFilestoreId)
|
|
3549
3774
|
});
|
|
3550
3775
|
const propertyData = _extends({}, newDataRaw === null || newDataRaw === void 0 ? void 0 : newDataRaw.property, {
|
|
3551
3776
|
kno: (newDataRaw === null || newDataRaw === void 0 ? void 0 : (_newDataRaw$property = newDataRaw.property) === null || _newDataRaw$property === void 0 ? void 0 : _newDataRaw$property.kno) || activeKno,
|
|
@@ -3566,136 +3791,323 @@ const Review = () => {
|
|
|
3566
3791
|
lastBillRaised: (editedMeter === null || editedMeter === void 0 ? void 0 : (_editedMeter$lastBill = editedMeter.lastBillRaisedData) === null || _editedMeter$lastBill === void 0 ? void 0 : _editedMeter$lastBill.value) === "Yes" || (newDataRaw === null || newDataRaw === void 0 ? void 0 : (_newDataRaw$meter7 = newDataRaw.meter) === null || _newDataRaw$meter7 === void 0 ? void 0 : _newDataRaw$meter7.lastBillRaised),
|
|
3567
3792
|
meterPhotoFileStoreId: (editedMeter === null || editedMeter === void 0 ? void 0 : editedMeter.meterPhotoFileStoreId) || (newDataRaw === null || newDataRaw === void 0 ? void 0 : (_newDataRaw$meter8 = newDataRaw.meter) === null || _newDataRaw$meter8 === void 0 ? void 0 : _newDataRaw$meter8.meterPhotoFileStoreId)
|
|
3568
3793
|
});
|
|
3569
|
-
const
|
|
3570
|
-
|
|
3571
|
-
|
|
3794
|
+
const headerMapping = [{
|
|
3795
|
+
key: "kno",
|
|
3796
|
+
label: "KNO"
|
|
3572
3797
|
}, {
|
|
3573
|
-
|
|
3574
|
-
|
|
3798
|
+
key: "firstName",
|
|
3799
|
+
label: "FIRST_NAME"
|
|
3575
3800
|
}, {
|
|
3576
|
-
|
|
3577
|
-
|
|
3801
|
+
key: "middleName",
|
|
3802
|
+
label: "MIDDLE_NAME"
|
|
3578
3803
|
}, {
|
|
3579
|
-
|
|
3580
|
-
|
|
3804
|
+
key: "lastName",
|
|
3805
|
+
label: "LAST_NAME"
|
|
3581
3806
|
}, {
|
|
3582
|
-
|
|
3583
|
-
|
|
3807
|
+
key: "status",
|
|
3808
|
+
label: "STATUS"
|
|
3584
3809
|
}, {
|
|
3585
|
-
|
|
3586
|
-
|
|
3810
|
+
key: "ekycStatus",
|
|
3811
|
+
label: "EKYC_STATUS"
|
|
3587
3812
|
}, {
|
|
3588
|
-
|
|
3589
|
-
|
|
3813
|
+
key: "zoneName",
|
|
3814
|
+
label: "ZONE"
|
|
3590
3815
|
}, {
|
|
3591
|
-
|
|
3592
|
-
|
|
3816
|
+
key: "zoneCode",
|
|
3817
|
+
label: "ZONE_CODE"
|
|
3593
3818
|
}, {
|
|
3594
|
-
|
|
3595
|
-
|
|
3596
|
-
}];
|
|
3597
|
-
const addressFields = [{
|
|
3598
|
-
label: "EKYC_FULL_ADDRESS",
|
|
3599
|
-
key: "fullAddress"
|
|
3819
|
+
key: "assembly",
|
|
3820
|
+
label: "EKYC_ASSEMBLY"
|
|
3600
3821
|
}, {
|
|
3601
|
-
|
|
3602
|
-
|
|
3822
|
+
key: "ward",
|
|
3823
|
+
label: "WARD"
|
|
3603
3824
|
}, {
|
|
3604
|
-
|
|
3605
|
-
|
|
3825
|
+
key: "pincode",
|
|
3826
|
+
label: "EKYC_PINCODE"
|
|
3606
3827
|
}, {
|
|
3607
|
-
|
|
3608
|
-
|
|
3828
|
+
key: "addressRaw",
|
|
3829
|
+
label: "ADDRESS_RAW"
|
|
3609
3830
|
}, {
|
|
3610
|
-
|
|
3611
|
-
|
|
3831
|
+
key: "locality",
|
|
3832
|
+
label: "EKYC_LOCALITY"
|
|
3612
3833
|
}, {
|
|
3613
|
-
|
|
3614
|
-
|
|
3834
|
+
key: "subLocality",
|
|
3835
|
+
label: "SUB_LOCALITY"
|
|
3615
3836
|
}, {
|
|
3616
|
-
|
|
3617
|
-
|
|
3837
|
+
key: "flatHouseNumber",
|
|
3838
|
+
label: "FLAT_HOUSE_NUMBER"
|
|
3618
3839
|
}, {
|
|
3619
|
-
|
|
3620
|
-
|
|
3621
|
-
isBool: true
|
|
3840
|
+
key: "streetName",
|
|
3841
|
+
label: "STREET_NAME"
|
|
3622
3842
|
}, {
|
|
3623
|
-
|
|
3624
|
-
|
|
3843
|
+
key: "landmark",
|
|
3844
|
+
label: "EKYC_LANDMARK"
|
|
3625
3845
|
}, {
|
|
3626
|
-
|
|
3627
|
-
|
|
3846
|
+
key: "city",
|
|
3847
|
+
label: "CITY"
|
|
3628
3848
|
}, {
|
|
3629
|
-
|
|
3630
|
-
|
|
3849
|
+
key: "state",
|
|
3850
|
+
label: "STATE"
|
|
3631
3851
|
}, {
|
|
3632
|
-
|
|
3633
|
-
|
|
3852
|
+
key: "addressType",
|
|
3853
|
+
label: "ADDRESS_TYPE"
|
|
3634
3854
|
}, {
|
|
3635
|
-
|
|
3636
|
-
|
|
3855
|
+
key: "addressProofType",
|
|
3856
|
+
label: "ADDRESS_PROOF_TYPE"
|
|
3637
3857
|
}, {
|
|
3638
|
-
|
|
3639
|
-
|
|
3858
|
+
key: "mobileNo",
|
|
3859
|
+
label: "MOBILE_NUMBER"
|
|
3640
3860
|
}, {
|
|
3641
|
-
|
|
3642
|
-
|
|
3643
|
-
}];
|
|
3644
|
-
const propertyFields = [{
|
|
3645
|
-
label: "EKYC_CONNECTION_CATEGORY",
|
|
3646
|
-
key: "connectionCategory"
|
|
3861
|
+
key: "alternateMobileNo",
|
|
3862
|
+
label: "ALTERNATE_MOBILE_NUMBER"
|
|
3647
3863
|
}, {
|
|
3648
|
-
|
|
3649
|
-
|
|
3864
|
+
key: "whatsappNo",
|
|
3865
|
+
label: "WHATSAPP_NO"
|
|
3650
3866
|
}, {
|
|
3651
|
-
|
|
3652
|
-
|
|
3867
|
+
key: "email",
|
|
3868
|
+
label: "EMAIL"
|
|
3653
3869
|
}, {
|
|
3654
|
-
|
|
3655
|
-
|
|
3870
|
+
key: "landlineNo",
|
|
3871
|
+
label: "LANDLINE_NO"
|
|
3656
3872
|
}, {
|
|
3657
|
-
|
|
3658
|
-
|
|
3873
|
+
key: "mrkey",
|
|
3874
|
+
label: "MR_KEY"
|
|
3659
3875
|
}, {
|
|
3660
|
-
|
|
3661
|
-
|
|
3876
|
+
key: "mrcode",
|
|
3877
|
+
label: "MR_CODE"
|
|
3662
3878
|
}, {
|
|
3663
|
-
|
|
3664
|
-
|
|
3879
|
+
key: "areacode",
|
|
3880
|
+
label: "AREA_CODE"
|
|
3665
3881
|
}, {
|
|
3666
|
-
|
|
3667
|
-
|
|
3668
|
-
}
|
|
3669
|
-
|
|
3670
|
-
label: "
|
|
3671
|
-
|
|
3882
|
+
key: "source",
|
|
3883
|
+
label: "SOURCE"
|
|
3884
|
+
}, {
|
|
3885
|
+
key: "submittedAt",
|
|
3886
|
+
label: "SUBMITTED_AT"
|
|
3887
|
+
}, {
|
|
3888
|
+
key: "assignedAt",
|
|
3889
|
+
label: "ASSIGNED_AT"
|
|
3890
|
+
}, {
|
|
3891
|
+
key: "connectionType",
|
|
3892
|
+
label: "CONNECTION_TYPE"
|
|
3893
|
+
}, {
|
|
3894
|
+
key: "Type",
|
|
3895
|
+
label: "CONSUMER_TYPE"
|
|
3896
|
+
}, {
|
|
3897
|
+
key: "occupantType",
|
|
3898
|
+
label: "OCCUPANT_TYPE"
|
|
3899
|
+
}, {
|
|
3900
|
+
key: "knoCategory",
|
|
3901
|
+
label: "KNO_CATEGORY"
|
|
3902
|
+
}, {
|
|
3903
|
+
key: "approvedAt",
|
|
3904
|
+
label: "APPROVED_AT"
|
|
3905
|
+
}, {
|
|
3906
|
+
key: "gender",
|
|
3907
|
+
label: "GENDER"
|
|
3908
|
+
}, {
|
|
3909
|
+
key: "parentSpouse",
|
|
3910
|
+
label: "PARENT_SPOUSE"
|
|
3911
|
+
}, {
|
|
3912
|
+
key: "fatherOrHusbandName",
|
|
3913
|
+
label: "FATHER_HUSBUND_NAME"
|
|
3914
|
+
}, {
|
|
3915
|
+
key: "relationship",
|
|
3916
|
+
label: "RELATIONSHIP"
|
|
3917
|
+
}, {
|
|
3918
|
+
key: "informantName",
|
|
3919
|
+
label: "INFORMANT_NAME"
|
|
3920
|
+
}, {
|
|
3921
|
+
key: "informantRelation",
|
|
3922
|
+
label: "INFORMANT_RELATION"
|
|
3923
|
+
}, {
|
|
3924
|
+
key: "informantIs",
|
|
3925
|
+
label: "INFORMANT_IS"
|
|
3926
|
+
}, {
|
|
3927
|
+
key: "contactPerson",
|
|
3928
|
+
label: "CONTACT_PERSON"
|
|
3929
|
+
}, {
|
|
3930
|
+
key: "relation",
|
|
3931
|
+
label: "RELATION"
|
|
3932
|
+
}, {
|
|
3933
|
+
key: "entityName",
|
|
3934
|
+
label: "ENTITY_NAME"
|
|
3935
|
+
}, {
|
|
3936
|
+
key: "designation",
|
|
3937
|
+
label: "DESIGNATION"
|
|
3938
|
+
}, {
|
|
3939
|
+
key: "department",
|
|
3940
|
+
label: "DEPARTMENT"
|
|
3941
|
+
}, {
|
|
3942
|
+
key: "employeeId",
|
|
3943
|
+
label: "EMPLOYEE_ID"
|
|
3944
|
+
}, {
|
|
3945
|
+
key: "ownerMobile",
|
|
3946
|
+
label: "OWNER_MOBILE"
|
|
3947
|
+
}, {
|
|
3948
|
+
key: "ownerVerificationDone",
|
|
3949
|
+
label: "OWNER_VERIFICATION_DONE",
|
|
3672
3950
|
isBool: true
|
|
3673
3951
|
}, {
|
|
3674
|
-
|
|
3675
|
-
|
|
3952
|
+
key: "consentGiven",
|
|
3953
|
+
label: "CONSENT_GIVEN",
|
|
3954
|
+
isBool: true
|
|
3955
|
+
}, {
|
|
3956
|
+
key: "proofOfIdentityType",
|
|
3957
|
+
label: "PROOF_OF_IDENTITY_TYPE"
|
|
3958
|
+
}, {
|
|
3959
|
+
key: "documentNumber",
|
|
3960
|
+
label: "DOCUMENT_NUMBER"
|
|
3676
3961
|
}, {
|
|
3677
|
-
|
|
3678
|
-
|
|
3962
|
+
key: "noOfPerson",
|
|
3963
|
+
label: "NUMBER_OF_PERSON"
|
|
3679
3964
|
}, {
|
|
3680
|
-
|
|
3681
|
-
|
|
3965
|
+
key: "latitude",
|
|
3966
|
+
label: "LATITUDE"
|
|
3682
3967
|
}, {
|
|
3683
|
-
|
|
3684
|
-
|
|
3968
|
+
key: "longitude",
|
|
3969
|
+
label: "LONGITUDE"
|
|
3970
|
+
}, {
|
|
3971
|
+
key: "gpsValid",
|
|
3972
|
+
label: "GPS_VALID",
|
|
3973
|
+
isBool: true
|
|
3685
3974
|
}, {
|
|
3686
|
-
|
|
3687
|
-
|
|
3975
|
+
key: "meterNumber",
|
|
3976
|
+
label: "METER_NUMBER"
|
|
3977
|
+
}, {
|
|
3978
|
+
key: "meterMake",
|
|
3979
|
+
label: "METER_MAKE"
|
|
3980
|
+
}, {
|
|
3981
|
+
key: "meterStatus",
|
|
3982
|
+
label: "METER_STATUS"
|
|
3983
|
+
}, {
|
|
3984
|
+
key: "meterCondition",
|
|
3985
|
+
label: "METER_CONDITION"
|
|
3986
|
+
}, {
|
|
3987
|
+
key: "meterLocation",
|
|
3988
|
+
label: "METER_LOCATION"
|
|
3989
|
+
}, {
|
|
3990
|
+
key: "meterLocationAddress",
|
|
3991
|
+
label: "METER_LOCATION_ADDRESS"
|
|
3688
3992
|
}, {
|
|
3689
|
-
label: "EKYC_WORKING_STATUS",
|
|
3690
3993
|
key: "workingStatus",
|
|
3994
|
+
label: "WORKING_STATUS"
|
|
3995
|
+
}, {
|
|
3996
|
+
key: "sewerConnection",
|
|
3997
|
+
label: "SEWER_CONNECTION",
|
|
3998
|
+
isBool: true
|
|
3999
|
+
}, {
|
|
4000
|
+
key: "septicTank",
|
|
4001
|
+
label: "SEPTIC_TANK",
|
|
3691
4002
|
isBool: true
|
|
3692
4003
|
}, {
|
|
3693
|
-
label: "EKYC_LAST_BILL_RAISED",
|
|
3694
4004
|
key: "lastBillRaised",
|
|
4005
|
+
label: "LAST_BILL_RAISED",
|
|
3695
4006
|
isBool: true
|
|
3696
4007
|
}, {
|
|
3697
|
-
|
|
3698
|
-
|
|
4008
|
+
key: "lastBillReceivedDate",
|
|
4009
|
+
label: "LAST_BILL_RECEIVED_DATE"
|
|
4010
|
+
}, {
|
|
4011
|
+
key: "accessToMeter",
|
|
4012
|
+
label: "ACCESS_TO_METER",
|
|
4013
|
+
isBool: true
|
|
4014
|
+
}, {
|
|
4015
|
+
key: "systemMeterId",
|
|
4016
|
+
label: "SYSTEM_METER_ID"
|
|
4017
|
+
}, {
|
|
4018
|
+
key: "lastBillNotRaisedReason",
|
|
4019
|
+
label: "LAST_BILL_NOT_RAISED_REASON"
|
|
4020
|
+
}, {
|
|
4021
|
+
key: "waterConnectionYears",
|
|
4022
|
+
label: "WATER_CONNECTION_YEARS"
|
|
4023
|
+
}, {
|
|
4024
|
+
key: "sewerConnectionYears",
|
|
4025
|
+
label: "SEWER_CONNECTION_YEARS"
|
|
4026
|
+
}, {
|
|
4027
|
+
key: "pidNumber",
|
|
4028
|
+
label: "PID_NUMBER"
|
|
4029
|
+
}, {
|
|
4030
|
+
key: "propertyType",
|
|
4031
|
+
label: "PROPERTY_TYPE"
|
|
4032
|
+
}, {
|
|
4033
|
+
key: "subPropertyCategory",
|
|
4034
|
+
label: "SUB_PROPERTY_CATEGORY"
|
|
4035
|
+
}, {
|
|
4036
|
+
key: "noOfFloor",
|
|
4037
|
+
label: "NO_OF_FLOOR"
|
|
4038
|
+
}, {
|
|
4039
|
+
key: "noOfRooms",
|
|
4040
|
+
label: "NO_OF_ROOMS"
|
|
4041
|
+
}, {
|
|
4042
|
+
key: "noOfBeds",
|
|
4043
|
+
label: "NO_OF_BEDS"
|
|
4044
|
+
}, {
|
|
4045
|
+
key: "numberOfDwellingUnits",
|
|
4046
|
+
label: "NUMBER_OF_DWELLING_UNITS"
|
|
4047
|
+
}, {
|
|
4048
|
+
key: "floorNo",
|
|
4049
|
+
label: "FLOOR_NO"
|
|
4050
|
+
}, {
|
|
4051
|
+
key: "userType",
|
|
4052
|
+
label: "USER_TYPE"
|
|
4053
|
+
}, {
|
|
4054
|
+
key: "tenantName",
|
|
4055
|
+
label: "TENANT_NAME"
|
|
4056
|
+
}, {
|
|
4057
|
+
key: "tenantMobile",
|
|
4058
|
+
label: "TENANT_MOBILE"
|
|
4059
|
+
}, {
|
|
4060
|
+
key: "verificationStatus",
|
|
4061
|
+
label: "VERIFICATION_STATUS"
|
|
4062
|
+
}, {
|
|
4063
|
+
key: "houseBuiltDuration",
|
|
4064
|
+
label: "HOUSE_BUILT_DURATION"
|
|
4065
|
+
}, {
|
|
4066
|
+
key: "surveyorId",
|
|
4067
|
+
label: "SURVEYOR_ID"
|
|
4068
|
+
}, {
|
|
4069
|
+
key: "supervisorId",
|
|
4070
|
+
label: "SUPERVISOR_ID"
|
|
4071
|
+
}, {
|
|
4072
|
+
key: "vendorId",
|
|
4073
|
+
label: "VENDOR_ID"
|
|
4074
|
+
}, {
|
|
4075
|
+
key: "assignmentType",
|
|
4076
|
+
label: "ASSIGNMENT_TYPE"
|
|
4077
|
+
}, {
|
|
4078
|
+
key: "assignmentValue",
|
|
4079
|
+
label: "ASSIGNMENT_VALUE"
|
|
4080
|
+
}, {
|
|
4081
|
+
key: "assignedTime",
|
|
4082
|
+
label: "ASSIGNED_TIME"
|
|
4083
|
+
}, {
|
|
4084
|
+
key: "isSelfAssigned",
|
|
4085
|
+
label: "IS_SELF_ASSIGNED",
|
|
4086
|
+
isBool: true
|
|
4087
|
+
}, {
|
|
4088
|
+
key: "modifiedBy",
|
|
4089
|
+
label: "MODIFIED_BY"
|
|
4090
|
+
}, {
|
|
4091
|
+
key: "emailId",
|
|
4092
|
+
label: "EMAIL_ID"
|
|
4093
|
+
}, {
|
|
4094
|
+
key: "dob",
|
|
4095
|
+
label: "DOB"
|
|
4096
|
+
}, {
|
|
4097
|
+
key: "consumerType",
|
|
4098
|
+
label: "CONSUMER_TYPE"
|
|
4099
|
+
}, {
|
|
4100
|
+
key: "createdTime",
|
|
4101
|
+
label: "CREATED_TIME"
|
|
4102
|
+
}, {
|
|
4103
|
+
key: "lastModifiedTime",
|
|
4104
|
+
label: "LAST_MODIFIED_TIME"
|
|
4105
|
+
}, {
|
|
4106
|
+
key: "meterLatitude",
|
|
4107
|
+
label: "EKYC_METER_LATITUDE1"
|
|
4108
|
+
}, {
|
|
4109
|
+
key: "meterLongitude",
|
|
4110
|
+
label: "EKYC_METER_LONGITUDE1"
|
|
3699
4111
|
}];
|
|
3700
4112
|
const handleDeclaration = () => setAgree(!agree);
|
|
3701
4113
|
const handleReject = function () {
|
|
@@ -3776,11 +4188,24 @@ const Review = () => {
|
|
|
3776
4188
|
return Promise.reject(e);
|
|
3777
4189
|
}
|
|
3778
4190
|
};
|
|
3779
|
-
const handleViewDocument = fileStoreId
|
|
3780
|
-
|
|
3781
|
-
|
|
3782
|
-
|
|
3783
|
-
|
|
4191
|
+
const handleViewDocument = function (fileStoreId) {
|
|
4192
|
+
try {
|
|
4193
|
+
if (!fileStoreId) return Promise.resolve();
|
|
4194
|
+
const _temp4 = _catch(function () {
|
|
4195
|
+
return Promise.resolve(Digit.UploadServices.FileFetchbyid(fileStoreId, tenantId)).then(function (response) {
|
|
4196
|
+
if (response !== null && response !== void 0 && response.data) {
|
|
4197
|
+
const blobUrl = URL.createObjectURL(response.data);
|
|
4198
|
+
setPreviewUrl(blobUrl);
|
|
4199
|
+
setShowPreview(true);
|
|
4200
|
+
}
|
|
4201
|
+
});
|
|
4202
|
+
}, function (error) {
|
|
4203
|
+
console.error("Error fetching document:", error);
|
|
4204
|
+
});
|
|
4205
|
+
return Promise.resolve(_temp4 && _temp4.then ? _temp4.then(function () {}) : void 0);
|
|
4206
|
+
} catch (e) {
|
|
4207
|
+
return Promise.reject(e);
|
|
4208
|
+
}
|
|
3784
4209
|
};
|
|
3785
4210
|
const handleMenuSelect = option => {
|
|
3786
4211
|
setShowOptions(false);
|
|
@@ -3791,65 +4216,15 @@ const Review = () => {
|
|
|
3791
4216
|
}
|
|
3792
4217
|
};
|
|
3793
4218
|
if (isSearchLoading || isSubmitting) return /*#__PURE__*/React__default.createElement(digitUiReactComponents.Loader, null);
|
|
3794
|
-
const baseUrl = "/digit-ui/employee/ekyc";
|
|
3795
4219
|
return /*#__PURE__*/React__default.createElement(React.Fragment, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Card, {
|
|
3796
4220
|
className: "overflow-y-scroll"
|
|
3797
4221
|
}, /*#__PURE__*/React__default.createElement(ReviewSection, {
|
|
3798
|
-
title: t("
|
|
3799
|
-
fields:
|
|
3800
|
-
newData:
|
|
3801
|
-
oldData:
|
|
3802
|
-
t: t,
|
|
3803
|
-
jumpTo: baseUrl + "/consumer-details?kno=" + activeKno,
|
|
3804
|
-
state: _extends({}, flowState, {
|
|
3805
|
-
kNumber: activeKno,
|
|
3806
|
-
kno: activeKno,
|
|
3807
|
-
reviewData: searchData,
|
|
3808
|
-
edits
|
|
3809
|
-
}),
|
|
3810
|
-
hideEditButton: hideEditButton
|
|
3811
|
-
}), /*#__PURE__*/React__default.createElement(ReviewSection, {
|
|
3812
|
-
title: t("EKYC_ADDRESS_DETAILS"),
|
|
3813
|
-
fields: addressFields,
|
|
3814
|
-
newData: addressData,
|
|
3815
|
-
oldData: oldDataRaw === null || oldDataRaw === void 0 ? void 0 : oldDataRaw.address,
|
|
3816
|
-
t: t,
|
|
3817
|
-
jumpTo: baseUrl + "/address-details?kno=" + activeKno,
|
|
3818
|
-
state: _extends({}, flowState, {
|
|
3819
|
-
kNumber: activeKno,
|
|
3820
|
-
kno: activeKno,
|
|
3821
|
-
reviewData: searchData,
|
|
3822
|
-
edits
|
|
3823
|
-
}),
|
|
3824
|
-
hideEditButton: hideEditButton
|
|
3825
|
-
}), /*#__PURE__*/React__default.createElement(ReviewSection, {
|
|
3826
|
-
title: t("EKYC_PROPERTY_INFO"),
|
|
3827
|
-
fields: propertyFields,
|
|
3828
|
-
newData: propertyData,
|
|
3829
|
-
oldData: oldDataRaw === null || oldDataRaw === void 0 ? void 0 : oldDataRaw.property,
|
|
3830
|
-
t: t,
|
|
3831
|
-
jumpTo: baseUrl + "/property-info?kno=" + activeKno,
|
|
3832
|
-
state: _extends({}, flowState, {
|
|
3833
|
-
kNumber: activeKno,
|
|
3834
|
-
kno: activeKno,
|
|
3835
|
-
reviewData: searchData,
|
|
3836
|
-
edits
|
|
3837
|
-
}),
|
|
3838
|
-
hideEditButton: hideEditButton
|
|
3839
|
-
}), /*#__PURE__*/React__default.createElement(ReviewSection, {
|
|
3840
|
-
title: t("EKYC_METER_DETAILS"),
|
|
3841
|
-
fields: meterFields,
|
|
3842
|
-
newData: meterData,
|
|
3843
|
-
oldData: oldDataRaw === null || oldDataRaw === void 0 ? void 0 : oldDataRaw.meter,
|
|
4222
|
+
title: t("EKYC_ALL_DETAILS") || "All Details",
|
|
4223
|
+
fields: headerMapping,
|
|
4224
|
+
newData: flatNewData,
|
|
4225
|
+
oldData: flatOldData,
|
|
3844
4226
|
t: t,
|
|
3845
|
-
|
|
3846
|
-
state: _extends({}, flowState, {
|
|
3847
|
-
kNumber: activeKno,
|
|
3848
|
-
kno: activeKno,
|
|
3849
|
-
reviewData: searchData,
|
|
3850
|
-
edits
|
|
3851
|
-
}),
|
|
3852
|
-
hideEditButton: hideEditButton
|
|
4227
|
+
hideEditButton: true
|
|
3853
4228
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
3854
4229
|
style: {
|
|
3855
4230
|
marginTop: "40px"
|
|
@@ -5638,6 +6013,7 @@ const SupervisorDetailsCard = () => {
|
|
|
5638
6013
|
|
|
5639
6014
|
const AssignEkycModal = _ref => {
|
|
5640
6015
|
let surveyor = _ref.surveyor,
|
|
6016
|
+
isReassign = _ref.isReassign,
|
|
5641
6017
|
closeModal = _ref.closeModal,
|
|
5642
6018
|
refetchDashboard = _ref.refetchDashboard,
|
|
5643
6019
|
propsTenantId = _ref.tenantId;
|
|
@@ -5731,9 +6107,7 @@ const AssignEkycModal = _ref => {
|
|
|
5731
6107
|
assemblyOptions: Array.from(assemblies.values()).sort((a, b) => a.name.localeCompare(b.name)),
|
|
5732
6108
|
wardOptions: Array.from(wards.values()).sort((a, b) => a.name.localeCompare(b.name))
|
|
5733
6109
|
};
|
|
5734
|
-
}, [boundaryData])
|
|
5735
|
-
assemblyOptions = _useMemo.assemblyOptions,
|
|
5736
|
-
wardOptions = _useMemo.wardOptions;
|
|
6110
|
+
}, [boundaryData]);
|
|
5737
6111
|
const structuredLocalityData = React.useMemo(() => {
|
|
5738
6112
|
let localities = [];
|
|
5739
6113
|
const boundaries = Array.isArray(boundaryData) ? boundaryData : boundaryData ? [boundaryData] : [];
|
|
@@ -5767,7 +6141,7 @@ const AssignEkycModal = _ref => {
|
|
|
5767
6141
|
return Array.from(pinSet).sort();
|
|
5768
6142
|
}, [structuredLocalityData]);
|
|
5769
6143
|
const _Digit$Hooks$ekyc$use = Digit.Hooks.ekyc.useEkycApplicationList({
|
|
5770
|
-
unassignedOnly:
|
|
6144
|
+
unassignedOnly: !isReassign,
|
|
5771
6145
|
fetchFilterOptions: true
|
|
5772
6146
|
}, {
|
|
5773
6147
|
tenantId: tenantId,
|
|
@@ -5797,7 +6171,7 @@ const AssignEkycModal = _ref => {
|
|
|
5797
6171
|
setCurrentPage(0);
|
|
5798
6172
|
}, [debouncedFilters, filters.kno]);
|
|
5799
6173
|
const _Digit$Hooks$ekyc$use2 = Digit.Hooks.ekyc.useEkycApplicationList(_extends({
|
|
5800
|
-
unassignedOnly:
|
|
6174
|
+
unassignedOnly: !isReassign
|
|
5801
6175
|
}, filters.kno && {
|
|
5802
6176
|
kno: filters.kno
|
|
5803
6177
|
}, debouncedFilters.ekycStatus && {
|
|
@@ -5894,6 +6268,56 @@ const AssignEkycModal = _ref => {
|
|
|
5894
6268
|
handleAssignmentError(errMsg, variables);
|
|
5895
6269
|
}
|
|
5896
6270
|
});
|
|
6271
|
+
const reassignMutation = Digit.Hooks.ekyc.useEkycAssignmentReassign({
|
|
6272
|
+
onSuccess: (response, variables) => {
|
|
6273
|
+
if (response !== null && response !== void 0 && response.error) {
|
|
6274
|
+
var _response$data2;
|
|
6275
|
+
const errMsg = (response === null || response === void 0 ? void 0 : (_response$data2 = response.data) === null || _response$data2 === void 0 ? void 0 : _response$data2.message) || "";
|
|
6276
|
+
handleAssignmentError(errMsg, variables);
|
|
6277
|
+
return;
|
|
6278
|
+
}
|
|
6279
|
+
if (response !== null && response !== void 0 && response.skipped && response.skipped.length > 0) {
|
|
6280
|
+
var _response$skipped$2;
|
|
6281
|
+
const reason = ((_response$skipped$2 = response.skipped[0]) === null || _response$skipped$2 === void 0 ? void 0 : _response$skipped$2.reason) || "";
|
|
6282
|
+
handleAssignmentError(reason, variables);
|
|
6283
|
+
return;
|
|
6284
|
+
}
|
|
6285
|
+
setToastData({
|
|
6286
|
+
error: false,
|
|
6287
|
+
label: t("EKYC_REASSIGNMENT_SUCCESSFUL") || "Reassignment successful"
|
|
6288
|
+
});
|
|
6289
|
+
setShowToast(true);
|
|
6290
|
+
setTimeout(function () {
|
|
6291
|
+
try {
|
|
6292
|
+
function _temp8() {
|
|
6293
|
+
function _temp6() {
|
|
6294
|
+
closeModal();
|
|
6295
|
+
}
|
|
6296
|
+
const _temp5 = function () {
|
|
6297
|
+
if (refetchApplicationList) {
|
|
6298
|
+
return Promise.resolve(refetchApplicationList()).then(function () {});
|
|
6299
|
+
}
|
|
6300
|
+
}();
|
|
6301
|
+
return _temp5 && _temp5.then ? _temp5.then(_temp6) : _temp6(_temp5);
|
|
6302
|
+
}
|
|
6303
|
+
const _temp7 = function () {
|
|
6304
|
+
if (refetchDashboard) {
|
|
6305
|
+
return Promise.resolve(refetchDashboard()).then(function () {});
|
|
6306
|
+
}
|
|
6307
|
+
}();
|
|
6308
|
+
return Promise.resolve(_temp7 && _temp7.then ? _temp7.then(_temp8) : _temp8(_temp7));
|
|
6309
|
+
} catch (e) {
|
|
6310
|
+
return Promise.reject(e);
|
|
6311
|
+
}
|
|
6312
|
+
}, 1000);
|
|
6313
|
+
},
|
|
6314
|
+
onError: (error, variables) => {
|
|
6315
|
+
var _error$data2, _error$response2, _error$response2$data;
|
|
6316
|
+
const errMsg = (error === null || error === void 0 ? void 0 : (_error$data2 = error.data) === null || _error$data2 === void 0 ? void 0 : _error$data2.message) || (error === null || error === void 0 ? void 0 : (_error$response2 = error.response) === null || _error$response2 === void 0 ? void 0 : (_error$response2$data = _error$response2.data) === null || _error$response2$data === void 0 ? void 0 : _error$response2$data.message) || "";
|
|
6317
|
+
handleAssignmentError(errMsg, variables);
|
|
6318
|
+
}
|
|
6319
|
+
});
|
|
6320
|
+
const activeMutation = isReassign ? reassignMutation : assignmentMutation;
|
|
5897
6321
|
const tableData = (applicationData === null || applicationData === void 0 ? void 0 : applicationData.consumerList) || [];
|
|
5898
6322
|
const getAssignmentPayload = () => {
|
|
5899
6323
|
if (isBulkSelection) {
|
|
@@ -5933,16 +6357,22 @@ const AssignEkycModal = _ref => {
|
|
|
5933
6357
|
};
|
|
5934
6358
|
};
|
|
5935
6359
|
const handleAssign = () => {
|
|
5936
|
-
var _surveyor$owner;
|
|
5937
6360
|
const _getAssignmentPayload = getAssignmentPayload(),
|
|
5938
6361
|
assignmentType = _getAssignmentPayload.assignmentType,
|
|
5939
6362
|
assignmentValue = _getAssignmentPayload.assignmentValue;
|
|
5940
|
-
|
|
6363
|
+
const payload = {
|
|
5941
6364
|
tenantId: tenantId,
|
|
5942
|
-
surveyorId: surveyor === null || surveyor === void 0 ? void 0 : (_surveyor$owner = surveyor.owner) === null || _surveyor$owner === void 0 ? void 0 : _surveyor$owner.uuid,
|
|
5943
6365
|
assignmentType,
|
|
5944
6366
|
assignmentValue
|
|
5945
|
-
}
|
|
6367
|
+
};
|
|
6368
|
+
if (isReassign) {
|
|
6369
|
+
var _surveyor$owner;
|
|
6370
|
+
payload.newSurveyorId = surveyor === null || surveyor === void 0 ? void 0 : (_surveyor$owner = surveyor.owner) === null || _surveyor$owner === void 0 ? void 0 : _surveyor$owner.uuid;
|
|
6371
|
+
} else {
|
|
6372
|
+
var _surveyor$owner2;
|
|
6373
|
+
payload.surveyorId = surveyor === null || surveyor === void 0 ? void 0 : (_surveyor$owner2 = surveyor.owner) === null || _surveyor$owner2 === void 0 ? void 0 : _surveyor$owner2.uuid;
|
|
6374
|
+
}
|
|
6375
|
+
activeMutation.mutate(payload);
|
|
5946
6376
|
};
|
|
5947
6377
|
const handleSelectAll = () => {
|
|
5948
6378
|
setIsBulkSelection(true);
|
|
@@ -6008,13 +6438,13 @@ const AssignEkycModal = _ref => {
|
|
|
6008
6438
|
setSelectedKnos(prev => prev.includes(kno) ? prev.filter(item => item !== kno) : [...prev, kno]);
|
|
6009
6439
|
};
|
|
6010
6440
|
return /*#__PURE__*/React__default.createElement(digitUiReactComponents.Modal, {
|
|
6011
|
-
headerBarMain: "Assign KNOs to " + (surveyor === null || surveyor === void 0 ? void 0 : surveyor.name),
|
|
6441
|
+
headerBarMain: isReassign ? "Reassign KNOs to " + (surveyor === null || surveyor === void 0 ? void 0 : surveyor.name) : "Assign KNOs to " + (surveyor === null || surveyor === void 0 ? void 0 : surveyor.name),
|
|
6012
6442
|
headerBarEnd: /*#__PURE__*/React__default.createElement(digitUiReactComponents.Close, {
|
|
6013
6443
|
onClick: closeModal
|
|
6014
6444
|
}),
|
|
6015
6445
|
actionCancelLabel: "Cancel",
|
|
6016
6446
|
actionCancelOnSubmit: closeModal,
|
|
6017
|
-
actionSaveLabel: t("EKYC_ASSIGN_KNOS") || "Assign KNOs",
|
|
6447
|
+
actionSaveLabel: isReassign ? t("EKYC_REASSIGN_KNOS") || "Reassign KNOs" : t("EKYC_ASSIGN_KNOS") || "Assign KNOs",
|
|
6018
6448
|
actionSaveOnSubmit: handleAssign,
|
|
6019
6449
|
isDisabled: !(selectedKnos !== null && selectedKnos !== void 0 && selectedKnos.length)
|
|
6020
6450
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -6036,30 +6466,6 @@ const AssignEkycModal = _ref => {
|
|
|
6036
6466
|
key: pin,
|
|
6037
6467
|
value: pin
|
|
6038
6468
|
}, pin))), /*#__PURE__*/React__default.createElement("select", {
|
|
6039
|
-
className: "form-control",
|
|
6040
|
-
value: filters.ward,
|
|
6041
|
-
onChange: e => handleFilterChange("ward", e.target.value)
|
|
6042
|
-
}, /*#__PURE__*/React__default.createElement("option", {
|
|
6043
|
-
value: ""
|
|
6044
|
-
}, "Select Ward"), wardOptions.filter(ward => {
|
|
6045
|
-
const stripped = ward.name.replace(/[0-9]/g, "").replace(/^[-\s]+|[-\s]+$/g, "");
|
|
6046
|
-
return stripped.trim().length > 0;
|
|
6047
|
-
}).map(ward => {
|
|
6048
|
-
const displayName = ward.name.replace(/[0-9]/g, "").replace(/^[-\s]+|[-\s]+$/g, "");
|
|
6049
|
-
return /*#__PURE__*/React__default.createElement("option", {
|
|
6050
|
-
key: ward.code,
|
|
6051
|
-
value: ward.name
|
|
6052
|
-
}, displayName);
|
|
6053
|
-
})), /*#__PURE__*/React__default.createElement("select", {
|
|
6054
|
-
className: "form-control",
|
|
6055
|
-
value: filters.assembly,
|
|
6056
|
-
onChange: e => handleFilterChange("assembly", e.target.value)
|
|
6057
|
-
}, /*#__PURE__*/React__default.createElement("option", {
|
|
6058
|
-
value: ""
|
|
6059
|
-
}, "Select Assembly"), assemblyOptions.map(assembly => /*#__PURE__*/React__default.createElement("option", {
|
|
6060
|
-
key: assembly.code,
|
|
6061
|
-
value: assembly.name
|
|
6062
|
-
}, assembly.name))), /*#__PURE__*/React__default.createElement("select", {
|
|
6063
6469
|
className: "form-control",
|
|
6064
6470
|
value: filters.mrkey,
|
|
6065
6471
|
onChange: e => handleFilterChange("mrkey", e.target.value)
|
|
@@ -6113,7 +6519,7 @@ const AssignEkycModal = _ref => {
|
|
|
6113
6519
|
const SurveyorDetailsDashboard = () => {
|
|
6114
6520
|
var _Digit$SessionStorage, _Digit$SessionStorage2, _surveyorSearchById$s, _Digit$SessionStorage3, _Digit$SessionStorage4, _surveyor$owner, _surveyor$owner2, _surveyor$owner3, _surveyor$owner4, _fullName$charAt, _dashboardData$dashbo, _dashboardData$dashbo2, _dashboardData$dashbo3, _dashboardData$dashbo4, _surveyor$owner8, _surveyor$owner9, _surveyor$owner0, _dashboardData$dashbo5, _dashboardData$dashbo6;
|
|
6115
6521
|
const tenantId = Digit.ULBService.getCurrentTenantId();
|
|
6116
|
-
const _useState = React.useState(
|
|
6522
|
+
const _useState = React.useState(null),
|
|
6117
6523
|
showModal = _useState[0],
|
|
6118
6524
|
setShowModal = _useState[1];
|
|
6119
6525
|
const _useState2 = React.useState(false),
|
|
@@ -6439,10 +6845,12 @@ const SurveyorDetailsDashboard = () => {
|
|
|
6439
6845
|
};
|
|
6440
6846
|
const options = [{
|
|
6441
6847
|
action: "Assign"
|
|
6848
|
+
}, {
|
|
6849
|
+
action: "EKYC_REASSIGN"
|
|
6442
6850
|
}];
|
|
6443
6851
|
const handleMenuSelect = option => {
|
|
6444
6852
|
setShowOptions(false);
|
|
6445
|
-
setShowModal(
|
|
6853
|
+
setShowModal(option.action);
|
|
6446
6854
|
};
|
|
6447
6855
|
const handleDownloadEkycData = function () {
|
|
6448
6856
|
try {
|
|
@@ -6523,7 +6931,7 @@ const SurveyorDetailsDashboard = () => {
|
|
|
6523
6931
|
};
|
|
6524
6932
|
const closeModal = function () {
|
|
6525
6933
|
try {
|
|
6526
|
-
setShowModal(
|
|
6934
|
+
setShowModal(null);
|
|
6527
6935
|
return Promise.resolve();
|
|
6528
6936
|
} catch (e) {
|
|
6529
6937
|
return Promise.reject(e);
|
|
@@ -6750,6 +7158,7 @@ const SurveyorDetailsDashboard = () => {
|
|
|
6750
7158
|
}
|
|
6751
7159
|
})), showModal && /*#__PURE__*/React__default.createElement(AssignEkycModal, {
|
|
6752
7160
|
surveyor: surveyor,
|
|
7161
|
+
isReassign: showModal === "EKYC_REASSIGN",
|
|
6753
7162
|
closeModal: closeModal,
|
|
6754
7163
|
refetchDashboard: refetchDashboard
|
|
6755
7164
|
}));
|