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