@djb25/digit-ui-module-ekyc 1.0.13 → 1.0.15
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.css +54 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +3334 -3345
- package/dist/index.modern.js.map +1 -1
- package/package.json +34 -29
- package/src/Module.js +2 -5
- package/src/components/AssignEkyc.js +317 -0
- package/src/components/AssignEkycModal.js +362 -0
- package/src/components/CeoDashboard.js +255 -192
- package/src/components/CeoDashboard.jsx +334 -0
- package/src/components/DesktopInbox.js +8 -0
- package/src/components/EKYCCard.js +9 -3
- package/src/components/Review.js +155 -88
- package/src/components/StatusCards.js +6 -17
- package/src/components/SurveyorDetailsCard.js +282 -0
- package/src/components/VendorDetails.jsx +231 -0
- package/src/components/analytics/charts/ExecutiveBarChart.jsx +30 -0
- package/src/components/analytics/charts/ExecutiveLineChart.jsx +159 -0
- package/src/components/analytics/charts/ExecutivePieChart.jsx +24 -0
- package/src/components/analytics/charts/TaskStatusChart.js +1 -3
- package/src/components/analytics/components/DashboardLayout.js +26 -46
- package/src/components/mockData.js +772 -0
- package/src/hook/SupervisorInboxTableConfig.js +138 -0
- package/src/hook/useInboxTableConfig.js +12 -3
- package/src/pages/citizen/Home.js +27 -14
- package/src/pages/citizen/index.js +48 -1
- package/src/pages/employee/Mapping.js +162 -449
- package/src/pages/employee/index.js +96 -70
- package/src/components/analytics/styles/Dashboard.css +0 -54
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ResponsiveContainer, PieChart, Pie, Cell, Tooltip, Legend } from "recharts";
|
|
3
|
+
|
|
4
|
+
const colors = ["#22c55e", "#38bdf8", "#f97316", "#facc15", "#f43f5e"];
|
|
5
|
+
|
|
6
|
+
const ExecutivePieChart = ({ data = [], dataKey = "value", labelKey = "label" }) => {
|
|
7
|
+
return (
|
|
8
|
+
<div className="chart-card" style={{ minHeight: 320 }}>
|
|
9
|
+
<ResponsiveContainer width="100%" height={320}>
|
|
10
|
+
<PieChart>
|
|
11
|
+
<Pie data={data} dataKey={dataKey} nameKey={labelKey} cx="50%" cy="50%" outerRadius={110} innerRadius={60} paddingAngle={3} label={{ fill: "#f8fafc", fontSize: 12 }}>
|
|
12
|
+
{data.map((entry, index) => (
|
|
13
|
+
<Cell key={`cell-${index}`} fill={colors[index % colors.length]} />
|
|
14
|
+
))}
|
|
15
|
+
</Pie>
|
|
16
|
+
<Tooltip contentStyle={{ background: "#0f172a", border: "none", borderRadius: 14, color: "#f8fafc" }} />
|
|
17
|
+
<Legend verticalAlign="bottom" align="center" iconType="circle" wrapperStyle={{ color: "#cbd5e1", marginTop: 10 }} />
|
|
18
|
+
</PieChart>
|
|
19
|
+
</ResponsiveContainer>
|
|
20
|
+
</div>
|
|
21
|
+
);
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export default ExecutivePieChart;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import React, { useEffect, useRef } from "react";
|
|
2
2
|
import { useTranslation } from "react-i18next";
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
Chart.register(...registerables);
|
|
3
|
+
import Chart from "chart.js/auto";
|
|
6
4
|
|
|
7
5
|
const TaskStatusChart = ({ data, title }) => {
|
|
8
6
|
const { t } = useTranslation();
|
|
@@ -1,70 +1,50 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { useTranslation } from "react-i18next";
|
|
3
3
|
|
|
4
|
-
/**
|
|
5
|
-
* Main structural shell for the Enterprise Dashboard.
|
|
6
|
-
*/
|
|
7
4
|
const DashboardLayout = ({ header, filters, children, onNotificationClick, activeRole, onRoleChange }) => {
|
|
8
5
|
const { t } = useTranslation();
|
|
9
6
|
|
|
10
7
|
const roles = ["CEO", "CLUSTER_MANAGER", "AGENCY_SUPERVISOR"];
|
|
11
8
|
|
|
12
9
|
return (
|
|
13
|
-
<div className="enterprise-dashboard-layout"
|
|
10
|
+
<div className="enterprise-dashboard-layout">
|
|
11
|
+
<div className="dashboard-background-glow glow-1" />
|
|
12
|
+
<div className="dashboard-background-glow glow-2" />
|
|
13
|
+
|
|
14
14
|
{/* Top Navigation / Header */}
|
|
15
|
-
<div className="glass-card
|
|
16
|
-
<div>
|
|
17
|
-
<
|
|
18
|
-
|
|
15
|
+
<div className="glass-card dashboard-header">
|
|
16
|
+
<div className="dashboard-header-left">
|
|
17
|
+
<div className="dashboard-chip">LIVE ANALYTICS</div>
|
|
18
|
+
|
|
19
|
+
<h1 className="dashboard-title gradient-text">{t(header)}</h1>
|
|
20
|
+
|
|
21
|
+
<p className="dashboard-subtitle">{t("EKYC_DASHBOARD_SUBTITLE_ALT") || "Operational analytics & performance monitoring."}</p>
|
|
19
22
|
</div>
|
|
20
|
-
|
|
21
|
-
<div
|
|
22
|
-
{/* Role Switcher
|
|
23
|
-
<div
|
|
24
|
-
{roles.map(role => (
|
|
25
|
-
<button
|
|
26
|
-
key={role}
|
|
27
|
-
onClick={() => onRoleChange(role)}
|
|
28
|
-
style={{
|
|
29
|
-
padding: "6px 12px",
|
|
30
|
-
borderRadius: "6px",
|
|
31
|
-
fontSize: "12px",
|
|
32
|
-
fontWeight: "700",
|
|
33
|
-
border: "none",
|
|
34
|
-
cursor: "pointer",
|
|
35
|
-
background: activeRole === role ? "var(--primary-gradient)" : "transparent",
|
|
36
|
-
color: activeRole === role ? "#FFFFFF" : "#64748B",
|
|
37
|
-
boxShadow: activeRole === role ? "0 4px 12px rgba(99, 102, 241, 0.3)" : "none",
|
|
38
|
-
transition: "all 0.3s cubic-bezier(0.4, 0, 0.2, 1)"
|
|
39
|
-
}}
|
|
40
|
-
>
|
|
23
|
+
|
|
24
|
+
<div className="dashboard-header-actions">
|
|
25
|
+
{/* Role Switcher */}
|
|
26
|
+
<div className="role-switcher">
|
|
27
|
+
{roles.map((role) => (
|
|
28
|
+
<button key={role} onClick={() => onRoleChange(role)} className={`role-switcher-button ${activeRole === role ? "active" : "inactive"}`}>
|
|
41
29
|
{t(role)}
|
|
42
30
|
</button>
|
|
43
31
|
))}
|
|
44
32
|
</div>
|
|
45
33
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
<span
|
|
51
|
-
<span style={{ position: "absolute", top: "0", right: "0", width: "10px", height: "10px", background: "#EF4444", borderRadius: "50%", border: "2px solid #FFF" }} />
|
|
34
|
+
{/* Notification */}
|
|
35
|
+
<button onClick={onNotificationClick} className="notification-button">
|
|
36
|
+
<span className="notification-icon">🔔</span>
|
|
37
|
+
|
|
38
|
+
<span className="notification-badge" />
|
|
52
39
|
</button>
|
|
53
40
|
</div>
|
|
54
41
|
</div>
|
|
55
42
|
|
|
56
|
-
{/* Filter Bar
|
|
57
|
-
{filters}
|
|
58
|
-
|
|
59
|
-
{/* Main Content Area */}
|
|
60
|
-
<div style={{ padding: "24px", maxWidth: "1600px", margin: "0 auto" }}>
|
|
61
|
-
{children}
|
|
62
|
-
</div>
|
|
43
|
+
{/* Filter Bar */}
|
|
44
|
+
<div className="dashboard-filter-wrapper">{filters}</div>
|
|
63
45
|
|
|
64
|
-
{/*
|
|
65
|
-
<div
|
|
66
|
-
{t("EKYC_POWERED_BY_UPYOG")} | {new Date().getFullYear()} © {t("EKYC_GOVT_DJB")}
|
|
67
|
-
</div>
|
|
46
|
+
{/* Main Content */}
|
|
47
|
+
<div className="dashboard-content animate-fade-in">{children}</div>
|
|
68
48
|
</div>
|
|
69
49
|
);
|
|
70
50
|
};
|