feat: rebrand AgendaPro -> AgendaMax + calendar fixes + current-week demo seed

- Rebrand all user-facing text to AgendaMax
- Fix sidebar scrolling: card container no longer overflows html (flex h-full min-h-0)
- Fix calendar toolbar hover: active buttons keep readable contrast
- Sticky calendar toolbar (month/week/day always visible on scroll)
- Seed guarantees 2-4 appointments per day for current week (Mon-Sat)
This commit is contained in:
AgendaPro Dev
2026-07-27 10:11:16 -06:00
parent 4227db0c8b
commit d796538fd9
57 changed files with 2477 additions and 322 deletions
+17 -9
View File
@@ -24,6 +24,7 @@ import {
Flame,
Trophy,
Coins,
Wallet,
} from "lucide-react";
import { api } from "../lib/api";
import { useAuth } from "../lib/auth";
@@ -50,8 +51,8 @@ export function DashboardPage() {
const symbol = business?.currency_symbol ?? "$";
const { data: overview, isLoading: ovLoading } = useQuery({
queryKey: ["dashboard", "overview"],
queryFn: () => api.dashboard.overview(),
queryKey: ["dashboard", "overview", range],
queryFn: () => api.dashboard.overview(Number(range)),
});
const { data: emp } = useQuery({
queryKey: ["dashboard", "best-employees", range],
@@ -118,13 +119,20 @@ export function DashboardPage() {
<div className="flex-1 space-y-5 px-5 py-5 sm:px-7">
{/* KPIs */}
<div className="grid grid-cols-1 gap-3 sm:grid-cols-2 xl:grid-cols-4">
<div className="grid grid-cols-1 gap-3 sm:grid-cols-2 xl:grid-cols-5">
<KpiCard
title="Ingresos de hoy"
value={ovLoading ? "…" : formatCurrency(overview?.revenue_today ?? 0, symbol)}
sub="día de hoy"
icon={Wallet}
color="#10b981"
/>
<KpiCard
title="Ingresos del período"
value={ovLoading ? "…" : formatCurrency(overview?.revenue_month ?? 0, symbol)}
sub="últimos 30 días"
value={ovLoading ? "…" : formatCurrency(overview?.revenue_range ?? 0, symbol)}
sub={`últimos ${range} días`}
delta={overview?.revenue_change_pct}
deltaSuffix="% vs mes anterior"
deltaSuffix="% vs período anterior"
icon={DollarSign}
color="#3b66ff"
/>
@@ -133,7 +141,7 @@ export function DashboardPage() {
value={ovLoading ? "…" : formatNumber(overview?.appts_upcoming ?? 0)}
sub="próximas"
icon={CalendarCheck}
color="#10b981"
color="#6366f1"
/>
<KpiCard
title="Ticket promedio"
@@ -143,8 +151,8 @@ export function DashboardPage() {
color="#a855f7"
/>
<KpiCard
title="Ocupación"
value={ovLoading ? "…" : `${overview?.occupancy_pct ?? 0}%`}
title="Finalización"
value={ovLoading ? "…" : `${overview?.completion_pct ?? 0}%`}
sub={`${overview?.cancel_rate ?? 0}% cancelación`}
icon={Flame}
color="#f17616"