Commit Graph

26 Commits

Author SHA1 Message Date
giles
ec2a91a401 Add fragment blueprint + sync shared: micro-frontend infrastructure
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 1m2s
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 08:27:50 +00:00
giles
424c267110 Add global all-events view at / and scope page summary to single page
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 53s
Root / shows all upcoming events across all pages with page badges.
/<slug>/ reverted to show only that page's events.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 23:13:14 +00:00
giles
dad53fd1b5 Show all events across all pages with page badges
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 1m1s
Page summary now loads all upcoming events globally, not just the
current page's. Each card shows an amber page badge when the event
belongs to a different page. Links use the correct page slug.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 23:05:11 +00:00
giles
39f500c41c Inline ticket +/- updates without full page refresh
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 58s
Extract shared _ticket_widget.html with stable #page-ticket-{id} target.
Adjust route returns re-rendered widget + OOB cart-mini swap, same
pattern as the entry detail page's ticket adjust.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 22:59:27 +00:00
giles
b8724eaf66 Add page-local ticket adjust route that returns HX-Refresh
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 50s
The cards were posting to tickets.adjust_quantity which returns the
entry detail buy form — wrong context for the page summary. New
page_summary.adjust_ticket route calls the service and returns
HX-Refresh: true so the whole listing refreshes with correct counts.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 22:56:42 +00:00
giles
1dbf8f479e Fix ticket config update returning full page instead of fragment
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 52s
The update_tickets route was rendering index.html (full page) but the
HTMX form targets #entry-tickets with innerHTML swap. Return just the
_tickets.html fragment instead.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 22:48:14 +00:00
giles
e5ab555359 Add village hall page summary with infinite scroll
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 53s
New /<slug>/ route shows upcoming confirmed events across all calendars
for a container. Features list/tile view toggle, date-grouped cards,
ticket +/- cart widgets, and infinite scroll pagination.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 22:28:30 +00:00
giles
8f4d733d12 Tech debt cleanup: update README, fix comments, sync shared submodule
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 50s
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 15:35:58 +00:00
giles
7b642b3430 Widget Phase 2: events app consumes container_nav widgets
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 54s
Day view and entry detail now load and render registered container_nav
widgets (e.g. market links) from the same container page — matching how
blog post pages work. Calendar-domain widgets are skipped since we're
already on a calendar page. Adds /w/<widget_domain>/ paginate route for
infinite scroll support.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 09:14:18 +00:00
giles
446bbf74b4 Inline federation publication for calendar entries
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 53s
Replace emit_event("calendar_entry.created") with direct try_publish().
Update shared submodule.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 07:55:52 +00:00
giles
ef273a7311 Update shared submodule + emit calendar entry events for federation
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 57s
- Emit calendar_entry.created events when entries are added
- Updated shared with federation handlers, delivery, anchoring

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 15:59:59 +00:00
giles
f445d39d22 Fix cart-mini OOB: compute cart_count explicitly in adjust route
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 52s
Pass cart_count directly to the template instead of relying on the
context processor, which may not resolve correctly for the /tickets/
URL prefix.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 09:12:59 +00:00
giles
256eb390b0 Replace ticket qty input with +/- buttons, show sold/basket counts
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 57s
- Entry page shows tickets sold count, remaining, and "in basket" count
- Replace numeric input + Buy button with add-to-basket / +/- controls
- New POST /tickets/adjust/ route creates/cancels tickets to target count
- Keep buy form active after adding (no confirmation replacement)
- New service functions: get_sold_ticket_count, get_user_reserved_count,
  cancel_latest_reserved_ticket

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 08:53:12 +00:00
giles
2527c854cb Replace HTTP API and MarketPlace imports with service calls
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 42s
Calendar entries route now uses services.cart.cart_summary() instead of
internal HTTP API call to cart app. Market CRUD delegates to
services.market.create_marketplace() / soft_delete_marketplace().
Updates shared submodule.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 06:07:20 +00:00
giles
f1b5aeac53 Domain isolation: replace cross-domain imports with service calls
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 55s
Replace direct Post, MarketPlace, Calendar model queries and HTTP API
calls with typed service calls. Events registers all 4 services via
domain_services_fn with has() guards.

Key changes:
- app.py: use domain_services_fn, Post/Calendar/MarketPlace queries
  → services.blog/calendar/market, HTTP cart API → services.cart
