feat: add per-event badge editor, pretix company import, smart guides
Badge Designer (admin): per-event WYSIWYG badge/PDF layout editor with mm canvas, text/QR/image elements, multi-select, Word+PowerPoint alignment, PowerPoint-style smart guides with snapping, Delete-key, preview and JSON views. Migration 20261015194531_badge_editor (badge_layouts + admin-only save/set-default/delete RPCs). Company import: migration 20261015200719_events_company adds events.company; the sidecar pretix sync now fetches the organizer display name and stores it (best-effort). Bindable on badges as Company/organizer. Tests: 15 SQL rollback assertions + 13 mocked browser tests. Docs synced. Co-authored-by: Stephan Charles <[email protected]> Co-authored-by: Amelia Hernandez <[email protected]> Co-authored-by: Markus Franz <[email protected]> Co-authored-by: Sabrina Hota <[email protected]> Co-authored-by: Nilüfer Doğan <[email protected]>
This commit is contained in:
1 parent
4ec03410ff
commit
5cb67afb5e
16 files changed
+1914
-9
No files matched your search
@@ -1,3 +1,29 @@
|
||||
# Badge Editor Regression
|
||||
|
||||
After applying `20261015194531_badge_editor`, run:
|
||||
|
||||
```sh
|
||||
docker exec -i supabase_db_Convivo psql -X -U postgres -d postgres \
|
||||
-v ON_ERROR_STOP=1 < supabase/tests/badge_layout_tests.sql
|
||||
CONVIVO_ADMIN_URL=http://127.0.0.1:3001 npm test --prefix e2e -- badge-editor.spec.ts --project=chromium
|
||||
```
|
||||
|
||||
The SQL fixture is rollback-only: fifteen assertions cover creating a default
|
||||
layout, upserting the same `(event_id, name)` in place, the one-default-per-event
|
||||
invariant when a new default is saved, per-event scoping, `set_default`
|
||||
promote/demote, refusing to delete the default while other layouts exist,
|
||||
deleting a non-default layout, rejecting blank names, and admin/non-admin/anon
|
||||
authorization (the non-admin read check runs as the real `authenticated` role so
|
||||
RLS is enforced). The browser suite is API-mocked and covers loading the default
|
||||
layout onto the millimetre canvas with a bound attendee name, adding/selecting a
|
||||
text element and its handles, editing `x` to move an element, saving via
|
||||
`save_badge_layout`, preview mode hiding the handles, the JSON view, a failed
|
||||
save, the mobile layout, the **Delete key** removing the selection, binding the
|
||||
**company / organizer** field, **align-centre** on the page, and **Shift-click
|
||||
multi-select** for group alignment. No real attendee data changes.
|
||||
|
||||
See [RPC rules](./rpcs.md#badge-editor) and the [Badges view](../frontend/admin-app.md).
|
||||
|
||||
# Raffle Regression
|
||||
|
||||
After applying `20261015180640_raffle`, run:
|
||||
|
||||
Reference in new issue
Block a user