Delete events sx_components.py — move all rendering to sxc/pages
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 49s

Phase 7 of the zero-Python-rendering plan. All 100 rendering functions
move from events/sx/sx_components.py into events/sxc/pages/__init__.py.
Route handlers (15 files) import from sxc.pages instead.
load_service_components call moves into _load_events_page_files.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-04 11:16:59 +00:00
parent 31a8b755d9
commit 7419ecf3c0
18 changed files with 3242 additions and 3328 deletions

View File

@@ -35,7 +35,7 @@ def register():
slot = await svc_get_slot(g.s, slot_id)
if not slot:
return await make_response("Not found", 404)
from sx.sx_components import render_slot_edit_form
from sxc.pages import render_slot_edit_form
return sx_response(await render_slot_edit_form(slot, g.calendar))
@bp.get("/view/")
@@ -44,7 +44,7 @@ def register():
slot = await svc_get_slot(g.s, slot_id)
if not slot:
return await make_response("Not found", 404)
from sx.sx_components import render_slot_main_panel
from sxc.pages import render_slot_main_panel
return sx_response(await render_slot_main_panel(slot, g.calendar))
@bp.delete("/")
@@ -53,7 +53,7 @@ def register():
async def slot_delete(slot_id: int, **kwargs):
await svc_delete_slot(g.s, slot_id)
slots = await svc_list_slots(g.s, g.calendar.id)
from sx.sx_components import render_slots_table
from sxc.pages import render_slots_table
return sx_response(await render_slots_table(slots, g.calendar))
@bp.put("/")
@@ -135,7 +135,7 @@ def register():
}
), 422
from sx.sx_components import render_slot_main_panel
from sxc.pages import render_slot_main_panel
return sx_response(await render_slot_main_panel(slot, g.calendar, oob=True))