Commit 7239ae7
committed
feat: fix config crash, add global tenant switcher, and schema-driven config forms
- Fix Application error: listModules() was calling .map() on { data: [...] } object
Updated ModuleSummary interface and listModules() return type to ListModulesResponse
- Add global TenantContext with localStorage persistence across page refreshes
- Add tenant switcher dropdown in header: shows active tenant (Acme Corp / acme-corp),
search, avatar initials, and persists selection — switching it updates all pages
- Build schema-driven config form renderer using x-ui hints from the API schema:
* toggle for booleans (autoConfirm)
* visual slider with numeric input for bounded integers (slotDurationMinutes, bufferMinutes)
* number input for unbounded integers (maxBookingsPerDay, advanceBookingDays)
* nested collapsible section for objects (cancellationPolicy)
- Config page: Form/JSON view toggle, module pill buttons, tenant context sync
- Tenant config page: same schema form treatment
- Bookings/Keys pages auto-select tenant from global context on mount
- Sidebar: updated to better icons (KeyRound, CalendarCheck2, SlidersHorizontal, Plug2)1 parent 37f16f0 commit 7239ae7
12 files changed
Lines changed: 1095 additions & 251 deletions
File tree
- apps/management-ui
- app
- bookings
- config
- integrations
- keys
- tenants/[id]/config
- components
- config
- layout
- lib
- api
- context
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
62 | 63 | | |
63 | 64 | | |
64 | 65 | | |
65 | | - | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
66 | 72 | | |
67 | 73 | | |
68 | 74 | | |
| |||
0 commit comments