Adds react-day-picker 10.0.1 (it brings date-fns). The portal bans native date inputs, and the events and leads forms need a date field. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EFUzfj5akPxyikzGc2iAHM
3.0 KiB
3.0 KiB
Proposal
Why
Lead capture (change 4) records every lead against an event, so staff need to create and maintain events before go-live. Tastefully's event screens live in the Thymeleaf backoffice, which Co-Lite never deploys, and mobile-api only reads the current event. This change adds an Events screen to the admin portal. See docs/superpowers/specs/2026-11-26-co-lite-foundation-and-leads-design.md (Admin portal, screen 4).
What Changes
- Admin portal Events screens: a paged list (search by name, filter by enabled), a create page and an edit page. Desktop-first, like Users and Roles.
mobile-apigains/api/admin/events: list, get, create and update, guarded by a newBO_EVENTSmodule. They call the existingservices-counterevent endpoints (findByPropertyAndPageable,findByUuid,save); theeventtable does not change.- Event fields kept from Tastefully: name, location, start date, end date, enabled. Tastefully's backoffice rules carry over: name and location required, both dates required, end date not before start date, dates are whole days, new events start enabled.
- Event team: each event has a team of salespeople (active admin users), chosen on create and edit and stored in a new
services-countertableevent_salesperson. Change 4 limits a lead's salesperson to the event's team. - Not kept: the four Tastefully upload fields (floor plan, stage activities, lucky draw, taste rewards). Their columns stay in the table and are left untouched on update.
- No delete, as in Tastefully. Leads will reference events, so an event is disabled instead.
- Back-office module
BO_EVENTS(/events) added toservice-system.module; SQL in this change folder, mirrored inlocal/seed/. - Date picker: the portal forbids native date inputs (an existing test), so babyboo's
DatePickerandCalendarcomponents are ported, addingreact-day-picker. Change 4 reuses them for the follow-up date.
Not in this change: event booths, products, receipts, lucky draw and the other Tastefully event sub-screens; event company scoping (the design keeps user as the only existing table that gains company_id).
Capabilities
New Capabilities
admin-events: managing events in the admin portal (list, search, create, edit, enable and disable) and the rules an event must satisfy.
Modified Capabilities
None.
Impact
solvway-admin-portal: newapp/events/**pages,app/api/events/**route handlers, an events service, the ported date picker and calendar,/eventsin the route-module map. New dependencyreact-day-picker.solvway-mobile-api: newAdminEventController,AdminEventService, DTOs and counter endpoint constants.solvway-services-counter:EventSalespersonentity and team endpoints.- Database: new table
service-counter.event_salespersonand one newservice-system.modulerow. Additive only. local/seed/03-colite.sql: mirrors both.- No change to the gateway or the
eventtable.