Files
AgendaPro/.superpowers/sdd/task-9-report.md
T
AgendaPro Dev d796538fd9 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)
2026-07-27 10:11:16 -06:00

65 lines
2.3 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 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 reading `PublicBusiness` is `BookingPage.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 type `PublicBusiness` in the codebase (they come from `request<PublicBusinessResponse>`).
- `BookPayload.employee_id` made optional → strictly loosening; existing callers passing `employee_id` still typecheck.
- `BookResponse.appointment` widened with `employee_id`/`reasons` → existing readers of `employee_name` still work; new readers will be added in Task 12.
No consumer errors observed.
## Interface diffs (verbatim from plan)
### 1. `PublicBusiness` — added `auto_assign_specialist`
```diff
require_deposit: boolean;
deposit_pct: number;
+ auto_assign_specialist: number | boolean;
}
```
### 2. `BookPayload` — `employee_id` now optional
```diff
export interface BookPayload {
service_id: number;
- employee_id: number;
+ employee_id?: number;
start_at: string;
client: BookClient;
}
```
### 3. `BookResponse.appointment` — added `employee_id` + `reasons`
```diff
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 1112.)
## Concerns
None. Ready for Tasks 1012 to consume these new types.