fix(project): 프로젝트 화면 500 — 새 컨텍스트 변수가 엉뚱한 함수에 들어감
직전 커밋에서 두 값이 홈 화면 쪽에 들어가 프로젝트 화면이 터졌다. - router.py: my_open_total / mention_unread 를 index() 가 아니라 이 값들을 실제로 템플릿에 넘기는 project_page() 에서 계산하도록 이동 (project_page 가 NameError → Internal Server Error). - project.js: refreshMyTasksBadge() 호출이 홈의 syncMyTaskPanel 에 들어가 있었다. 이 함수는 initProject 스코프라 홈에서 부르면 ReferenceError — 프로젝트 화면의 syncProjectMyTaskPanel 로 옮겼다. 둘 다 같은 원인: 두 함수에 똑같이 생긴 코드 줄이 있어 치환이 첫 번째(홈)에 걸렸다. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -485,8 +485,6 @@ async def index(request: Request) -> HTMLResponse:
|
||||
t["due_label"] = _fmt_date_kr(t.get("due_date"))
|
||||
# 내 업무를 프로젝트별로 묶어 트리로 표시(전체/진행/완료 개수 포함)
|
||||
my_projects = _group_my_tasks(my_tasks)
|
||||
my_open_total = sum(g["open"] for g in my_projects)
|
||||
mention_unread = _safe_mention_unread(st, user["email"])
|
||||
|
||||
# 홈 화면 카드/내업무에 노출된 업무 전체(id→업무) — 클릭 시 페이지 이동 없이
|
||||
# 팝업으로 편집하기 위해 필요한 원본 데이터를 그대로 클라이언트에 넘긴다.
|
||||
@@ -614,6 +612,8 @@ async def project_page(request: Request, project_id: int) -> HTMLResponse:
|
||||
t["start_label"] = _fmt_date_kr(t.get("start_date"))
|
||||
t["due_label"] = _fmt_date_kr(t.get("due_date"))
|
||||
my_projects = _group_my_tasks(my_tasks)
|
||||
my_open_total = sum(g["open"] for g in my_projects)
|
||||
mention_unread = _safe_mention_unread(st, user["email"])
|
||||
|
||||
# 달력(휴가식 월간 그리드) — ?y=&m= 로 월 이동, 기본 이번 달
|
||||
today = today_kst()
|
||||
|
||||
@@ -1195,7 +1195,6 @@
|
||||
if (cmt) cmt.wireBadge(newLi.querySelector(".pj-cmt-badge"));
|
||||
if (existingLi) existingLi.replaceWith(newLi); else group.appendChild(newLi);
|
||||
updateMyTreeCounts(groupEl);
|
||||
refreshMyTasksBadge();
|
||||
}
|
||||
|
||||
|
||||
@@ -1788,6 +1787,7 @@
|
||||
if (cmt) cmt.wireBadge(newLi.querySelector(".pj-cmt-badge"));
|
||||
if (existingLi) existingLi.replaceWith(newLi); else group.appendChild(newLi);
|
||||
updateMyTreeCounts(groupEl);
|
||||
refreshMyTasksBadge();
|
||||
}
|
||||
// 내 업무 항목 우클릭 메뉴 — 열기(프로젝트 페이지로 이동)/업무 추가/수정
|
||||
// (팝업 편집)/완료토글/삭제. "업무 추가"는 현재 열려 있는 프로젝트로만
|
||||
|
||||
Reference in New Issue
Block a user