Refine events + sx sub-module imports from background agents

Events: route imports now point to specific sub-modules (entries,
tickets, slots) instead of all going through renders.py. Merged
layouts into helpers.py. __init__.py now 20 lines.

SX Docs: moved dispatchers from helpers.py into essays.py, cleaned
up __init__.py to 24 lines.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-04 17:13:45 +00:00
parent 5344b382a5
commit ad6a8ecb17
18 changed files with 446 additions and 168 deletions

View File

@@ -110,20 +110,20 @@ def register():
# Success → re-render the slots table
slots = await svc_list_slots(g.s, g.calendar.id)
from sxc.pages.renders import render_slots_table
from sxc.pages.slots import render_slots_table
return sx_response(await render_slots_table(slots, g.calendar))
@bp.get("/add")
@require_admin
async def add_form(**kwargs):
from sxc.pages.renders import render_slot_add_form
from sxc.pages.slots import render_slot_add_form
return sx_response(await render_slot_add_form(g.calendar))
@bp.get("/add-button")
@require_admin
async def add_button(**kwargs):
from sxc.pages.renders import render_slot_add_button
from sxc.pages.slots import render_slot_add_button
return sx_response(await render_slot_add_button(g.calendar))
return bp