diff --git a/backend/app/main.py b/backend/app/main.py index 0dec3b9..6b086a4 100755 --- a/backend/app/main.py +++ b/backend/app/main.py @@ -982,7 +982,7 @@ def parse_fixed_office_template(office_key: str = FIXED_OFFICE_SOURCE_KEY) -> di raise HTTPException(status_code=500, detail=f"Fixed office viewer data not found: {office_key}") html = re.sub( - r'', + r'', f"", html, count=1, @@ -1582,6 +1582,10 @@ def fetch_seat_layout(seat_map_id: int, as_of: datetime | None = None) -> dict[s (as_of, as_of, seat_map_id, as_of, as_of), ) placements = cur.fetchall() + cur.execute("SELECT name FROM member_retirements") + retired_names = {str(row["name"] or "").strip() for row in cur.fetchall() if str(row["name"] or "").strip()} + for member in members: + member["is_retired"] = str(member.get("name") or "").strip() in retired_names viewer_data: dict[str, object] | None = None office_key = str(seat_map.get("source_url") or FIXED_OFFICE_SOURCE_KEY) fixed_office = FIXED_OFFICE_CONFIGS.get(office_key) @@ -1807,6 +1811,8 @@ def build_center_chair_viewer_html(layout: dict[str, object]) -> str: