@djb25/digit-ui-module-ekyc 1.0.30 → 1.0.32

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.
Files changed (63) hide show
  1. package/dist/index.js +8911 -1
  2. package/dist/index.js.map +1 -1
  3. package/dist/index.modern.js +3295 -2039
  4. package/dist/index.modern.js.map +1 -1
  5. package/package.json +4 -1
  6. package/dist/index.css +0 -54
  7. package/src/Module.js +0 -78
  8. package/src/components/AadhaarVerification.js +0 -315
  9. package/src/components/AssignEkyc.js +0 -236
  10. package/src/components/AssignEkycModal.js +0 -446
  11. package/src/components/CeoDashboard.js +0 -264
  12. package/src/components/CeoDashboard.jsx +0 -334
  13. package/src/components/ConnectionDetailsView.js +0 -241
  14. package/src/components/Dashboard.js +0 -43
  15. package/src/components/DesktopInbox.js +0 -176
  16. package/src/components/EKYCCard.js +0 -53
  17. package/src/components/Filter.js +0 -55
  18. package/src/components/MeterDetails.js +0 -336
  19. package/src/components/MobileInbox.js +0 -73
  20. package/src/components/PropertyInfo.js +0 -264
  21. package/src/components/Review.js +0 -696
  22. package/src/components/SearchConsumer.js +0 -142
  23. package/src/components/SearchFormFieldsComponent.js +0 -67
  24. package/src/components/SelectEkycZones.js +0 -71
  25. package/src/components/StatusCards.js +0 -148
  26. package/src/components/SurveyorDetailsCard.js +0 -512
  27. package/src/components/VendorDetails.jsx +0 -230
  28. package/src/components/analytics/charts/ClusterHeatmap.js +0 -88
  29. package/src/components/analytics/charts/ExecutiveBarChart.jsx +0 -30
  30. package/src/components/analytics/charts/ExecutiveLineChart.jsx +0 -159
  31. package/src/components/analytics/charts/ExecutivePieChart.jsx +0 -24
  32. package/src/components/analytics/charts/TaskStatusChart.js +0 -90
  33. package/src/components/analytics/components/AnalyticsTable.js +0 -106
  34. package/src/components/analytics/components/DashboardLayout.js +0 -52
  35. package/src/components/analytics/components/EmptyState.js +0 -27
  36. package/src/components/analytics/components/ErrorBoundary.js +0 -27
  37. package/src/components/analytics/components/FilterBar.js +0 -73
  38. package/src/components/analytics/components/NotificationPanel.js +0 -77
  39. package/src/components/analytics/components/SLAWidget.js +0 -56
  40. package/src/components/analytics/components/SkeletonLoader.js +0 -53
  41. package/src/components/analytics/components/SummaryCard.js +0 -74
  42. package/src/components/analytics/components/WorkflowTimeline.js +0 -55
  43. package/src/components/analytics/utils/exportUtils.js +0 -64
  44. package/src/components/analytics/utils/filterSerializer.js +0 -50
  45. package/src/components/mockData.js +0 -772
  46. package/src/config/AadhaarVerificationConfig.js +0 -367
  47. package/src/config/MeterDetailsConfig.js +0 -297
  48. package/src/config/PropertyInfoConfig.js +0 -145
  49. package/src/config/config.js +0 -70
  50. package/src/hook/SupervisorInboxTableConfig.js +0 -80
  51. package/src/hook/useInboxTableConfig.js +0 -131
  52. package/src/pages/citizen/Home.js +0 -54
  53. package/src/pages/citizen/Inbox.js +0 -265
  54. package/src/pages/citizen/index.js +0 -199
  55. package/src/pages/employee/ConsumerDetails.js +0 -299
  56. package/src/pages/employee/Create.js +0 -94
  57. package/src/pages/employee/EKYCForm.js +0 -118
  58. package/src/pages/employee/Inbox.js +0 -266
  59. package/src/pages/employee/Mapping.js +0 -358
  60. package/src/pages/employee/Update.js +0 -9
  61. package/src/pages/employee/index.js +0 -184
  62. package/src/utils/index.js +0 -46
  63. package/src/utils/reportDownloader.js +0 -90
