@djb25/digit-ui-module-ekyc 1.0.62 → 1.0.64
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 +187 -337
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +188 -338
- 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"];
|
|
@@ -1994,35 +1937,38 @@ const VendorDetailsCard = () => {
|
|
|
1994
1937
|
}, [vendorSearchResponse, vendorId, loggedInUser]);
|
|
1995
1938
|
const targetVendorId = vendorId || (vendor === null || vendor === void 0 ? void 0 : vendor.id) || (vendor === null || vendor === void 0 ? void 0 : vendor.vendorId);
|
|
1996
1939
|
const _Digit$Hooks$ekyc$use = Digit.Hooks.ekyc.useEkycAssignmentProgress(targetVendorId ? {
|
|
1997
|
-
vendorId: targetVendorId
|
|
1998
|
-
vendorIds: [targetVendorId]
|
|
1940
|
+
vendorId: targetVendorId
|
|
1999
1941
|
} : {}, {
|
|
2000
1942
|
enabled: !!tenantId,
|
|
2001
1943
|
keepPreviousData: true
|
|
2002
1944
|
}),
|
|
2003
1945
|
isProgressLoading = _Digit$Hooks$ekyc$use.isLoading,
|
|
2004
1946
|
progressData = _Digit$Hooks$ekyc$use.data;
|
|
1947
|
+
const createDummySupervisors = vendor => {
|
|
1948
|
+
const count = Number(vendor === null || vendor === void 0 ? void 0 : vendor.supervisors) || 5;
|
|
1949
|
+
return Array.from({
|
|
1950
|
+
length: count
|
|
1951
|
+
}, (_, i) => ({
|
|
1952
|
+
id: "SUP_V_" + ((vendor === null || vendor === void 0 ? void 0 : vendor.id) || "DEFAULT") + "_" + (i + 1),
|
|
1953
|
+
name: "Supervisor " + (i + 1),
|
|
1954
|
+
mobileNo: "99999120" + i,
|
|
1955
|
+
status: "ACTIVE",
|
|
1956
|
+
totalKnos: 0,
|
|
1957
|
+
submittedKnos: 0,
|
|
1958
|
+
pendingKnos: 0,
|
|
1959
|
+
progressPercent: 0,
|
|
1960
|
+
isDummy: true
|
|
1961
|
+
}));
|
|
1962
|
+
};
|
|
2005
1963
|
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
|
-
}
|
|
1964
|
+
const currentVendorId = (vendor === null || vendor === void 0 ? void 0 : vendor.id) || (vendor === null || vendor === void 0 ? void 0 : vendor.vendorId) || vendorId;
|
|
1965
|
+
if (!Array.isArray(supervisorSearchResponse === null || supervisorSearchResponse === void 0 ? void 0 : supervisorSearchResponse.supervisors)) {
|
|
1966
|
+
return vendor ? createDummySupervisors(vendor) : [];
|
|
1967
|
+
}
|
|
1968
|
+
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));
|
|
1969
|
+
if (matchedSups.length === 0) {
|
|
2022
1970
|
return [];
|
|
2023
1971
|
}
|
|
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
1972
|
return matchedSups.map(sup => {
|
|
2027
1973
|
var _progressData$supervi, _sup$owner2, _sup$owner3, _sup$owner4;
|
|
2028
1974
|
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,32 +1983,26 @@ const VendorDetailsCard = () => {
|
|
|
2037
1983
|
totalKnos: (report === null || report === void 0 ? void 0 : report.totalKnos) || 0,
|
|
2038
1984
|
submittedKnos: (report === null || report === void 0 ? void 0 : report.submittedKnos) || 0,
|
|
2039
1985
|
pendingKnos: (report === null || report === void 0 ? void 0 : report.pendingKnos) || 0,
|
|
2040
|
-
progressPercent: (report === null || report === void 0 ? void 0 : report.progressPercent) || 0
|
|
1986
|
+
progressPercent: (report === null || report === void 0 ? void 0 : report.progressPercent) || 0,
|
|
1987
|
+
isDummy: false
|
|
2041
1988
|
};
|
|
2042
1989
|
});
|
|
2043
1990
|
}, [supervisorSearchResponse, vendor, progressData, vendorId]);
|
|
2044
1991
|
const vendorName = (vendor === null || vendor === void 0 ? void 0 : vendor.name) || "N/A";
|
|
2045
1992
|
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
1993
|
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
1994
|
const zoneIds = React.useMemo(() => {
|
|
2054
1995
|
var _vendor$zoneIds;
|
|
2055
1996
|
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
1997
|
}, [vendor]);
|
|
2057
1998
|
const cards = React.useMemo(() => {
|
|
2058
|
-
const
|
|
2059
|
-
const
|
|
2060
|
-
const
|
|
2061
|
-
const
|
|
2062
|
-
const progressPercent = totalKnos > 0 ? Math.round(completedKnos / totalKnos * 100) : (vendor === null || vendor === void 0 ? void 0 : vendor.progress) || 0;
|
|
1999
|
+
const totalAssignments = (progressData === null || progressData === void 0 ? void 0 : progressData.totalKnos) || 0;
|
|
2000
|
+
const completedKnos = (progressData === null || progressData === void 0 ? void 0 : progressData.completedKnos) || 0;
|
|
2001
|
+
const pendingKnos = (progressData === null || progressData === void 0 ? void 0 : progressData.pendingKnos) || 0;
|
|
2002
|
+
const progressPercent = (progressData === null || progressData === void 0 ? void 0 : progressData.overallProgressPercent) || 0;
|
|
2063
2003
|
return [{
|
|
2064
2004
|
label: "TOTAL_EKYC_APPLICATIONS",
|
|
2065
|
-
count:
|
|
2005
|
+
count: totalAssignments,
|
|
2066
2006
|
color: "#0B2559",
|
|
2067
2007
|
type: "today",
|
|
2068
2008
|
icon: /*#__PURE__*/React__default.createElement(fa.FaUsers, null)
|
|
@@ -2104,6 +2044,7 @@ const VendorDetailsCard = () => {
|
|
|
2104
2044
|
tenantId: tenantId,
|
|
2105
2045
|
offset: 0,
|
|
2106
2046
|
limit: 10000,
|
|
2047
|
+
vendorId: targetVendorId,
|
|
2107
2048
|
reportDownload: true
|
|
2108
2049
|
}, fromDate && {
|
|
2109
2050
|
fromDate
|
|
@@ -2220,7 +2161,6 @@ const VendorDetailsCard = () => {
|
|
|
2220
2161
|
meterPhotoFileStoreId: t("METER_PHOTO_FILESTORE_ID"),
|
|
2221
2162
|
modifiedBy: t("MODIFIED_BY"),
|
|
2222
2163
|
emailId: t("EMAIL_ID"),
|
|
2223
|
-
fatherOrHusbandName: t("FATHER_HUSBUND_NAME"),
|
|
2224
2164
|
dob: t("DOB"),
|
|
2225
2165
|
consumerType: t("CONSUMER_TYPE"),
|
|
2226
2166
|
createdTime: t("CREATED_TIME"),
|
|
@@ -2544,25 +2484,7 @@ const VendorDetailsCard = () => {
|
|
|
2544
2484
|
setShowReportMenu(p => !p);
|
|
2545
2485
|
setShowCustomPicker(false);
|
|
2546
2486
|
}
|
|
2547
|
-
}, /*#__PURE__*/React__default.createElement("
|
|
2548
|
-
width: "16",
|
|
2549
|
-
height: "16",
|
|
2550
|
-
viewBox: "0 0 24 24",
|
|
2551
|
-
fill: "none",
|
|
2552
|
-
stroke: "currentColor",
|
|
2553
|
-
strokeWidth: "2.5",
|
|
2554
|
-
strokeLinecap: "round",
|
|
2555
|
-
strokeLinejoin: "round"
|
|
2556
|
-
}, /*#__PURE__*/React__default.createElement("path", {
|
|
2557
|
-
d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"
|
|
2558
|
-
}), /*#__PURE__*/React__default.createElement("polyline", {
|
|
2559
|
-
points: "7 10 12 15 17 10"
|
|
2560
|
-
}), /*#__PURE__*/React__default.createElement("line", {
|
|
2561
|
-
x1: "12",
|
|
2562
|
-
y1: "15",
|
|
2563
|
-
x2: "12",
|
|
2564
|
-
y2: "3"
|
|
2565
|
-
})), ekycDownloadLoading ? t("DOWNLOADING") || "Downloading..." : t("DOWNLOAD_EXCEL") || "Download Excel"), showReportMenu && /*#__PURE__*/React__default.createElement("div", {
|
|
2487
|
+
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.MdDownloadIcon, null), ekycDownloadLoading ? t("DOWNLOADING") || "Downloading..." : t("DOWNLOAD_EXCEL") || "Download Excel"), showReportMenu && /*#__PURE__*/React__default.createElement("div", {
|
|
2566
2488
|
className: "report-menu"
|
|
2567
2489
|
}, [{
|
|
2568
2490
|
label: t("TODAY") || "Today",
|
|
@@ -3282,47 +3204,9 @@ const Inbox = _ref2 => {
|
|
|
3282
3204
|
isListLoading = _Digit$Hooks$ekyc$use.isLoading,
|
|
3283
3205
|
_Digit$Hooks$ekyc$use2 = _Digit$Hooks$ekyc$use.data,
|
|
3284
3206
|
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
3207
|
const _Digit$Hooks$ekyc$use3 = Digit.Hooks.ekyc.useEkycAssignmentProgress({
|
|
3325
|
-
tenantId
|
|
3208
|
+
tenantId,
|
|
3209
|
+
allVendorsDetailed: true
|
|
3326
3210
|
}, {
|
|
3327
3211
|
enabled: !!tenantId,
|
|
3328
3212
|
keepPreviousData: true
|
|
@@ -3386,7 +3270,7 @@ const Inbox = _ref2 => {
|
|
|
3386
3270
|
const _useTranslation = reactI18next.useTranslation(),
|
|
3387
3271
|
t = _useTranslation.t;
|
|
3388
3272
|
const progressMetrics = React.useMemo(() => {
|
|
3389
|
-
var _ref3, _progressData$totalKn,
|
|
3273
|
+
var _ref3, _progressData$totalKn, _progressData$submitt, _progressData$pending, _ref4, _progressData$overall;
|
|
3390
3274
|
if (!progressData) return {
|
|
3391
3275
|
totalKnos: 0,
|
|
3392
3276
|
submittedKnos: 0,
|
|
@@ -3394,9 +3278,9 @@ const Inbox = _ref2 => {
|
|
|
3394
3278
|
progressPercent: 0
|
|
3395
3279
|
};
|
|
3396
3280
|
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 = (
|
|
3281
|
+
const submittedKnos = (_progressData$submitt = progressData === null || progressData === void 0 ? void 0 : progressData.submittedKnos) != null ? _progressData$submitt : 0;
|
|
3398
3282
|
const pendingKnos = (_progressData$pending = progressData === null || progressData === void 0 ? void 0 : progressData.pendingKnos) != null ? _progressData$pending : totalKnos >= submittedKnos ? totalKnos - submittedKnos : 0;
|
|
3399
|
-
const progressPercent = (
|
|
3283
|
+
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
3284
|
return {
|
|
3401
3285
|
totalKnos,
|
|
3402
3286
|
submittedKnos,
|
|
@@ -3431,10 +3315,10 @@ const Inbox = _ref2 => {
|
|
|
3431
3315
|
}], [progressMetrics, t]);
|
|
3432
3316
|
const totalRecords = (listData === null || listData === void 0 ? void 0 : listData.totalCount) || 0;
|
|
3433
3317
|
const checkPathName = location.pathname.includes("ekyc/inbox");
|
|
3434
|
-
const SearchFormFields = React.useCallback(
|
|
3435
|
-
let registerRef =
|
|
3436
|
-
searchFormState =
|
|
3437
|
-
controlSearchForm =
|
|
3318
|
+
const SearchFormFields = React.useCallback(_ref5 => {
|
|
3319
|
+
let registerRef = _ref5.registerRef,
|
|
3320
|
+
searchFormState = _ref5.searchFormState,
|
|
3321
|
+
controlSearchForm = _ref5.controlSearchForm;
|
|
3438
3322
|
return /*#__PURE__*/React__default.createElement(SearchFormFieldsComponents, {
|
|
3439
3323
|
registerRef,
|
|
3440
3324
|
searchFormState,
|
|
@@ -5406,18 +5290,7 @@ const EKYCForm = _ref => {
|
|
|
5406
5290
|
}))))));
|
|
5407
5291
|
};
|
|
5408
5292
|
|
|
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
5293
|
const AdminDashboard = () => {
|
|
5420
|
-
var _Digit$SessionStorage;
|
|
5421
5294
|
const _useTranslation = reactI18next.useTranslation(),
|
|
5422
5295
|
t = _useTranslation.t;
|
|
5423
5296
|
const history = reactRouterDom.useHistory();
|
|
@@ -5425,7 +5298,6 @@ const AdminDashboard = () => {
|
|
|
5425
5298
|
if (!tenantId || tenantId === "dl") {
|
|
5426
5299
|
tenantId = "dl.djb";
|
|
5427
5300
|
}
|
|
5428
|
-
const loggedInUser = (_Digit$SessionStorage = Digit.SessionStorage.get("User")) === null || _Digit$SessionStorage === void 0 ? void 0 : _Digit$SessionStorage.info;
|
|
5429
5301
|
const _Digit$Hooks$fsm$useD = Digit.Hooks.fsm.useDsoSearch(tenantId, {
|
|
5430
5302
|
status: "ACTIVE"
|
|
5431
5303
|
}, {
|
|
@@ -5440,54 +5312,15 @@ const AdminDashboard = () => {
|
|
|
5440
5312
|
return dso.id || dso.vendorId || v.id || v.vendorId;
|
|
5441
5313
|
}).filter(Boolean);
|
|
5442
5314
|
}, [vendorSearchResponse]);
|
|
5443
|
-
const _Digit$Hooks$ekyc$use = Digit.Hooks.ekyc.useEkycAssignmentProgress(
|
|
5444
|
-
|
|
5445
|
-
|
|
5446
|
-
}
|
|
5315
|
+
const _Digit$Hooks$ekyc$use = Digit.Hooks.ekyc.useEkycAssignmentProgress({
|
|
5316
|
+
tenantId,
|
|
5317
|
+
allVendorsDetailed: true
|
|
5318
|
+
}, {
|
|
5447
5319
|
enabled: !!tenantId && allVendorIds.length > 0,
|
|
5448
5320
|
keepPreviousData: true
|
|
5449
5321
|
}),
|
|
5450
5322
|
progressData = _Digit$Hooks$ekyc$use.data,
|
|
5451
5323
|
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
5324
|
return /*#__PURE__*/React__default.createElement(digitUiReactComponents.Card, {
|
|
5492
5325
|
className: "surveyor-dashboard"
|
|
5493
5326
|
}, /*#__PURE__*/React__default.createElement(Dashboard, null), /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -5496,52 +5329,69 @@ const AdminDashboard = () => {
|
|
|
5496
5329
|
className: "section-title"
|
|
5497
5330
|
}, t("EKYC_VENDORS_PERFORMANCE") || "eKYC Vendors Performance"), isVendorSearchLoading || isProgressLoading ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.Loader, null) : /*#__PURE__*/React__default.createElement("div", {
|
|
5498
5331
|
className: "vendors-grid"
|
|
5499
|
-
},
|
|
5500
|
-
|
|
5501
|
-
|
|
5502
|
-
|
|
5503
|
-
|
|
5504
|
-
|
|
5505
|
-
|
|
5506
|
-
|
|
5507
|
-
|
|
5508
|
-
|
|
5509
|
-
|
|
5510
|
-
|
|
5511
|
-
|
|
5512
|
-
|
|
5513
|
-
|
|
5514
|
-
|
|
5515
|
-
|
|
5516
|
-
|
|
5517
|
-
}
|
|
5518
|
-
|
|
5519
|
-
|
|
5520
|
-
|
|
5521
|
-
|
|
5522
|
-
|
|
5523
|
-
|
|
5524
|
-
|
|
5525
|
-
|
|
5526
|
-
|
|
5527
|
-
|
|
5528
|
-
|
|
5529
|
-
|
|
5530
|
-
|
|
5531
|
-
|
|
5532
|
-
|
|
5533
|
-
|
|
5534
|
-
|
|
5535
|
-
|
|
5536
|
-
|
|
5537
|
-
|
|
5538
|
-
|
|
5539
|
-
|
|
5540
|
-
|
|
5541
|
-
|
|
5542
|
-
|
|
5543
|
-
|
|
5544
|
-
|
|
5332
|
+
}, 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 => {
|
|
5333
|
+
var _vendor$vendorName, _vendor$vendorName$;
|
|
5334
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
5335
|
+
key: vendor.vendorId,
|
|
5336
|
+
className: "vendor-perf-card",
|
|
5337
|
+
onClick: () => history.push("/digit-ui/employee/ekyc/vendors/" + vendor.vendorId)
|
|
5338
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
5339
|
+
className: "vendor-card-header"
|
|
5340
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
5341
|
+
className: "vendor-title"
|
|
5342
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
5343
|
+
className: "vendor-icon"
|
|
5344
|
+
}, /*#__PURE__*/React__default.createElement("span", null, (_vendor$vendorName = vendor.vendorName) === null || _vendor$vendorName === void 0 ? void 0 : (_vendor$vendorName$ = _vendor$vendorName[0]) === null || _vendor$vendorName$ === void 0 ? void 0 : _vendor$vendorName$.toUpperCase())), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("h4", null, vendor.vendorName), /*#__PURE__*/React__default.createElement("span", {
|
|
5345
|
+
className: "vendor-subtitle"
|
|
5346
|
+
}, t("EKYC_VENDOR") || "eKYC Vendor"))), /*#__PURE__*/React__default.createElement("div", {
|
|
5347
|
+
className: "progress-badge"
|
|
5348
|
+
}, vendor.progressPercent, "%")), /*#__PURE__*/React__default.createElement("div", {
|
|
5349
|
+
className: "progress-section"
|
|
5350
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
5351
|
+
className: "progress-bar-container"
|
|
5352
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
5353
|
+
className: "progress-bar-fill",
|
|
5354
|
+
style: {
|
|
5355
|
+
width: vendor.progressPercent + "%"
|
|
5356
|
+
}
|
|
5357
|
+
})), /*#__PURE__*/React__default.createElement("div", {
|
|
5358
|
+
className: "progress-label"
|
|
5359
|
+
}, /*#__PURE__*/React__default.createElement("span", null, t("PROGRESS") || "Progress"), /*#__PURE__*/React__default.createElement("span", null, vendor.progressPercent, "%"))), /*#__PURE__*/React__default.createElement("div", {
|
|
5360
|
+
className: "stats-grid"
|
|
5361
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
5362
|
+
className: "stat-item"
|
|
5363
|
+
}, /*#__PURE__*/React__default.createElement("span", {
|
|
5364
|
+
className: "stat-value"
|
|
5365
|
+
}, vendor.totalSupervisors), /*#__PURE__*/React__default.createElement("span", {
|
|
5366
|
+
className: "stat-label"
|
|
5367
|
+
}, t("SUPERVISORS") || "Supervisors")), /*#__PURE__*/React__default.createElement("div", {
|
|
5368
|
+
className: "stat-item"
|
|
5369
|
+
}, /*#__PURE__*/React__default.createElement("span", {
|
|
5370
|
+
className: "stat-value"
|
|
5371
|
+
}, vendor.totalSurveyors), /*#__PURE__*/React__default.createElement("span", {
|
|
5372
|
+
className: "stat-label"
|
|
5373
|
+
}, t("SURVEYORS") || "Surveyors")), /*#__PURE__*/React__default.createElement("div", {
|
|
5374
|
+
className: "stat-item"
|
|
5375
|
+
}, /*#__PURE__*/React__default.createElement("span", {
|
|
5376
|
+
className: "stat-value"
|
|
5377
|
+
}, vendor.totalKnos), /*#__PURE__*/React__default.createElement("span", {
|
|
5378
|
+
className: "stat-label"
|
|
5379
|
+
}, t("TOTAL_KNOS") || "Total KNOs"))), /*#__PURE__*/React__default.createElement("div", {
|
|
5380
|
+
className: "knos-summary"
|
|
5381
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
5382
|
+
className: "kno-stat"
|
|
5383
|
+
}, /*#__PURE__*/React__default.createElement("span", {
|
|
5384
|
+
className: "kno-label"
|
|
5385
|
+
}, t("SUBMITTED") || "Submitted"), /*#__PURE__*/React__default.createElement("strong", null, vendor.submittedKnos)), /*#__PURE__*/React__default.createElement("div", {
|
|
5386
|
+
className: "kno-stat pending"
|
|
5387
|
+
}, /*#__PURE__*/React__default.createElement("span", {
|
|
5388
|
+
className: "kno-label"
|
|
5389
|
+
}, t("PENDING") || "Pending"), /*#__PURE__*/React__default.createElement("strong", null, vendor.pendingKnos)), /*#__PURE__*/React__default.createElement("div", {
|
|
5390
|
+
className: "kno-stat rejected"
|
|
5391
|
+
}, /*#__PURE__*/React__default.createElement("span", {
|
|
5392
|
+
className: "kno-label"
|
|
5393
|
+
}, t("REJECTED") || "Rejected"), /*#__PURE__*/React__default.createElement("strong", null, vendor.rejectedKnos))));
|
|
5394
|
+
})))));
|
|
5545
5395
|
};
|
|
5546
5396
|
|
|
5547
5397
|
const SupervisorDetailsCard = () => {
|
|
@@ -5936,6 +5786,7 @@ const SupervisorDetailsCard = () => {
|
|
|
5936
5786
|
tenantId: tenantId || "dl.djb",
|
|
5937
5787
|
offset: 0,
|
|
5938
5788
|
limit: 10000,
|
|
5789
|
+
supervisorId: (supervisor === null || supervisor === void 0 ? void 0 : supervisor.supervisorId) || supervisorId,
|
|
5939
5790
|
reportDownload: true
|
|
5940
5791
|
}, fromDate && {
|
|
5941
5792
|
fromDate
|
|
@@ -6052,7 +5903,6 @@ const SupervisorDetailsCard = () => {
|
|
|
6052
5903
|
meterPhotoFileStoreId: t("METER_PHOTO_FILESTORE_ID"),
|
|
6053
5904
|
modifiedBy: t("MODIFIED_BY"),
|
|
6054
5905
|
emailId: t("EMAIL_ID"),
|
|
6055
|
-
fatherOrHusbandName: t("FATHER_HUSBUND_NAME"),
|
|
6056
5906
|
dob: t("DOB"),
|
|
6057
5907
|
consumerType: t("CONSUMER_TYPE"),
|
|
6058
5908
|
createdTime: t("CREATED_TIME"),
|