feat(dashboard): redesign dashboard widgets and update theme to royal plum

This commit is contained in:
adithiyan 2026-10-12 22:21:39 +05:30
parent 7ce2667ea0
commit c1ee908cde
8 changed files with 1740 additions and 241 deletions

2
.gitignore vendored
View file

@ -21,3 +21,5 @@
npm-debug.log* npm-debug.log*
yarn-debug.log* yarn-debug.log*
yarn-error.log* yarn-error.log*
.agents/
skills-lock.json

View file

@ -2,10 +2,10 @@ import React, { useEffect } from "react";
import { useSelector } from "react-redux"; import { useSelector } from "react-redux";
const themeColors: any = { const themeColors: any = {
primary: "#e41f07", primary: "#69235B",
brightblue: "#4680ff", brightblue: "#4680ff",
lunargreen: "#365e32", lunargreen: "#365e32",
lavendar: "#673ab7", lavendar: "#69235B",
magenta: "#e83e8c", magenta: "#e83e8c",
chromeyellow: "#ff9b04", chromeyellow: "#ff9b04",
lavared: "#dc2626", lavared: "#dc2626",

View file

@ -472,11 +472,11 @@ const Header = () => {
{logoRoute ? ( {logoRoute ? (
<> <>
<Link to={logoRoute} className="logo logo-normal mt-2 mb-2" style={{ textDecoration: 'none' }}> <Link to={logoRoute} className="logo logo-normal mt-2 mb-2" style={{ textDecoration: 'none' }}>
<h3 style={{ color: '#333', margin: 0, fontWeight: 'bold' }}>CRM</h3> <h3 style={{ color: '#69235B', margin: 0, fontWeight: 'bold' }}>CRM</h3>
</Link> </Link>
<Link to={logoRoute} className="logo-small" style={{ textDecoration: 'none' }}> <Link to={logoRoute} className="logo-small" style={{ textDecoration: 'none' }}>
<h3 style={{ color: '#333', margin: 0, fontWeight: 'bold', fontSize: '18px' }}>CRM</h3> <h3 style={{ color: '#69235B', margin: 0, fontWeight: 'bold', fontSize: '18px' }}>CRM</h3>
</Link> </Link>
</> </>
) : ( ) : (
@ -485,14 +485,14 @@ const Header = () => {
className="logo logo-normal mt-2 mb-2" className="logo logo-normal mt-2 mb-2"
style={{ cursor: "not-allowed", opacity: 0.6, textDecoration: 'none' }} style={{ cursor: "not-allowed", opacity: 0.6, textDecoration: 'none' }}
> >
<h3 style={{ color: '#333', margin: 0, fontWeight: 'bold' }}>CRM</h3> <h3 style={{ color: '#69235B', margin: 0, fontWeight: 'bold' }}>CRM</h3>
</div> </div>
<div <div
className="logo-small" className="logo-small"
style={{ cursor: "not-allowed", opacity: 0.6, textDecoration: 'none' }} style={{ cursor: "not-allowed", opacity: 0.6, textDecoration: 'none' }}
> >
<h3 style={{ color: '#333', margin: 0, fontWeight: 'bold', fontSize: '18px' }}>CRM</h3> <h3 style={{ color: '#69235B', margin: 0, fontWeight: 'bold', fontSize: '18px' }}>CRM</h3>
</div> </div>
</> </>
)} )}

File diff suppressed because it is too large Load diff

View file

@ -63,11 +63,13 @@ import CountUp from "react-countup";
import ReactECharts from "echarts-for-react"; import ReactECharts from "echarts-for-react";
import Tip from "../../../core/common/tooltip"; import Tip from "../../../core/common/tooltip";
import ChartExportControl from "../../../core/common/ChartExportControl"; import ChartExportControl from "../../../core/common/ChartExportControl";
import CipherBizzDashboard from "./CipherBizzDashboard";
const ReactApexChart = React.lazy(() => import("react-apexcharts")); const ReactApexChart = React.lazy(() => import("react-apexcharts"));
const DealsDashboard = () => { const DealsDashboard = () => {
const route = all_routes; const route = all_routes;
const navigate = useNavigate(); const navigate = useNavigate();
const [dashboardView, setDashboardView] = useState<"cipherbizz" | "crm">("cipherbizz");
const [funnelData, setFunnelData] = useState<LeadCountsFunnel>({ const [funnelData, setFunnelData] = useState<LeadCountsFunnel>({
total_leads: 0, total_leads: 0,
@ -103,7 +105,7 @@ const DealsDashboard = () => {
}, },
dataLabels: { dataLabels: {
enabled: true, enabled: true,
formatter: (val: number) => val.toString(), formatter: (val: number) => (val != null ? val.toString() : ""),
style: { style: {
colors: ["#333"], colors: ["#333"],
}, },
@ -621,7 +623,7 @@ const DealsDashboard = () => {
0 0
); );
return total.toString(); return (total != null ? total.toString() : "0");
}, },
}, },
}, },
@ -1388,7 +1390,7 @@ const DealsDashboard = () => {
yaxis: { yaxis: {
labels: { labels: {
formatter: (val: number) => `₹ ${val.toLocaleString()}`, formatter: (val: number) => `₹ ${(val ?? 0).toLocaleString()}`,
style: { fontSize: "12px", colors: "#6B7280" }, style: { fontSize: "12px", colors: "#6B7280" },
}, },
title: { title: {
@ -1400,7 +1402,7 @@ const DealsDashboard = () => {
tooltip: { tooltip: {
theme: "light", theme: "light",
y: { y: {
formatter: (val: number) => `₹ ${val.toLocaleString()}`, formatter: (val: number) => `₹ ${(val ?? 0).toLocaleString()}`,
}, },
x: { x: {
formatter: (_: any, opts: any) => { formatter: (_: any, opts: any) => {
@ -2102,7 +2104,7 @@ const DealsDashboard = () => {
min: 0, min: 0,
tickAmount: 5, tickAmount: 5,
labels: { labels: {
formatter: (val: number) => val.toString(), formatter: (val: number) => (val != null ? val.toString() : ""),
style: { fontSize: "12px", colors: "#6B7280" }, style: { fontSize: "12px", colors: "#6B7280" },
}, },
title: { title: {
@ -2113,8 +2115,8 @@ const DealsDashboard = () => {
tooltip: { tooltip: {
theme: "light", theme: "light",
x: { formatter: (val: any) => `Month: ${val}` }, x: { formatter: (val: any) => `Month: ${val ?? ""}` },
y: { formatter: (val: number) => `${val} companies` }, y: { formatter: (val: number) => `${val ?? 0} companies` },
marker: { show: true }, marker: { show: true },
}, },
@ -2229,8 +2231,8 @@ const DealsDashboard = () => {
shared: true, shared: true,
intersect: false, intersect: false,
y: [ y: [
{ formatter: (val: any) => `${val} deals` }, { formatter: (val: any) => `${val ?? 0} deals` },
{ formatter: (val: any) => `₹${val.toLocaleString()}` }, { formatter: (val: any) => `₹${(val ?? 0).toLocaleString()}` },
], ],
}, },
@ -2683,30 +2685,46 @@ const DealsDashboard = () => {
style={{ width: `${scrollProgress}%` }} style={{ width: `${scrollProgress}%` }}
></div> ></div>
</div> </div>
<div className="page-wrapper"> <div className="page-wrapper dashboard-minimal">
<div className="content"> <div className="content">
{dashboardView === "cipherbizz" ? (
<CipherBizzDashboard
userName={userName || "Admin"}
totalLeads={dashboardData?.statsData?.overall_lead_value_by_status_WITH_COUNT?.reduce((acc: number, item: any) => acc + (item.lead_count || 0), 0) || allLeads.length}
contactedLeads={dashboardData?.statsData?.overall_lead_value_by_status_WITH_COUNT?.find((s: any) => s.status === "Contacted")?.lead_count || 0}
notContactedLeads={dashboardData?.statsData?.overall_lead_value_by_status_WITH_COUNT?.find((s: any) => s.status === "Not_Contacted")?.lead_count || 0}
dealsWon={dealStatusSummary.find((s: any) => s.name === "Won")?.value || 0}
dealsLost={dealStatusSummary.find((s: any) => s.name === "Lost")?.value || 0}
openDeals={dealStatusSummary.find((s: any) => s.name === "Open")?.value || 0}
totalDealValue={allDeals.reduce((sum, d) => sum + (parseFloat(d.deal_value as any) || 0), 0)}
conversionRate={conversionRate}
stages={stages}
stageOwnerCounts={stageOwnerCounts}
productRevenueData={productRevenueData}
dealSourceData={{ labels: chartConfig?.labels || [], series: chartConfig?.series || [] }}
allLeads={allLeads}
allDeals={allDeals}
todos={todos}
calendarEvents={calendarEvents || []}
navigate={navigate}
/>
) : (
<>
<div className="row mb-0"> <div className="row mb-0">
<div className="col-md-12 mb-0"> <div className="col-md-12 mb-0">
<div className="page-header"> <div className="page-header d-flex justify-content-between align-items-center mb-4 flex-wrap gap-3">
<div className="row align-items-center "> <div>
<div className="col-12 col-md-6 col-lg-4 mb-3"> <div className="text-muted f-13 fw-medium mb-1">
<h3 className="page-title fw-bold d-flex align-items-center"> Hala {userName || "Mohammad"}!
<i className="ti ti-layout-dashboard text-primary me-2" />
<span className="text-truncate">Admin Dashboard</span>
<Tip
text="Overall summary of admin insights including users, leads, deals, activities and system performance."
placement="right"
>
<i
className="fa fa-info-circle ms-2 text-primary"
style={{ cursor: "pointer", fontSize: "15px" }}
/>
</Tip>
</h3>
</div> </div>
<div className="col-md-8 float-end ms-auto"> <h2
<div className="d-flex title-head"> className="page-title fw-bold d-flex align-items-center mb-0"
<div className="daterange-picker d-flex align-items-center justify-content-center"> style={{ color: "#1E2638", fontSize: "1.75rem", letterSpacing: "-0.02em" }}
>
Welcome to <span className="ms-2" style={{ color: "#69235B" }}>CRM Dashboard</span>
</h2>
</div>
<div className="d-flex align-items-center gap-2">
<div className="head-icons mb-0"> <div className="head-icons mb-0">
<CollapseHeader /> <CollapseHeader />
</div> </div>
@ -2714,18 +2732,9 @@ const DealsDashboard = () => {
</div> </div>
</div> </div>
</div> </div>
<div className="d-flex align-items-center mb-0">
<i className="ti ti-user-check text-success me-2 "></i>
<span className="fw-semibold ">
Welcome, {userName || "Admin"}
</span>
</div>
</div>
</div>
</div>
<div className="row mt-0"> {/* KPI Widget Grid */}
<div className="row g-3 mb-4"> <div className="dashboard-kpi-grid mb-4">
{statusWidgets.map((widget, index) => { {statusWidgets.map((widget, index) => {
const total = statusWidgets.reduce( const total = statusWidgets.reduce(
(sum, w) => sum + w.value, (sum, w) => sum + w.value,
@ -2734,76 +2743,94 @@ const DealsDashboard = () => {
const percent = const percent =
total > 0 ? ((widget.value / total) * 100).toFixed(1) : 0; total > 0 ? ((widget.value / total) * 100).toFixed(1) : 0;
const accentClass =
widget.label === "Contacted"
? "kpi-accent-warning"
: widget.label === "Not_Contacted"
? "kpi-accent-info"
: widget.label === "Closed"
? "kpi-accent-success"
: widget.label === "Lost"
? "kpi-accent-danger"
: "kpi-accent-secondary";
return ( return (
<div className="col" key={index}>
<Tip <Tip
key={index}
text={`${widget.subtext}: ${widget.value} (${percent}%)`} text={`${widget.subtext}: ${widget.value} (${percent}%)`}
> >
<div <div
className={`card dashboard-card shadow-sm p-3 border-0 h-100 ${widget.color}`} className={`dashboard-kpi-card ${accentClass}`}
style={{ role="button"
borderRadius: "16px", tabIndex={0}
cursor: "pointer",
transition:
"transform 0.25s ease, box-shadow 0.25s ease",
whiteSpace: "nowrap",
overflow: "hidden",
textOverflow: "ellipsis",
}}
onClick={() => { onClick={() => {
if (widget.label === "UnAssigned Contacts") { if (
widget.label === "UnAssigned Contacts" ||
widget.label === "Unassigned Contacts"
) {
navigate(`/crm/contact-list?unassigned=true`); navigate(`/crm/contact-list?unassigned=true`);
} else { } else {
const statusParam = widget.label || ""; const statusParam = widget.label || "";
navigate( navigate(
`/leads${statusParam `/leads${
statusParam
? `?status=${encodeURIComponent(statusParam)}` ? `?status=${encodeURIComponent(statusParam)}`
: "" : ""
}` }`
); );
} }
}} }}
onMouseEnter={(e) => { onKeyDown={(e) => {
e.currentTarget.style.transform = "translateY(-4px)"; if (e.key === "Enter" || e.key === " ") {
e.currentTarget.style.boxShadow = if (
"0 6px 18px rgba(0,0,0,0.12)"; widget.label === "UnAssigned Contacts" ||
}} widget.label === "Unassigned Contacts"
onMouseLeave={(e) => { ) {
e.currentTarget.style.transform = "translateY(0px)"; navigate(`/crm/contact-list?unassigned=true`);
e.currentTarget.style.boxShadow = } else {
"var(--bs-box-shadow-sm)"; const statusParam = widget.label || "";
navigate(
`/leads${
statusParam
? `?status=${encodeURIComponent(statusParam)}`
: ""
}`
);
}
}
}} }}
> >
<div className="mb-2 d-flex justify-content-center"> <div className="d-flex justify-content-between align-items-start mb-2">
<span <span
className="rounded-circle d-flex align-items-center justify-content-center" className="kpi-label text-truncate"
style={{ title={widget.subtext || widget.label}
width: "48px",
height: "48px",
background: "rgba(255,255,255,0.15)",
backdropFilter: "blur(4px)",
}}
> >
{widget.icon} {widget.subtext || widget.label}
</span> </span>
<div className="kpi-icon-badge">{widget.icon}</div>
</div> </div>
<h3 className="fw-bold mb-1"> <div className="d-flex align-items-baseline justify-content-between gap-2 mt-auto">
<h3 className="kpi-value mb-0">
<CountUp <CountUp
end={widget.value} end={widget.value}
duration={2} duration={1.5}
separator="," separator=","
decimals={widget.value % 1 !== 0 ? 1 : 0} decimals={widget.value % 1 !== 0 ? 1 : 0}
/> />
</h3> </h3>
<p className="text-muted mb-0">{widget.subtext}</p> {total > 0 && (
<span className="kpi-percentage">{percent}%</span>
)}
</div>
</div> </div>
</Tip> </Tip>
</div>
); );
})} })}
</div> </div>
<div className="col-xl-6 col-lg-12 d-flex">
<div className="row g-4 mb-4">
<div className="col-12 col-md-6 col-xl-3 d-flex">
<div className="card flex-fill" id="monthly-highlights-card"> <div className="card flex-fill" id="monthly-highlights-card">
<div <div
style={{ overflow: "visible" }} style={{ overflow: "visible" }}
@ -2811,20 +2838,20 @@ const DealsDashboard = () => {
> >
{/* LEFT SIDE : TITLE + ICONS */} {/* LEFT SIDE : TITLE + ICONS */}
<h5 <h5
className="mb-0 d-flex align-items-center gap-2 flex-nowrap" className="mb-0 d-flex align-items-center gap-1 flex-nowrap f-14 fw-semibold text-truncate"
style={{ style={{
whiteSpace: "nowrap", whiteSpace: "nowrap",
overflow: "hidden", overflow: "hidden",
textOverflow: "ellipsis", textOverflow: "ellipsis",
}} }}
> >
<i className="ti ti-help-circle" /> <i className="ti ti-chart-pie text-muted" />
<span className="text-truncate">Monthly Highlights</span> <span className="text-truncate">Monthly Highlights</span>
<Tip text="This donut shows the count of contacts, leads, and deals created this month."> <Tip text="This donut shows the count of contacts, leads, and deals created this month.">
<i <i
className="fa fa-info-circle text-primary" className="fa fa-info-circle text-primary ms-1"
style={{ cursor: "pointer", fontSize: "16px" }} style={{ cursor: "pointer", fontSize: "14px" }}
/> />
</Tip> </Tip>
</h5> </h5>
@ -2937,22 +2964,22 @@ const DealsDashboard = () => {
</div> </div>
</div> </div>
<div className="col-12 col-md-12 col-lg-12 col-xl-6 d-flex"> <div className="col-12 col-md-6 col-xl-3 d-flex">
<div className="card flex-fill" id="leads-by-stage-card"> <div className="card flex-fill" id="leads-by-stage-card">
<div style={{ overflow: "visible" }} className="card-header border-0 pb-0"> <div style={{ overflow: "visible" }} className="card-header pb-2 border-0">
<div className="d-flex align-items-center justify-content-between flex-wrap gap-2" <div className="d-flex align-items-center justify-content-between flex-nowrap gap-2"
style={{ whiteSpace: "nowrap" }} style={{ whiteSpace: "nowrap" }}
> >
<h4 className="mb-0 d-flex align-items-center gap-2 flex-wrap"> <h5 className="mb-0 d-flex align-items-center gap-1 flex-nowrap f-14 fw-semibold text-truncate">
<i className="ti ti-info-square me-1" /> <i className="ti ti-chart-bar text-muted" />
Leads by Stage <span className="text-truncate">Leads by Stage</span>
<Tip text="Displays how many leads are present in each stage of your pipeline."> <Tip text="Displays how many leads are present in each stage of your pipeline.">
<i <i
className="fa fa-info-circle text-primary ms-2" className="fa fa-info-circle text-primary ms-1"
style={{ cursor: "pointer", fontSize: "15px" }} style={{ cursor: "pointer", fontSize: "14px" }}
/> />
</Tip> </Tip>
</h4> </h5>
<div className="d-flex gap-1 flex-shrink-0 align-items-center"> <div className="d-flex gap-1 flex-shrink-0 align-items-center">
<ChartExportControl <ChartExportControl
@ -2989,13 +3016,13 @@ const DealsDashboard = () => {
options={leadsByStageOptions.options} options={leadsByStageOptions.options}
series={leadsByStageOptions.series} series={leadsByStageOptions.series}
type="bar" type="bar"
height={window.innerWidth < 576 ? 220 : 275} height={240}
/> />
</Suspense> </Suspense>
</div> </div>
{/* ===== STAGE → OWNER BREAKDOWN ===== */} {/* ===== STAGE → OWNER BREAKDOWN ===== */}
<div className="row mt-3"> <div className="row mt-2 g-2">
{Object.entries(stageOwnerCounts).map( {Object.entries(stageOwnerCounts).map(
([stage, owners], idx) => { ([stage, owners], idx) => {
const isOpen = openIndex === idx; const isOpen = openIndex === idx;
@ -3006,7 +3033,7 @@ const DealsDashboard = () => {
); );
return ( return (
<div className="col-12 col-sm-6 col-lg-4 mb-3" key={stage}> <div className="col-12 mb-2" key={stage}>
<div className="accordion-item shadow-sm rounded"> <div className="accordion-item shadow-sm rounded">
<h2 className="accordion-header"> <h2 className="accordion-header">
<button <button
@ -3095,23 +3122,23 @@ const DealsDashboard = () => {
</div> </div>
</div> </div>
<div className="col-md-6 d-flex"> <div className="col-12 col-md-6 col-xl-3 d-flex">
<div className="card flex-fill" id="product-deal-revenue-card"> <div className="card flex-fill" id="product-deal-revenue-card">
<div style={{ overflow: "visible" }} className="card-header border-0 pb-0"> <div style={{ overflow: "visible" }} className="card-header pb-2 border-0">
<div <div
className="d-flex align-items-center justify-content-between flex-nowrap" className="d-flex align-items-center justify-content-between flex-nowrap"
style={{ whiteSpace: "nowrap" }} style={{ whiteSpace: "nowrap" }}
> >
<h4 className="mb-0 d-flex align-items-center gap-2 text-truncate"> <h5 className="mb-0 d-flex align-items-center gap-1 f-14 fw-semibold text-truncate">
<i className="ti ti-packages me-1" /> <i className="ti ti-packages text-muted" />
Product-wise Deal Revenue <span className="text-truncate">Product Deal Revenue</span>
<Tip text="Showing current combined deal value of each product based on their status."> <Tip text="Showing current combined deal value of each product based on their status.">
<i <i
className="fa fa-info-circle text-primary ms-2" className="fa fa-info-circle text-primary ms-1"
style={{ cursor: "pointer", fontSize: "15px" }} style={{ cursor: "pointer", fontSize: "14px" }}
/> />
</Tip> </Tip>
</h4> </h5>
<div className="d-flex gap-1 flex-shrink-0 align-items-center"> <div className="d-flex gap-1 flex-shrink-0 align-items-center">
<ChartExportControl <ChartExportControl
variant="dots" variant="dots"
@ -3138,19 +3165,20 @@ const DealsDashboard = () => {
<p className="mb-0">No revenue data available</p> <p className="mb-0">No revenue data available</p>
</div> </div>
) : ( ) : (
<div style={{ width: "100%", height: 300 }}> <div style={{ width: "100%", height: 260 }}>
<ResponsiveContainer width="100%" height="100%"> <ResponsiveContainer width="100%" height="100%">
<BarChart <BarChart
data={productRevenueData} data={productRevenueData}
margin={{ top: 20, right: 30, left: 0, bottom: 40 }} margin={{ top: 15, right: 10, left: -20, bottom: 35 }}
> >
<CartesianGrid strokeDasharray="3 3" /> <CartesianGrid strokeDasharray="3 3" vertical={false} stroke="#f1f5f9" />
<XAxis <XAxis
dataKey="name" dataKey="name"
tick={{ fontSize: 11, fontWeight: 600 }} tick={{ fontSize: 10, fill: "#6b7280" }}
interval={0} interval={0}
angle={-25} angle={-30}
textAnchor="end" textAnchor="end"
height={35}
/> />
<Tooltip <Tooltip
@ -3182,6 +3210,7 @@ const DealsDashboard = () => {
<Legend <Legend
onClick={handleLegendClick} onClick={handleLegendClick}
verticalAlign="top" verticalAlign="top"
wrapperStyle={{ fontSize: "11px", paddingBottom: "6px" }}
/> />
{(!activeKey || activeKey === "Won") && ( {(!activeKey || activeKey === "Won") && (
@ -3227,18 +3256,19 @@ const DealsDashboard = () => {
</div> </div>
</div> </div>
{/* Deals by Source */} {/* Deals by Source */}
<div className="col-lg-6 d-flex "> <div className="col-12 col-md-6 col-xl-3 d-flex">
<div className="card flex-fill" id="deals-by-source-card"> <div className="card flex-fill" id="deals-by-source-card">
<div style={{ overflow: "visible" }} className="card-header border-0 pb-0 d-flex justify-content-between align-items-center"> <div style={{ overflow: "visible" }} className="card-header pb-2 border-0 d-flex justify-content-between align-items-center">
<h4 className="fw-bold mb-0 d-flex align-items-center gap-2"> <h5 className="mb-0 d-flex align-items-center gap-1 f-14 fw-semibold text-truncate">
<i className="bi bi-graph-up-arrow me-2"></i>Deals by Source <i className="ti ti-chart-dots text-muted" />
<span className="text-truncate">Deals by Source</span>
<Tip text="Shows the number of deals coming from each source."> <Tip text="Shows the number of deals coming from each source.">
<i <i
className="fa fa-info-circle text-primary ms-1" className="fa fa-info-circle text-primary ms-1"
style={{ cursor: "pointer", fontSize: "15px" }} style={{ cursor: "pointer", fontSize: "14px" }}
/> />
</Tip> </Tip>
</h4> </h5>
<div className="d-flex gap-1 flex-shrink-0 align-items-center"> <div className="d-flex gap-1 flex-shrink-0 align-items-center">
<ChartExportControl <ChartExportControl
variant="dots" variant="dots"
@ -3266,14 +3296,14 @@ const DealsDashboard = () => {
options={chartConfig} options={chartConfig}
series={chartConfig.series} series={chartConfig.series}
type="donut" type="donut"
height={350} height={240}
/> />
</Suspense> </Suspense>
)} )}
</div> </div>
</div> </div>
</div> </div>
<div className="col-lg-12 d-flex"> <div className="col-12 d-flex">
<div className="card flex-fill" id="team-performance-tracker-card"> <div className="card flex-fill" id="team-performance-tracker-card">
<div style={{ overflow: "visible" }} className="card-header pb-2 d-flex justify-content-between align-items-center flex-wrap"> <div style={{ overflow: "visible" }} className="card-header pb-2 d-flex justify-content-between align-items-center flex-wrap">
<h5 className="mb-2 d-flex align-items-center gap-2"> <h5 className="mb-2 d-flex align-items-center gap-2">
@ -3384,7 +3414,7 @@ const DealsDashboard = () => {
</div> </div>
</div> </div>
<div className="card shadow-sm mt-2"> <div className="card shadow-sm mt-2">
<div className="card-header text-white d-flex justify-content-between align-items-center"> <div className="card-header d-flex justify-content-between align-items-center">
<h5 className="mb-0 d-flex align-items-center gap-2"> <h5 className="mb-0 d-flex align-items-center gap-2">
🏅 Top 5 Performers Leaderboard 🏅 Top 5 Performers Leaderboard
<Tip text="Displays top 5 users by incentive earned or deal value"> <Tip text="Displays top 5 users by incentive earned or deal value">
@ -3500,7 +3530,7 @@ const DealsDashboard = () => {
)} )}
</div> </div>
<div className="card shadow-sm mt-2"> <div className="card shadow-sm mt-2">
<div className="card-header text-white d-flex justify-content-between align-items-center gap-3 flex-wrap"> <div className="card-header d-flex justify-content-between align-items-center gap-3 flex-wrap">
{/* Title */} {/* Title */}
<h5 className="mb-0 d-flex align-items-center gap-2"> <h5 className="mb-0 d-flex align-items-center gap-2">
🕒 Lead Last Activity Overview 🕒 Lead Last Activity Overview
@ -4941,11 +4971,11 @@ const DealsDashboard = () => {
</div> </div>
<div className="col-lg-6"> <div className="col-lg-6">
<div <div
className="card h-100 border-0 shadow-sm rounded-4 overflow-hidden bg-white" className="card dashboard-card h-100"
id="deal-pipeline-by-stage-card" id="deal-pipeline-by-stage-card"
> >
{/* ================= HEADER ================= */} {/* ================= HEADER ================= */}
<div className="card-header bg-white border-bottom py-3 px-4 d-flex align-items-center justify-content-between"> <div className="card-header d-flex align-items-center justify-content-between">
<div className="d-flex align-items-center gap-2"> <div className="d-flex align-items-center gap-2">
<div className="d-flex align-items-center justify-content-center" <div className="d-flex align-items-center justify-content-center"
style={{ width: 36, height: 36 }}> style={{ width: 36, height: 36 }}>
@ -5267,8 +5297,8 @@ const DealsDashboard = () => {
{/* Deal Status Summary (Rose Chart) */} {/* Deal Status Summary (Rose Chart) */}
<div className="col-12 col-md-6 col-lg-5 d-flex"> <div className="col-12 col-md-6 col-lg-5 d-flex">
<div className="card h-100 w-100 shadow-sm border-0" id="deal-status-summary-card"> <div className="card dashboard-card h-100 w-100" id="deal-status-summary-card">
<div style={{ overflow: "visible" }} className="card-header bg-white border-0 d-flex justify-content-between align-items-center py-3 flex-wrap gap-2"> <div style={{ overflow: "visible" }} className="card-header d-flex justify-content-between align-items-center py-3 flex-wrap gap-2">
<h5 className="mb-0 d-flex align-items-center gap-2 flex-wrap"> <h5 className="mb-0 d-flex align-items-center gap-2 flex-wrap">
<i className="ti ti-chart-pie text-primary flex-shrink-0" /> <i className="ti ti-chart-pie text-primary flex-shrink-0" />
<span className="text-truncate">Deal Status Summary</span> <span className="text-truncate">Deal Status Summary</span>
@ -5551,9 +5581,9 @@ const DealsDashboard = () => {
{/*Sticky Notes*/} {/*Sticky Notes*/}
<div className="row"> <div className="row">
<div className="col-md-6 d-flex"> <div className="col-md-6 d-flex">
<div className="card upcoming-card flex-fill shadow-sm rounded-4 border-0"> <div className="card dashboard-card flex-fill">
{/* Header */} {/* Header */}
<div className="card-header d-flex justify-content-between align-items-center border-0 bg-white py-3"> <div className="card-header d-flex justify-content-between align-items-center">
<h5 className="fw-bold mb-0 d-flex align-items-center gap-2"> <h5 className="fw-bold mb-0 d-flex align-items-center gap-2">
<i className="ti ti-calendar-event text-primary "></i> <i className="ti ti-calendar-event text-primary "></i>
Upcoming Schedule Upcoming Schedule
@ -5588,41 +5618,29 @@ const DealsDashboard = () => {
const start = moment(event.event_start); const start = moment(event.event_start);
const end = moment(event.event_end); const end = moment(event.event_end);
const bgColors = [ const accentColors = [
"#E9EAFE", "#4F46E5",
"#FFF1DA", "#059669",
"#D6F5E8", "#D97706",
"#FFE9E9", "#6366F1",
]; ];
const textColors = [ const color = accentColors[index % accentColors.length];
"#706FE5",
"#F4A700",
"#38B77C",
"#F25C5C",
];
const color = textColors[index % textColors.length];
const bg = bgColors[index % bgColors.length];
return ( return (
<div <div
key={event.id} key={event.id}
className="event-item d-flex justify-content-between align-items-center p-3 mb-2 rounded-4" className="event-item d-flex justify-content-between align-items-center p-3 mb-2 rounded-3"
onMouseEnter={() => setHoveredIndex(index)} onMouseEnter={() => setHoveredIndex(index)}
onMouseLeave={() => setHoveredIndex(null)} onMouseLeave={() => setHoveredIndex(null)}
style={{ style={{
backgroundColor: bg, backgroundColor:
hoveredIndex === index
? "#f9fafb"
: "#ffffff",
cursor: "pointer", cursor: "pointer",
transform: border: "1px solid #e5e7eb",
hoveredIndex === index borderLeft: `4px solid ${color}`,
? "scale(1.015)" transition: "all 0.2s ease",
: "scale(1)",
boxShadow:
hoveredIndex === index
? "0 4px 12px rgba(0,0,0,0.12)"
: "0 1px 4px rgba(0,0,0,0.08)",
transition: "all 0.25s ease",
borderLeft: `5px solid ${color}`,
}} }}
> >
{/* Date Block */} {/* Date Block */}
@ -5720,9 +5738,9 @@ const DealsDashboard = () => {
</div> </div>
<div className="col-md-6 d-flex"> <div className="col-md-6 d-flex">
<div className="card upcoming-card flex-fill shadow-sm rounded-4 border-0"> <div className="card dashboard-card flex-fill">
{/* Header */} {/* Header */}
<div className="card-header d-flex justify-content-between align-items-center border-0 bg-white py-3"> <div className="card-header d-flex justify-content-between align-items-center">
<h5 className="fw-bold mb-0 d-flex align-items-center gap-2"> <h5 className="fw-bold mb-0 d-flex align-items-center gap-2">
<i className="ti ti-checklist text-primary "></i> <i className="ti ti-checklist text-primary "></i>
Recent ToDos Recent ToDos
@ -5752,40 +5770,28 @@ const DealsDashboard = () => {
todos.map((todo, index) => { todos.map((todo, index) => {
const created = moment(todo.created_at); const created = moment(todo.created_at);
const bgColors = [ const accentColors = [
"#E9EAFE", "#4F46E5",
"#FFF1DA", "#059669",
"#D6F5E8", "#D97706",
"#FFE9E9", "#6366F1",
]; ];
const textColors = [ const color = accentColors[index % accentColors.length];
"#706FE5",
"#F4A700",
"#38B77C",
"#F25C5C",
];
const bg = bgColors[index % bgColors.length];
const color = textColors[index % textColors.length];
return ( return (
<div <div
key={todo.todo_id || `todo-${index}`} key={todo.todo_id || `todo-${index}`}
className="p-3 mb-3 rounded-4 shadow-sm" className="p-3 mb-3 rounded-3"
onClick={() => handleOpenTodo(todo)} onClick={() => handleOpenTodo(todo)}
style={{ style={{
backgroundColor: bg, backgroundColor:
hoveredTodo === index
? "#f9fafb"
: "#ffffff",
cursor: "pointer", cursor: "pointer",
transition: "all 0.25s ease", border: "1px solid #e5e7eb",
transform:
hoveredTodo === index
? "scale(1.015)"
: "scale(1)",
boxShadow:
hoveredTodo === index
? "0 4px 12px rgba(0,0,0,0.12)"
: "0 1px 4px rgba(0,0,0,0.06)",
borderLeft: `4px solid ${color}`, borderLeft: `4px solid ${color}`,
transition: "all 0.2s ease",
}} }}
onMouseEnter={() => setHoveredTodo(index)} onMouseEnter={() => setHoveredTodo(index)}
onMouseLeave={() => setHoveredTodo(null)} onMouseLeave={() => setHoveredTodo(null)}
@ -6454,6 +6460,8 @@ const DealsDashboard = () => {
</div> </div>
</div> </div>
</div> </div>
</>
)}
</div> </div>
</div> </div>
{showScrollTop && ( {showScrollTop && (

View file

@ -2884,3 +2884,486 @@ a.dropdown-active-toggle.show,
margin: -8px; margin: -8px;
} }
/* ==================================================================
MINIMAL ENTERPRISE ADMIN DASHBOARD REDESIGN
================================================================== */
:root,
body,
.dashboard-minimal {
--dashboard-bg: #F4F6FB;
--dashboard-card-bg: #FFFFFF;
--dashboard-primary: #69235B;
--dashboard-primary-hover: #531847;
--dashboard-primary-subtle: #F8EBF6;
--dashboard-text: #1E2638;
--dashboard-muted: #7E8B9B;
--dashboard-border: #ECEEF5;
--dashboard-accent-bg: #F8FAFC;
--dashboard-radius: 14px;
background-color: var(--dashboard-bg);
color: var(--dashboard-text);
min-height: 100vh;
box-sizing: border-box;
* {
box-sizing: border-box;
}
/* Compact Header */
.page-header {
margin-bottom: 20px;
padding-bottom: 0;
border-bottom: none;
.dashboard-title,
.page-title {
font-size: 1.375rem;
font-weight: 700;
color: var(--dashboard-text);
letter-spacing: -0.02em;
}
.dashboard-subtitle {
font-size: 0.84rem;
color: var(--dashboard-muted);
margin-top: 2px;
}
}
/* Universal Dashboard Card */
.card,
.dashboard-card {
background-color: var(--dashboard-card-bg);
border: 1px solid var(--dashboard-border);
border-radius: var(--dashboard-radius);
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
min-width: 0;
transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
&:hover {
border-color: #d1d5db;
}
}
.card-header {
background-color: transparent;
border-bottom: 1px solid #f3f4f6;
padding: 14px 18px;
color: var(--dashboard-text);
h4, h5 {
font-size: 0.95rem;
font-weight: 600;
color: var(--dashboard-text);
letter-spacing: -0.01em;
margin-bottom: 0;
i {
color: var(--dashboard-muted);
font-size: 1.1rem;
}
}
}
.card-body {
padding: 18px;
min-width: 0;
}
.card-footer {
background-color: transparent;
border-top: 1px solid #f3f4f6;
padding: 12px 18px;
}
/* KPI Widget Section */
.dashboard-kpi-grid {
display: grid;
grid-template-columns: repeat(4, minmax(0, 1fr));
gap: 16px;
width: 100%;
margin-bottom: 24px;
@media (min-width: 1440px) {
grid-template-columns: repeat(5, minmax(0, 1fr));
}
@media (max-width: 1200px) {
grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 900px) {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (max-width: 520px) {
grid-template-columns: minmax(0, 1fr);
}
> * {
min-width: 0;
}
}
/* Shared White KPI Card */
.dashboard-kpi-card {
background: var(--dashboard-card-bg);
border: 1px solid var(--dashboard-border);
border-radius: var(--dashboard-radius);
padding: 16px 18px;
height: 100%;
min-height: 104px;
display: flex;
flex-direction: column;
justify-content: space-between;
cursor: pointer;
transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
outline: none;
position: relative;
overflow: hidden;
&:hover {
border-color: #cbd5e1;
transform: translateY(-2px);
box-shadow: 0 6px 16px rgba(0, 0, 0, 0.05);
}
&:focus-visible {
border-color: var(--dashboard-primary);
box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}
.kpi-label {
font-size: 0.8125rem;
font-weight: 500;
color: var(--dashboard-muted);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.kpi-icon-badge {
width: 36px;
height: 36px;
border-radius: 8px;
display: flex;
align-items: center;
justify-content: center;
background: var(--dashboard-accent-bg);
color: var(--dashboard-muted);
flex-shrink: 0;
transition: transform 0.2s ease;
svg, i {
font-size: 18px !important;
width: 18px !important;
height: 18px !important;
}
}
&:hover .kpi-icon-badge {
transform: scale(1.06);
}
.kpi-value {
font-size: 1.5rem;
font-weight: 700;
color: var(--dashboard-text);
line-height: 1.2;
letter-spacing: -0.02em;
}
.kpi-percentage {
font-size: 0.75rem;
font-weight: 600;
color: var(--dashboard-muted);
background: var(--dashboard-accent-bg);
border: 1px solid #f1f5f9;
padding: 2px 7px;
border-radius: 6px;
}
/* Subtle semantic accents for icon badges (matching CipherBizz XD) */
&.kpi-accent-success .kpi-icon-badge {
background: #EAF7EE;
color: #16A34A;
}
&.kpi-accent-info .kpi-icon-badge {
background: #E4F6FC;
color: #0284C7;
}
&.kpi-accent-danger .kpi-icon-badge {
background: #FDEBEC;
color: #E11D48;
}
&.kpi-accent-warning .kpi-icon-badge {
background: #FEF6E8;
color: #D97706;
}
&.kpi-accent-peach .kpi-icon-badge {
background: #FDEFEA;
color: #EA580C;
}
&.kpi-accent-primary .kpi-icon-badge,
&.kpi-accent-secondary .kpi-icon-badge {
background: #F8EBF6;
color: #69235B;
}
}
/* Table Modernization */
.table {
--bs-table-bg: transparent;
--bs-table-striped-bg: #fafbfc;
margin-bottom: 0;
thead {
background-color: #f9fafb;
border-bottom: 1px solid var(--dashboard-border);
th {
font-size: 0.75rem;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.04em;
color: var(--dashboard-muted);
padding: 11px 14px;
border-bottom: 1px solid var(--dashboard-border);
white-space: nowrap;
}
}
tbody {
td {
padding: 12px 14px;
font-size: 0.8125rem;
color: var(--dashboard-text);
border-bottom: 1px solid #f1f5f9;
vertical-align: middle;
}
tr {
transition: background-color 0.15s ease;
&:hover td {
background-color: #f9fafb;
}
}
}
}
/* Badges & Pills */
.badge {
font-weight: 500;
letter-spacing: 0.01em;
}
/* Schedule & Todo Items */
.event-item,
.todo-item {
transition: all 0.2s ease;
&:hover {
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05) !important;
transform: translateY(-1px);
}
}
/* Chart controls & toolbars */
.chart-export-btn {
border: 1px solid var(--dashboard-border) !important;
border-radius: 6px !important;
background: #ffffff !important;
color: var(--dashboard-muted) !important;
font-size: 12px !important;
padding: 3px 8px !important;
&:hover {
border-color: #cbd5e1 !important;
color: var(--dashboard-text) !important;
background: #f8fafc !important;
}
}
/* Flexible chart containers & 4-Chart Card Grid */
.apexcharts-canvas,
.recharts-wrapper {
max-width: 100% !important;
}
#monthly-highlights-card,
#leads-by-stage-card,
#product-deal-revenue-card,
#deals-by-source-card {
min-width: 0;
.card-body {
padding: 14px;
display: flex;
flex-direction: column;
justify-content: flex-start;
}
.card-header {
padding: 12px 14px;
}
.apexcharts-canvas,
.recharts-wrapper,
.recharts-surface {
max-width: 100% !important;
}
}
/* Custom Clean Scrollbar */
.event-scroll-wrapper,
.table-responsive {
&::-webkit-scrollbar {
width: 5px;
height: 5px;
}
&::-webkit-scrollbar-track {
background: #f1f5f9;
}
&::-webkit-scrollbar-thumb {
background: #cbd5e1;
border-radius: 4px;
&:hover {
background: #94a3b8;
}
}
}
}
/* ==============================================================
CIPHERBIZZ GLOBAL COLOR THEME OVERRIDES (Adobe XD Prototype)
============================================================== */
:root {
--primary: #69235B;
--bs-primary: #69235B;
--bs-primary-rgb: 105, 35, 91;
--primary-transparent: #F8EBF6;
}
body {
background-color: #F4F6FB !important;
color: #1E2638;
}
/* Primary buttons & elements */
.btn-primary,
.bg-primary {
background-color: #69235B !important;
border-color: #69235B !important;
color: #FFFFFF !important;
&:hover, &:focus, &:active {
background-color: #531847 !important;
border-color: #531847 !important;
}
}
.text-primary {
color: #69235B !important;
}
.border-primary {
border-color: #69235B !important;
}
.badge-primary {
background-color: #69235B !important;
color: #FFFFFF !important;
}
.badge-soft-primary,
.bg-soft-primary {
background-color: #F8EBF6 !important;
color: #69235B !important;
}
/* Sidebar styling to match Adobe XD */
.sidebar {
background-color: #FFFFFF !important;
border-right: 1px solid #ECEEF5 !important;
box-shadow: 0 0 20px rgba(105, 35, 91, 0.03) !important;
.sidebar-menu {
ul {
li {
a {
border-radius: 10px;
color: #556070;
transition: all 0.2s ease;
&:hover {
color: #69235B;
background: #FAF2F9;
}
&.active,
&.subdrop {
background-color: #F8EBF6 !important;
color: #69235B !important;
font-weight: 600;
i, svg {
color: #69235B !important;
}
}
}
&.active > a {
background-color: #F8EBF6 !important;
color: #69235B !important;
font-weight: 600;
i, svg {
color: #69235B !important;
}
}
}
}
.menu-title {
color: #9CA3AF !important;
font-size: 11px !important;
text-transform: uppercase !important;
letter-spacing: 0.05em !important;
font-weight: 700 !important;
}
}
}
/* Top Header styling */
.header {
background-color: #FFFFFF !important;
border-bottom: 1px solid #ECEEF5 !important;
box-shadow: 0 1px 10px rgba(0, 0, 0, 0.02) !important;
.searchinputs {
input {
background-color: #F4F6F9 !important;
border: 1px solid #E5E7EB !important;
border-radius: 50rem !important;
padding-left: 36px !important;
font-size: 13px !important;
color: #1E2638 !important;
&::placeholder {
color: #9CA3AF !important;
}
&:focus {
border-color: #69235B !important;
box-shadow: 0 0 0 3px rgba(105, 35, 91, 0.1) !important;
}
}
}
}

View file

@ -4341,7 +4341,7 @@
get: function get() { get: function get() {
if (!IS_DOM) return; if (!IS_DOM) return;
var container = DOCUMENT.createElement('div'); var container = DOCUMENT.createElement('div');
container.innerHTML = val to={route.estimationList}; container.innerHTML = val;
return container.children; return container.children;
} }
}); });

View file

@ -18,8 +18,8 @@ $font-family-primary: "Noto Sans", sans-serif;
$font-awesome: "Fontawesome"; $font-awesome: "Fontawesome";
// Theme Colors Variables // Theme Colors Variables
$primary: #E41F07; $primary: #69235B;
$primary-hover: darken($primary, 10%); $primary-hover: #531847;
$secondary: #FFA201; $secondary: #FFA201;
$secondary-hover: darken($secondary, 10%); $secondary-hover: darken($secondary, 10%);
$success: #5CB85C; $success: #5CB85C;
@ -38,7 +38,7 @@ $dark-hover: darken($dark, 10%);
$darkmode-hover: #28283D; $darkmode-hover: #28283D;
$dark-input: #1A1A25; $dark-input: #1A1A25;
$dark-bg: #1E1E2D; $dark-bg: #1E1E2D;
$primary-transparent: #FEF1EB; $primary-transparent: #F8EBF6;
$secondary-transparent: #EDF2F4; $secondary-transparent: #EDF2F4;
$success-transparent: #E8FAF0; $success-transparent: #E8FAF0;
$warning-transparent: #FFF9E9; $warning-transparent: #FFF9E9;
@ -55,7 +55,7 @@ $light: #FDFDFE;
$light-hover: darken($light, 10%); $light-hover: darken($light, 10%);
$white: #FFF; $white: #FFF;
$black: #000; $black: #000;
$purple: #4A00E5; $purple: #69235B;
$pink: #EA00B7; $pink: #EA00B7;
$blue: #339DFF; $blue: #339DFF;
$teal: #02a8b5; $teal: #02a8b5;
@ -68,16 +68,16 @@ $indigo-hover: darken($indigo, 10%);
$tertiary: #3C2371; $tertiary: #3C2371;
$yellow: #ffff00; $yellow: #ffff00;
// Primary // Primary (CipherBizz Plum)
$primary-100: #FCE9E6; $primary-100: #F8EBF6;
$primary-200: #FAD2CD; $primary-200: #ECCEE7;
$primary-300: #F7BCB5; $primary-300: #E0B1D8;
$primary-400: #F4A59C; $primary-400: #CE86C2;
$primary-500: #F28F83; $primary-500: #B75CAB;
$primary-600: #EF796A; $primary-600: #9B3D8E;
$primary-700: #EC6251; $primary-700: #812B75;
$primary-800: #E94C39; $primary-800: #69235B;
$primary-900: #E73520; $primary-900: #531847;
// Secondary // Secondary
$secondary-100: #FFF6E6; $secondary-100: #FFF6E6;