fix(project): keep sidebar on week navigation
This commit is contained in:
@@ -3159,7 +3159,7 @@ def _parse_attendees(text: str, members: list[dict[str, str]]) -> list[dict[str,
|
||||
|
||||
|
||||
@router.get("/goals/{year}/meetings/{month}", response_class=HTMLResponse)
|
||||
def goal_meeting_page(request: Request, year: int, month: int, week: str | None = None) -> HTMLResponse:
|
||||
def goal_meeting_page(request: Request, year: int, month: int, week: str | None = None, content: bool = False) -> HTMLResponse:
|
||||
"""주간 회의록 — 그 달과 겹치는 주(월~일) 탭, 주마다 회의록 하나. 입력은 관리자만(목표 표와 같음)."""
|
||||
from app.main import build_erp_nav, render_template # noqa: WPS433
|
||||
from app.store import has_module, is_admin # noqa: WPS433
|
||||
@@ -3180,7 +3180,7 @@ def goal_meeting_page(request: Request, year: int, month: int, week: str | None
|
||||
sel = None
|
||||
if sel is not None and (sel.year, sel.month) != (year, month):
|
||||
# 다른 달의 주(주는 월요일이 속한 달의 것) — 그 달 회의록 주소로
|
||||
return RedirectResponse(url=f"/project/goals/{sel.year}/meetings/{sel.month}?week={sel.isoformat()}",
|
||||
return RedirectResponse(url=f"/project/goals/{sel.year}/meetings/{sel.month}?week={sel.isoformat()}" + ("&content=1" if content else ""),
|
||||
status_code=303)
|
||||
if sel is None or sel not in [w for w, _ in weeks]:
|
||||
sel = next((w for w, e in weeks if w <= today <= e), weeks[0][0])
|
||||
@@ -3209,6 +3209,7 @@ def goal_meeting_page(request: Request, year: int, month: int, week: str | None
|
||||
"project_icons": list(store.PROJECT_ICONS),
|
||||
"goal_year": year,
|
||||
"goal_month": month,
|
||||
"meeting_embedded": content,
|
||||
"meetings_enabled": enabled,
|
||||
"weeks": [{"start": w.isoformat(), "end": e.isoformat(), "n": i + 1, "label": f"{w.month}/{w.day}~{e.month}/{e.day}",
|
||||
"has": w.isoformat() in existing, "now": w <= today <= e,
|
||||
|
||||
Reference in New Issue
Block a user