@djb25/digit-ui-module-ekyc 1.0.62 → 1.0.63
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 +168 -292
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +169 -293
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -184,28 +184,6 @@ const StatusCards = _ref => {
|
|
|
184
184
|
}
|
|
185
185
|
const loggedInUser = (_Digit$SessionStorage = Digit.SessionStorage.get("User")) === null || _Digit$SessionStorage === void 0 ? void 0 : _Digit$SessionStorage.info;
|
|
186
186
|
const fullName = (loggedInUser === null || loggedInUser === void 0 ? void 0 : loggedInUser.name) || "Admin";
|
|
187
|
-
const hasExternalData = countData && typeof countData.total === "number" && typeof countData.submittedCount === "number";
|
|
188
|
-
const _Digit$Hooks$ekyc$use = Digit.Hooks.ekyc.useEkycSurveyorDashboard({}, {
|
|
189
|
-
tenantId,
|
|
190
|
-
offset: 0,
|
|
191
|
-
limit: 10,
|
|
192
|
-
ekycStatus: "submitted"
|
|
193
|
-
}, {
|
|
194
|
-
enabled: !!tenantId && !hasExternalData
|
|
195
|
-
}),
|
|
196
|
-
dashboardData = _Digit$Hooks$ekyc$use.data;
|
|
197
|
-
const apiCountData = React__default.useMemo(() => {
|
|
198
|
-
const info = (dashboardData === null || dashboardData === void 0 ? void 0 : dashboardData.dashboardInfo) || {};
|
|
199
|
-
return {
|
|
200
|
-
total: info.total || 0,
|
|
201
|
-
completed: info.completed || 0,
|
|
202
|
-
pending: info.pending || 0,
|
|
203
|
-
submittedCount: info.submittedCount || 0,
|
|
204
|
-
inProgressCount: info.inProgressCount || 0,
|
|
205
|
-
rejected: info.rejected || 0,
|
|
206
|
-
active: info.active || 0
|
|
207
|
-
};
|
|
208
|
-
}, [dashboardData]);
|
|
209
187
|
const handleDownloadEkycData = function (fromDate, toDate) {
|
|
210
188
|
try {
|
|
211
189
|
setEkycDownloadLoading(true);
|
|
@@ -331,7 +309,6 @@ const StatusCards = _ref => {
|
|
|
331
309
|
meterPhotoFileStoreId: t("METER_PHOTO_FILESTORE_ID"),
|
|
332
310
|
modifiedBy: t("MODIFIED_BY"),
|
|
333
311
|
emailId: t("EMAIL_ID"),
|
|
334
|
-
fatherOrHusbandName: t("FATHER_HUSBUND_NAME"),
|
|
335
312
|
dob: t("DOB"),
|
|
336
313
|
consumerType: t("CONSUMER_TYPE"),
|
|
337
314
|
createdTime: t("CREATED_TIME"),
|
|
@@ -457,16 +434,7 @@ const StatusCards = _ref => {
|
|
|
457
434
|
};
|
|
458
435
|
const chartRef1 = React.useRef(null);
|
|
459
436
|
const chartInstance1 = React.useRef(null);
|
|
460
|
-
const
|
|
461
|
-
const pending = hasExternalData ? countData.pending : (apiCountData === null || apiCountData === void 0 ? void 0 : apiCountData.pending) || (countData === null || countData === void 0 ? void 0 : countData.pending) || 0;
|
|
462
|
-
const active = hasExternalData ? countData.active : (apiCountData === null || apiCountData === void 0 ? void 0 : apiCountData.active) || (countData === null || countData === void 0 ? void 0 : countData.active) || 0;
|
|
463
|
-
const completed = hasExternalData ? countData.completed : (apiCountData === null || apiCountData === void 0 ? void 0 : apiCountData.completed) || (countData === null || countData === void 0 ? void 0 : countData.completed) || 0;
|
|
464
|
-
const inprocess = hasExternalData ? countData.inProgressCount : (apiCountData === null || apiCountData === void 0 ? void 0 : apiCountData.inProgressCount) || (countData === null || countData === void 0 ? void 0 : countData.inProgressCount) || 0;
|
|
465
|
-
const submitted = hasExternalData ? countData.submittedCount : (apiCountData === null || apiCountData === void 0 ? void 0 : apiCountData.submittedCount) || (countData === null || countData === void 0 ? void 0 : countData.submittedCount) || 0;
|
|
466
|
-
const actualCompleted = completed;
|
|
467
|
-
const approved = actualCompleted;
|
|
468
|
-
const efficiency = total > 0 ? Math.round((submitted + completed) / total * 100) : 0;
|
|
469
|
-
const healthPct = submitted > 0 ? Math.round(approved / submitted * 100) : 0;
|
|
437
|
+
const efficiency = (countData === null || countData === void 0 ? void 0 : countData.total) > 0 ? Math.round(((countData === null || countData === void 0 ? void 0 : countData.submittedCount) + (countData === null || countData === void 0 ? void 0 : countData.completed)) / (countData === null || countData === void 0 ? void 0 : countData.total) * 100) : 0;
|
|
470
438
|
const formatNumber = num => new Intl.NumberFormat("en-IN").format(num || 0);
|
|
471
439
|
React.useEffect(() => {
|
|
472
440
|
if (chartRef1.current) {
|
|
@@ -478,7 +446,7 @@ const StatusCards = _ref => {
|
|
|
478
446
|
data: {
|
|
479
447
|
labels: [t("EKYC_PENDING"), t("EKYC_COMPLETED"), t("EKYC_SUBMITTED"), t("EKYC_INPROCESS")],
|
|
480
448
|
datasets: [{
|
|
481
|
-
data: [pending, completed, submitted, inprocess],
|
|
449
|
+
data: [countData === null || countData === void 0 ? void 0 : countData.pending, countData === null || countData === void 0 ? void 0 : countData.completed, countData === null || countData === void 0 ? void 0 : countData.submitted, countData === null || countData === void 0 ? void 0 : countData.inprocess],
|
|
482
450
|
backgroundColor: ["#0c2a52", "#77B6EA", "#c8ddf5", "#49a3fb"],
|
|
483
451
|
borderColor: ["#ffffff", "#ffffff", "#ffffff", "#ffffff"],
|
|
484
452
|
borderWidth: 2,
|
|
@@ -500,23 +468,31 @@ const StatusCards = _ref => {
|
|
|
500
468
|
return () => {
|
|
501
469
|
if (chartInstance1.current) chartInstance1.current.destroy();
|
|
502
470
|
};
|
|
503
|
-
}, [
|
|
471
|
+
}, [countData, t]);
|
|
504
472
|
const legendItems = [{
|
|
473
|
+
color: "#77B6EA",
|
|
474
|
+
label: t("EKYC_TOTAL"),
|
|
475
|
+
value: countData === null || countData === void 0 ? void 0 : countData.total
|
|
476
|
+
}, {
|
|
505
477
|
color: "#77B6EA",
|
|
506
478
|
label: t("EKYC_COMPLETED"),
|
|
507
|
-
value: completed
|
|
479
|
+
value: countData === null || countData === void 0 ? void 0 : countData.completed
|
|
508
480
|
}, {
|
|
509
481
|
color: "#0c2a52",
|
|
510
482
|
label: t("EKYC_PENDING"),
|
|
511
|
-
value: pending
|
|
483
|
+
value: countData === null || countData === void 0 ? void 0 : countData.pending
|
|
484
|
+
}, {
|
|
485
|
+
color: "#c8ddf5",
|
|
486
|
+
label: t("EKYC_SUBMITTED_BY_VENDORS"),
|
|
487
|
+
value: countData === null || countData === void 0 ? void 0 : countData.submittedCount
|
|
512
488
|
}, {
|
|
513
489
|
color: "#c8ddf5",
|
|
514
|
-
label: t("
|
|
515
|
-
value:
|
|
490
|
+
label: t("EKYC_SUBMITTED_BY_CITIZEN"),
|
|
491
|
+
value: (countData === null || countData === void 0 ? void 0 : countData.selfEkycCount) || 0
|
|
516
492
|
}, {
|
|
517
|
-
color: "#
|
|
518
|
-
label: t("
|
|
519
|
-
value:
|
|
493
|
+
color: "#c8ddf5",
|
|
494
|
+
label: t("EKYC_REJECTED"),
|
|
495
|
+
value: (countData === null || countData === void 0 ? void 0 : countData.rejected) || 0
|
|
520
496
|
}];
|
|
521
497
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
522
498
|
className: "ekyc-employee-container"
|
|
@@ -524,49 +500,29 @@ const StatusCards = _ref => {
|
|
|
524
500
|
className: "status-cards-wrapper"
|
|
525
501
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
526
502
|
className: "status-cards-header"
|
|
527
|
-
}, /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
|
|
528
|
-
className: "eyebrow"
|
|
529
|
-
}, /*#__PURE__*/React__default.createElement("span", {
|
|
530
|
-
className: "eyebrow-dot"
|
|
531
|
-
}), t("EKYC_INSTITUTIONAL_OVERVIEW") || "Institutional Performance Overview"), /*#__PURE__*/React__default.createElement("h1", {
|
|
532
|
-
className: "status-cards-h1"
|
|
533
|
-
}, t("EKYC_DASHBOARD_TITLE") || "eKYC Verification Dashboard"), /*#__PURE__*/React__default.createElement("p", {
|
|
534
|
-
className: "status-cards-subtitle"
|
|
535
|
-
}, t("EKYC_DASHBOARD_SUBTITLE") || "Real-time monitoring of consumer verification workflows across all administrative zones.")), /*#__PURE__*/React__default.createElement("div", {
|
|
536
|
-
className: "total-applications-card"
|
|
537
503
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
538
|
-
className: "
|
|
539
|
-
},
|
|
540
|
-
|
|
541
|
-
|
|
504
|
+
className: "status-card-title"
|
|
505
|
+
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.FaChartBar, {
|
|
506
|
+
size: 32,
|
|
507
|
+
color: "#fff",
|
|
508
|
+
backgroundColor: "#065297",
|
|
509
|
+
style: {
|
|
510
|
+
paddingInline: "4px",
|
|
511
|
+
borderRadius: "4px "
|
|
512
|
+
}
|
|
513
|
+
}), /*#__PURE__*/React__default.createElement("h1", {
|
|
514
|
+
className: "status-cards-h1"
|
|
515
|
+
}, t("EKYC_DASHBOARD_TITLE") || "eKYC Verification Dashboard")), /*#__PURE__*/React__default.createElement("div", {
|
|
542
516
|
className: "report-download",
|
|
543
517
|
ref: reportMenuRef
|
|
544
518
|
}, /*#__PURE__*/React__default.createElement("button", {
|
|
545
|
-
className: "download-
|
|
519
|
+
className: "total-applications-card download-btn",
|
|
546
520
|
disabled: ekycDownloadLoading,
|
|
547
521
|
onClick: () => {
|
|
548
522
|
setShowReportMenu(p => !p);
|
|
549
523
|
setShowCustomPicker(false);
|
|
550
524
|
}
|
|
551
|
-
}, /*#__PURE__*/React__default.createElement("
|
|
552
|
-
width: "16",
|
|
553
|
-
height: "16",
|
|
554
|
-
viewBox: "0 0 24 24",
|
|
555
|
-
fill: "none",
|
|
556
|
-
stroke: "currentColor",
|
|
557
|
-
strokeWidth: "2.5",
|
|
558
|
-
strokeLinecap: "round",
|
|
559
|
-
strokeLinejoin: "round"
|
|
560
|
-
}, /*#__PURE__*/React__default.createElement("path", {
|
|
561
|
-
d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"
|
|
562
|
-
}), /*#__PURE__*/React__default.createElement("polyline", {
|
|
563
|
-
points: "7 10 12 15 17 10"
|
|
564
|
-
}), /*#__PURE__*/React__default.createElement("line", {
|
|
565
|
-
x1: "12",
|
|
566
|
-
y1: "15",
|
|
567
|
-
x2: "12",
|
|
568
|
-
y2: "3"
|
|
569
|
-
})), ekycDownloadLoading ? t("DOWNLOADING") || "Downloading..." : t("DOWNLOAD_EXCEL") || "Download Excel"), showReportMenu && /*#__PURE__*/React__default.createElement("div", {
|
|
525
|
+
}, t("DOWNLOAD_REPORT") || "Download Report", /*#__PURE__*/React__default.createElement(digitUiReactComponents.MdDownloadIcon, null)), showReportMenu && /*#__PURE__*/React__default.createElement("div", {
|
|
570
526
|
className: "report-menu"
|
|
571
527
|
}, [{
|
|
572
528
|
label: t("TODAY") || "Today",
|
|
@@ -612,7 +568,8 @@ const StatusCards = _ref => {
|
|
|
612
568
|
}
|
|
613
569
|
}, /*#__PURE__*/React__default.createElement("button", {
|
|
614
570
|
className: "picker-cancel-btn",
|
|
615
|
-
onClick:
|
|
571
|
+
onClick: e => {
|
|
572
|
+
e.stopPropagation();
|
|
616
573
|
setShowCustomPicker(false);
|
|
617
574
|
setCustomDate({
|
|
618
575
|
from: "",
|
|
@@ -621,32 +578,25 @@ const StatusCards = _ref => {
|
|
|
621
578
|
}
|
|
622
579
|
}, t("CANCEL") || "Cancel"), /*#__PURE__*/React__default.createElement("button", {
|
|
623
580
|
className: "picker-apply-btn",
|
|
624
|
-
onClick:
|
|
625
|
-
|
|
581
|
+
onClick: e => {
|
|
582
|
+
e.stopPropagation();
|
|
583
|
+
handleCustomDownload();
|
|
584
|
+
}
|
|
585
|
+
}, t("APPLY") || "Apply")))))), /*#__PURE__*/React__default.createElement("div", {
|
|
626
586
|
className: "status-panels-grid"
|
|
627
587
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
628
588
|
className: "status-panel"
|
|
629
589
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
590
|
+
className: "panel-header"
|
|
591
|
+
}, /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
|
|
630
592
|
className: "panel-title"
|
|
631
593
|
}, t("EKYC_STATUS_BREAKDOWN") || "Status Breakdown"), /*#__PURE__*/React__default.createElement("div", {
|
|
632
594
|
className: "panel-subtitle"
|
|
633
|
-
}, t("EKYC_VERIFICATION_LIFECYCLE") || "Verification lifecycle
|
|
634
|
-
className: "
|
|
595
|
+
}, t("EKYC_VERIFICATION_LIFECYCLE") || "Verification lifecycle")), /*#__PURE__*/React__default.createElement("div", {
|
|
596
|
+
className: "completion-badge"
|
|
597
|
+
}, efficiency, "% Complete")), /*#__PURE__*/React__default.createElement("div", {
|
|
598
|
+
className: "status-breakdown-content"
|
|
635
599
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
636
|
-
className: "status-legend"
|
|
637
|
-
}, legendItems.map(item => /*#__PURE__*/React__default.createElement("div", {
|
|
638
|
-
key: item.label,
|
|
639
|
-
className: "legend-row"
|
|
640
|
-
}, /*#__PURE__*/React__default.createElement("span", {
|
|
641
|
-
className: "legend-label"
|
|
642
|
-
}, /*#__PURE__*/React__default.createElement("span", {
|
|
643
|
-
className: "indicator-dot",
|
|
644
|
-
style: {
|
|
645
|
-
background: item.color
|
|
646
|
-
}
|
|
647
|
-
}), item.label), /*#__PURE__*/React__default.createElement("span", {
|
|
648
|
-
className: "legend-value"
|
|
649
|
-
}, formatNumber(item.value))))), /*#__PURE__*/React__default.createElement("div", {
|
|
650
600
|
className: "chart-wrapper"
|
|
651
601
|
}, /*#__PURE__*/React__default.createElement("canvas", {
|
|
652
602
|
ref: chartRef1,
|
|
@@ -660,38 +610,23 @@ const StatusCards = _ref => {
|
|
|
660
610
|
className: "chart-percentage"
|
|
661
611
|
}, efficiency, "%"), /*#__PURE__*/React__default.createElement("div", {
|
|
662
612
|
className: "chart-label"
|
|
663
|
-
}, t("EKYC_COMPLETE") || "Complete")))
|
|
664
|
-
className: "status-
|
|
665
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
666
|
-
className: "
|
|
667
|
-
|
|
668
|
-
className: "panel-subtitle"
|
|
669
|
-
}, t("EKYC_PLATFORM_EFFICIENCY") || "Platform operational efficiency"), /*#__PURE__*/React__default.createElement("div", {
|
|
670
|
-
className: "health-metrics-row"
|
|
671
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
672
|
-
className: "health-percentage"
|
|
673
|
-
}, healthPct, "%")), /*#__PURE__*/React__default.createElement("div", {
|
|
674
|
-
className: "status-progress-bar"
|
|
613
|
+
}, t("EKYC_COMPLETE") || "Complete"))), /*#__PURE__*/React__default.createElement("div", {
|
|
614
|
+
className: "status-boxes"
|
|
615
|
+
}, legendItems.map(item => /*#__PURE__*/React__default.createElement("div", {
|
|
616
|
+
className: "status-box",
|
|
617
|
+
key: item.label
|
|
675
618
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
676
|
-
className: "
|
|
619
|
+
className: "status-box-top"
|
|
620
|
+
}, /*#__PURE__*/React__default.createElement("span", {
|
|
621
|
+
className: "status-indicator",
|
|
677
622
|
style: {
|
|
678
|
-
|
|
623
|
+
backgroundColor: item.color
|
|
679
624
|
}
|
|
680
|
-
})
|
|
681
|
-
className: "
|
|
682
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
683
|
-
className: "
|
|
684
|
-
},
|
|
685
|
-
className: "metric-label"
|
|
686
|
-
}, t("EKYC_AVG_LATENCY") || "Avg Latency"), /*#__PURE__*/React__default.createElement("div", {
|
|
687
|
-
className: "metric-value"
|
|
688
|
-
}, "0s")), /*#__PURE__*/React__default.createElement("div", {
|
|
689
|
-
className: "metric-box"
|
|
690
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
691
|
-
className: "metric-label"
|
|
692
|
-
}, t("EKYC_ERROR_RATE") || "Error Rate"), /*#__PURE__*/React__default.createElement("div", {
|
|
693
|
-
className: "metric-value"
|
|
694
|
-
}, "0.0%")))))));
|
|
625
|
+
}), /*#__PURE__*/React__default.createElement("span", {
|
|
626
|
+
className: "status-name"
|
|
627
|
+
}, item.label)), /*#__PURE__*/React__default.createElement("div", {
|
|
628
|
+
className: "status-box-value"
|
|
629
|
+
}, formatNumber(item.value))))))))));
|
|
695
630
|
};
|
|
696
631
|
|
|
697
632
|
const Dashboard = () => {
|
|
@@ -705,23 +640,31 @@ const Dashboard = () => {
|
|
|
705
640
|
}),
|
|
706
641
|
isLoading = _Digit$Hooks$ekyc$use.isLoading,
|
|
707
642
|
dashboardData = _Digit$Hooks$ekyc$use.data;
|
|
643
|
+
const _Digit$Hooks$ekyc$use2 = Digit.Hooks.ekyc.useEkycAssignmentProgress({
|
|
644
|
+
tenantId,
|
|
645
|
+
allVendorsDetailed: true
|
|
646
|
+
}, {
|
|
647
|
+
enabled: true,
|
|
648
|
+
keepPreviousData: true
|
|
649
|
+
}),
|
|
650
|
+
progressData = _Digit$Hooks$ekyc$use2.data,
|
|
651
|
+
isProgressLoading = _Digit$Hooks$ekyc$use2.isLoading;
|
|
708
652
|
const countData = React.useMemo(() => {
|
|
709
653
|
const info = (dashboardData === null || dashboardData === void 0 ? void 0 : dashboardData.dashboardInfo) || {};
|
|
710
654
|
return {
|
|
711
655
|
total: info.total || 0,
|
|
712
|
-
completed:
|
|
713
|
-
pending: info.
|
|
714
|
-
rejected:
|
|
715
|
-
active:
|
|
716
|
-
submittedCount:
|
|
717
|
-
|
|
656
|
+
completed: (progressData === null || progressData === void 0 ? void 0 : progressData.submittedKnos) + (progressData === null || progressData === void 0 ? void 0 : progressData.selfEkycCount) || 0,
|
|
657
|
+
pending: info.total - (progressData === null || progressData === void 0 ? void 0 : progressData.submittedKnos) - (progressData === null || progressData === void 0 ? void 0 : progressData.selfEkycCount) || 0,
|
|
658
|
+
rejected: (progressData === null || progressData === void 0 ? void 0 : progressData.rejectedKnos) || 0,
|
|
659
|
+
active: (progressData === null || progressData === void 0 ? void 0 : progressData.active) || 0,
|
|
660
|
+
submittedCount: (progressData === null || progressData === void 0 ? void 0 : progressData.submittedKnos) || 0,
|
|
661
|
+
selfEkycCount: (progressData === null || progressData === void 0 ? void 0 : progressData.selfEkycCount) || 0,
|
|
662
|
+
overallProgressPercent: (progressData === null || progressData === void 0 ? void 0 : progressData.overallProgressPercent) || 0
|
|
718
663
|
};
|
|
719
|
-
}, [dashboardData]);
|
|
720
|
-
return isLoading ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.Loader, null) : /*#__PURE__*/React__default.createElement(
|
|
721
|
-
className: "min-width-full"
|
|
722
|
-
}, /*#__PURE__*/React__default.createElement(StatusCards, {
|
|
664
|
+
}, [dashboardData, progressData]);
|
|
665
|
+
return isProgressLoading || isLoading ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.Loader, null) : /*#__PURE__*/React__default.createElement(StatusCards, {
|
|
723
666
|
countData: countData
|
|
724
|
-
})
|
|
667
|
+
});
|
|
725
668
|
};
|
|
726
669
|
|
|
727
670
|
const _excluded = ["tableConfig", "filterComponent"];
|
|
@@ -2002,27 +1945,31 @@ const VendorDetailsCard = () => {
|
|
|
2002
1945
|
}),
|
|
2003
1946
|
isProgressLoading = _Digit$Hooks$ekyc$use.isLoading,
|
|
2004
1947
|
progressData = _Digit$Hooks$ekyc$use.data;
|
|
1948
|
+
const createDummySupervisors = vendor => {
|
|
1949
|
+
const count = Number(vendor === null || vendor === void 0 ? void 0 : vendor.supervisors) || 5;
|
|
1950
|
+
return Array.from({
|
|
1951
|
+
length: count
|
|
1952
|
+
}, (_, i) => ({
|
|
1953
|
+
id: "SUP_V_" + ((vendor === null || vendor === void 0 ? void 0 : vendor.id) || "DEFAULT") + "_" + (i + 1),
|
|
1954
|
+
name: "Supervisor " + (i + 1),
|
|
1955
|
+
mobileNo: "99999120" + i,
|
|
1956
|
+
status: "ACTIVE",
|
|
1957
|
+
totalKnos: 0,
|
|
1958
|
+
submittedKnos: 0,
|
|
1959
|
+
pendingKnos: 0,
|
|
1960
|
+
progressPercent: 0,
|
|
1961
|
+
isDummy: true
|
|
1962
|
+
}));
|
|
1963
|
+
};
|
|
2005
1964
|
const vendorSupervisors = React.useMemo(() => {
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
name: "Supervisor " + (i + 1) + " (" + vendor.name + ")",
|
|
2013
|
-
mobileNo: "99999120" + i,
|
|
2014
|
-
status: "ACTIVE",
|
|
2015
|
-
totalKnos: Math.round(1000 + Math.random() * 4000),
|
|
2016
|
-
submittedKnos: Math.round(500 + Math.random() * 2000),
|
|
2017
|
-
pendingKnos: Math.round(200 + Math.random() * 1000),
|
|
2018
|
-
progressPercent: Math.round(40 + Math.random() * 50)
|
|
2019
|
-
}));
|
|
2020
|
-
return mockSupList;
|
|
2021
|
-
}
|
|
1965
|
+
const currentVendorId = (vendor === null || vendor === void 0 ? void 0 : vendor.id) || (vendor === null || vendor === void 0 ? void 0 : vendor.vendorId) || vendorId;
|
|
1966
|
+
if (!Array.isArray(supervisorSearchResponse === null || supervisorSearchResponse === void 0 ? void 0 : supervisorSearchResponse.supervisors)) {
|
|
1967
|
+
return vendor ? createDummySupervisors(vendor) : [];
|
|
1968
|
+
}
|
|
1969
|
+
const matchedSups = supervisorSearchResponse.supervisors.filter(s => s.vendorId === currentVendorId || s.vendorId === (vendor === null || vendor === void 0 ? void 0 : vendor.id) || s.vendorId === (vendor === null || vendor === void 0 ? void 0 : vendor.vendorId));
|
|
1970
|
+
if (matchedSups.length === 0) {
|
|
2022
1971
|
return [];
|
|
2023
1972
|
}
|
|
2024
|
-
const currentVendorId = (vendor === null || vendor === void 0 ? void 0 : vendor.id) || (vendor === null || vendor === void 0 ? void 0 : vendor.vendorId) || vendorId;
|
|
2025
|
-
const matchedSups = supervisorSearchResponse.supervisors.filter(s => s.vendorId === currentVendorId);
|
|
2026
1973
|
return matchedSups.map(sup => {
|
|
2027
1974
|
var _progressData$supervi, _sup$owner2, _sup$owner3, _sup$owner4;
|
|
2028
1975
|
const report = progressData === null || progressData === void 0 ? void 0 : (_progressData$supervi = progressData.supervisorReport) === null || _progressData$supervi === void 0 ? void 0 : _progressData$supervi.find(r => {
|
|
@@ -2037,26 +1984,24 @@ const VendorDetailsCard = () => {
|
|
|
2037
1984
|
totalKnos: (report === null || report === void 0 ? void 0 : report.totalKnos) || 0,
|
|
2038
1985
|
submittedKnos: (report === null || report === void 0 ? void 0 : report.submittedKnos) || 0,
|
|
2039
1986
|
pendingKnos: (report === null || report === void 0 ? void 0 : report.pendingKnos) || 0,
|
|
2040
|
-
progressPercent: (report === null || report === void 0 ? void 0 : report.progressPercent) || 0
|
|
1987
|
+
progressPercent: (report === null || report === void 0 ? void 0 : report.progressPercent) || 0,
|
|
1988
|
+
isDummy: false
|
|
2041
1989
|
};
|
|
2042
1990
|
});
|
|
2043
1991
|
}, [supervisorSearchResponse, vendor, progressData, vendorId]);
|
|
2044
1992
|
const vendorName = (vendor === null || vendor === void 0 ? void 0 : vendor.name) || "N/A";
|
|
2045
1993
|
const mobileNumber = (vendor === null || vendor === void 0 ? void 0 : vendor.mobileNumber) || (vendor === null || vendor === void 0 ? void 0 : (_vendor$owner = vendor.owner) === null || _vendor$owner === void 0 ? void 0 : _vendor$owner.mobileNumber) || "N/A";
|
|
2046
1994
|
const email = (vendor === null || vendor === void 0 ? void 0 : (_vendor$owner2 = vendor.owner) === null || _vendor$owner2 === void 0 ? void 0 : _vendor$owner2.emailId) || "N/A";
|
|
2047
|
-
const jurisdictions = React.useMemo(() => {
|
|
2048
|
-
if (Array.isArray(vendor === null || vendor === void 0 ? void 0 : vendor.jurisdictions)) {
|
|
2049
|
-
return vendor.jurisdictions.join(", ");
|
|
2050
|
-
}
|
|
2051
|
-
return "N/A";
|
|
2052
|
-
}, [vendor]);
|
|
2053
1995
|
const zoneIds = React.useMemo(() => {
|
|
2054
1996
|
var _vendor$zoneIds;
|
|
2055
1997
|
return vendor !== null && vendor !== void 0 && (_vendor$zoneIds = vendor.zoneIds) !== null && _vendor$zoneIds !== void 0 && _vendor$zoneIds.length ? vendor.zoneIds.filter(Boolean).map(zone => String(zone).trim().toUpperCase()) : [];
|
|
2056
1998
|
}, [vendor]);
|
|
2057
1999
|
const cards = React.useMemo(() => {
|
|
2058
2000
|
const hasRealData = vendorSupervisors.some(s => s.totalKnos > 0);
|
|
2001
|
+
console.log("11111111111111111", vendorSupervisors);
|
|
2002
|
+
console.log(progressData);
|
|
2059
2003
|
const totalKnos = hasRealData ? vendorSupervisors.reduce((acc, s) => acc + (s.totalKnos || 0), 0) : (progressData === null || progressData === void 0 ? void 0 : progressData.totalKnos) || (vendor === null || vendor === void 0 ? void 0 : vendor.assignedConnections) || 0;
|
|
2004
|
+
const totalAssignments = hasRealData ? vendorSupervisors.reduce((acc, s) => acc + (s.totalKnos || 0), 0) : (progressData === null || progressData === void 0 ? void 0 : progressData.totalKnos) || (vendor === null || vendor === void 0 ? void 0 : vendor.assignedConnections) || 0;
|
|
2060
2005
|
const completedKnos = hasRealData ? vendorSupervisors.reduce((acc, s) => acc + (s.submittedKnos || 0), 0) : (progressData === null || progressData === void 0 ? void 0 : progressData.completedKnos) || (vendor === null || vendor === void 0 ? void 0 : vendor.completedEkyc) || 0;
|
|
2061
2006
|
const pendingKnos = hasRealData ? vendorSupervisors.reduce((acc, s) => acc + (s.pendingKnos || 0), 0) : totalKnos - completedKnos;
|
|
2062
2007
|
const progressPercent = totalKnos > 0 ? Math.round(completedKnos / totalKnos * 100) : (vendor === null || vendor === void 0 ? void 0 : vendor.progress) || 0;
|
|
@@ -2066,6 +2011,12 @@ const VendorDetailsCard = () => {
|
|
|
2066
2011
|
color: "#0B2559",
|
|
2067
2012
|
type: "today",
|
|
2068
2013
|
icon: /*#__PURE__*/React__default.createElement(fa.FaUsers, null)
|
|
2014
|
+
}, {
|
|
2015
|
+
label: "TOTAL_EKYC_APPLICATIONS",
|
|
2016
|
+
count: totalAssignments,
|
|
2017
|
+
color: "#0B2559",
|
|
2018
|
+
type: "today",
|
|
2019
|
+
icon: /*#__PURE__*/React__default.createElement(fa.FaUsers, null)
|
|
2069
2020
|
}, {
|
|
2070
2021
|
label: "EKYC_COMPLETED",
|
|
2071
2022
|
count: completedKnos,
|
|
@@ -2104,6 +2055,7 @@ const VendorDetailsCard = () => {
|
|
|
2104
2055
|
tenantId: tenantId,
|
|
2105
2056
|
offset: 0,
|
|
2106
2057
|
limit: 10000,
|
|
2058
|
+
vendorId: targetVendorId,
|
|
2107
2059
|
reportDownload: true
|
|
2108
2060
|
}, fromDate && {
|
|
2109
2061
|
fromDate
|
|
@@ -2220,7 +2172,6 @@ const VendorDetailsCard = () => {
|
|
|
2220
2172
|
meterPhotoFileStoreId: t("METER_PHOTO_FILESTORE_ID"),
|
|
2221
2173
|
modifiedBy: t("MODIFIED_BY"),
|
|
2222
2174
|
emailId: t("EMAIL_ID"),
|
|
2223
|
-
fatherOrHusbandName: t("FATHER_HUSBUND_NAME"),
|
|
2224
2175
|
dob: t("DOB"),
|
|
2225
2176
|
consumerType: t("CONSUMER_TYPE"),
|
|
2226
2177
|
createdTime: t("CREATED_TIME"),
|
|
@@ -3282,47 +3233,9 @@ const Inbox = _ref2 => {
|
|
|
3282
3233
|
isListLoading = _Digit$Hooks$ekyc$use.isLoading,
|
|
3283
3234
|
_Digit$Hooks$ekyc$use2 = _Digit$Hooks$ekyc$use.data,
|
|
3284
3235
|
listData = _Digit$Hooks$ekyc$use2 === void 0 ? {} : _Digit$Hooks$ekyc$use2;
|
|
3285
|
-
const _Digit$Hooks$fsm$useD = Digit.Hooks.fsm.useDsoSearch(tenantId, {
|
|
3286
|
-
status: "ACTIVE"
|
|
3287
|
-
}, {
|
|
3288
|
-
enabled: !!tenantId,
|
|
3289
|
-
staleTime: 300000
|
|
3290
|
-
}),
|
|
3291
|
-
vendorSearchResponse = _Digit$Hooks$fsm$useD.data;
|
|
3292
|
-
const _useMemo = React.useMemo(() => {
|
|
3293
|
-
var _Digit$SessionStorage;
|
|
3294
|
-
if (!vendorSearchResponse || vendorSearchResponse.length === 0) {
|
|
3295
|
-
return {
|
|
3296
|
-
targetVendorId: null,
|
|
3297
|
-
allVendorIds: []
|
|
3298
|
-
};
|
|
3299
|
-
}
|
|
3300
|
-
const loggedInUser = (_Digit$SessionStorage = Digit.SessionStorage.get("User")) === null || _Digit$SessionStorage === void 0 ? void 0 : _Digit$SessionStorage.info;
|
|
3301
|
-
const userUuid = loggedInUser === null || loggedInUser === void 0 ? void 0 : loggedInUser.uuid;
|
|
3302
|
-
const userMobile = loggedInUser === null || loggedInUser === void 0 ? void 0 : loggedInUser.mobileNumber;
|
|
3303
|
-
const matchesUser = v => {
|
|
3304
|
-
var _v$owner, _v$owner2, _v$owner3;
|
|
3305
|
-
const ownerUuid = ((_v$owner = v.owner) === null || _v$owner === void 0 ? void 0 : _v$owner.uuid) || ((_v$owner2 = v.owner) === null || _v$owner2 === void 0 ? void 0 : _v$owner2.id);
|
|
3306
|
-
const ownerMobile = ((_v$owner3 = v.owner) === null || _v$owner3 === void 0 ? void 0 : _v$owner3.mobileNumber) || v.mobileNumber;
|
|
3307
|
-
return userUuid && ownerUuid === userUuid || userMobile && ownerMobile === userMobile;
|
|
3308
|
-
};
|
|
3309
|
-
const allIds = vendorSearchResponse.map(v => {
|
|
3310
|
-
const dso = v.dsoDetails || v;
|
|
3311
|
-
return dso.id || dso.vendorId || v.id || v.vendorId;
|
|
3312
|
-
}).filter(Boolean);
|
|
3313
|
-
const matched = vendorSearchResponse.find(v => matchesUser(v.dsoDetails || v));
|
|
3314
|
-
let matchedId = null;
|
|
3315
|
-
if (matched) {
|
|
3316
|
-
const dso = matched.dsoDetails || matched;
|
|
3317
|
-
matchedId = dso.id || dso.vendorId || matched.id || matched.vendorId;
|
|
3318
|
-
}
|
|
3319
|
-
return {
|
|
3320
|
-
targetVendorId: matchedId,
|
|
3321
|
-
allVendorIds: allIds
|
|
3322
|
-
};
|
|
3323
|
-
}, [vendorSearchResponse]);
|
|
3324
3236
|
const _Digit$Hooks$ekyc$use3 = Digit.Hooks.ekyc.useEkycAssignmentProgress({
|
|
3325
|
-
tenantId
|
|
3237
|
+
tenantId,
|
|
3238
|
+
allVendorsDetailed: true
|
|
3326
3239
|
}, {
|
|
3327
3240
|
enabled: !!tenantId,
|
|
3328
3241
|
keepPreviousData: true
|
|
@@ -3386,7 +3299,7 @@ const Inbox = _ref2 => {
|
|
|
3386
3299
|
const _useTranslation = reactI18next.useTranslation(),
|
|
3387
3300
|
t = _useTranslation.t;
|
|
3388
3301
|
const progressMetrics = React.useMemo(() => {
|
|
3389
|
-
var _ref3, _progressData$totalKn,
|
|
3302
|
+
var _ref3, _progressData$totalKn, _progressData$submitt, _progressData$pending, _ref4, _progressData$overall;
|
|
3390
3303
|
if (!progressData) return {
|
|
3391
3304
|
totalKnos: 0,
|
|
3392
3305
|
submittedKnos: 0,
|
|
@@ -3394,9 +3307,9 @@ const Inbox = _ref2 => {
|
|
|
3394
3307
|
progressPercent: 0
|
|
3395
3308
|
};
|
|
3396
3309
|
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;
|
|
3397
|
-
const submittedKnos = (
|
|
3310
|
+
const submittedKnos = (_progressData$submitt = progressData === null || progressData === void 0 ? void 0 : progressData.submittedKnos) != null ? _progressData$submitt : 0;
|
|
3398
3311
|
const pendingKnos = (_progressData$pending = progressData === null || progressData === void 0 ? void 0 : progressData.pendingKnos) != null ? _progressData$pending : totalKnos >= submittedKnos ? totalKnos - submittedKnos : 0;
|
|
3399
|
-
const progressPercent = (
|
|
3312
|
+
const progressPercent = (_ref4 = (_progressData$overall = progressData === null || progressData === void 0 ? void 0 : progressData.overallProgressPercent) != null ? _progressData$overall : progressData === null || progressData === void 0 ? void 0 : progressData.progressPercent) != null ? _ref4 : totalKnos > 0 ? (submittedKnos / totalKnos * 100).toFixed(1) : 0;
|
|
3400
3313
|
return {
|
|
3401
3314
|
totalKnos,
|
|
3402
3315
|
submittedKnos,
|
|
@@ -3431,10 +3344,10 @@ const Inbox = _ref2 => {
|
|
|
3431
3344
|
}], [progressMetrics, t]);
|
|
3432
3345
|
const totalRecords = (listData === null || listData === void 0 ? void 0 : listData.totalCount) || 0;
|
|
3433
3346
|
const checkPathName = location.pathname.includes("ekyc/inbox");
|
|
3434
|
-
const SearchFormFields = React.useCallback(
|
|
3435
|
-
let registerRef =
|
|
3436
|
-
searchFormState =
|
|
3437
|
-
controlSearchForm =
|
|
3347
|
+
const SearchFormFields = React.useCallback(_ref5 => {
|
|
3348
|
+
let registerRef = _ref5.registerRef,
|
|
3349
|
+
searchFormState = _ref5.searchFormState,
|
|
3350
|
+
controlSearchForm = _ref5.controlSearchForm;
|
|
3438
3351
|
return /*#__PURE__*/React__default.createElement(SearchFormFieldsComponents, {
|
|
3439
3352
|
registerRef,
|
|
3440
3353
|
searchFormState,
|
|
@@ -5406,18 +5319,7 @@ const EKYCForm = _ref => {
|
|
|
5406
5319
|
}))))));
|
|
5407
5320
|
};
|
|
5408
5321
|
|
|
5409
|
-
const parseAdditionalDetails = additionalDetails => {
|
|
5410
|
-
if (!additionalDetails) return {};
|
|
5411
|
-
if (typeof additionalDetails === "object") return additionalDetails;
|
|
5412
|
-
if (typeof additionalDetails !== "string") return {};
|
|
5413
|
-
try {
|
|
5414
|
-
return JSON.parse(additionalDetails);
|
|
5415
|
-
} catch (error) {
|
|
5416
|
-
return {};
|
|
5417
|
-
}
|
|
5418
|
-
};
|
|
5419
5322
|
const AdminDashboard = () => {
|
|
5420
|
-
var _Digit$SessionStorage;
|
|
5421
5323
|
const _useTranslation = reactI18next.useTranslation(),
|
|
5422
5324
|
t = _useTranslation.t;
|
|
5423
5325
|
const history = reactRouterDom.useHistory();
|
|
@@ -5425,7 +5327,6 @@ const AdminDashboard = () => {
|
|
|
5425
5327
|
if (!tenantId || tenantId === "dl") {
|
|
5426
5328
|
tenantId = "dl.djb";
|
|
5427
5329
|
}
|
|
5428
|
-
const loggedInUser = (_Digit$SessionStorage = Digit.SessionStorage.get("User")) === null || _Digit$SessionStorage === void 0 ? void 0 : _Digit$SessionStorage.info;
|
|
5429
5330
|
const _Digit$Hooks$fsm$useD = Digit.Hooks.fsm.useDsoSearch(tenantId, {
|
|
5430
5331
|
status: "ACTIVE"
|
|
5431
5332
|
}, {
|
|
@@ -5440,54 +5341,15 @@ const AdminDashboard = () => {
|
|
|
5440
5341
|
return dso.id || dso.vendorId || v.id || v.vendorId;
|
|
5441
5342
|
}).filter(Boolean);
|
|
5442
5343
|
}, [vendorSearchResponse]);
|
|
5443
|
-
const _Digit$Hooks$ekyc$use = Digit.Hooks.ekyc.useEkycAssignmentProgress(
|
|
5444
|
-
|
|
5445
|
-
|
|
5446
|
-
}
|
|
5344
|
+
const _Digit$Hooks$ekyc$use = Digit.Hooks.ekyc.useEkycAssignmentProgress({
|
|
5345
|
+
tenantId,
|
|
5346
|
+
allVendorsDetailed: true
|
|
5347
|
+
}, {
|
|
5447
5348
|
enabled: !!tenantId && allVendorIds.length > 0,
|
|
5448
5349
|
keepPreviousData: true
|
|
5449
5350
|
}),
|
|
5450
5351
|
progressData = _Digit$Hooks$ekyc$use.data,
|
|
5451
5352
|
isProgressLoading = _Digit$Hooks$ekyc$use.isLoading;
|
|
5452
|
-
const vendorsList = React.useMemo(() => {
|
|
5453
|
-
if (vendorSearchResponse && vendorSearchResponse.length > 0) {
|
|
5454
|
-
const filteredVendors = vendorSearchResponse.filter(v => {
|
|
5455
|
-
var _additionalDetails$se;
|
|
5456
|
-
const dso = v.dsoDetails || v;
|
|
5457
|
-
const additionalDetails = parseAdditionalDetails(dso.additionalDetails || v.additionalDetails);
|
|
5458
|
-
return (additionalDetails === null || additionalDetails === void 0 ? void 0 : (_additionalDetails$se = additionalDetails.serviceType) === null || _additionalDetails$se === void 0 ? void 0 : _additionalDetails$se.toLowerCase()) === "ekyc";
|
|
5459
|
-
});
|
|
5460
|
-
return filteredVendors.map(v => {
|
|
5461
|
-
var _progressData$supervi, _dso$owner, _v$owner, _dso$owner2;
|
|
5462
|
-
const dso = v.dsoDetails || v;
|
|
5463
|
-
const supervisorsList = dso.supervisors || [];
|
|
5464
|
-
const surveyorsList = dso.surveyors || [];
|
|
5465
|
-
const supervisorIds = supervisorsList.map(s => {
|
|
5466
|
-
var _s$owner;
|
|
5467
|
-
return s.id || ((_s$owner = s.owner) === null || _s$owner === void 0 ? void 0 : _s$owner.uuid);
|
|
5468
|
-
}).filter(Boolean);
|
|
5469
|
-
const matchedReports = (progressData === null || progressData === void 0 ? void 0 : (_progressData$supervi = progressData.supervisorReport) === null || _progressData$supervi === void 0 ? void 0 : _progressData$supervi.filter(r => supervisorIds.includes(r.supervisorId))) || [];
|
|
5470
|
-
const completed = matchedReports.reduce((acc, r) => acc + (r.submittedKnos || 0), 0);
|
|
5471
|
-
const pending = matchedReports.reduce((acc, r) => acc + (r.pendingKnos || 0), 0);
|
|
5472
|
-
const total = matchedReports.reduce((acc, r) => acc + (r.totalKnos || 0), 0);
|
|
5473
|
-
const progress = total > 0 ? Math.round(completed / total * 100) : 0;
|
|
5474
|
-
const rejected = 0;
|
|
5475
|
-
return {
|
|
5476
|
-
id: dso.id || dso.vendorId || v.id || v.vendorId,
|
|
5477
|
-
name: dso.name || dso.displayName || v.name || "N/A",
|
|
5478
|
-
ownerName: ((_dso$owner = dso.owner) === null || _dso$owner === void 0 ? void 0 : _dso$owner.name) || ((_v$owner = v.owner) === null || _v$owner === void 0 ? void 0 : _v$owner.name) || "N/A",
|
|
5479
|
-
mobileNumber: dso.mobileNumber || ((_dso$owner2 = dso.owner) === null || _dso$owner2 === void 0 ? void 0 : _dso$owner2.mobileNumber) || v.mobileNumber || "N/A",
|
|
5480
|
-
supervisors: supervisorsList.length,
|
|
5481
|
-
surveyors: surveyorsList.length,
|
|
5482
|
-
completed: completed,
|
|
5483
|
-
progress: progress,
|
|
5484
|
-
pending: pending,
|
|
5485
|
-
rejected: rejected
|
|
5486
|
-
};
|
|
5487
|
-
});
|
|
5488
|
-
}
|
|
5489
|
-
return [];
|
|
5490
|
-
}, [vendorSearchResponse, progressData]);
|
|
5491
5353
|
return /*#__PURE__*/React__default.createElement(digitUiReactComponents.Card, {
|
|
5492
5354
|
className: "surveyor-dashboard"
|
|
5493
5355
|
}, /*#__PURE__*/React__default.createElement(Dashboard, null), /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -5496,52 +5358,66 @@ const AdminDashboard = () => {
|
|
|
5496
5358
|
className: "section-title"
|
|
5497
5359
|
}, t("EKYC_VENDORS_PERFORMANCE") || "eKYC Vendors Performance"), isVendorSearchLoading || isProgressLoading ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.Loader, null) : /*#__PURE__*/React__default.createElement("div", {
|
|
5498
5360
|
className: "vendors-grid"
|
|
5499
|
-
},
|
|
5500
|
-
|
|
5501
|
-
}, t("NO_VENDORS_FOUND") || "No vendors found.") : vendorsList.map(vendor => /*#__PURE__*/React__default.createElement("div", {
|
|
5502
|
-
key: vendor.id,
|
|
5361
|
+
}, Array.isArray(progressData === null || progressData === void 0 ? void 0 : progressData.vendorReports) && (progressData === null || progressData === void 0 ? void 0 : progressData.vendorReports.length) && (progressData === null || progressData === void 0 ? void 0 : progressData.vendorReports.map(vendor => /*#__PURE__*/React__default.createElement("div", {
|
|
5362
|
+
key: vendor.vendorId,
|
|
5503
5363
|
className: "vendor-perf-card",
|
|
5504
|
-
onClick: () => history.push("/digit-ui/employee/ekyc/vendors/" + vendor.
|
|
5364
|
+
onClick: () => history.push("/digit-ui/employee/ekyc/vendors/" + vendor.vendorId)
|
|
5365
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
5366
|
+
className: "vendor-card-header"
|
|
5505
5367
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
5506
|
-
className: "
|
|
5368
|
+
className: "vendor-title"
|
|
5507
5369
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
5508
|
-
className: "vendor-
|
|
5509
|
-
}, /*#__PURE__*/React__default.createElement("
|
|
5370
|
+
className: "vendor-icon"
|
|
5371
|
+
}, /*#__PURE__*/React__default.createElement("span", null, vendor.vendorName[0].toUpperCase())), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("h4", null, vendor.vendorName), /*#__PURE__*/React__default.createElement("span", {
|
|
5372
|
+
className: "vendor-subtitle"
|
|
5373
|
+
}, t("EKYC_VENDOR") || "eKYC Vendor"))), /*#__PURE__*/React__default.createElement("div", {
|
|
5510
5374
|
className: "progress-badge"
|
|
5511
|
-
}, vendor.
|
|
5375
|
+
}, vendor.progressPercent, "%")), /*#__PURE__*/React__default.createElement("div", {
|
|
5376
|
+
className: "progress-section"
|
|
5377
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
5512
5378
|
className: "progress-bar-container"
|
|
5513
5379
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
5514
5380
|
className: "progress-bar-fill",
|
|
5515
5381
|
style: {
|
|
5516
|
-
width: vendor.
|
|
5382
|
+
width: vendor.progressPercent + "%"
|
|
5517
5383
|
}
|
|
5518
5384
|
})), /*#__PURE__*/React__default.createElement("div", {
|
|
5385
|
+
className: "progress-label"
|
|
5386
|
+
}, /*#__PURE__*/React__default.createElement("span", null, t("PROGRESS") || "Progress"), /*#__PURE__*/React__default.createElement("span", null, vendor.progressPercent, "%"))), /*#__PURE__*/React__default.createElement("div", {
|
|
5519
5387
|
className: "stats-grid"
|
|
5520
5388
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
5521
5389
|
className: "stat-item"
|
|
5522
|
-
}, /*#__PURE__*/React__default.createElement("
|
|
5523
|
-
className: "value"
|
|
5524
|
-
}, vendor.
|
|
5525
|
-
className: "label"
|
|
5390
|
+
}, /*#__PURE__*/React__default.createElement("span", {
|
|
5391
|
+
className: "stat-value"
|
|
5392
|
+
}, vendor.totalSupervisors), /*#__PURE__*/React__default.createElement("span", {
|
|
5393
|
+
className: "stat-label"
|
|
5526
5394
|
}, t("SUPERVISORS") || "Supervisors")), /*#__PURE__*/React__default.createElement("div", {
|
|
5527
5395
|
className: "stat-item"
|
|
5528
|
-
}, /*#__PURE__*/React__default.createElement("
|
|
5529
|
-
className: "value"
|
|
5530
|
-
}, vendor.
|
|
5531
|
-
className: "label"
|
|
5396
|
+
}, /*#__PURE__*/React__default.createElement("span", {
|
|
5397
|
+
className: "stat-value"
|
|
5398
|
+
}, vendor.totalSurveyors), /*#__PURE__*/React__default.createElement("span", {
|
|
5399
|
+
className: "stat-label"
|
|
5532
5400
|
}, t("SURVEYORS") || "Surveyors")), /*#__PURE__*/React__default.createElement("div", {
|
|
5533
5401
|
className: "stat-item"
|
|
5534
|
-
}, /*#__PURE__*/React__default.createElement("
|
|
5535
|
-
className: "value completed-val"
|
|
5536
|
-
}, vendor.
|
|
5537
|
-
className: "label"
|
|
5402
|
+
}, /*#__PURE__*/React__default.createElement("span", {
|
|
5403
|
+
className: "stat-value completed-val"
|
|
5404
|
+
}, vendor.submittedKnos), /*#__PURE__*/React__default.createElement("span", {
|
|
5405
|
+
className: "stat-label"
|
|
5538
5406
|
}, t("COMPLETED") || "Completed"))), /*#__PURE__*/React__default.createElement("div", {
|
|
5539
|
-
className: "
|
|
5540
|
-
}, /*#__PURE__*/React__default.createElement("
|
|
5541
|
-
className: "
|
|
5542
|
-
},
|
|
5543
|
-
className: "
|
|
5544
|
-
}, vendor.
|
|
5407
|
+
className: "knos-summary"
|
|
5408
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
5409
|
+
className: "kno-stat"
|
|
5410
|
+
}, /*#__PURE__*/React__default.createElement("span", {
|
|
5411
|
+
className: "kno-label"
|
|
5412
|
+
}, t("TOTAL") || "Total"), /*#__PURE__*/React__default.createElement("strong", null, vendor.totalKnos)), /*#__PURE__*/React__default.createElement("div", {
|
|
5413
|
+
className: "kno-stat pending"
|
|
5414
|
+
}, /*#__PURE__*/React__default.createElement("span", {
|
|
5415
|
+
className: "kno-label"
|
|
5416
|
+
}, t("PENDING") || "Pending"), /*#__PURE__*/React__default.createElement("strong", null, vendor.pendingKnos)), /*#__PURE__*/React__default.createElement("div", {
|
|
5417
|
+
className: "kno-stat rejected"
|
|
5418
|
+
}, /*#__PURE__*/React__default.createElement("span", {
|
|
5419
|
+
className: "kno-label"
|
|
5420
|
+
}, t("REJECTED") || "Rejected"), /*#__PURE__*/React__default.createElement("strong", null, vendor.rejectedKnos)))))))));
|
|
5545
5421
|
};
|
|
5546
5422
|
|
|
5547
5423
|
const SupervisorDetailsCard = () => {
|
|
@@ -5936,6 +5812,7 @@ const SupervisorDetailsCard = () => {
|
|
|
5936
5812
|
tenantId: tenantId || "dl.djb",
|
|
5937
5813
|
offset: 0,
|
|
5938
5814
|
limit: 10000,
|
|
5815
|
+
supervisorId: (supervisor === null || supervisor === void 0 ? void 0 : supervisor.supervisorId) || supervisorId,
|
|
5939
5816
|
reportDownload: true
|
|
5940
5817
|
}, fromDate && {
|
|
5941
5818
|
fromDate
|
|
@@ -6052,7 +5929,6 @@ const SupervisorDetailsCard = () => {
|
|
|
6052
5929
|
meterPhotoFileStoreId: t("METER_PHOTO_FILESTORE_ID"),
|
|
6053
5930
|
modifiedBy: t("MODIFIED_BY"),
|
|
6054
5931
|
emailId: t("EMAIL_ID"),
|
|
6055
|
-
fatherOrHusbandName: t("FATHER_HUSBUND_NAME"),
|
|
6056
5932
|
dob: t("DOB"),
|
|
6057
5933
|
consumerType: t("CONSUMER_TYPE"),
|
|
6058
5934
|
createdTime: t("CREATED_TIME"),
|