+ {/* Dynamic Header */}
+
+
+
+ Hala {userName || "Admin"}!
+
+
+ Welcome to CRM Dashboard
+
+
+
+
+
+
+ New Deal
+
+
+
+ Add Lead
+
+
+
+
+ {/* Top 6 KPI Strip (Exact Adobe XD Card Design with Real CRM Data) */}
+
+ {/* KPI 1: Total Leads */}
+
+
navigate("/leads")}
+ style={{ cursor: "pointer", transition: "transform 0.15s ease" }}
+ >
+
+ Total Leads
+
+ {effectiveTotalLeads}
+
+
+
+
+
+
+
+
+ {/* KPI 2: Deals Won */}
+
+
navigate("/crm/deals?status=won")}
+ style={{ cursor: "pointer", transition: "transform 0.15s ease" }}
+ >
+
+ Deals Won
+
+ {effectiveWonDeals}
+
+
+
+
+
+
+
+
+ {/* KPI 3: Deals Lost */}
+
+
navigate("/crm/deals?status=lost")}
+ style={{ cursor: "pointer", transition: "transform 0.15s ease" }}
+ >
+
+ Deals Lost
+
+ {effectiveLostDeals}
+
+
+
+
+
+
+
+
+ {/* KPI 4: Contacted Leads */}
+
+
navigate("/leads?status=Contacted")}
+ style={{ cursor: "pointer", transition: "transform 0.15s ease" }}
+ >
+
+ Contacted
+
+ {contactedLeads}
+
+
+
+
+
+
+
+
+ {/* KPI 5: Pipeline Value */}
+
+
navigate("/crm/deals")}
+ style={{ cursor: "pointer", transition: "transform 0.15s ease" }}
+ >
+
+ Deal Value
+
+ ₹{effectiveTotalValue >= 1000 ? `${Math.round(effectiveTotalValue / 1000)}k` : effectiveTotalValue}
+
+
+
+
+
+
+
+
+ {/* KPI 6: Conversion Rate */}
+
+
navigate("/reports")}
+ style={{ cursor: "pointer", transition: "transform 0.15s ease" }}
+ >
+
+ Conversion
+
+ {conversionRate}
+
+
+
+
+
+
+
+
+
+ {/* Row 1: Leads by Stage | Activity Growth Trend | Product-wise Deal Revenue */}
+
+ {/* Card A: Leads by Stage (Matches 'Leave by Type' widget) */}
+
+
+
+
+ Leads by Stage
+
+
+ View all
+
+
+
+ {displayStages.map((item, idx) => (
+
navigate(`/leads?status=${encodeURIComponent(item.label)}`)}
+ style={{ cursor: "pointer" }}
+ >
+
+
+
+
+
+ {item.label}
+
+
+
+ {item.count}
+
+
+ ))}
+
+
+
+
+ {/* Card B: Leads & Deals Activity Trend (Matches 'Staff Turnover Chart' widget) */}
+
+
+
+
+ Lead & Deal Growth Trend
+
+
+
+
+ New Leads
+
+
+
+ Closed Deals
+
+
+
+
+
+
+
+
+
+
+ {/* Card C: Product-wise Deal Revenue (Matches 'Department wise Headcount' widget) */}
+
+
+
+
+ Product Deal Revenue
+
+ Amount (₹)
+
+
+
+
+ {/* Multi-dot category legend */}
+
+ {productChartData.names.map((name, i) => (
+
+
+ {name}
+
+ ))}
+
+
+
+
+
+ {/* Row 2: Deals by Source | Revenue Breakdown | Action Required */}
+
+ {/* Card A: Deals by Source (Matches 'Gender Diversity' widget) */}
+
+
+
+ Deals by Source
+
+
+
+
+
+ {sourceChartData.labels.slice(0, 3).map((label, idx) => (
+
+
+ {label.toUpperCase()}
+
+ ))}
+
+
+
+
+ {/* Card B: Deal Revenue Breakdown (Matches 'Insurance' widget) */}
+
+
+
+ Deal Revenue Breakdown
+
+
+ {/* Accordion 1: Deals Status */}
+
+
setOpenAccordion(openAccordion === "deals" ? null : "deals")}
+ style={{ cursor: "pointer" }}
+ >
+
+ Deals by Status
+
+
+
+ {effectiveTotalDeals}
+
+
+
+
+
+ {openAccordion === "deals" && (
+
+
+
+ Won
+
+ {wonRatio}%
+
+
+
+ Open
+
+ {openRatio}%
+
+
+
+ Lost
+
+ {lostRatio}%
+
+
+
+
+
+
+
+
+ )}
+
+
+ {/* Accordion 2: Leads Breakdown */}
+
+
setOpenAccordion(openAccordion === "leads" ? null : "leads")}
+ style={{ cursor: "pointer" }}
+ >
+
+ Lead Pipeline Distribution
+
+
+
+ {effectiveTotalLeads}
+
+
+
+
+
+
+
+
+ {/* Card C: Action Required (Matches 'Action Required' widget) */}
+
+
+
+ Action Required
+
+
+ {/* Item 1 */}
+
navigate("/leads?status=Not_Contacted")} style={{ cursor: "pointer" }}>
+
+ Pending Follow-ups
+
+
+
+
+
+ {pendingLeads} Pending
+ {contactedLeads}/{effectiveTotalLeads}
+
+
+
+
+ {/* Item 2 */}
+
navigate("/crm/deals?status=open")} style={{ cursor: "pointer" }}>
+
+ Active Pipeline Deals
+
+
+
+
+
+ {effectiveOpenDeals} In Progress
+ {effectiveWonDeals}/{effectiveTotalDeals}
+
+
+
+
+ {/* Item 3 */}
+
navigate("/to-do")} style={{ cursor: "pointer" }}>
+
+ Urgent Tasks & To-Dos
+
+
+
+
+
+ {pendingTodosCount} Pending
+ {completedTodosCount}/{totalTodosCount}
+
+
+
+
+
+
+
+
+ {/* Row 3: Upcoming Events | Recently Created Leads | Recent Deals */}
+
+ {/* Card A: Upcoming Events */}
+
+
+
+
+ Upcoming Events & Calls
+
+
+ Schedule
+
+
+
+ {upcomingEventsList.map((ev, i) => (
+
+
+
+
+
+ {ev.date}
+
+ {ev.title}
+
+ {ev.subtitle}
+
+
+ ))}
+
+
+
+
+ {/* Card B: Recently Created Leads */}
+
+
+
+
+ Recently Created Leads
+
+
+ View all
+
+
+
+ {recentLeadsList.map((emp, i) => (
+
+
+
+ {emp.initials}
+
+
+
+ {emp.name}
+
+ {emp.company}
+
+
+
+ {emp.status}
+
+
+ ))}
+
+
+
+
+ {/* Card C: Recent Deals in Pipeline */}
+
+
+
+
+ Recent Deals in Pipeline
+
+
+ View all
+
+
+
+ {recentDealsList.map((deal, i) => (
+
+
+
+ {deal.initials}
+
+
+
+ {deal.name}
+
+ {deal.client}
+
+
+
+ {deal.value}
+
+
+ ))}
+
+
+
+
+
+ );
+};
+
+export default CipherBizzDashboard;
diff --git a/src/feature-module/mainMenu/dealsDashboard/index.tsx b/src/feature-module/mainMenu/dealsDashboard/index.tsx
index 8b26a48..aae2bf8 100644
--- a/src/feature-module/mainMenu/dealsDashboard/index.tsx
+++ b/src/feature-module/mainMenu/dealsDashboard/index.tsx
@@ -63,11 +63,13 @@ import CountUp from "react-countup";
import ReactECharts from "echarts-for-react";
import Tip from "../../../core/common/tooltip";
import ChartExportControl from "../../../core/common/ChartExportControl";
+import CipherBizzDashboard from "./CipherBizzDashboard";
const ReactApexChart = React.lazy(() => import("react-apexcharts"));
const DealsDashboard = () => {
const route = all_routes;
const navigate = useNavigate();
+ const [dashboardView, setDashboardView] = useState<"cipherbizz" | "crm">("cipherbizz");
const [funnelData, setFunnelData] = useState