feat(project): 홈 화면 폐지 → 내 업무 화면 · 하위 업무 전체폭/완료 체크

- /project/ 가 프로젝트 홈(카드 그리드) 대신 "내 업무" 화면이 된다
  (project/mytasks.html). 내가 담당자인 업무를 한 표에 모아 보여준다 —
  완료 체크박스 · 업무 · 프로젝트 · 세션 · 우선순위 · 시작 · 마감,
  헤더 클릭 정렬, 진행중/완료/전체 필터, 진행·완료·지연 요약.
  체크박스로 그 자리에서 완료 토글, 행을 누르면 그 프로젝트로 이동하며
  업무 편집 팝업(?task=), 우클릭은 열기/완료/삭제.
- 좌측 "내 업무"는 접이식 패널을 없애고 이 화면으로 가는 링크로 바꿨다.
- 좌측 사이드바를 project/_side.html 로 뽑아 두 화면이 공용으로 쓴다.
- 홈 전용 코드 삭제: templates/project/index.html, project.js 의
  initHome/wireProjectGridDrag/updateMyTreeCounts/wireMyTreeToggles(약 900줄),
  router 의 홈 카드 집계와 _group_my_tasks, project.css 의 홈 카드/내 업무
  트리 스타일. 새 프로젝트 모달은 두 화면이 쓰도록 initNewProjectModal 로
  분리했다.
- 업무 편집 팝업: 하위 업무를 우측 칼럼에서 빼내 설명 바로 아래, 팝업 너비
  전체를 쓰는 행으로 옮겼다(.pj-subtask-full). 제목 왼쪽 체크박스로 완료를
  토글하고 완료된 줄은 반투명(50%) + 취소선.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-09-22 12:07:06 +09:00
