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
+25 -1
View File
@@ -120,7 +120,8 @@ export const api = {
remove: (id: number) => request<{ ok: boolean }>(`/appointments/${id}`, { method: "DELETE" }),
},
dashboard: {
overview: () => request<DashboardOverview>("/dashboard/overview"),
overview: (range?: number) =>
request<DashboardOverview>(`/dashboard/overview${range ? `?range=${range}` : ""}`),
bestEmployees: (range = "30") => request<{ employees: RankedEmployee[] }>(`/dashboard/best-employees?range=${range}`),
bestServices: (range = "30") => request<{ services: RankedService[] }>(`/dashboard/best-services?range=${range}`),
topTickets: (range = "30", limit = 8) =>
@@ -135,6 +136,29 @@ export const api = {
tickets: (limit = 50) => request<{ tickets: Ticket[] }>(`/dashboard/tickets?limit=${limit}`),
commissions: (range = "30") => request<{ rows: any[]; total: number }>(`/dashboard/commissions?range=${range}`),
},
me: {
performance: () =>
request<{
appointments_today: number;
upcoming: number;
revenue_30d: number;
avg_rating: number;
share_pct: number;
next_appointment: { start_at: string; service_name: string; client_name: string } | null;
}>("/me/performance"),
commissions: () =>
request<{
rows: {
appointment_id: number | null;
service_name: string;
client_name: string;
amount: number;
commission: number;
created_at: string;
}[];
total: number;
}>("/me/commissions"),
},
settings: {
get: () => request<{ settings: any }>("/settings"),
update: (data: any) => request<{ settings: any }>("/settings", { method: "PATCH", body: JSON.stringify(data) }),
+3 -14
View File
@@ -1,3 +1,6 @@
import type { BookResponse } from "../../shared/types";
export type { BookResponse };
const BASE = "/api/public";
export interface PublicBusiness {
@@ -64,20 +67,6 @@ export interface BookPayload {
client: BookClient;
}
export interface BookResponse {
appointment: {
id: number;
start_at: string;
price: number;
service_name: string;
employee_id: number;
employee_name: string;
reasons: string[];
};
business: { name: string; currency_symbol: string };
client_created: boolean;
}
async function request<T>(path: string, init?: RequestInit): Promise<T> {
const res = await fetch(`${BASE}${path}`, {
...init,