@@ -1,142 +0,0 @@
1
- import React, { useState } from "react";
2
- import { TextInput, Card, HomeIcon } from "@djb25/digit-ui-react-components";
3
- import { useTranslation } from "react-i18next";
4
-
5
- const SearchConsumer = ({ onSearch, searchParams, FilterComponent, children, ...props }) => {
6
- const { t } = useTranslation();
7
- const [_searchParams, setSearchParams] = useState(() => ({ ...searchParams }));
8
-
9
- const onChange = (key, value) => {
10
- setSearchParams((prev) => ({ ...prev, [key]: value }));
11
- };
12
-
13
- const onSubmit = (e) => {
14
- if (e && e.preventDefault) e.preventDefault();
15
- onSearch(_searchParams);
16
- };
17
-
18
- const onClear = () => {
19
- const cleared = { kNumber: "", kName: "" };
20
- setSearchParams(cleared);
21
- onSearch(cleared);
22
- };
23
-
24
- return (
25
- <div className="ekyc-employee-container">
26
- <div className="search-consumer-wrapper">
27
- <div className="header-wrapper">
28
- {/* Sidebar Title Card — flush top, full width */}
29
- <Card className="sidebar-title-card">
30
- <div className="icon-container">
31
- <HomeIcon />
32
- </div>
33
- <div className="title-text">
34
- {t("EKYC_SEARCH_CONSUMER_HEADER")}
35
- </div>
36
- </Card>
37
- </div>
38
-
39
- {/* Main Content */}
40
- <div className="main-content-wrapper">
41
- {/* Top Row: Search Card + Stats Cards */}
42
- <div className="search-stats-row">
43
- {/* Identity Lookup Card */}
44
- <div className="identity-lookup-card">
45
- {/* Card Title */}
46
- <div className="lookup-card-title">
47
- <div className="lookup-icon-bg">
48
- <svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="#3A7BD5" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
49
- <circle cx="11" cy="11" r="8" />
50
- <line x1="21" y1="21" x2="16.65" y2="16.65" />
51
- </svg>
52
- </div>
53
- <span className="lookup-title-text">
54
- {t("EKYC_IDENTITY_LOOKUP") || "Identity Lookup"}
55
- </span>
56
- </div>
57
-
58
- {/* Inputs Row */}
59
- <form onSubmit={onSubmit}>
60
- <div className="inputs-row">
61
- <div className="input-group">
62
- <label>
63
- {t("EKYC_K_NUMBER") || "K Number"}
64
- <span className="info-badge">i</span>
65
- </label>
66
- <TextInput
67
- value={_searchParams?.kNumber}
68
- onChange={(e) => onChange("kNumber", e.target.value)}
69
- placeholder={t("EKYC_K_NUMBER_PLACEHOLDER") || "e.g. 8234910234"}
70
- />
71
- </div>
72
-
73
- <div className="input-group">
74
- <label>
75
- {t("EKYC_K_NAME") || "K Name"}
76
- <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="#3A7BD5" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
77
- <path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2" />
78
- <circle cx="12" cy="7" r="4" />
79
- </svg>
80
- </label>
81
- <TextInput
82
- value={_searchParams?.kName}
83
- onChange={(e) => onChange("kName", e.target.value)}
84
- placeholder={t("EKYC_K_NAME_PLACEHOLDER") || "Consumer name search"}
85
- />
86
- </div>
87
- </div>
88
-
89
- {/* Actions Row */}
90
- <div className="actions-row">
91
- <button type="button" onClick={onClear} className="clear-btn">
92
- {t("ES_COMMON_CLEAR") || "Clear"}
93
- </button>
94
- <button type="submit" className="search-btn">
95
- {t("ES_COMMON_SEARCH") || "Execute Search"}
96
- </button>
97
- </div>
98
- </form>
99
- </div>
100
-
101
- {/* Right Stats Column */}
102
- <div className="stats-column">
103
- {/* Today's Audits Card */}
104
- <div className="audits-card">
105
- <div className="audits-label">{t("EKYC_TODAYS_AUDITS") || "Today's Audits"}</div>
106
- <div className="audits-count">{props.countData?.todaysAudits || 24}</div>
107
- <div className="audits-change">
108
- <span>↗</span>
109
- {props.countData?.auditChange || "12% increase from yesterday"}
110
- </div>
111
- <div className="audits-watermark">M</div>
112
- </div>
113
-
114
- {/* Queue Status Card */}
115
- <div className="queue-card">
116
- <div className="queue-label">{t("EKYC_QUEUE_STATUS") || "Queue Status"}</div>
117
- <div className="queue-content">
118
- <div className="queue-status-text">
119
- {props.countData?.pendingCount || 3} Pending
120
- </div>
121
- <div className="avatar-group">
122
- {[0, 1].map((i) => (
123
- <div key={i} className="avatar-item">
124
- {String.fromCharCode(65 + i)}
125
- </div>
126
- ))}
127
- <div className="avatar-more">+1</div>
128
- </div>
129
- </div>
130
- </div>
131
- </div>
132
- </div>
133
-
134
- {/* Children (ConnectionDetailsView or placeholder) */}
135
- {children}
136
- </div>
137
- </div>
138
- </div>
139
- );
140
- };
141
-
142
- export default SearchConsumer;
@@ -1,67 +0,0 @@
1
- import React from "react";
2
- import { Controller } from "react-hook-form";
3
- import { CardLabelError, TextInput, CustomTooltip, Label } from "@djb25/digit-ui-react-components";
4
- import { useTranslation } from "react-i18next";
5
-
6
- const SearchFormFieldsComponents = ({ searchFormState, controlSearchForm, searchType }) => {
7
- const { t } = useTranslation();
8
- const { errors } = searchFormState;
9
-
10
- if (searchType === "mobile") {
11
- return (
12
- <React.Fragment>
13
- {/* MOBILE NUMBER */}
14
- <span className="mobile-input">
15
- <Label className="flex-roww flex-gap-2">
16
- {t("ES_COMMON_MOBILE_NUM") || "Mobile Number"}
17
- <CustomTooltip message={t("EKYC_MOBILE_NUMBER_MESSAGE")} />
18
- </Label>
19
-
20
- <Controller
21
- name="mobileNumber"
22
- control={controlSearchForm}
23
- defaultValue=""
24
- rules={{
25
- pattern: {
26
- value: /^[6-9]\d{9}$/,
27
- message: t("ERR_INVALID_MOBILE_NUMBER"),
28
- },
29
- }}
30
- render={({ onChange, value }) => <TextInput value={value || ""} onChange={(e) => onChange(e.target.value)} />}
31
- />
32
-
33
- {errors?.mobileNumber && <CardLabelError>{errors.mobileNumber.message}</CardLabelError>}
34
- </span>
35
- </React.Fragment>
36
- );
37
- }
38
-
39
- return (
40
- <React.Fragment>
41
- {/* K NUMBER (KNO) */}
42
- <span className="mobile-input">
43
- <Label className="flex-roww flex-gap-2">
44
- {t("EKYC_K.NUMBER") || "K Number"}
45
- <CustomTooltip message={t("EKYC_K.NUMBER_MESSAGE")} />
46
- </Label>
47
-
48
- <Controller
49
- name="kNumber"
50
- control={controlSearchForm}
51
- defaultValue=""
52
- rules={{
53
- pattern: {
54
- value: /^[0-9]{10}$/,
55
- message: t("ERR_INVALID_KNO"),
56
- },
57
- }}
58
- render={({ onChange, value }) => <TextInput value={value || ""} onChange={(e) => onChange(e.target.value)} />}
59
- />
60
-
61
- {errors?.kNumber && <CardLabelError>{errors.kNumber.message}</CardLabelError>}
62
- </span>
63
- </React.Fragment>
64
- );
65
- };
66
-
67
- export default SearchFormFieldsComponents;
@@ -1,71 +0,0 @@
1
- import React, { useState, useEffect } from "react";
2
- import { CardLabel, LabelFieldPair, MultiSelectDropdown, Loader } from "@djb25/digit-ui-react-components";
3
-
4
- const SelectEkycZones = ({ config, onSelect, t, formData, isMultiSelect = true, placeHolder }) => {
5
- const tenantId = Digit.ULBService.getCurrentTenantId();
6
-
7
- const [zones, setZones] = useState([]);
8
-
9
- const [selectedZones, setSelectedZones] = useState(Array.isArray(formData?.zoneIds) ? formData.zoneIds : []);
10
-
11
- const { data: boundaryData, isLoading } = Digit.Hooks.useCommonMDMS(tenantId, "egov-location", ["TenantBoundary"]);
12
-
13
- useEffect(() => {
14
- const tenantBoundary = boundaryData?.["egov-location"]?.TenantBoundary?.[0] || boundaryData?.MdmsRes?.["egov-location"]?.TenantBoundary?.[0];
15
-
16
- const boundaries = tenantBoundary?.boundary || tenantBoundary?.children || [];
17
-
18
- if (Array.isArray(boundaries?.children) && boundaries?.children.length > 0) {
19
- const allZones = boundaries.children.flatMap((assembly) =>
20
- (assembly?.children || []).map((zone) => ({
21
- code: zone.code,
22
- name: zone.name,
23
- }))
24
- );
25
-
26
- const zonesList = [...new Map(allZones.map((zone) => [zone.code, zone])).values()];
27
-
28
- setZones(zonesList);
29
- }
30
- }, [boundaryData]);
31
-
32
- const handleSelect = (value) => {
33
- if (isMultiSelect) {
34
- const extractedValue = Array.isArray(value) ? value.map((v) => (Array.isArray(v) ? v[1] : v)).filter(Boolean) : [];
35
-
36
- setSelectedZones(extractedValue);
37
- onSelect(config.key, extractedValue);
38
- } else {
39
- const selectedZone = Array.isArray(value) ? (Array.isArray(value[0]) ? value[0][1] : value[0]) : value;
40
-
41
- setSelectedZones(selectedZone ? [selectedZone] : []);
42
-
43
- onSelect(config.key, selectedZone?.code || "");
44
- }
45
- };
46
-
47
- if (isLoading) return <Loader />;
48
-
49
- return (
50
- <LabelFieldPair>
51
- <CardLabel>{t(config.label) + (config.isMandatory ? " *" : "")}</CardLabel>
52
-
53
- <div className="field" style={{ position: "relative", zIndex: 10 }}>
54
- <MultiSelectDropdown
55
- options={zones}
56
- selected={selectedZones}
57
- onSelect={handleSelect}
58
- optionsKey="name"
59
- t={t}
60
- multiple={isMultiSelect}
61
- ServerStyle={{ backgroundColor: "#fff" }}
62
- isMultiSelect={isMultiSelect}
63
- placeHolder={placeHolder}
64
- showSelectedLabels={true}
65
- />
66
- </div>
67
- </LabelFieldPair>
68
- );
69
- };
70
-
71
- export default SelectEkycZones;
@@ -1,148 +0,0 @@
1
- import React, { useEffect, useRef } from "react";
2
- import { useTranslation } from "react-i18next";
3
- import * as Chartjs from "chart.js/auto";
4
-
5
- const getChartConstructor = () => {
6
- const C = Chartjs.Chart || Chartjs.default || Chartjs;
7
- return C;
8
- };
9
-
10
- const StatusCards = ({ countData }) => {
11
- const { t } = useTranslation();
12
- const chartRef1 = useRef(null);
13
- const chartInstance1 = useRef(null);
14
-
15
- const total = countData?.total || 0;
16
- const pending = countData?.pending || 0;
17
- const active = countData?.completed || 0;
18
- const completed = 0;
19
-
20
- const actualCompleted = countData?.completed || 0;
21
- const approved = actualCompleted;
22
-
23
- const efficiency = total > 0 ? Math.round((actualCompleted / total) * 100) : 0;
24
- const healthPct = total > 0 ? Math.round((approved / total) * 100) : 0;
25
-
26
- const formatNumber = (num) => new Intl.NumberFormat("en-IN").format(num || 0);
27
-
28
- useEffect(() => {
29
- if (chartRef1.current) {
30
- if (chartInstance1.current) chartInstance1.current.destroy();
31
- const ctx1 = chartRef1.current.getContext("2d");
32
- const ChartConstructor = getChartConstructor();
33
- chartInstance1.current = new ChartConstructor(ctx1, {
34
- type: "doughnut",
35
- data: {
36
- labels: [t("EKYC_ACTIVE"), t("EKYC_PENDING"), t("EKYC_COMPLETED")],
37
- datasets: [
38
- {
39
- data: [active, pending, completed],
40
- backgroundColor: ["#0c2a52", "#77B6EA", "#c8ddf5"],
41
- borderColor: ["#ffffff", "#ffffff", "#ffffff"],
42
- borderWidth: 2,
43
- hoverOffset: 4,
44
- },
45
- ],
46
- },
47
- options: {
48
- cutout: "75%",
49
- plugins: { legend: { display: false } },
50
- maintainAspectRatio: false,
51
- responsive: true,
52
- },
53
- });
54
- }
55
-
56
- return () => {
57
- if (chartInstance1.current) chartInstance1.current.destroy();
58
- };
59
- }, [pending, completed, active, t]);
60
-
61
- const legendItems = [
62
- { color: "#0c2a52", label: t("EKYC_ACTIVE"), value: active },
63
- { color: "#77B6EA", label: t("EKYC_PENDING"), value: pending },
64
- { color: "#c8ddf5", label: t("EKYC_COMPLETED"), value: completed },
65
- ];
66
-
67
- return (
68
- <div className="ekyc-employee-container">
69
- <div className="status-cards-wrapper">
70
- {/* Header */}
71
- <div className="status-cards-header">
72
- <div>
73
- <div className="eyebrow">
74
- <span className="eyebrow-dot" />
75
- {t("EKYC_INSTITUTIONAL_OVERVIEW") || "Institutional Performance Overview"}
76
- </div>
77
- <h1 className="status-cards-h1">{t("EKYC_DASHBOARD_TITLE") || "eKYC Verification Dashboard"}</h1>
78
- <p className="status-cards-subtitle">
79
- {t("EKYC_DASHBOARD_SUBTITLE") || "Real-time monitoring of consumer verification workflows across all administrative zones."}
80
- </p>
81
- </div>
82
- <div className="total-applications-card">
83
- <div className="total-label">{t("EKYC_TOTAL_APPLICATIONS") || "Total Applications Processed"}</div>
84
- <div className="total-number">{formatNumber(total)}</div>
85
- <div className="total-badge">↗ +12.4% {t("EKYC_FROM_LAST_QUARTER") || "from last quarter"}</div>
86
- </div>
87
- </div>
88
-
89
- {/* Panels */}
90
- <div className="status-panels-grid">
91
- {/* Panel 1: Status Breakdown */}
92
- <div className="status-panel">
93
- <div className="panel-title">{t("EKYC_STATUS_BREAKDOWN") || "Status Breakdown"}</div>
94
- <div className="panel-subtitle">{t("EKYC_VERIFICATION_LIFECYCLE") || "Verification lifecycle distribution"}</div>
95
- <div className="breakdown-body">
96
- <div className="status-legend">
97
- {legendItems.map((item) => (
98
- <div key={item.label} className="legend-row">
99
- <span className="legend-label">
100
- <span className="indicator-dot" style={{ background: item.color }} />
101
- {item.label}
102
- </span>
103
- <span className="legend-value">{formatNumber(item.value)}</span>
104
- </div>
105
- ))}
106
- </div>
107
- <div className="chart-wrapper">
108
- <canvas ref={chartRef1} style={{ width: "100%", height: "100%" }} />
109
- <div className="chart-center">
110
- <div className="chart-percentage">{efficiency}%</div>
111
- <div className="chart-label">{t("EKYC_COMPLETE") || "Complete"}</div>
112
- </div>
113
- </div>
114
- </div>
115
- </div>
116
-
117
- {/* Panel 2: Submission Health */}
118
- <div className="status-panel">
119
- <div className="panel-title">
120
- {t("EKYC_SUBMISSION_HEALTH") || "Submission Health"}
121
- <span className="optimal-badge">{t("EKYC_OPTIMAL") || "Optimal"}</span>
122
- </div>
123
- <div className="panel-subtitle">{t("EKYC_PLATFORM_EFFICIENCY") || "Platform operational efficiency"}</div>
124
- <div className="health-metrics-row">
125
- <div className="health-percentage">{healthPct}%</div>
126
- <div className="health-trend">↗ +2.1%</div>
127
- </div>
128
- <div className="status-progress-bar">
129
- <div className="progress-fill" style={{ width: `${healthPct}%` }} />
130
- </div>
131
- <div className="mini-metrics-grid">
132
- <div className="metric-box">
133
- <div className="metric-label">{t("EKYC_AVG_LATENCY") || "Avg Latency"}</div>
134
- <div className="metric-value">1.2s</div>
135
- </div>
136
- <div className="metric-box">
137
- <div className="metric-label">{t("EKYC_ERROR_RATE") || "Error Rate"}</div>
138
- <div className="metric-value">0.04%</div>
139
- </div>
140
- </div>
141
- </div>
142
- </div>
143
- </div>
144
- </div>
145
- );
146
- };
147
-
148
- export default StatusCards;