- calendars/markets services: Post → services.blog
- post_associations: Post → services.blog, direct queries → services
- markets routes: remove unused MarketPlace import
- glue imports → shared imports throughout

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 04:30:20 +00:00
giles
d2195c0969 Fix cart badge: include calendar entries + OOB update on add
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 50s
- Context processor now sums product + calendar counts from cart API
- add_entry route returns OOB cart-mini swap with correct count,
  querying pending entries from local session (sees uncommitted entry)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 21:49:45 +00:00
giles
b153203fc0 Fix CalendarEntryPost join: add explicit ON clause for polymorphic content_id
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 1m47s
content_id is a loose reference (no FK to posts.id), so SQLAlchemy
cannot infer the join condition automatically.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 21:24:39 +00:00
giles
ba456dca4c Decouple events: use shared.models for all cross-app imports
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 40s
- Replace all imports from blog.models and cart.models
  with shared.models equivalents
- Convert events/models/calendars.py to re-export stub
- Update shared + glue submodule pointers

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 20:58:14 +00:00
giles
fca0950cd1 Add attach/detach glue calls to calendar and market CRUD
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 48s
Wire up ContainerRelation tracking via attach_child/detach_child in:
- calendars: create (including revive), soft_delete
- markets: create (including revive), soft_delete

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 09:52:13 +00:00
giles
154f968296 feat: decouple events from shared_lib, add app-owned models
Phase 1-3 of decoupling:
- path_setup.py adds project root to sys.path
- Events-owned models in events/models/ (calendars with all related models)
- All imports updated: shared.infrastructure, shared.db, shared.browser, etc.
- Calendar uses container_type/container_id instead of post_id FK
- CalendarEntryPost uses content_type/content_id (generic content refs)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 12:46:36 +00:00
giles
e0679f8100 feat: add markets and payments management pages
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 45s
- New markets blueprint at /<slug>/markets/ with create/delete
- New payments blueprint at /<slug>/payments/ with SumUp config
- Register both in events app with context processor for markets
- Remove PageConfig feature flag check from calendar creation
  (feature toggles replaced by direct management pages)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 23:45:07 +00:00
giles
8c1a0240a3 feat: enforce calendar creation only on pages with calendar feature
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 48s
Calendar creation now requires the parent post to be a page (is_page=True)
with the calendar feature enabled in its PageConfig. Update shared_lib
submodule with PageConfig model.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 14:27:39 +00:00
giles
2f4f8b3e36 fix: use **kwargs in calendar admin handlers (slug popped by preprocessor)
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 37s
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 11:14:08 +00:00
giles
6c706703e6 fix: add bp/__init__.py with register_calendars export
Some checks failed
Build and Deploy / build-and-deploy (push) Has been cancelled
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 00:29:02 +00:00
giles
1bab546dfc feat: ticket purchase flow, QR display, and admin check-in
Some checks failed
Build and Deploy / build-and-deploy (push) Has been cancelled
Ticket purchase:
- tickets blueprint with routes for my tickets list, ticket detail with QR
- Buy tickets form on entry detail page (HTMX-powered)
- Ticket services: create, query, availability checking

Admin check-in:
- ticket_admin blueprint with dashboard, lookup, and check-in routes
- QR scanner/lookup interface with real-time search
- Per-entry ticket list view
- Check-in transitions ticket state to checked_in

Internal API:
- GET /internal/events/tickets endpoint for cross-app queries
- POST /internal/events/tickets/<code>/checkin for programmatic check-in

Template fixes:
- All templates updated: blog.post.calendars.* → calendars.*
- Removed slug=post.slug parameters (standalone events service)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 00:00:35 +00:00
giles
3c0fa45f8c feat: initialize events app with calendars, slots, tickets, and internal API
Some checks failed
Build and Deploy / build-and-deploy (push) Has been cancelled
Extract events/calendar functionality into standalone microservice:
- app.py and events_api.py from apps/events/
- Calendar blueprints (calendars, calendar, calendar_entries, calendar_entry, day, slots, slot, ticket_types, ticket_type)
- Templates for all calendar/event views including admin
- Dockerfile (APP_MODULE=app:app, IMAGE=events)
- entrypoint.sh (no Alembic - migrations managed by blog app)
- Gitea CI workflow for build and deploy

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 23:16:32 +00:00