- 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)
2.3 KiB
2.3 KiB
Task 9 Report — publicApi.ts tipos actualizados
Status
✅ DONE — typecheck passes with 0 errors.
File changed
src/lib/publicApi.ts(only this file; no consumers touched)
Typecheck result
$ npm run typecheck
> [email protected] typecheck
> tsc -b --noEmit
0 errors. The changes are additive/loosening, so no consumer breakage:
PublicBusiness.auto_assign_specialist(added required field) is safe — the only consumer readingPublicBusinessisBookingPage.tsx, which does not yet destructure this field (it'll be added in Task 12). Adding a required field to an interface does not error on existing readers; it only errors on object literals that lack it, and there are no literals of typePublicBusinessin the codebase (they come fromrequest<PublicBusinessResponse>).BookPayload.employee_idmade optional → strictly loosening; existing callers passingemployee_idstill typecheck.BookResponse.appointmentwidened withemployee_id/reasons→ existing readers ofemployee_namestill work; new readers will be added in Task 12.
No consumer errors observed.
Interface diffs (verbatim from plan)
1. PublicBusiness — added auto_assign_specialist
require_deposit: boolean;
deposit_pct: number;
+ auto_assign_specialist: number | boolean;
}
2. BookPayload — employee_id now optional
export interface BookPayload {
service_id: number;
- employee_id: number;
+ employee_id?: number;
start_at: string;
client: BookClient;
}
3. BookResponse.appointment — added employee_id + reasons
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;
}
Consumer errors
None. (Plan's Step 2 note had anticipated possible errors in BookingPage.tsx, but none materialized — the optional employee_id and the widened BookResponse are backward-compatible with the current consumer code, which will be properly updated in Tasks 11–12.)
Concerns
None. Ready for Tasks 10–12 to consume these new types.