parent 04568cce09
commit 8c68990aa9
10 changed files with 572 additions and 2008 deletions
+1 -1
View File
@@ -36,7 +36,7 @@ Claude Code는 이 저장소에서 작업을 시작하기 전에 **반드시 아
- 말레이시아 창고 재고관리 (`app/modules/malaysia/`, `malaysia_stock_db`) — 낱개(MT/MX/MZ) 입출고·조정, 세트(MY) BOM, 일일 재고조사(세트→낱개 자동 분해), 현재고 현황. 뚜껑(MD-)은 재고 집계 제외 — 단, 창고 랙에는 위치 확인용으로 배치 가능(`store.LID_ITEMS`). 상품은 `itemcode_db` 읽기 전용. 권한키 `malaysia`
- 말레이시아 배송 (`app/modules/dispatch/`, `dispatch_db`) — TikTok·Shopee 출고관리. 플랫폼별 데이터 엑셀 업로드(TikTok=03_TikTok_Order_Export.xlsx, Shopee=Packing List.Doorstep Delivery.xlsx) → 1상자=1카드 출고 작업 리스트·SKU 피킹 요약·Kagayaku 전달표 자동 생성. 1상자 묶음 기준 Package ID > Tracking ID > Order ID, 같은 상자 같은 SKU 합산. 작업 상태 토글(`dispatch_logs` 기록). 받는 사람 이름/전화/주소는 상자 단위로 저장(작업 카드 표시 + 출고 엑셀 생성용 — 개인정보). 배치 다운로드 zip 에 업로드 원본 + 취합 출고 엑셀(`YYYY.MM.DD(Ddd)_tictoc|shopee.xlsx`) 포함. 엑셀은 openpyxl 파싱/생성. 권한키 `dispatch`. 상세는 `docs/DISPATCH_MODULE.md`
- 카페24 상품관리 (`app/modules/cafe24/`, `cafe24_db`) — 카페24 관리자에 들어가지 않고 상품 상세페이지(description HTML) 조회·편집·즉시적용·예약적용·버전 이력. 3분할 화면(목록 | HTML 편집기 | 상품 정보 패널). 정보 패널(`routes_product_info.py`, `_side.html`)에서 상품명·판매가·공급가·소비자가, 대표이미지(업로드 → `POST /admin/products/images` → PUT `detail_image`+`image_upload_type=A`), 옵션(생성/이름·썸네일·표시방식 수정/삭제)·품목(자체코드·추가금액·진열·판매)을 수정. 카페24 OAuth/API 클라이언트는 향후 주문관리와 공유하기 위해 **공통 계층 `app/integrations/cafe24/`** 에 둔다 — 라우터에서 `httpx`/`requests` 직접 호출 금지. 토큰은 Fernet 암호화 저장(`CAFE24_TOKEN_SECRET`), 로그/화면에 토큰·시크릿 절대 미출력. 쓰기 직전 항상 카페24 현재 HTML 을 다시 읽어 `BACKUP` revision 생성(로컬 값을 현재값으로 가정 금지). **카페24 관리자 API 는 PUT 뒤 한동안 GET 에서 예전 값을 돌려준다(읽기 지연)** — 우리 캐시 문제가 아니다. 그래서 "마지막 쓰기가 권위": 상세설명은 카페24 값이 최근 revision 중 하나와 같으면 지연으로 보고 마지막 MANUAL/SCHEDULED 를 표시·지문 기준으로 쓰고(`store.resolve_description`), 스칼라(상품명·가격·이미지·진열/판매)는 PUT 응답 스냅샷(`cafe24_products.last_write_snapshot`, 마이그레이션 004)과 GET 의 `updated_date` 를 비교해 덮어씌운다(`store.overlay_recent_write`). 유예시간 `CAFE24_READ_LAG_GRACE_MIN`(기본 360분). 쓰기 후 화면은 PUT 응답으로 그리고 다시 GET 하지 않는다. 예약은 DB 저장 + 별도 worker(`app/modules/cafe24/worker.py`, compose 서비스 `dbx-cafe24-worker`)가 처리 — 웹 프로세스에서 대기하지 않는다. 권한키 `cafe24`(연결/해제는 admin 전용). 상세는 `docs/CAFE24_MODULE.md`
- 프로젝트 관리 (`app/modules/project/`, `project_db`) — 아사나식. 프로젝트/서브프로젝트(self-FK `parent_id`, CASCADE)·업무(`tasks`: 담당자·우선순위·시작/마감)·진행단계(`project_stages` 칸반, 생성시 기본 4단계 seed)·멤버 배정(`project_members`)·활동이력(`project_activity`). 메인 뷰 달력(FullCalendar)/타임라인(vis-timeline) 버튼 토글 + 보드/리스트. 보드는 아사나처럼 세션이 가로로 계속 늘어나고(넘치면 가로 스크롤) 카드의 담당자·마감일을 클릭해 그 자리에서 바꾼다. 좌측 사이드바에 수신함·내 업무(접이식) 메뉴. 설명란은 주소 붙여넣기 시 자동 링크, 설명란·댓글에서 @로 멤버를 태그하면 (`task_mentions`, 마이그레이션 006) 수신함에 그 업무가 쌓인다. 진입 권한키 `project`(관리자 페이지 토글로 직원별 부여, admin 자동). 프로젝트 생성/삭제·사용자 배정은 `is_admin` 만, 배정 멤버(또는 owner)는 서브프로젝트/업무/단계 CRUD. 멤버 배정 후보는 `project` 권한 보유 등록 사용자에서 자동 목록(`GET /project/api/assignable-users`). 업무 배정·완료 시 관리자에게 메일(`app/mail.py` stdlib smtplib, `SMTP_*`+`PROJECT_NOTIFY_EMAIL` env, 미설정 시 조용히 skip, `BackgroundTasks` 비동기). 상세는 `docs/PROJECT_MODULE.md`
- 프로젝트 관리 (`app/modules/project/`, `project_db`) — 아사나식. 프로젝트/서브프로젝트(self-FK `parent_id`, CASCADE)·업무(`tasks`: 담당자·우선순위·시작/마감)·진행단계(`project_stages` 칸반, 생성시 기본 4단계 seed)·멤버 배정(`project_members`)·활동이력(`project_activity`). 첫 화면(`/project/`)은 **내 업무 목록**(프로젝트 홈 카드 화면은 폐지). 프로젝트 화면은 달력(FullCalendar)/타임라인(vis-timeline)/보드/리스트/대시보드 뷰 토글. 좌측 사이드바는 두 화면 공용(`templates/project/_side.html`). 보드는 아사나처럼 세션이 가로로 계속 늘어나고(넘치면 가로 스크롤) 카드의 담당자·마감일을 클릭해 그 자리에서 바꾼다. 좌측 사이드바에 수신함·내 업무(접이식) 메뉴. 설명란은 주소 붙여넣기 시 자동 링크, 설명란·댓글에서 @로 멤버를 태그하면 (`task_mentions`, 마이그레이션 006) 수신함에 그 업무가 쌓인다. 진입 권한키 `project`(관리자 페이지 토글로 직원별 부여, admin 자동). 프로젝트 생성/삭제·사용자 배정은 `is_admin` 만, 배정 멤버(또는 owner)는 서브프로젝트/업무/단계 CRUD. 멤버 배정 후보는 `project` 권한 보유 등록 사용자에서 자동 목록(`GET /project/api/assignable-users`). 업무 배정·완료 시 관리자에게 메일(`app/mail.py` stdlib smtplib, `SMTP_*`+`PROJECT_NOTIFY_EMAIL` env, 미설정 시 조용히 skip, `BackgroundTasks` 비동기). 상세는 `docs/PROJECT_MODULE.md`
상세는 `docs/PROJECT_OVERVIEW.md`.
+44 -110
View File
@@ -236,31 +236,6 @@ def _fmt_date_kr(d: str | None) -> str:
return dd.strftime("%m/%d") + f"({_WEEKDAYS_KR[dd.weekday()]})"
def _group_my_tasks(my_tasks: list[dict[str, Any]]) -> list[dict[str, Any]]:
"""담당 업무를 프로젝트별로 묶고, "내 업무" 패널에 표시할 전체/진행/완료
개수를 함께 센다(홈 화면·프로젝트 화면 양쪽에서 재사용)."""
groups: dict[int, dict[str, Any]] = {}
for t in my_tasks:
pid = t.get("project_id")
g = groups.get(pid)
if g is None:
g = {
"id": pid,
"name": t.get("project_name") or "프로젝트",
"color": t.get("project_color") or "#4573d2",
"tasks": [],
}
groups[pid] = g
g["tasks"].append(t)
for g in groups.values():
total = len(g["tasks"])
done = sum(1 for t in g["tasks"] if t.get("completed_at"))
g["total"] = total
g["done"] = done
g["open"] = total - done
return list(groups.values())
def _build_tree(projects: list[dict[str, Any]]) -> list[dict[str, Any]]:
"""평면 프로젝트 목록 → parent_id 기준 트리(children 키)."""
by_id: dict[int, dict[str, Any]] = {}
@@ -405,7 +380,12 @@ async def api_live_version(request: Request) -> JSONResponse:
@router.get("/", response_class=HTMLResponse)
async def index(request: Request) -> HTMLResponse:
async def my_tasks_page(request: Request) -> HTMLResponse:
"""프로젝트 모듈의 첫 화면 = 내 업무.
예전 홈(프로젝트 카드 그리드)은 없앴다 — 좌측 "내 업무" 메뉴와 같은
화면이며, 좌측 사이드바는 프로젝트 화면과 공용(project/_side.html)이다.
"""
from app.main import build_erp_nav, render_template # noqa: WPS433
from app.store import is_admin # noqa: WPS433
@@ -419,13 +399,30 @@ async def index(request: Request) -> HTMLResponse:
include_archived=False,
member_email=None if admin else user["email"],
)
tree = _build_tree(projects)
# 진행중/완료 프로젝트를 별도 섹션으로 분류. 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"]
nav_projects = [
{
"id": p["id"],
"name": p["name"],
"color": p.get("color") or "#4573d2",
"created_by": p.get("created_by") or "",
"description": p.get("description") or "",
"start_date": p.get("start_date"),
"due_date": p.get("due_date"),
"status": p.get("status") or "active",
}
for p in projects
if not p.get("parent_id")
]
today_iso = today_kst().isoformat()
my_tasks = st.list_tasks(assignee_email=user["email"], limit=1000)
for t in my_tasks:
t["start_label"] = _fmt_date_kr(t.get("start_date"))
t["due_label"] = _fmt_date_kr(t.get("due_date"))
d = t.get("due_date")
t["due_overdue"] = bool(d and d[:10] < today_iso and not t.get("completed_at"))
my_open_total = sum(1 for t in my_tasks if not t.get("completed_at"))
# 아바타 맵: 이메일(소문자) → 구글 프로필 이미지 URL (홈 카드 업무 담당자 표시용)
from app.main import user_store # noqa: WPS433
avatars = {
store.norm_str(u["email"], lower=True): u.get("picture") or ""
@@ -433,84 +430,24 @@ async def index(request: Request) -> HTMLResponse:
if u.get("picture")
}
# 프로젝트 카드에 업무 미리보기(담당자·마감일·진행률) 붙이기 — 한눈에 현황 파악용.
# 완료 업무도 취소선으로 계속 보이도록 목록에 포함하되, 미완료를 먼저 보여준다.
today_iso = today_kst().isoformat()
for p in tree:
p_tasks = st.list_tasks(project_id=p["id"], include_subprojects=True, limit=500)
total = len(p_tasks)
open_tasks = [t for t in p_tasks if not t.get("completed_at")]
done_tasks = [t for t in p_tasks if t.get("completed_at")]
open_tasks.sort(key=lambda t: (t.get("due_date") is None, t.get("due_date") or "", t["id"]))
done_tasks.sort(key=lambda t: t.get("completed_at") or "", reverse=True)
ordered_tasks = open_tasks + done_tasks
for t in ordered_tasks:
t["assignee_display"] = (
t.get("assignee_name")
or (t["assignee_email"].split("@")[0] if t.get("assignee_email") else "")
)
d = t.get("due_date")
t["due_overdue"] = bool(d and d[:10] < today_iso and not t.get("completed_at"))
t["due_label"] = _fmt_date_kr(d)
p["task_total"] = total
p["task_done"] = len(done_tasks)
p["task_percent"] = round(len(done_tasks) * 100 / total) if total else 0
p["task_preview"] = ordered_tasks[:8]
p["task_more"] = max(0, len(ordered_tasks) - 8)
p["due_label"] = _fmt_date_kr(p.get("due_date"))
# 프로젝트 이름 아래 표시할 멤버(아이콘+이름) + 업무추가 버튼 노출 권한
# (관리자 또는 해당 프로젝트 멤버/owner).
p_members = st.list_members(project_id=p["id"])
p["members"] = [
{
"email": m["user_email"],
"name": m.get("user_name") or m["user_email"].split("@")[0],
"avatar": avatars.get(store.norm_str(m["user_email"], lower=True), ""),
}
for m in p_members
]
member_emails = {store.norm_str(m["user_email"], lower=True) for m in p_members}
p["can_add_task"] = (
admin
or store.norm_str(user["email"], lower=True) in member_emails
or store.norm_str(p.get("owner_email"), lower=True) == store.norm_str(user["email"], lower=True)
)
# 세션이 하나도 없으면 업무를 넣을 곳이 없다 — "업무 추가" 버튼 비활성화용.
p["has_stages"] = bool(st.list_stages(project_id=p["id"]))
my_tasks = st.list_tasks(assignee_email=user["email"], limit=500)
for t in my_tasks:
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)
# 홈 화면 카드/내업무에 노출된 업무 전체(id→업무) — 클릭 시 페이지 이동 없이
# 팝업으로 편집하기 위해 필요한 원본 데이터를 그대로 클라이언트에 넘긴다.
home_tasks: dict[str, Any] = {}
for p in tree:
for t in p.get("task_preview", []):
home_tasks[str(t["id"])] = t
for t in my_tasks:
home_tasks[str(t["id"])] = t
return render_template(
request,
"project/index.html",
"project/mytasks.html",
{
"user": user,
"is_admin": admin,
"nav_items": build_erp_nav(user, active="project"),
"page_title": "프로젝트 관리",
"page_subtitle": "달력·타임라인·보드로 프로젝트를 관리하세요.",
"page_title": "내 업무",
"page_subtitle": "내가 담당자인 업무를 한 곳에서 봅니다.",
"force_sidebar_collapsed": True,
"active_projects": active_projects,
"done_projects": done_projects,
"my_projects": my_projects,
"nav_projects": nav_projects,
"my_tasks": my_tasks,
"my_open_total": my_open_total,
"mention_unread": _safe_mention_unread(st, user["email"]),
"avatars": avatars,
"home_tasks": home_tasks,
"today": today_kst().isoformat(),
"priority_labels": store.PRIORITY_LABELS,
"color_palette": list(store.COLOR_PALETTE),
"today": today_iso,
},
)
@@ -607,12 +544,11 @@ async def project_page(request: Request, project_id: int) -> HTMLResponse:
}
# 우측 "내 업무" 패널 — 홈 화면과 동일한 쿼리/그룹핑(프로젝트별)을 재사용.
my_tasks = st.list_tasks(assignee_email=user["email"], limit=500)
for t in my_tasks:
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)
# 좌측 사이드바 "내 업무" 배지(진행 중 개수)와 수신함 배지.
my_open_total = sum(
1 for t in st.list_tasks(assignee_email=user["email"], limit=1000)
if not t.get("completed_at")
)
mention_unread = _safe_mention_unread(st, user["email"])
# 달력(휴가식 월간 그리드) — ?y=&m= 로 월 이동, 기본 이번 달
@@ -641,8 +577,6 @@ async def project_page(request: Request, project_id: int) -> HTMLResponse:
"force_sidebar_collapsed": True,
"project": project,
"current_project_id": project_id,
"my_projects": my_projects,
"my_tasks": my_tasks,
"my_open_total": my_open_total,
"mention_unread": mention_unread,
"nav_projects": nav_projects,
@@ -0,0 +1,84 @@
{# ── 프로젝트 모듈 좌측 사이드바 (공용) ──────────────────────────────
내 업무 화면(mytasks.html)과 프로젝트 화면(project.html)이 함께 쓴다.
변수:
mention_unread 미확인 @태그 개수 (수신함 배지)
my_open_total 진행 중인 내 업무 개수 (내 업무 배지)
nav_projects 프로젝트 목록(평면)
current_pid 지금 보고 있는 프로젝트 id (내 업무 화면이면 0)
is_admin 프로젝트 생성/수정/삭제 권한
프로젝트 수정/삭제(✎/×) 버튼은 그 동작을 배선하는 initProject 가 도는
프로젝트 화면에서만 그린다(current_pid 로 판별). #}
<aside class="pj-side">
<!-- 아사나처럼 맨 위에 개인 메뉴(수신함 / 내 업무). 내 업무는 접었다 펴는
패널이 아니라 오른쪽 화면 전체에 목록을 띄우는 별도 페이지다. -->
<nav class="pj-side-nav">
<a class="pj-side-navlink" href="/project/inbox">
<span class="material-symbols-outlined pj-side-navic">inbox</span>
<span class="pj-side-navtext">수신함</span>
<span class="pj-side-navbadge" id="pj-mention-badge"
{% if not mention_unread %}hidden{% endif %}>{{ mention_unread }}</span>
</a>
<a class="pj-side-navlink {% if not current_pid %}is-active{% endif %}" href="/project/">
<span class="material-symbols-outlined pj-side-navic">checklist</span>
<span class="pj-side-navtext">내 업무</span>
<span class="pj-side-navbadge pj-side-navbadge-open" id="pj-myopen-badge"
{% if not my_open_total %}hidden{% endif %}>{{ my_open_total }}</span>
</a>
</nav>
<div class="pj-side-block">
<div class="pj-side-head">
<span>프로젝트</span>
{% if is_admin %}
<button type="button" class="pj-icon-btn" id="pj-new-project-side" title="새 프로젝트">+</button>
{% endif %}
</div>
{% macro nav_li(p) %}
<li class="pj-tree-li" data-id="{{ p.id }}"
data-name="{{ p.name }}" data-desc="{{ p.description or '' }}"
data-start="{{ p.start_date or '' }}" data-due="{{ p.due_date or '' }}"
data-color="{{ p.color }}" data-status="{{ p.status or 'active' }}"
data-creator="{{ p.created_by or '' }}">
<div class="pj-tree-row {% if p.id == current_pid %}is-active{% endif %}">
<a class="pj-tree-link" href="/project/p/{{ p.id }}">
<span class="pj-tree-avatar" style="background: {{ p.color }}">{{ p.name[0] | upper }}</span>
<span class="pj-tree-name">{{ p.name }}</span>
</a>
{% if is_admin and current_pid %}
<span class="pj-tree-acts">
<button type="button" class="pj-icon-btn pj-tree-edit" title="프로젝트 수정">✎</button>
<button type="button" class="pj-icon-btn pj-tree-del" data-id="{{ p.id }}" data-name="{{ p.name }}" data-creator="{{ p.created_by }}" title="프로젝트 삭제">×</button>
</span>
{% endif %}
</div>
</li>
{% endmacro %}
{% set nav_active = nav_projects | rejectattr("status", "equalto", "completed") | list %}
{% set nav_done = nav_projects | selectattr("status", "equalto", "completed") | list %}
{% if nav_active %}
<ul class="pj-tree" id="pj-tree-root">
{% for p in nav_active %}{{ nav_li(p) }}{% endfor %}
</ul>
{% else %}
<div class="pj-empty-sm">프로젝트 없음</div>
{% endif %}
{% if nav_done %}
<div class="pj-side-head pj-side-head-done"><span>완료 프로젝트</span></div>
<ul class="pj-tree" id="pj-tree-root-done">
{% for p in nav_done %}{{ nav_li(p) }}{% endfor %}
</ul>
{% endif %}
</div>
<!-- 전체 멤버 — 등록된 전체 직원(프로젝트 권한 보유자). 아이콘 클릭 시
그 사람이 담당자인 업무를 팝업으로 보여준다(프로젝트/세션/마감일).
이 팝업을 배선하는 코드가 initProject 안에 있어 프로젝트 화면에서만
그린다(내 업무 화면에는 안 나온다). -->
{% if current_pid %}
<div class="pj-side-block">
<div class="pj-side-head"><span>전체 멤버</span></div>
<div class="pj-allmembers-grid" id="pj-allmembers-grid">불러오는 중…</div>
</div>
{% endif %}
</aside>
@@ -1,7 +1,7 @@
{% extends "erp_base.html" %}
{% block head_extra %}
<link rel="stylesheet" href="/static/project.css?v=20260922b" />
<link rel="stylesheet" href="/static/project.css?v=20260922c" />
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
{% endblock %}
@@ -84,5 +84,5 @@
</div>
</div>
<script src="/static/project.js?v=20260922b" defer></script>
<script src="/static/project.js?v=20260922c" defer></script>
{% endblock %}
@@ -1,436 +0,0 @@
{% extends "erp_base.html" %}
{% block head_extra %}
<link rel="stylesheet" href="/static/project.css?v=20260922b" />
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
{% endblock %}
{% block content %}
<div class="pj-wrap" data-is-admin="{{ 'true' if is_admin else 'false' }}"
data-is-super="{{ 'true' if user.is_super_admin else 'false' }}"
data-me="{{ user.email }}">
{% macro project_card(p) %}
<div class="pj-project-card {% if p.status == 'completed' %}is-done{% endif %}"
style="--pj-color: {{ p.color }}"
data-id="{{ p.id }}"
data-name="{{ p.name }}"
data-desc="{{ p.description or '' }}"
data-start="{{ p.start_date or '' }}"
data-due="{{ p.due_date or '' }}"
data-color="{{ p.color }}"
data-status="{{ p.status or 'active' }}"
data-creator="{{ p.created_by or '' }}"
data-has-stages="{{ 'true' if p.has_stages else 'false' }}"
data-sort-order="{{ p.sort_order or 0 }}">
<a class="pj-project-cardlink" href="/project/p/{{ p.id }}">
<div class="pj-project-header">
<span class="pj-project-name">{{ p.name }}
{% if p.status == 'completed' %}<span class="pj-chip pj-chip-sm">완료</span>{% endif %}
</span>
</div>
<div class="pj-project-body">
{% if p.description %}<div class="pj-project-desc">{{ p.description }}</div>{% endif %}
{% if p.members %}
<div class="pj-project-members">
{% for m in p.members %}
<span class="pj-project-member">
{% if m.avatar %}<img class="pj-avatar pj-gicon-sm" src="{{ m.avatar }}" alt="" />
{% else %}<span class="material-symbols-outlined pj-gicon pj-gicon-sm">account_circle</span>{% endif %}
{{ m.name }}
</span>
{% endfor %}
</div>
{% endif %}
<div class="pj-project-meta">
{% if p.due_date %}<span class="pj-chip">마감 {{ p.due_label }}</span>{% endif %}
{% if p.task_total %}<span class="pj-chip">업무 {{ p.task_done }}/{{ p.task_total }}</span>{% endif %}
</div>
{% if p.task_total %}
<div class="pj-project-progress">
<div class="pj-project-progress-bar" style="width: {{ p.task_percent }}%"></div>
</div>
{% endif %}
</div>
</a>
<div class="pj-card-actions">
{% if p.can_add_task %}
<button type="button" class="pj-icon-btn pj-card-addstage" data-project-id="{{ p.id }}" data-project-name="{{ p.name }}" title="세션 추가">
<span class="material-symbols-outlined">view_column</span>
</button>
<button type="button" class="pj-icon-btn pj-card-addtask" data-project-id="{{ p.id }}"
{% if not p.has_stages %}disabled{% endif %}
title="{{ '세션을 먼저 추가하세요' if not p.has_stages else '업무 추가' }}">
<span class="material-symbols-outlined">add_task</span>
</button>
{% endif %}
{% if p.can_add_task %}
<button type="button" class="pj-icon-btn pj-card-edit" title="프로젝트 수정">
<span class="material-symbols-outlined">edit</span>
</button>
{% endif %}
</div>
{% if p.task_preview %}
<ul class="pj-project-tasklist">
{% for t in p.task_preview %}
<li class="pj-project-taskrow {% if t.completed_at %}is-done{% endif %}">
<a href="/project/p/{{ p.id }}?task={{ t.id }}" data-task-id="{{ t.id }}" class="pj-task-popup-link">
<span class="pj-project-task-lead">
{% if t.comment_count %}
<span class="pj-cmt-badge" data-task-id="{{ t.id }}" data-count="{{ t.comment_count }}" title="댓글 {{ t.comment_count }}개">
<span class="pj-cmt-ic">💬</span><span class="pj-cmt-n">{{ t.comment_count }}</span>
</span>
{% endif %}
</span>
<span class="pj-project-task-title">{{ t.title }}</span>
{% if t.stage_name %}<span class="pj-project-task-stage">{{ t.stage_name }}</span>{% endif %}
{% if t.assignee_display %}
<span class="pj-project-task-assignee">
{% if avatars.get(t.assignee_email | lower) %}
<img class="pj-avatar pj-gicon-sm" src="{{ avatars[t.assignee_email | lower] }}" alt="" />
{% endif %}
{{ t.assignee_display }}
</span>
{% endif %}
{% if t.due_date %}
<span class="pj-project-task-due {% if t.due_overdue %}is-overdue{% endif %}">{{ t.due_label }}</span>
{% endif %}
</a>
</li>
{% endfor %}
</ul>
{% if p.task_more %}
<a class="pj-project-more" href="/project/p/{{ p.id }}">+{{ p.task_more }}개 업무 더보기</a>
{% endif %}
{% elif p.task_total == 0 %}
<div class="pj-project-tasks-empty">진행 중인 업무가 없습니다.</div>
{% endif %}
</div>
{% endmacro %}
<div class="pj-home">
<!-- 프로젝트 목록 -->
<section class="pj-home-main">
<div class="pj-section-head">
<h2>진행중인 프로젝트</h2>
<div class="pj-toolbar-right">
<a class="pj-bell" href="/project/inbox" title="알림센터">
<span class="material-symbols-outlined">notifications</span>
<span class="pj-bell-badge" id="pj-bell-badge" hidden>0</span>
</a>
<button type="button" class="pj-btn pj-btn-primary" id="pj-new-project">
+ 새 프로젝트
</button>
</div>
</div>
{% if not active_projects and not done_projects %}
<div class="pj-empty">
아직 프로젝트가 없습니다. 상단의 <b>새 프로젝트</b> 버튼으로 만들어 보세요.
</div>
{% elif not active_projects %}
<div class="pj-empty pj-empty-sm">진행중인 프로젝트가 없습니다.</div>
{% endif %}
<div class="pj-project-grid" id="pj-project-grid">
{% for p in active_projects %}{{ project_card(p) }}{% endfor %}
</div>
{% if done_projects %}
<div class="pj-section-head pj-section-head-done">
<h2>완료 프로젝트</h2>
</div>
<div class="pj-project-grid" id="pj-project-grid-done">
{% for p in done_projects %}{{ project_card(p) }}{% endfor %}
</div>
{% endif %}
</section>
<!-- 내 업무 -->
<aside class="pj-home-side">
<div class="pj-section-head"><h2>내 업무</h2></div>
{% if not my_projects %}
<div class="pj-empty pj-empty-sm">배정된 업무가 없습니다.</div>
{% else %}
<div class="pj-mytree">
{% for p in my_projects %}
<div class="pj-mytree-group" data-group-id="{{ p.id }}">
<div class="pj-mytree-head">
<button type="button" class="pj-mytree-toggle" title="펼치기/접기">
<span class="material-symbols-outlined" style="color: {{ p.color }}; font-size:18px;">folder_open</span>
</button>
<a class="pj-mytree-proj" href="/project/p/{{ p.id }}">
<span class="pj-mytree-proj-name">{{ p.name }}</span>
</a>
<!-- .pj-mytree-head 자체는 접어도(is-collapsed 는 .pj-mytree-tasks 만
숨김) 계속 보인다. -->
<span class="pj-mytree-counts">
<span class="pj-mtc-num pj-mtc-open" data-tip="진행">{{ p.open }}</span>
<span class="pj-mtc-num pj-mtc-done" data-tip="완료">{{ p.done }}</span>
</span>
</div>
<ul class="pj-mytree-tasks">
{% for t in p.tasks %}
<li class="pj-mytree-task {% if t.completed_at %}is-done{% endif %}">
<a href="/project/p/{{ t.project_id }}?task={{ t.id }}" data-task-id="{{ t.id }}" class="pj-task-popup-link">
<span class="pj-mytree-lead">
{% if t.comment_count %}
<span class="pj-cmt-badge" data-task-id="{{ t.id }}" data-count="{{ t.comment_count }}" title="댓글 {{ t.comment_count }}개">
<span class="pj-cmt-ic">💬</span><span class="pj-cmt-n">{{ t.comment_count }}</span>
</span>
{% endif %}
</span>
<span class="pj-mytree-body">
<span class="pj-mytree-title">{{ t.title }}</span>
{% if t.start_date or t.due_date %}
<span class="pj-mytree-dates">
{% if t.start_date and t.due_date %}{{ t.start_label }} ~ {{ t.due_label }}
{% elif t.due_date %}~ {{ t.due_label }}
{% else %}{{ t.start_label }} ~{% endif %}
</span>
{% endif %}
</span>
</a>
</li>
{% endfor %}
</ul>
</div>
{% endfor %}
</div>
{% endif %}
</aside>
</div>
</div>
<!-- 새 프로젝트 모달 — 생성은 로그인한 사용자 누구나 -->
<div class="pj-modal" id="pj-modal-project" hidden>
<div class="pj-modal-card">
<h3>새 프로젝트</h3>
<label>이름<input type="text" id="pj-f-name" placeholder="프로젝트 이름" /></label>
<label>설명<textarea id="pj-f-desc" rows="2"></textarea></label>
<div class="pj-form-row">
<label>시작일<input type="date" id="pj-f-start" /></label>
<label>마감일<input type="date" id="pj-f-due" /></label>
</div>
<label>색상
<span class="pj-color-palette" id="pj-f-colors"></span>
</label>
<div class="pj-field-label">멤버
<div class="pj-member-picker" id="pj-f-members">불러오는 중…</div>
</div>
<div class="pj-modal-actions">
<button type="button" class="pj-btn" data-close>취소</button>
<button type="button" class="pj-btn pj-btn-primary" id="pj-save-project">만들기</button>
</div>
</div>
</div>
<!-- 프로젝트 수정 모달 -->
<div class="pj-modal" id="pj-modal-edit" hidden>
<div class="pj-modal-card">
<h3>프로젝트 수정</h3>
<input type="hidden" id="pj-e-id" />
<label>이름<input type="text" id="pj-e-name" placeholder="프로젝트 이름" /></label>
<label>설명<textarea id="pj-e-desc" rows="2"></textarea></label>
<div class="pj-form-row">
<label>시작일<input type="date" id="pj-e-start" /></label>
<label>마감일<input type="date" id="pj-e-due" /></label>
</div>
<label>색상
<span class="pj-color-palette" id="pj-e-colors"></span>
</label>
<label class="pj-time-toggle">
<input type="checkbox" id="pj-e-done" /> 프로젝트 완료 (목록 끝으로 이동·비활성)
</label>
<div class="pj-modal-actions">
<button type="button" class="pj-btn pj-btn-danger" id="pj-delete-project">삭제</button>
<span style="flex:1"></span>
<button type="button" class="pj-btn" data-close>취소</button>
<button type="button" class="pj-btn pj-btn-primary" id="pj-save-edit">저장</button>
</div>
</div>
</div>
<!-- 세션 추가 모달 — 홈 카드 hover 의 "세션 추가" 아이콘. 프로젝트 화면
보드의 "+ 세션 추가"와 같은 폼(이름+색상)을 그대로 재사용한다. -->
<div class="pj-modal" id="pj-modal-stage" hidden>
<div class="pj-modal-card">
<h3 id="pj-stage-modal-title">새 세션</h3>
<input type="hidden" id="pj-stg-id" />
<label>이름<input type="text" id="pj-stg-name" placeholder="세션 이름" /></label>
<label>색상
<span class="pj-color-palette" id="pj-stg-colors"></span>
</label>
<div class="pj-modal-actions">
<span style="flex:1"></span>
<button type="button" class="pj-btn" data-close>취소</button>
<button type="button" class="pj-btn pj-btn-primary" id="pj-save-stage">저장</button>
</div>
</div>
</div>
<!-- 업무 편집 모달 — 카드/내 업무에서 클릭 시 페이지 이동 없이 팝업으로 편집 -->
<div class="pj-modal" id="pj-modal-task" hidden>
<div class="pj-modal-card pj-task-modal-card">
<!-- 아사나처럼 큰 제목은 아래 무테 입력칸이 대신한다 — 이 표시는 작은
모드 안내(새 업무/업무 편집)만 한다. -->
<h3 id="pj-task-modal-title" class="pj-modal-kicker">업무 편집</h3>
<input type="hidden" id="pj-t-id" />
<input type="hidden" id="pj-t-project-id" />
<input type="text" id="pj-t-title" class="pj-t-title-input" placeholder="업무 제목" />
<div class="pj-modal-body">
<div class="pj-modal-col-main">
<!-- 메타 정보 — 담당자·세션·우선순위·일정을 작은 칩 형태로 한 줄에 -->
<div class="pj-meta-row">
<div class="pj-meta-field">
<span class="pj-meta-label">담당자</span>
<select id="pj-t-assignee"><option value="">불러오는 중…</option></select>
</div>
<div class="pj-meta-field">
<span class="pj-meta-label">세션</span>
<select id="pj-t-stage"><option value="">불러오는 중…</option></select>
</div>
<div class="pj-meta-field">
<span class="pj-meta-label">우선순위</span>
<select id="pj-t-priority">
<option value="low">낮음</option>
<option value="normal" selected>보통</option>
<option value="high">높음</option>
</select>
</div>
</div>
<div class="pj-meta-row">
<div class="pj-meta-field">
<span class="pj-meta-label">시작일</span>
<input type="date" id="pj-t-start" />
</div>
<div class="pj-meta-field">
<span class="pj-meta-label">마감일</span>
<input type="date" id="pj-t-due" />
</div>
</div>
<label class="pj-time-toggle">
<input type="checkbox" id="pj-t-usetime" /> 시간 지정 (체크 안 하면 종일)
</label>
<div class="pj-form-row" id="pj-time-row">
<label>시작 시간<input type="time" id="pj-t-stime" disabled /></label>
<label>마감 시간<input type="time" id="pj-t-dtime" disabled /></label>
</div>
</div>
<!-- 설명 — 팝업 너비 전체를 쓴다(.pj-modal-body 그리드에서
1/-1 로 두 칼럼을 가로지르는 아랫줄). -->
<div class="pj-desc-block">
<div class="pj-desc-toolbar">
<span class="pj-extra-label">설명</span>
<span class="pj-muted-sm" id="pj-desc-hint"></span>
</div>
<div class="pj-desc-fmtbar" id="pj-desc-fmtbar">
<button type="button" class="pj-desc-fmtbtn" data-cmd="bold" title="굵게 (Ctrl+B)"><b>B</b></button>
<button type="button" class="pj-desc-fmtbtn" data-cmd="italic" title="기울임 (Ctrl+I)"><i>I</i></button>
<button type="button" class="pj-desc-fmtbtn" data-cmd="underline" title="밑줄 (Ctrl+U)"><u>U</u></button>
<span class="pj-desc-fmtsep"></span>
<button type="button" class="pj-desc-fmtbtn" data-cmd="insertUnorderedList" title="글머리 기호 목록">☰•</button>
<button type="button" class="pj-desc-fmtbtn" data-cmd="insertOrderedList" title="번호 매기기 목록">☰1</button>
<button type="button" class="pj-desc-fmtbtn" data-cmd="formatBlock" data-arg="blockquote" title="인용구">❝</button>
<span class="pj-desc-fmtsep"></span>
<button type="button" class="pj-desc-fmtbtn" data-cmd="createLink" title="링크 삽입">🔗</button>
<button type="button" class="pj-desc-fmtbtn" data-cmd="removeFormat" title="서식 지우기">✕서식</button>
<span class="pj-desc-fmtsep"></span>
<label class="pj-desc-fmtbtn" id="pj-desc-imgbtn" title="이미지 추가"><span class="material-symbols-outlined">image</span><input type="file" id="pj-desc-img-input" accept="image/*" hidden /></label>
</div>
<div class="pj-desc-wrap">
<div class="pj-desc-editor" id="pj-t-desc" contenteditable="true" data-placeholder="설명을 입력하세요… (이미지는 붙여넣기 또는 위 버튼으로 추가)"></div>
</div>
</div>
<div class="pj-modal-col-side">
<div class="pj-task-extra" id="pj-subtask-block">
<div class="pj-extra-head">
<span class="material-symbols-outlined pj-gicon pj-gicon-sm">checklist</span> 하위 업무
</div>
<ul class="pj-subtask-list" id="pj-subtask-list"></ul>
<div class="pj-subtask-form">
<input type="text" id="pj-subtask-input" placeholder="하위 업무 제목…" />
<select id="pj-subtask-add-assignee"><option value="">(미지정)</option></select>
<input type="date" id="pj-subtask-add-due" />
<button type="button" class="pj-btn pj-btn-primary" id="pj-subtask-add">추가</button>
</div>
</div>
<div class="pj-task-extra" id="pj-attach-block">
<div class="pj-extra-head">
<span class="material-symbols-outlined pj-gicon pj-gicon-sm">attach_file</span> 첨부파일
<label class="pj-upload-btn">
파일 추가<input type="file" id="pj-attach-input" hidden />
</label>
</div>
<ul class="pj-attach-list" id="pj-attach-list"></ul>
</div>
<div class="pj-task-extra" id="pj-links-block">
<div class="pj-extra-head">
<span class="material-symbols-outlined pj-gicon pj-gicon-sm">link</span> 연결된 프로젝트
</div>
<div class="pj-link-chips" id="pj-link-chips"></div>
<div class="pj-link-form" id="pj-link-form">
<select id="pj-link-project"><option value="">프로젝트 선택…</option></select>
<select id="pj-link-stage"><option value="">세션 선택…</option></select>
<button type="button" class="pj-btn pj-btn-primary" id="pj-link-save">추가</button>
</div>
</div>
<!-- 댓글(활동) — 아사나처럼 맨 아래 -->
<div class="pj-task-extra" id="pj-comment-block">
<div class="pj-extra-head">
<span class="pj-cmt-emoji">💬</span> 댓글
</div>
<ul class="pj-comment-list" id="pj-comment-list"></ul>
<div class="pj-comment-form">
<input type="text" id="pj-comment-input" placeholder="댓글 입력…" />
<button type="button" class="pj-btn pj-btn-primary" id="pj-comment-send">등록</button>
</div>
</div>
</div>
</div>
<div class="pj-modal-actions">
<button type="button" class="pj-btn pj-btn-complete" id="pj-toggle-complete" hidden>✓ 완료로 표시</button>
<button type="button" class="pj-btn pj-btn-danger" id="pj-delete-task">삭제</button>
<span style="flex:1"></span>
<a class="pj-btn" id="pj-t-open-project" href="#" target="_self">프로젝트에서 열기</a>
<button type="button" class="pj-btn" data-close>취소</button>
<button type="button" class="pj-btn pj-btn-primary" id="pj-save-task">저장</button>
</div>
</div>
</div>
<!-- 댓글만 보는 팝업 (업무 카드의 말풍선 아이콘 더블클릭) -->
<div class="pj-modal" id="pj-modal-comments" hidden>
<div class="pj-modal-card pj-modal-chat">
<div class="pj-chat-head">
<h3 id="pj-cm-title">댓글</h3>
</div>
<input type="hidden" id="pj-cm-task-id" />
<ul class="pj-chat-list" id="pj-chat-list"></ul>
<div class="pj-chat-pending" id="pj-cm-pending" hidden></div>
<div class="pj-comment-form">
<label class="pj-chat-attach-btn" title="파일 추가">
<span class="material-symbols-outlined">attach_file</span>
<input type="file" id="pj-cm-file-input" multiple hidden />
</label>
<input type="text" id="pj-cm-input" placeholder="댓글 입력… (이미지는 붙여넣기 가능)" />
<button type="button" class="pj-btn pj-btn-primary" id="pj-cm-send">전송</button>
</div>
</div>
</div>
<script id="pj-home-data" type="application/json">
{{ home_tasks | tojson }}
</script>
<script>
window.PJ_COLORS = {{ ["#4573d2","#37a3a3","#62a420","#e8a33d","#e8384f","#aa62e3","#f06a6a","#5a6772"] | tojson }};
window.PJ_STAGE_COLORS = {{ ["#4573d2","#37a3a3","#62a420","#e8a33d","#e8384f","#aa62e3","#f06a6a","#5a6772","#e8398a","#a15c43"] | tojson }};
</script>
<script src="/static/project.js?v=20260922b" defer></script>
{% endblock %}
@@ -0,0 +1,104 @@
{% extends "erp_base.html" %}
{% block head_extra %}
<link rel="stylesheet" href="/static/project.css?v=20260922c" />
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
{% endblock %}
{% block topbar_actions %}
<a class="pj-bell" href="/project/inbox" title="수신함">
<span class="material-symbols-outlined">notifications</span>
<span class="pj-bell-badge" id="pj-bell-badge" hidden>0</span>
</a>
{% endblock %}
{% block content %}
{# 프로젝트 모듈의 첫 화면 = 내 업무. 예전 프로젝트 홈(카드 그리드)은 없앴다. #}
<div class="pj-wrap pj-mytasks-view" data-me="{{ user.email }}"
data-is-admin="{{ 'true' if is_admin else 'false' }}"
data-is-super="{{ 'true' if user.is_super_admin else 'false' }}">
<div class="pj-layout">
{% with current_pid = 0 %}{% include "project/_side.html" %}{% endwith %}
<section class="pj-main">
<div class="pj-toolbar">
<div class="pj-view-tabs" id="pj-mt-filter">
<button type="button" class="pj-tab is-active" data-filter="open">진행 중</button>
<button type="button" class="pj-tab" data-filter="done">완료</button>
<button type="button" class="pj-tab" data-filter="all">전체</button>
</div>
<div class="pj-title-wrap">
<h1 class="pj-project-title">
<span class="pj-project-title-pill" style="--pj-color: #7b68ee">내 업무</span>
</h1>
</div>
<div class="pj-mytasks-summary" id="pj-mytasks-summary"></div>
</div>
<div class="pj-view pj-mytasks-pane">
<table class="pj-table pj-mytasks-table" id="pj-mytasks-table">
<thead></thead>
<tbody></tbody>
</table>
<div class="pj-empty" id="pj-mytasks-empty" hidden>표시할 업무가 없습니다.</div>
</div>
</section>
</div>
</div>
<!-- 새 프로젝트 모달 — 좌측 프로젝트 목록의 + 버튼(프로젝트 화면과 동일 폼) -->
<div class="pj-modal" id="pj-modal-project" hidden>
<div class="pj-modal-card">
<h3>새 프로젝트</h3>
<label>이름<input type="text" id="pj-f-name" placeholder="프로젝트 이름" /></label>
<label>설명<textarea id="pj-f-desc" rows="2"></textarea></label>
<div class="pj-form-row">
<label>시작일<input type="date" id="pj-f-start" /></label>
<label>마감일<input type="date" id="pj-f-due" /></label>
</div>
<label>색상
<span class="pj-color-palette" id="pj-f-colors"></span>
</label>
<div class="pj-field-label">멤버
<div class="pj-member-picker" id="pj-f-members">불러오는 중…</div>
</div>
<div class="pj-modal-actions">
<button type="button" class="pj-btn" data-close>취소</button>
<button type="button" class="pj-btn pj-btn-primary" id="pj-save-project">만들기</button>
</div>
</div>
</div>
<!-- 댓글만 보는 채팅형 팝업 — 업무 행의 말풍선 아이콘 더블클릭 -->
<div class="pj-modal" id="pj-modal-comments" hidden>
<div class="pj-modal-card pj-modal-chat">
<div class="pj-chat-head">
<h3 id="pj-cm-title">댓글</h3>
</div>
<input type="hidden" id="pj-cm-task-id" />
<ul class="pj-chat-list" id="pj-chat-list"></ul>
<div class="pj-chat-pending" id="pj-cm-pending" hidden></div>
<div class="pj-comment-form">
<label class="pj-chat-attach-btn" title="파일 추가">
<span class="material-symbols-outlined">attach_file</span>
<input type="file" id="pj-cm-file-input" multiple hidden />
</label>
<input type="text" id="pj-cm-input" placeholder="댓글 입력… (이미지는 붙여넣기 가능)" />
<button type="button" class="pj-btn pj-btn-primary" id="pj-cm-send">전송</button>
</div>
</div>
</div>
<script>
window.PJ_COLORS = {{ color_palette | tojson }};
</script>
<script id="pj-mytasks-data" type="application/json">
{
"tasks": {{ my_tasks | tojson }},
"priorityLabels": {{ priority_labels | tojson }},
"avatars": {{ avatars | tojson }},
"today": {{ today | tojson }}
}
</script>
<script src="/static/project.js?v=20260922c" defer></script>
{% endblock %}
@@ -1,7 +1,7 @@
{% extends "erp_base.html" %}
{% block head_extra %}
<link rel="stylesheet" href="/static/project.css?v=20260922b" />
<link rel="stylesheet" href="/static/project.css?v=20260922c" />
<!-- 구글 머티리얼 심볼(담당자 아이콘 등) — self-host -->
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
<!-- 타임라인 vis-timeline — self-host -->
@@ -27,129 +27,8 @@
data-me="{{ user.email }}">
<div class="pj-layout">
<!-- ── 좌측: 프로젝트 트리 + 멤버 ── -->
<aside class="pj-side">
<!-- 아사나처럼 맨 위에 개인 메뉴(수신함 / 내 업무). 둘 다 기본 접힘이고
누르면 펼쳐진다 — 예전 화면 오른쪽에 항상 떠 있던 "내 업무" 패널을
이 메뉴가 대신한다. -->
<nav class="pj-side-nav">
<a class="pj-side-navlink" href="/project/inbox">
<span class="material-symbols-outlined pj-side-navic">inbox</span>
<span class="pj-side-navtext">수신함</span>
<span class="pj-side-navbadge" id="pj-mention-badge"
{% if not mention_unread %}hidden{% endif %}>{{ mention_unread }}</span>
</a>
<button type="button" class="pj-side-navlink pj-mytasks-toggle" id="pj-mytasks-toggle"
aria-expanded="false" aria-controls="pj-mytasks-panel">
<span class="material-symbols-outlined pj-side-navic">checklist</span>
<span class="pj-side-navtext">내 업무</span>
<span class="pj-side-navbadge pj-side-navbadge-open"
{% if not my_open_total %}hidden{% endif %}>{{ my_open_total }}</span>
<span class="material-symbols-outlined pj-side-navcaret">expand_more</span>
</button>
</nav>
<!-- 내 업무 목록 — 접힌 상태가 기본. 업무를 고르면 팝업이 열리면서 다시 접힌다. -->
<div class="pj-mytasks-panel" id="pj-mytasks-panel" hidden>
{% if not my_projects %}
<div class="pj-empty-sm">배정된 업무가 없습니다.</div>
{% else %}
<div class="pj-mytree">
{% for p in my_projects %}
<div class="pj-mytree-group" data-group-id="{{ p.id }}">
<div class="pj-mytree-head">
<button type="button" class="pj-mytree-toggle" title="펼치기/접기">
<span class="material-symbols-outlined" style="color: {{ p.color }}; font-size:18px;">folder_open</span>
</button>
<a class="pj-mytree-proj" href="/project/p/{{ p.id }}">
<span class="pj-mytree-proj-name">{{ p.name }}</span>
</a>
<span class="pj-mytree-counts">
<span class="pj-mtc-num pj-mtc-open" data-tip="진행">{{ p.open }}</span>
<span class="pj-mtc-num pj-mtc-done" data-tip="완료">{{ p.done }}</span>
</span>
</div>
<ul class="pj-mytree-tasks">
{% for t in p.tasks %}
<li class="pj-mytree-task {% if t.completed_at %}is-done{% endif %}">
<a href="/project/p/{{ t.project_id }}?task={{ t.id }}" data-task-id="{{ t.id }}" class="pj-task-popup-link">
<span class="pj-mytree-lead">
{% if t.comment_count %}
<span class="pj-cmt-badge" data-task-id="{{ t.id }}" data-count="{{ t.comment_count }}" title="댓글 {{ t.comment_count }}개">
<span class="pj-cmt-ic">💬</span><span class="pj-cmt-n">{{ t.comment_count }}</span>
</span>
{% endif %}
</span>
<span class="pj-mytree-body">
<span class="pj-mytree-title">{{ t.title }}</span>
{% if t.start_date or t.due_date %}
<span class="pj-mytree-dates">
{% if t.start_date and t.due_date %}{{ t.start_label }} ~ {{ t.due_label }}
{% elif t.due_date %}~ {{ t.due_label }}
{% else %}{{ t.start_label }} ~{% endif %}
</span>
{% endif %}
</span>
</a>
</li>
{% endfor %}
</ul>
</div>
{% endfor %}
</div>
{% endif %}
</div>
<div class="pj-side-block">
<div class="pj-side-head">
<span>프로젝트</span>
{% if is_admin %}
<button type="button" class="pj-icon-btn" id="pj-new-project-side" title="새 프로젝트">+</button>
{% endif %}
</div>
{% macro nav_li(p) %}
<li class="pj-tree-li" data-id="{{ p.id }}"
data-name="{{ p.name }}" data-desc="{{ p.description or '' }}"
data-start="{{ p.start_date or '' }}" data-due="{{ p.due_date or '' }}"
data-color="{{ p.color }}" data-status="{{ p.status or 'active' }}"
data-creator="{{ p.created_by or '' }}">
<div class="pj-tree-row {% if p.id == project.id %}is-active{% endif %}">
<a class="pj-tree-link" href="/project/p/{{ p.id }}">
<span class="pj-tree-avatar" style="background: {{ p.color }}">{{ p.name[0] | upper }}</span>
<span class="pj-tree-name">{{ p.name }}</span>
</a>
{% if is_admin %}
<span class="pj-tree-acts">
<button type="button" class="pj-icon-btn pj-tree-edit" title="프로젝트 수정">✎</button>
<button type="button" class="pj-icon-btn pj-tree-del" data-id="{{ p.id }}" data-name="{{ p.name }}" data-creator="{{ p.created_by }}" title="프로젝트 삭제">×</button>
</span>
{% endif %}
</div>
</li>
{% endmacro %}
{% set nav_active = nav_projects | rejectattr("status", "equalto", "completed") | list %}
{% set nav_done = nav_projects | selectattr("status", "equalto", "completed") | list %}
{% if nav_active %}
<ul class="pj-tree" id="pj-tree-root">
{% for p in nav_active %}{{ nav_li(p) }}{% endfor %}
</ul>
{% else %}
<div class="pj-empty-sm">프로젝트 없음</div>
{% endif %}
{% if nav_done %}
<div class="pj-side-head pj-side-head-done"><span>완료 프로젝트</span></div>
<ul class="pj-tree" id="pj-tree-root-done">
{% for p in nav_done %}{{ nav_li(p) }}{% endfor %}
</ul>
{% endif %}
</div>
<!-- 전체 멤버 — 등록된 전체 직원(프로젝트 권한 보유자). 아이콘 클릭 시
그 사람이 담당자인 업무를 팝업으로 보여준다(프로젝트/세션/마감일). -->
<div class="pj-side-block">
<div class="pj-side-head"><span>전체 멤버</span></div>
<div class="pj-allmembers-grid" id="pj-allmembers-grid">불러오는 중…</div>
</div>
</aside>
<!-- ── 좌측 사이드바 — 내 업무 화면과 공용(project/_side.html) ── -->
{% with current_pid = project.id %}{% include "project/_side.html" %}{% endwith %}
<!-- ── 우측: 뷰 ── -->
<section class="pj-main">
@@ -426,21 +305,22 @@
</div>
</div>
<div class="pj-modal-col-side">
<!-- 하위 업무 (기존 업무 편집 시에만) -->
<div class="pj-task-extra" id="pj-subtask-block" hidden>
<div class="pj-extra-head">
<span class="material-symbols-outlined pj-gicon pj-gicon-sm">checklist</span> 하위 업무
</div>
<ul class="pj-subtask-list" id="pj-subtask-list"></ul>
<div class="pj-subtask-form">
<input type="text" id="pj-subtask-input" placeholder="하위 업무 제목…" />
<select id="pj-subtask-add-assignee"><option value="">(미지정)</option></select>
<input type="date" id="pj-subtask-add-due" />
<button type="button" class="pj-btn pj-btn-primary" id="pj-subtask-add">추가</button>
</div>
<!-- 하위 업무 — 설명 바로 아래 줄에서 팝업 너비 전체를 쓴다
(.pj-modal-body 그리드의 3번째 행, 1 / -1). 기존 업무 편집 시에만. -->
<div class="pj-task-extra pj-subtask-full" id="pj-subtask-block" hidden>
<div class="pj-extra-head">
<span class="material-symbols-outlined pj-gicon pj-gicon-sm">checklist</span> 하위 업무
</div>
<ul class="pj-subtask-list" id="pj-subtask-list"></ul>
<div class="pj-subtask-form">
<input type="text" id="pj-subtask-input" placeholder="하위 업무 제목…" />
<select id="pj-subtask-add-assignee"><option value="">(미지정)</option></select>
<input type="date" id="pj-subtask-add-due" />
<button type="button" class="pj-btn pj-btn-primary" id="pj-subtask-add">추가</button>
</div>
</div>
<div class="pj-modal-col-side">
<!-- 첨부파일 (기존 업무 편집 시에만) -->
<div class="pj-task-extra" id="pj-attach-block" hidden>
<div class="pj-extra-head">
@@ -568,11 +448,10 @@
"projects": {{ projects_meta | tojson }},
"stagesByProject": {{ stages_by_project | tojson }},
"boardStages": {{ board_stage_names | tojson }},
"avatars": {{ avatars | tojson }},
"myTasks": {{ my_tasks | tojson }}
"avatars": {{ avatars | tojson }}
}
</script>
<script src="/static/vendor/vis-timeline/vis-timeline-graph2d.min.js"></script>
<script src="/static/project.js?v=20260922b" defer></script>
<script src="/static/project.js?v=20260922c" defer></script>
{% endblock %}
+46 -157
View File
@@ -45,118 +45,9 @@
.pj-chip { display: inline-block; padding: 2px 8px; border-radius: 999px; background: #eef0f2; color: #525860; font-size: 11px; font-weight: 600; }
.pj-chip-sm { padding: 1px 6px; font-size: 10px; }
/* ── 홈 — 프로젝트 상세와 같은 "한 화면 채움" 레이아웃. 페이지(.erp-page)는
스크롤하지 않고 프로젝트 목록(좌)·내 업무(우)가 각자 안에서만 스크롤.
.erp-page 는 flex column 이라 .pj-wrap 을 flex:1 로 늘려 남은 높이를
확보하고, .pj-home 의 행을 1fr 로 확정해야 자식 height:100% 가 먹는다. */
/* 페이지(.erp-page)는 스크롤하지 않고 좌/우 칸이 각자 안에서만 스크롤한다 —
.erp-page 는 flex column 이라 .pj-wrap 을 flex:1 로 늘려 남은 높이를 확보한다. */
.erp-page > .pj-wrap { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; padding-bottom: 8px; }
.pj-home {
flex: 1 1 auto; min-height: 0;
display: grid; grid-template-columns: minmax(0, 1fr) 300px; grid-template-rows: minmax(0, 1fr);
gap: 28px; align-items: stretch;
}
.pj-home-main { min-width: 0; min-height: 0; height: 100%; overflow-y: auto; padding-right: 14px; }
@media (max-width: 980px) {
.erp-page > .pj-wrap:not(.pj-project-view) { display: block; }
.pj-home { display: block; }
.pj-home-main { height: auto; overflow: visible; }
}
.pj-project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; align-items: start; }
.pj-project-card {
position: relative; border: 1px solid var(--pj-border); border-radius: var(--pj-card-radius);
background: #fff; box-shadow: var(--pj-card-shadow); transition: box-shadow .14s, transform .1s;
}
.pj-project-card:hover { box-shadow: var(--pj-card-shadow-hover); transform: translateY(-1px); }
.pj-project-card[draggable="true"] { cursor: grab; }
.pj-project-card.is-dragging { opacity: .45; }
.pj-project-cardlink { display: flex; flex-direction: column; text-decoration: none; color: inherit; }
/* 카드 헤더 — 예전엔 이름 옆 작은 점(dot)이었지만, 이제 헤더 윗부분 전체를
프로젝트 색으로 채우고 글자는 흰색(세션 헤더 색칠과 같은 원칙). */
.pj-project-header {
display: flex; align-items: center; padding: 12px 16px;
background: var(--pj-color, #4573d2); color: #fff;
border-radius: calc(var(--pj-card-radius) - 1px) calc(var(--pj-card-radius) - 1px) 0 0;
}
.pj-project-name .pj-chip { background: rgba(255,255,255,.28); color: #fff; }
.pj-project-body { padding: 12px 16px 16px; }
/* 완료 프로젝트 — 비활성(흐리게) */
.pj-project-card.is-done { background: #f6f7f8; opacity: .62; }
.pj-project-card.is-done:hover { opacity: .85; }
/* 카드 우측 상단 액션(업무 추가/수정) — 헤더가 항상 색으로 채워지므로
흰 아이콘으로, 호버 시에만 노출 */
.pj-card-actions {
position: absolute; top: 8px; right: 8px; display: flex; gap: 2px;
}
.pj-card-actions .pj-icon-btn {
width: 28px; height: 28px;
display: inline-flex; align-items: center; justify-content: center;
border-radius: 8px; color: #fff; opacity: 0; transition: opacity .12s;
}
.pj-card-actions .pj-icon-btn .material-symbols-outlined { font-size: 18px; }
.pj-project-card:hover .pj-card-actions .pj-icon-btn { opacity: 1; }
.pj-card-actions .pj-icon-btn:hover { background: rgba(255,255,255,.25); color: #fff; }
/* 세션이 없는 프로젝트는 업무를 넣을 곳이 없다 — 흐리게 + 클릭 불가 */
.pj-project-card:hover .pj-card-actions .pj-icon-btn:disabled { opacity: .35; cursor: not-allowed; }
.pj-card-actions .pj-icon-btn:disabled { pointer-events: none; }
.pj-card-actions .pj-icon-btn:disabled:hover { background: none; }
.pj-project-name { font-weight: 700; font-size: 15px; }
.pj-project-desc { color: #6b7280; font-size: 12.5px; }
/* 프로젝트 이름 아래 — 배정 멤버(아이콘+이름) */
.pj-project-members { display: flex; flex-wrap: wrap; gap: 3px 10px; margin-top: 6px; }
.pj-project-member { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; color: #6b7280; }
.pj-project-meta { margin-top: 10px; display: flex; gap: 6px; flex-wrap: wrap; }
.pj-project-progress { margin-top: 10px; height: 5px; border-radius: 999px; background: #eef0f2; overflow: hidden; }
.pj-project-progress-bar { height: 100%; border-radius: 999px; background: var(--pj-color, #4573d2); }
/* 카드 하단 업무 미리보기 목록 */
.pj-project-tasklist { list-style: none; margin: 0; padding: 0 10px 6px; border-top: 1px solid #f0f1f3; }
.pj-project-taskrow a {
display: flex; align-items: center; gap: 7px; padding: 7px 6px; border-radius: 7px;
text-decoration: none; color: inherit;
}
.pj-project-taskrow a:hover { background: #f6f7f8; }
/* 댓글 아이콘 자리 — 댓글이 없어도 폭을 고정해 제목이 항상 같은 위치에서 시작(세로 정렬)되게 한다. */
.pj-project-task-lead { flex: 0 0 32px; display: inline-flex; align-items: center; }
.pj-project-task-title {
font-size: 12.5px; font-weight: 600; flex: 1; min-width: 0;
overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pj-project-task-stage {
flex: 0 0 auto; font-size: 10px; font-weight: 700; color: #6b7280;
background: #eef0f2; border-radius: 999px; padding: 1px 7px;
max-width: 70px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pj-project-task-assignee {
display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: #6b7280;
flex: 0 0 auto; max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pj-project-task-due { font-size: 11px; color: #9aa1a9; flex: 0 0 auto; }
.pj-project-task-due.is-overdue { color: #c22b10; font-weight: 700; }
.pj-project-taskrow.is-done .pj-project-task-title { text-decoration: line-through; color: #9aa1a9; }
.pj-project-more {
display: block; padding: 6px 16px 12px; font-size: 12px; font-weight: 600;
color: #6b7280; text-decoration: none;
}
.pj-project-more:hover { color: #1e1f21; text-decoration: underline; }
.pj-project-tasks-empty { padding: 4px 16px 14px; font-size: 12px; color: #b7bdc5; border-top: 1px solid #f0f1f3; margin-top: 2px; }
/* 완료 프로젝트 섹션 헤더 */
/* 홈/프로젝트 상세 공통 "내 업무" 패널 — 부모 grid 행(1fr)에 맞춰 높이를
확정하고 자기 안에서만 스크롤. 300px 는 padding 포함(border-box). */
.pj-home-side {
width: 300px; box-sizing: border-box; min-height: 0; height: 100%; overflow-y: auto;
border-left: 1px solid #eef0f2; padding-left: 24px; padding-right: 14px;
}
@media (max-width: 980px) { .pj-home-side { border-left: none; padding-left: 0; height: auto; overflow: visible; } }
.pj-mytask-list { list-style: none; margin: 0; padding: 0; }
.pj-mytask a { display: flex; align-items: center; gap: 8px; padding: 9px 6px; border-radius: 8px; text-decoration: none; color: inherit; }
.pj-mytask a:hover { background: #f6f7f8; }
.pj-mytask.is-done .pj-mytask-title { text-decoration: line-through; color: #9aa1a9; }
.pj-mytask-dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; }
.pj-mytask-title { font-size: 13.5px; font-weight: 600; }
.pj-mytask-meta { margin-left: auto; font-size: 11px; color: #9aa1a9; }
/* ── 프로젝트 페이지 레이아웃 (좌: 프로젝트 트리 / 가운데: 세션 등 뷰 / 우:
내 업무) — 화면(=.erp-page) 자체는 스크롤하지 않고 3칸이 각자 안에서만
@@ -194,9 +85,9 @@
스크롤 위치에 맞춰 움직이는 막대를 직접 그려 어떤 환경에서도 항상
보이게 한다. 휠·키보드·드래그 스크롤은 그대로 동작. 막대가 들어갈 자리로
각 패널의 padding-right 를 14px 확보한다. */
.pj-home-side, .pj-home-main, .pj-side, .pj-board { scrollbar-width: none; }
.pj-home-side::-webkit-scrollbar, .pj-home-main::-webkit-scrollbar,
.pj-side::-webkit-scrollbar, .pj-board::-webkit-scrollbar { display: none; width: 0; height: 0; }
.pj-side, .pj-board, .pj-mytasks-pane { scrollbar-width: none; }
.pj-side::-webkit-scrollbar, .pj-board::-webkit-scrollbar,
.pj-mytasks-pane::-webkit-scrollbar { display: none; width: 0; height: 0; }
/* anchor = 스크롤러의 첫 자식(높이 0, sticky) → 화면에 보이는 영역의 맨 위에
항상 붙어 있고, 그 안의 track 이 보이는 높이만큼 오른쪽 padding 자리에 걸린다. */
.pj-vbar-anchor { position: sticky; top: 0; height: 0; z-index: 5; }
@@ -419,51 +310,16 @@
.pj-th-resize { position: absolute; top: 0; right: -3px; width: 8px; height: 100%; cursor: col-resize; z-index: 2; }
.pj-th-resize:hover { background: linear-gradient(90deg, transparent 40%, #c9d4ea 40%, #c9d4ea 60%, transparent 60%); }
/* ── 내 업무 트리(홈) — 폴더 아이콘은 토글 버튼(열림/닫힘), 이름은 별도 링크 ── */
.pj-mytree-group { margin-bottom: 14px; }
.pj-mytree-head { display: flex; align-items: center; gap: 2px; }
.pj-mytree-toggle {
flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
width: 26px; height: 26px; padding: 0; border: none; background: transparent; border-radius: 7px; cursor: pointer;
}
.pj-mytree-toggle:hover { background: #f1f2f4; }
.pj-mytree-proj { display: flex; align-items: center; gap: 7px; text-decoration: none; color: #1e1f21; font-weight: 700; font-size: 13.5px; padding: 4px 2px; border-radius: 7px; flex: 1 1 auto; min-width: 0; }
.pj-mytree-proj:hover { background: #f6f7f8; }
/* 긴 이름이 밀려도 2줄로 안 꺾이게 — 말줄임표로. */
.pj-mytree-proj-name { display: block; flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 프로젝트 이름 오른쪽에 진행/완료 개수(숫자만, 색깔 있는 동그라미 안에).
.pj-mytree-head 자체가 폴더를 접어도(is-collapsed 는 .pj-mytree-tasks 만
숨김) 항상 보이므로 이 위치 그대로 유지된다. */
.pj-mytree-counts { display: flex; align-items: center; gap: 4px; flex: 0 0 auto; }
.pj-mtc-num {
display: inline-flex; align-items: center; justify-content: center;
min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
font-size: 10.5px; font-weight: 800;
}
/* 파스텔톤 — 배경은 연하게, 글자는 진하게(눈에 덜 튀면서도 대비는 유지) */
.pj-mtc-num.pj-mtc-open { background: #dcf1fc; color: #0284c7; cursor: default; } /* 진행 = 연한 하늘색 */
.pj-mtc-num.pj-mtc-done { background: #fbe3df; color: #c22b10; cursor: default; } /* 완료 = 연한 빨강 */
/* 마우스를 따라다니는 작은 툴팁([data-tip] 공용) */
/* 마우스를 따라다니는 작은 툴팁 — 제목 옆 멤버 아이콘의 이름 표시용. */
.pj-hovertip {
position: fixed; z-index: 4000; pointer-events: none;
background: #1e1f21; color: #fff; font-size: 11px; font-weight: 700;
position: fixed; z-index: 1400; pointer-events: none;
background: #1e1f21; color: #fff; font-size: 11.5px; font-weight: 600;
padding: 4px 8px; border-radius: 6px; white-space: nowrap;
box-shadow: 0 3px 10px rgba(0,0,0,.25);
/* left/top 은 커서 좌표 그대로 — 말풍선 아래-가운데를 그 점에 맞춰
커서 바로 위, 가로로는 커서 중앙에 오게 한다. */
transform: translate(-50%, -100%);
}
.pj-hovertip[hidden] { display: none; }
.pj-mytree-tasks { list-style: none; margin: 2px 0 0; padding: 0 0 0 8px; border-left: 2px solid #eef0f2; margin-left: 10px; }
.pj-mytree-group.is-collapsed .pj-mytree-tasks { display: none; }
.pj-mytree-task a { display: flex; align-items: flex-start; gap: 7px; padding: 6px 6px; border-radius: 7px; text-decoration: none; color: inherit; }
.pj-mytree-task a:hover { background: #f6f7f8; }
/* 댓글 아이콘 자리 — 댓글이 없어도 폭을 고정해 제목이 항상 같은 위치에서 시작(세로 정렬)되게 한다. */
.pj-mytree-lead { flex: 0 0 32px; display: inline-flex; align-items: center; margin-top: 1px; }
.pj-mytree-body { display: flex; flex-direction: column; min-width: 0; }
.pj-mytree-title { font-size: 13px; font-weight: 600; }
.pj-mytree-dates { font-size: 11px; color: #9aa1a9; margin-top: 1px; }
.pj-mytree-task.is-done .pj-mytree-title { text-decoration: line-through; color: #9aa1a9; }
/* ── 달력 (휴가 모듈과 동일한 월간 그리드 룩) ── */
.pj-cal-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
@@ -562,12 +418,14 @@
설명은 팝업 너비를 다 쓰는 게 편해서 칼럼 안이 아니라 두 열을 가로지르는
별도 행(.pj-desc-block)으로 뺐다. */
.pj-modal-body {
display: grid; grid-template-columns: 1.15fr .85fr; grid-template-rows: minmax(0, 1fr) auto;
display: grid; grid-template-columns: 1.15fr .85fr; grid-template-rows: minmax(0, 1fr) auto auto;
gap: 0 26px; align-items: stretch; height: 100%;
}
.pj-modal-col-main { grid-column: 1; grid-row: 1; }
.pj-modal-col-side { grid-column: 2; grid-row: 1; }
.pj-desc-block { grid-column: 1 / -1; grid-row: 2; min-width: 0; padding-top: 10px; border-top: 1px solid #eef0f2; }
/* 하위 업무도 설명과 같이 팝업 너비 전체를 쓰는 별도 행. */
.pj-subtask-full { grid-column: 1 / -1; grid-row: 3; min-width: 0; }
.pj-modal-col-main, .pj-modal-col-side { min-width: 0; min-height: 0; overflow-y: auto; padding-right: 4px; }
.pj-modal-col-side .pj-task-extra:first-child { margin-top: 0; padding-top: 0; border-top: none; }
@media (max-width: 720px) {
@@ -888,6 +746,8 @@ label.pj-desc-fmtbtn { line-height: 26px; }
/* ── 하위 업무(인라인) ── */
.pj-subtask-list { list-style: none; margin: 0 0 8px; padding: 0; }
.pj-subtask-row { display: flex; align-items: center; gap: 6px; padding: 4px 2px; }
/* 완료된 하위 업무는 행 전체를 반투명하게(체크박스 포함) + 제목 취소선. */
.pj-subtask-row.is-done { opacity: .5; }
.pj-subtask-row.is-done .pj-subtask-title { text-decoration: line-through; color: #9aa1a9; }
.pj-subtask-row input[type="checkbox"] { width: auto; margin: 0; flex: 0 0 auto; }
.pj-subtask-title {
@@ -1054,10 +914,8 @@ label.pj-desc-fmtbtn { line-height: 26px; }
}
.pj-side-navbadge-open { background: #dcf1fc; color: #0284c7; }
.pj-side-navbadge[hidden] { display: none; }
.pj-side-navcaret { font-size: 18px; color: #9aa1a9; flex: 0 0 auto; transition: transform .15s; }
.pj-mytasks-toggle[aria-expanded="true"] .pj-side-navcaret { transform: rotate(180deg); }
.pj-mytasks-panel { margin: 0 0 18px 6px; padding-left: 4px; border-left: 2px solid #eef0f2; }
.pj-mytasks-panel[hidden] { display: none; }
.pj-side-navlink.is-active { background: var(--pj-accent-tint); color: var(--pj-accent-dark); }
.pj-side-navlink.is-active .pj-side-navic { color: var(--pj-accent-dark); }
/* ── 보드 가로 스크롤 막대 (세로 막대 .pj-vbar-* 와 같은 이유로 직접 그린다) ── */
.pj-hbar { position: relative; height: 8px; margin: 6px 14px 0 0; border-radius: 999px; background: #e6e8ec; flex: none; }
@@ -1112,3 +970,34 @@ label.pj-desc-fmtbtn { line-height: 26px; }
.pj-inbox-count[hidden] { display: none; }
.pj-inbox-title.is-done { text-decoration: line-through; color: #9aa1a9; }
.pj-inbox-proj { font-weight: 600; }
/* ════════════════════════════════════════════════════════════
내 업무 화면 (/project/) — 프로젝트 모듈의 첫 화면.
내가 담당자인 업무를 한 표에 모은다. 행 클릭 = 그 프로젝트로 이동하며
업무 편집 팝업(?task=), 체크박스 = 완료 토글, 우클릭 = 메뉴.
════════════════════════════════════════════════════════════ */
.pj-mytasks-view .pj-layout { flex: 1 1 auto; min-height: 0; }
.pj-mytasks-pane { overflow-y: auto; padding-right: 14px; }
.pj-mytasks-summary { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.pj-mtk-stat { font-size: 12.5px; color: var(--pj-ink-soft); }
.pj-mtk-stat b { font-size: 14px; color: var(--pj-ink); margin-left: 3px; }
.pj-mtk-stat.is-overdue b { color: #c22b10; }
.pj-mytasks-table { width: 100%; }
.pj-mytasks-table th { white-space: nowrap; }
.pj-mtk-row { cursor: pointer; }
.pj-mtk-row:hover td { background: #f6f7f8; }
.pj-mtk-row.is-done { opacity: .5; }
.pj-mtk-row.is-done .pj-mtk-name { text-decoration: line-through; }
.pj-mytasks-table td { vertical-align: middle; }
.pj-mtk-check { width: 34px; text-align: center; }
.pj-mtk-check input[type="checkbox"] { width: auto; margin: 0; cursor: pointer; }
.pj-mtk-name { font-weight: 600; }
.pj-mtk-proj, .pj-mtk-stage { width: 160px; color: var(--pj-ink-soft); font-size: 12.5px; }
.pj-mtk-pri { width: 88px; }
.pj-mtk-date { width: 108px; font-size: 12.5px; color: var(--pj-ink-soft); }
.pj-mtk-overdue { color: #c22b10; font-weight: 700; }
.pj-muted { color: #b7bdc5; }
@media (max-width: 980px) {
.pj-mtk-proj, .pj-mtk-stage, .pj-mtk-pri { display: none; }
}
+256 -1146
View File
File diff suppressed because it is too large Load Diff
+16 -16
View File
@@ -83,19 +83,18 @@
## 3. 화면 / 뷰
- **홈** (`/project/`): "진행중인 프로젝트" / "완료된 프로젝트" 두 섹션으로 구분된 카드 그리드 + "내 업무" 사이드.
관리자는 "새 프로젝트"(이름/설명/시작일/마감일/색상 지정 + 멤버 다중 선택, 생성 직후 일괄 배정). 완료 섹션은 접기/펼치기(localStorage 기억).
각 카드에 이름 아래 배정 멤버(아이콘+이름), 진행률 바(완료/전체 업무)와 업무 미리보기(단계·담당자·마감일, 최대 8건 + 더보기)를 표시 —
완료된 업무도 취소선으로 계속 노출해 전체 현황을 한눈에 파악.
카드 이름 옆에는 호버 시에만 보이는 "업무 추가" 아이콘 버튼(관리자 또는 해당 프로젝트 멤버/owner) — 같은 업무편집 팝업을 새 업무 작성 모드로 연다.
카드·내 업무의 업무를 클릭하면 페이지 이동 없이 그 자리에서 업무편집 팝업(담당자·단계·일정·첨부·댓글)이 뜬다
(`#pj-modal-task` + `home_tasks`/`#pj-home-data`, 담당자·단계 옵션은 해당 프로젝트를 API 로 즉시 조회).
업무에 댓글이 있으면 말풍선 아이콘+개수를 표시, 더블클릭하면 댓글만 보는 카톡 대화창 스타일 팝업(`#pj-modal-comments`)이 뜬다.
확인 안 한 새 댓글은 말풍선이 커지며 반짝이고(브라우저별 `localStorage: pj_seen_comments` 로 확인 여부 기억), 팝업을 열면(확인하면) 원래대로 돌아간다.
날짜는 전부 `mm/dd(요일)` 형식(`_fmt_date_kr`)으로 표시.
프로젝트/업무/댓글/멤버/단계가 추가·수정되면 `GET /project/api/live-version`(최근 변경 시각) 폴링으로 감지해
해당 화면을 열어둔 모든 사용자의 페이지가 자동 새로고침(모달을 열어 입력 중이면 닫힐 때까지 대기).
- **프로젝트** (`/project/p/{id}`): 좌측 사이드바(수신함 · 내 업무 · 프로젝트 트리 · 전체 멤버) + 우측 뷰 토글.
- **내 업무** (`/project/`): 프로젝트 모듈의 첫 화면. 예전 홈(프로젝트 카드 그리드)은
**없앴다** — 좌측 "내 업무" 메뉴와 같은 화면이다(`project/mytasks.html`).
내가 담당자인 업무를 한 표에 모아 보여준다: 완료 체크박스 · 업무 · 프로젝트 · 세션 ·
우선순위 · 시작 · 마감. 헤더 클릭으로 정렬, 상단 탭으로 진행 중/완료/전체 필터,
오른쪽에 진행/완료/지연 요약. 체크박스는 그 자리에서 완료 토글, 행을 누르면 그
프로젝트로 이동하며 업무 편집 팝업이 열리고(`?task=`), 우클릭은 열기/완료/삭제 메뉴.
완료된 업무 행은 반투명 + 취소선. 8초 주기로 목록을 다시 받는다.
좌측 사이드바는 프로젝트 화면과 공용(`project/_side.html`) — 수신함 · 내 업무 ·
프로젝트 트리(+ 새 프로젝트). "전체 멤버"는 그 팝업을 배선하는 코드가 `initProject`
안에 있어 프로젝트 화면에서만 나온다.
- **프로젝트** (`/project/p/{id}`): 좌측 사이드바(공용 `_side.html`) + 우측 뷰 토글.
좌측 "내 업무"는 접이식 패널이 아니라 `/project/` 로 가는 링크다.
**이 프로젝트의 멤버는 화면 위 제목 오른쪽**에 겹친 아바타로 둔다(`.pj-title-members`) —
마우스를 올리면 이름(`data-tip`, `initHoverTips` 가 위임 방식이라 동적 요소에도 붙는다),
클릭하면 그 사람이 이 프로젝트에서 맡은 업무 팝업, 우클릭(관리자)하면 제외, 옆 `+` 는 멤버 배정.
@@ -184,9 +183,10 @@ description 을 항상 HTML로 취급하기 때문). 두 번 실행하면 이중
## 6. 댓글 · 첨부 · 알림센터 · 세션 편집 (구현됨)
- **댓글** `task_comments` — 업무 모달 하단. 등록/삭제(본인·관리자). 새 댓글 시 관련자 인앱 알림.
- **업무 편집 팝업** — 윗줄은 메타(좌) + 하위업무/첨부/연결/댓글(우) 2단, **설명란은 그 아래
팝업 너비 전체**를 쓰는 별도 행(`.pj-desc-block`, 그리드 `1 / -1`). 좁은 화면과 "새 업무"
(compact)에서는 단일 컬럼으로 흐른다.
- **업무 편집 팝업** — 윗줄은 메타(좌) + 첨부/연결/댓글(우) 2단, 그 아래 **설명란**과
**하위 업무**가 각각 팝업 너비 전체를 쓰는 별도 행(`.pj-desc-block` / `.pj-subtask-full`,
그리드 `1 / -1`). 하위 업무는 제목 왼쪽 체크박스로 완료를 토글하고, 완료된 줄은
반투명(50%) + 취소선. 좁은 화면과 "새 업무"(compact)에서는 단일 컬럼으로 흐른다.
- **첨부** `task_attachments` — 업무 모달. 파일 업로드(최대 20MB)/다운로드/삭제. 실제 파일은 `DATA_DIR/project/<task_id>/<uuid>.<ext>`, DB엔 메타만. 첨부 디렉토리는 운영 볼륨(DATA_DIR)에 저장돼 재배포에도 보존. 설명란 이미지 삽입도 이 표를 재사용(§1-1).
- **세션 편집** — 보드 칸반 헤더에서 이름변경/완료토글/삭제, 트레일링 "+ 세션 추가", **컬럼 드래그로 순서 변경**. `PUT .../stages/order`, `PUT .../stages/{id}`, 삭제는 만든 사람만.
- **알림센터(인앱)** `project_notifications` — 배정/완료/댓글 시 수신자별 알림 생성. 우측 상단 벨(미읽음 배지) → `/project/inbox`. 항목 클릭=읽음, "모두 읽음". 본인 행동은 알림 제외.