feat(project): 완료 프로젝트를 "완료 프로젝트" 별도 섹션으로 다시 분류
같은 그리드 안에서 끝으로만 보내던 것을 되돌려, 진행중/완료를 다시 분리된 섹션(그리드)으로 나눔. 완료 체크 시 카드가 "완료 프로젝트" 섹션으로 옮겨지고(반투명은 기존 .is-done 유지), 해제하면 "진행중인 프로젝트"로 복귀 — 각 섹션 안에서는 sort_order 기준 정렬 유지. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -389,11 +389,10 @@ async def index(request: Request) -> HTMLResponse:
|
||||
member_email=None if admin else user["email"],
|
||||
)
|
||||
tree = _build_tree(projects)
|
||||
# 완료 프로젝트는 별도 섹션 대신, 같은 대시보드 안에서 반투명 + 맨
|
||||
# 끝으로만 보낸다(세션 완료 처리와 같은 원칙). sorted() 는 안정 정렬이라
|
||||
# tree 가 이미 sort_order 순이면 완료 여부로만 다시 나눠도 각 그룹
|
||||
# 내부 순서는 그대로 유지된다 — 완료 해제 시 원래 자리로 자동 복귀.
|
||||
home_projects = sorted(tree, key=lambda p: p.get("status") == "completed")
|
||||
# 진행중/완료 프로젝트를 별도 섹션으로 분류. list_projects 가 이미
|
||||
# sort_order 순으로 내려주므로 필터링만 해도 각 섹션 내부 순서는 그대로.
|
||||
active_projects = [p for p in tree if p.get("status") != "completed"]
|
||||
done_projects = [p for p in tree if p.get("status") == "completed"]
|
||||
|
||||
# 아바타 맵: 이메일(소문자) → 구글 프로필 이미지 URL (홈 카드 업무 담당자 표시용)
|
||||
from app.main import user_store # noqa: WPS433
|
||||
@@ -475,7 +474,8 @@ async def index(request: Request) -> HTMLResponse:
|
||||
"page_title": "프로젝트 관리",
|
||||
"page_subtitle": "달력·타임라인·보드로 프로젝트를 관리하세요.",
|
||||
"force_sidebar_collapsed": True,
|
||||
"home_projects": home_projects,
|
||||
"active_projects": active_projects,
|
||||
"done_projects": done_projects,
|
||||
"my_projects": my_projects,
|
||||
"avatars": avatars,
|
||||
"home_tasks": home_tasks,
|
||||
|
||||
Reference in New Issue
Block a user