feat(admin-portal): port babyboo's date picker and calendar
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
This commit is contained in:
1 parent
1fa7c60fee
commit
c908fbe9fc
13 files changed
+443
-9
No files matched your search
@@ -7,12 +7,13 @@ Lead capture (change 4) records every lead against an event, so staff need to cr
|
||||
## 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-api` gains `/api/admin/events`**: list, get, create and update, guarded by a new `BO_EVENTS` module. They call the existing `services-counter` event endpoints (`findByPropertyAndPageable`, `findByUuid`, `save`); `services-counter` and its schema do not change.
|
||||
- **`mobile-api` gains `/api/admin/events`**: list, get, create and update, guarded by a new `BO_EVENTS` module. They call the existing `services-counter` event endpoints (`findByPropertyAndPageable`, `findByUuid`, `save`); the `event` table 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-counter` table `event_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 to `service-system`.`module`; SQL in this change folder, mirrored in `local/seed/`.
|
||||
- **Date picker**: the portal forbids native date inputs (an existing test), so babyboo's `DatePicker` and `Calendar` components are ported, adding `react-day-picker` and `date-fns`. Change 4 reuses them for the follow-up date.
|
||||
- **Date picker**: the portal forbids native date inputs (an existing test), so babyboo's `DatePicker` and `Calendar` components are ported, adding `react-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`).
|
||||
|
||||
@@ -26,8 +27,9 @@ None.
|
||||
|
||||
## Impact
|
||||
|
||||
- `solvway-admin-portal`: new `app/events/**` pages, `app/api/events/**` route handlers, an events service, the ported date picker and calendar, `/events` in the route-module map. New dependencies `react-day-picker` and `date-fns`.
|
||||
- `solvway-admin-portal`: new `app/events/**` pages, `app/api/events/**` route handlers, an events service, the ported date picker and calendar, `/events` in the route-module map. New dependency `react-day-picker`.
|
||||
- `solvway-mobile-api`: new `AdminEventController`, `AdminEventService`, DTOs and counter endpoint constants.
|
||||
- Database `service-system`: one new `module` row. Additive only.
|
||||
- `local/seed/03-colite.sql`: mirrors the module row.
|
||||
- No change to `services-counter`, the gateway, or the `event` table.
|
||||
- `solvway-services-counter`: `EventSalesperson` entity and team endpoints.
|
||||
- Database: new table `service-counter`.`event_salesperson` and one new `service-system`.`module` row. Additive only.
|
||||
- `local/seed/03-colite.sql`: mirrors both.
|
||||
- No change to the gateway or the `event` table.
|
||||
Reference in new issue
Block a user