@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.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"];
|
|
@@ -1991,35 +1934,38 @@ const VendorDetailsCard = () => {
|
|
|
1991
1934
|
}, [vendorSearchResponse, vendorId, loggedInUser]);
|
|
1992
1935
|
const targetVendorId = vendorId || (vendor === null || vendor === void 0 ? void 0 : vendor.id) || (vendor === null || vendor === void 0 ? void 0 : vendor.vendorId);
|
|
1993
1936
|
const _Digit$Hooks$ekyc$use = Digit.Hooks.ekyc.useEkycAssignmentProgress(targetVendorId ? {
|
|
1994
|
-
vendorId: targetVendorId
|
|
1995
|
-
vendorIds: [targetVendorId]
|
|
1937
|
+
vendorId: targetVendorId
|
|
1996
1938
|
} : {}, {
|
|
1997
1939
|
enabled: !!tenantId,
|
|
1998
1940
|
keepPreviousData: true
|
|
1999
1941
|
}),
|
|
2000
1942
|
isProgressLoading = _Digit$Hooks$ekyc$use.isLoading,
|
|
2001
1943
|
progressData = _Digit$Hooks$ekyc$use.data;
|
|
1944
|
+
const createDummySupervisors = vendor => {
|
|
1945
|
+
const count = Number(vendor === null || vendor === void 0 ? void 0 : vendor.supervisors) || 5;
|
|
1946
|
+
return Array.from({
|
|
1947
|
+
length: count
|
|
1948
|
+
}, (_, i) => ({
|
|
1949
|
+
id: "SUP_V_" + ((vendor === null || vendor === void 0 ? void 0 : vendor.id) || "DEFAULT") + "_" + (i + 1),
|
|
1950
|
+
name: "Supervisor " + (i + 1),
|
|
1951
|
+
mobileNo: "99999120" + i,
|
|
1952
|
+
status: "ACTIVE",
|
|
1953
|
+
totalKnos: 0,
|
|
1954
|
+
submittedKnos: 0,
|
|
1955
|
+
pendingKnos: 0,
|
|
1956
|
+
progressPercent: 0,
|
|
1957
|
+
isDummy: true
|
|
1958
|
+
}));
|
|
1959
|
+
};
|
|
2002
1960
|
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
|
-
}
|
|
1961
|
+
const currentVendorId = (vendor === null || vendor === void 0 ? void 0 : vendor.id) || (vendor === null || vendor === void 0 ? void 0 : vendor.vendorId) || vendorId;
|
|
1962
|
+
if (!Array.isArray(supervisorSearchResponse === null || supervisorSearchResponse === void 0 ? void 0 : supervisorSearchResponse.supervisors)) {
|
|
1963
|
+
return vendor ? createDummySupervisors(vendor) : [];
|
|
1964
|
+
}
|
|
1965
|
+
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));
|
|
1966
|
+
if (matchedSups.length === 0) {
|
|
2019
1967
|
return [];
|
|
2020
1968
|
}
|
|
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
1969
|
return matchedSups.map(sup => {
|
|
2024
1970
|
var _progressData$supervi, _sup$owner2, _sup$owner3, _sup$owner4;
|
|
2025
1971
|
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,32 +1980,26 @@ const VendorDetailsCard = () => {
|
|
|
2034
1980
|
totalKnos: (report === null || report === void 0 ? void 0 : report.totalKnos) || 0,
|
|
2035
1981
|
submittedKnos: (report === null || report === void 0 ? void 0 : report.submittedKnos) || 0,
|
|
2036
1982
|
pendingKnos: (report === null || report === void 0 ? void 0 : report.pendingKnos) || 0,
|
|
2037
|
-
progressPercent: (report === null || report === void 0 ? void 0 : report.progressPercent) || 0
|
|
1983
|
+
progressPercent: (report === null || report === void 0 ? void 0 : report.progressPercent) || 0,
|
|
1984
|
+
isDummy: false
|
|
2038
1985
|
};
|
|
2039
1986
|
});
|
|
2040
1987
|
}, [supervisorSearchResponse, vendor, progressData, vendorId]);
|
|
2041
1988
|
const vendorName = (vendor === null || vendor === void 0 ? void 0 : vendor.name) || "N/A";
|
|
2042
1989
|
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
1990
|
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
1991
|
const zoneIds = useMemo(() => {
|
|
2051
1992
|
var _vendor$zoneIds;
|
|
2052
1993
|
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
1994
|
}, [vendor]);
|
|
2054
1995
|
const cards = useMemo(() => {
|
|
2055
|
-
const
|
|
2056
|
-
const
|
|
2057
|
-
const
|
|
2058
|
-
const
|
|
2059
|
-
const progressPercent = totalKnos > 0 ? Math.round(completedKnos / totalKnos * 100) : (vendor === null || vendor === void 0 ? void 0 : vendor.progress) || 0;
|
|
1996
|
+
const totalAssignments = (progressData === null || progressData === void 0 ? void 0 : progressData.totalKnos) || 0;
|
|
1997
|
+
const completedKnos = (progressData === null || progressData === void 0 ? void 0 : progressData.completedKnos) || 0;
|
|
1998
|
+
const pendingKnos = (progressData === null || progressData === void 0 ? void 0 : progressData.pendingKnos) || 0;
|
|
1999
|
+
const progressPercent = (progressData === null || progressData === void 0 ? void 0 : progressData.overallProgressPercent) || 0;
|
|
2060
2000
|
return [{
|
|
2061
2001
|
label: "TOTAL_EKYC_APPLICATIONS",
|
|
2062
|
-
count:
|
|
2002
|
+
count: totalAssignments,
|
|
2063
2003
|
color: "#0B2559",
|
|
2064
2004
|
type: "today",
|
|
2065
2005
|
icon: /*#__PURE__*/React.createElement(FaUsers, null)
|
|
@@ -2101,6 +2041,7 @@ const VendorDetailsCard = () => {
|
|
|
2101
2041
|
tenantId: tenantId,
|
|
2102
2042
|
offset: 0,
|
|
2103
2043
|
limit: 10000,
|
|
2044
|
+
vendorId: targetVendorId,
|
|
2104
2045
|
reportDownload: true
|
|
2105
2046
|
}, fromDate && {
|
|
2106
2047
|
fromDate
|
|
@@ -2217,7 +2158,6 @@ const VendorDetailsCard = () => {
|
|
|
2217
2158
|
meterPhotoFileStoreId: t("METER_PHOTO_FILESTORE_ID"),
|
|
2218
2159
|
modifiedBy: t("MODIFIED_BY"),
|
|
2219
2160
|
emailId: t("EMAIL_ID"),
|
|
2220
|
-
fatherOrHusbandName: t("FATHER_HUSBUND_NAME"),
|
|
2221
2161
|
dob: t("DOB"),
|
|
2222
2162
|
consumerType: t("CONSUMER_TYPE"),
|
|
2223
2163
|
createdTime: t("CREATED_TIME"),
|
|
@@ -2541,25 +2481,7 @@ const VendorDetailsCard = () => {
|
|
|
2541
2481
|
setShowReportMenu(p => !p);
|
|
2542
2482
|
setShowCustomPicker(false);
|
|
2543
2483
|
}
|
|
2544
|
-
}, /*#__PURE__*/React.createElement("
|
|
2545
|
-
width: "16",
|
|
2546
|
-
height: "16",
|
|
2547
|
-
viewBox: "0 0 24 24",
|
|
2548
|
-
fill: "none",
|
|
2549
|
-
stroke: "currentColor",
|
|
2550
|
-
strokeWidth: "2.5",
|
|
2551
|
-
strokeLinecap: "round",
|
|
2552
|
-
strokeLinejoin: "round"
|
|
2553
|
-
}, /*#__PURE__*/React.createElement("path", {
|
|
2554
|
-
d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"
|
|
2555
|
-
}), /*#__PURE__*/React.createElement("polyline", {
|
|
2556
|
-
points: "7 10 12 15 17 10"
|
|
2557
|
-
}), /*#__PURE__*/React.createElement("line", {
|
|
2558
|
-
x1: "12",
|
|
2559
|
-
y1: "15",
|
|
2560
|
-
x2: "12",
|
|
2561
|
-
y2: "3"
|
|
2562
|
-
})), ekycDownloadLoading ? t("DOWNLOADING") || "Downloading..." : t("DOWNLOAD_EXCEL") || "Download Excel"), showReportMenu && /*#__PURE__*/React.createElement("div", {
|
|
2484
|
+
}, /*#__PURE__*/React.createElement(MdDownloadIcon, null), ekycDownloadLoading ? t("DOWNLOADING") || "Downloading..." : t("DOWNLOAD_EXCEL") || "Download Excel"), showReportMenu && /*#__PURE__*/React.createElement("div", {
|
|
2563
2485
|
className: "report-menu"
|
|
2564
2486
|
}, [{
|
|
2565
2487
|
label: t("TODAY") || "Today",
|
|
@@ -3279,47 +3201,9 @@ const Inbox = _ref2 => {
|
|
|
3279
3201
|
isListLoading = _Digit$Hooks$ekyc$use.isLoading,
|
|
3280
3202
|
_Digit$Hooks$ekyc$use2 = _Digit$Hooks$ekyc$use.data,
|
|
3281
3203
|
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
3204
|
const _Digit$Hooks$ekyc$use3 = Digit.Hooks.ekyc.useEkycAssignmentProgress({
|
|
3322
|
-
tenantId
|
|
3205
|
+
tenantId,
|
|
3206
|
+
allVendorsDetailed: true
|
|
3323
3207
|
}, {
|
|
3324
3208
|
enabled: !!tenantId,
|
|
3325
3209
|
keepPreviousData: true
|
|
@@ -3383,7 +3267,7 @@ const Inbox = _ref2 => {
|
|
|
3383
3267
|
const _useTranslation = useTranslation(),
|
|
3384
3268
|
t = _useTranslation.t;
|
|
3385
3269
|
const progressMetrics = useMemo(() => {
|
|
3386
|
-
var _ref3, _progressData$totalKn,
|
|
3270
|
+
var _ref3, _progressData$totalKn, _progressData$submitt, _progressData$pending, _ref4, _progressData$overall;
|
|
3387
3271
|
if (!progressData) return {
|
|
3388
3272
|
totalKnos: 0,
|
|
3389
3273
|
submittedKnos: 0,
|
|
@@ -3391,9 +3275,9 @@ const Inbox = _ref2 => {
|
|
|
3391
3275
|
progressPercent: 0
|
|
3392
3276
|
};
|
|
3393
3277
|
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 = (
|
|
3278
|
+
const submittedKnos = (_progressData$submitt = progressData === null || progressData === void 0 ? void 0 : progressData.submittedKnos) != null ? _progressData$submitt : 0;
|
|
3395
3279
|
const pendingKnos = (_progressData$pending = progressData === null || progressData === void 0 ? void 0 : progressData.pendingKnos) != null ? _progressData$pending : totalKnos >= submittedKnos ? totalKnos - submittedKnos : 0;
|
|
3396
|
-
const progressPercent = (
|
|
3280
|
+
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
3281
|
return {
|
|
3398
3282
|
totalKnos,
|
|
3399
3283
|
submittedKnos,
|
|
@@ -3428,10 +3312,10 @@ const Inbox = _ref2 => {
|
|
|
3428
3312
|
}], [progressMetrics, t]);
|
|
3429
3313
|
const totalRecords = (listData === null || listData === void 0 ? void 0 : listData.totalCount) || 0;
|
|
3430
3314
|
const checkPathName = location.pathname.includes("ekyc/inbox");
|
|
3431
|
-
const SearchFormFields = useCallback(
|
|
3432
|
-
let registerRef =
|
|
3433
|
-
searchFormState =
|
|
3434
|
-
controlSearchForm =
|
|
3315
|
+
const SearchFormFields = useCallback(_ref5 => {
|
|
3316
|
+
let registerRef = _ref5.registerRef,
|
|
3317
|
+
searchFormState = _ref5.searchFormState,
|
|
3318
|
+
controlSearchForm = _ref5.controlSearchForm;
|
|
3435
3319
|
return /*#__PURE__*/React.createElement(SearchFormFieldsComponents, {
|
|
3436
3320
|
registerRef,
|
|
3437
3321
|
searchFormState,
|
|
@@ -5403,18 +5287,7 @@ const EKYCForm = _ref => {
|
|
|
5403
5287
|
}))))));
|
|
5404
5288
|
};
|
|
5405
5289
|
|
|
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
5290
|
const AdminDashboard = () => {
|
|
5417
|
-
var _Digit$SessionStorage;
|
|
5418
5291
|
const _useTranslation = useTranslation(),
|
|
5419
5292
|
t = _useTranslation.t;
|
|
5420
5293
|
const history = useHistory();
|
|
@@ -5422,7 +5295,6 @@ const AdminDashboard = () => {
|
|
|
5422
5295
|
if (!tenantId || tenantId === "dl") {
|
|
5423
5296
|
tenantId = "dl.djb";
|
|
5424
5297
|
}
|
|
5425
|
-
const loggedInUser = (_Digit$SessionStorage = Digit.SessionStorage.get("User")) === null || _Digit$SessionStorage === void 0 ? void 0 : _Digit$SessionStorage.info;
|
|
5426
5298
|
const _Digit$Hooks$fsm$useD = Digit.Hooks.fsm.useDsoSearch(tenantId, {
|
|
5427
5299
|
status: "ACTIVE"
|
|
5428
5300
|
}, {
|
|
@@ -5437,54 +5309,15 @@ const AdminDashboard = () => {
|
|
|
5437
5309
|
return dso.id || dso.vendorId || v.id || v.vendorId;
|
|
5438
5310
|
}).filter(Boolean);
|
|
5439
5311
|
}, [vendorSearchResponse]);
|
|
5440
|
-
const _Digit$Hooks$ekyc$use = Digit.Hooks.ekyc.useEkycAssignmentProgress(
|
|
5441
|
-
|
|
5442
|
-
|
|
5443
|
-
}
|
|
5312
|
+
const _Digit$Hooks$ekyc$use = Digit.Hooks.ekyc.useEkycAssignmentProgress({
|
|
5313
|
+
tenantId,
|
|
5314
|
+
allVendorsDetailed: true
|
|
5315
|
+
}, {
|
|
5444
5316
|
enabled: !!tenantId && allVendorIds.length > 0,
|
|
5445
5317
|
keepPreviousData: true
|
|
5446
5318
|
}),
|
|
5447
5319
|
progressData = _Digit$Hooks$ekyc$use.data,
|
|
5448
5320
|
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
5321
|
return /*#__PURE__*/React.createElement(Card, {
|
|
5489
5322
|
className: "surveyor-dashboard"
|
|
5490
5323
|
}, /*#__PURE__*/React.createElement(Dashboard, null), /*#__PURE__*/React.createElement("div", {
|
|
@@ -5493,52 +5326,69 @@ const AdminDashboard = () => {
|
|
|
5493
5326
|
className: "section-title"
|
|
5494
5327
|
}, t("EKYC_VENDORS_PERFORMANCE") || "eKYC Vendors Performance"), isVendorSearchLoading || isProgressLoading ? /*#__PURE__*/React.createElement(Loader, null) : /*#__PURE__*/React.createElement("div", {
|
|
5495
5328
|
className: "vendors-grid"
|
|
5496
|
-
},
|
|
5497
|
-
|
|
5498
|
-
|
|
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
|
-
|
|
5329
|
+
}, 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 => {
|
|
5330
|
+
var _vendor$vendorName, _vendor$vendorName$;
|
|
5331
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
5332
|
+
key: vendor.vendorId,
|
|
5333
|
+
className: "vendor-perf-card",
|
|
5334
|
+
onClick: () => history.push("/digit-ui/employee/ekyc/vendors/" + vendor.vendorId)
|
|
5335
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
5336
|
+
className: "vendor-card-header"
|
|
5337
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
5338
|
+
className: "vendor-title"
|
|
5339
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
5340
|
+
className: "vendor-icon"
|
|
5341
|
+
}, /*#__PURE__*/React.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.createElement("div", null, /*#__PURE__*/React.createElement("h4", null, vendor.vendorName), /*#__PURE__*/React.createElement("span", {
|
|
5342
|
+
className: "vendor-subtitle"
|
|
5343
|
+
}, t("EKYC_VENDOR") || "eKYC Vendor"))), /*#__PURE__*/React.createElement("div", {
|
|
5344
|
+
className: "progress-badge"
|
|
5345
|
+
}, vendor.progressPercent, "%")), /*#__PURE__*/React.createElement("div", {
|
|
5346
|
+
className: "progress-section"
|
|
5347
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
5348
|
+
className: "progress-bar-container"
|
|
5349
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
5350
|
+
className: "progress-bar-fill",
|
|
5351
|
+
style: {
|
|
5352
|
+
width: vendor.progressPercent + "%"
|
|
5353
|
+
}
|
|
5354
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
5355
|
+
className: "progress-label"
|
|
5356
|
+
}, /*#__PURE__*/React.createElement("span", null, t("PROGRESS") || "Progress"), /*#__PURE__*/React.createElement("span", null, vendor.progressPercent, "%"))), /*#__PURE__*/React.createElement("div", {
|
|
5357
|
+
className: "stats-grid"
|
|
5358
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
5359
|
+
className: "stat-item"
|
|
5360
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
5361
|
+
className: "stat-value"
|
|
5362
|
+
}, vendor.totalSupervisors), /*#__PURE__*/React.createElement("span", {
|
|
5363
|
+
className: "stat-label"
|
|
5364
|
+
}, t("SUPERVISORS") || "Supervisors")), /*#__PURE__*/React.createElement("div", {
|
|
5365
|
+
className: "stat-item"
|
|
5366
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
5367
|
+
className: "stat-value"
|
|
5368
|
+
}, vendor.totalSurveyors), /*#__PURE__*/React.createElement("span", {
|
|
5369
|
+
className: "stat-label"
|
|
5370
|
+
}, t("SURVEYORS") || "Surveyors")), /*#__PURE__*/React.createElement("div", {
|
|
5371
|
+
className: "stat-item"
|
|
5372
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
5373
|
+
className: "stat-value"
|
|
5374
|
+
}, vendor.totalKnos), /*#__PURE__*/React.createElement("span", {
|
|
5375
|
+
className: "stat-label"
|
|
5376
|
+
}, t("TOTAL_KNOS") || "Total KNOs"))), /*#__PURE__*/React.createElement("div", {
|
|
5377
|
+
className: "knos-summary"
|
|
5378
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
5379
|
+
className: "kno-stat"
|
|
5380
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
5381
|
+
className: "kno-label"
|
|
5382
|
+
}, t("SUBMITTED") || "Submitted"), /*#__PURE__*/React.createElement("strong", null, vendor.submittedKnos)), /*#__PURE__*/React.createElement("div", {
|
|
5383
|
+
className: "kno-stat pending"
|
|
5384
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
5385
|
+
className: "kno-label"
|
|
5386
|
+
}, t("PENDING") || "Pending"), /*#__PURE__*/React.createElement("strong", null, vendor.pendingKnos)), /*#__PURE__*/React.createElement("div", {
|
|
5387
|
+
className: "kno-stat rejected"
|
|
5388
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
5389
|
+
className: "kno-label"
|
|
5390
|
+
}, t("REJECTED") || "Rejected"), /*#__PURE__*/React.createElement("strong", null, vendor.rejectedKnos))));
|
|
5391
|
+
})))));
|
|
5542
5392
|
};
|
|
5543
5393
|
|
|
5544
5394
|
const SupervisorDetailsCard = () => {
|
|
@@ -5933,6 +5783,7 @@ const SupervisorDetailsCard = () => {
|
|
|
5933
5783
|
tenantId: tenantId || "dl.djb",
|
|
5934
5784
|
offset: 0,
|
|
5935
5785
|
limit: 10000,
|
|
5786
|
+
supervisorId: (supervisor === null || supervisor === void 0 ? void 0 : supervisor.supervisorId) || supervisorId,
|
|
5936
5787
|
reportDownload: true
|
|
5937
5788
|
}, fromDate && {
|
|
5938
5789
|
fromDate
|
|
@@ -6049,7 +5900,6 @@ const SupervisorDetailsCard = () => {
|
|
|
6049
5900
|
meterPhotoFileStoreId: t("METER_PHOTO_FILESTORE_ID"),
|
|
6050
5901
|
modifiedBy: t("MODIFIED_BY"),
|
|
6051
5902
|
emailId: t("EMAIL_ID"),
|
|
6052
|
-
fatherOrHusbandName: t("FATHER_HUSBUND_NAME"),
|
|
6053
5903
|
dob: t("DOB"),
|
|
6054
5904
|
consumerType: t("CONSUMER_TYPE"),
|
|
6055
5905
|
createdTime: t("CREATED_TIME"),
|