From b6c9d71107f9f8b37bdcb1ac41c0001cba8b70e3 Mon Sep 17 00:00:00 2001 From: Shivangi Gupta Date: Tue, 7 Jul 2026 15:21:38 +0530 Subject: [PATCH 1/2] feat(analytics): add stale inventory and profit forecast dashboard --- app/blocks/__global/app-sidebar.tsx | 53 +++++---- .../analytics/ProfitForecast.module.css | 65 +++++++++++ app/blocks/analytics/ProfitForecast.tsx | 53 +++++++++ .../analytics/StaleInventoryCard.module.css | 109 +++++++++++++++++ app/blocks/analytics/StaleInventoryCard.tsx | 47 ++++++++ app/routes.ts | 9 +- app/routes/analytics.module.css | 5 + app/routes/analytics.tsx | 110 ++++++++++++++++++ 8 files changed, 427 insertions(+), 24 deletions(-) create mode 100644 app/blocks/analytics/ProfitForecast.module.css create mode 100644 app/blocks/analytics/ProfitForecast.tsx create mode 100644 app/blocks/analytics/StaleInventoryCard.module.css create mode 100644 app/blocks/analytics/StaleInventoryCard.tsx create mode 100644 app/routes/analytics.module.css create mode 100644 app/routes/analytics.tsx diff --git a/app/blocks/__global/app-sidebar.tsx b/app/blocks/__global/app-sidebar.tsx index b707289..c06b563 100644 --- a/app/blocks/__global/app-sidebar.tsx +++ b/app/blocks/__global/app-sidebar.tsx @@ -1,13 +1,14 @@ import { Link, NavLink, useSubmit } from "react-router"; -import { - IconDashboard, - IconBox, - IconChartLine, - IconReceipt, - IconWallet, - IconBrain, +import { + IconDashboard, + IconBox, + IconChartLine, + IconReceipt, + IconWallet, + IconBrain, IconSettings, - IconLogout + IconLogout, + IconTrendingUp, } from "@tabler/icons-react"; import styles from "./app-sidebar.module.css"; @@ -33,9 +34,9 @@ export function AppSidebar({ user }: Props) { { to: "/app/sales", label: "Sales Log", icon: }, { to: "/app/expenses", label: "Expenses", icon: }, { to: "/app/ai-insights", label: "AI Insights", icon: }, + { to: "/app/analytics", label: "Analytics", icon: }, { to: "/app/settings", label: "Settings", icon: }, ]; - return (