diff --git a/app/modules/project/router.py b/app/modules/project/router.py index b4d8def..b372577 100644 --- a/app/modules/project/router.py +++ b/app/modules/project/router.py @@ -319,6 +319,8 @@ async def index(request: Request) -> HTMLResponse: include_archived=False, member_email=None if admin else user["email"], ) + # 완료된 프로젝트는 비활성으로 맨 끝에 (홈 카드 정렬). 안정 정렬. + projects = sorted(projects, key=lambda p: 1 if p.get("status") == "completed" else 0) tree = _build_tree(projects) my_tasks = st.list_tasks(assignee_email=user["email"], limit=500) # 내 업무를 프로젝트별로 묶어 트리로 표시 diff --git a/app/modules/project/store.py b/app/modules/project/store.py index ff398f4..7abf8b5 100644 --- a/app/modules/project/store.py +++ b/app/modules/project/store.py @@ -22,7 +22,7 @@ PRIORITIES: tuple[str, ...] = ("low", "normal", "high") PRIORITY_LABELS: dict[str, str] = {"low": "낮음", "normal": "보통", "high": "높음"} # 프로젝트 상태 -PROJECT_STATUSES: tuple[str, ...] = ("active", "archived") +PROJECT_STATUSES: tuple[str, ...] = ("active", "completed", "archived") # 멤버 역할 MEMBER_ROLES: tuple[str, ...] = ("manager", "member") diff --git a/app/modules/project/templates/project/index.html b/app/modules/project/templates/project/index.html index bd97bde..c568f78 100644 --- a/app/modules/project/templates/project/index.html +++ b/app/modules/project/templates/project/index.html @@ -1,7 +1,7 @@ {% extends "erp_base.html" %} {% block head_extra %} - + {% endblock %} @@ -14,6 +14,12 @@