feat(ui): booking redesign + auto-assign settings + specialist fields

Dynamic 3/4-step wizard (omits specialist step when auto-assign on), always-visible MonthCalendar, 2-column desktop layout with morning/afternoon slot grouping, confirmation reasons badges. Settings: auto-assign checkbox + business working-hours editor. Employee modal: specialties, efficiency, per-employee working hours. Fix icon/placeholder overlap app-wide via @layer components + pl-10.
This commit is contained in:
AgendaPro Dev
2026-07-26 15:59:41 -06:00
parent ed608656e0
commit 5410e27c89
7 changed files with 481 additions and 88 deletions
+4 -1
View File
@@ -12,6 +12,7 @@ export interface PublicBusiness {
cancel_penalty_pct: number;
require_deposit: boolean;
deposit_pct: number;
auto_assign_specialist: number | boolean;
}
export interface PublicService {
@@ -58,7 +59,7 @@ export interface BookClient {
export interface BookPayload {
service_id: number;
employee_id: number;
employee_id?: number;
start_at: string;
client: BookClient;
}
@@ -69,7 +70,9 @@ export interface BookResponse {
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;
+17
View File
@@ -0,0 +1,17 @@
export const DEFAULT_WH: Record<number, { start: string; end: string } | null> = {
1: { start: "09:00", end: "20:00" }, 2: { start: "09:00", end: "20:00" },
3: { start: "09:00", end: "20:00" }, 4: { start: "09:00", end: "20:00" },
5: { start: "09:00", end: "20:00" }, 6: null, 7: null,
};
export const DAYS = [
{ n: 1, label: "Lunes" }, { n: 2, label: "Martes" }, { n: 3, label: "Miércoles" },
{ n: 4, label: "Jueves" }, { n: 5, label: "Viernes" }, { n: 6, label: "Sábado" }, { n: 7, label: "Domingo" },
];
export function parseWh(v: any): Record<number, { start: string; end: string } | null> {
let obj = v;
if (typeof v === "string") { try { obj = JSON.parse(v); } catch { obj = null; } }
if (!obj || typeof obj !== "object") return { ...DEFAULT_WH };
const out: Record<number, any> = {};
for (let d = 1; d <= 7; d++) out[d] = obj[String(d)] ?? null;
return out;
}