feat(project): 4-tier roles (super/admin/pro/user), meeting header 구분
- app.store: role "pro" (ROLES, ROLE_LABELS); admin page grade select Admin / Pro user / User, super admin fixed to one account. - project.access: role_of, is_pro, is_project_admin. - router: _require_admin -> _require_pro (goals, meetings complete/delete, members, reorder, trash restore, assignable users); new project and project edit/owner change need Pro user+; task delete open to any member; project/section delete = Admin+ or creator; comment edit/delete of others and workload summary = Pro user+. Templates get pj_pro / pj_admin. - Weekly meeting table first header "구역" -> "구분". - Docs (CLAUDE.md, PROJECT_MODULE 6-14, overview, help page) and tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{# ── 프로젝트 모듈 좌측 사이드바 (공용) ──────────────────────────────
|
||||
수신함·내 업무·휴지통·프로젝트 화면이 함께 쓴다 — 어느 화면이든 프로젝트
|
||||
목록은 똑같다(관리자: 드래그 순서 변경·✎ 수정·× 삭제·우클릭 메뉴).
|
||||
목록은 똑같다(Pro user 이상: 드래그 순서 변경·✎ 수정·× 삭제·우클릭 메뉴).
|
||||
|
||||
변수:
|
||||
mention_unread 미확인 @태그 개수 (수신함 배지)
|
||||
@@ -10,7 +10,8 @@
|
||||
side_active 'inbox' | 'mytasks' | 'trash' | 'goals' | '' — 개인 메뉴 활성 표시
|
||||
goal_years "목표" 아래 연도 목록(router._goal_years_nav — 올해는 항상 포함)
|
||||
goal_year_active 목표 화면에서 보고 있는 연도
|
||||
is_admin 프로젝트 생성/수정/삭제 권한
|
||||
pj_pro Pro user 이상 — 프로젝트 생성·수정·순서·전체 보기·휴지통·전체 멤버·연도 추가
|
||||
pj_admin Admin 이상 — 남이 만든 프로젝트도 삭제(그 밖은 만든 사람만)
|
||||
목록 동작은 project.js 의 initSideTree(첫 화면을 같은 마크업으로 다시 그림),
|
||||
새 프로젝트/수정 모달은 각 화면이 include 하는 project/_side_modals.html. #}
|
||||
{# 날짜 팝업(openDatePopover)이 공휴일을 빨강으로 칠할 때 쓰는 표 — 이 사이드바는
|
||||
@@ -19,7 +20,7 @@
|
||||
{# 모든 프로젝트 화면에서 같은 회의록 트리를 사용한다. #}
|
||||
<link rel="stylesheet" href="/static/project-goal-nav.css?v=20261004e" />
|
||||
<script src="/static/project-goal-nav.js?v=20261004d" defer></script>
|
||||
<aside class="pj-side" data-is-admin="{{ 'true' if is_admin else 'false' }}"
|
||||
<aside class="pj-side" data-is-pro="{{ 'true' if pj_pro else 'false' }}" data-is-padmin="{{ 'true' if pj_admin else 'false' }}"
|
||||
data-is-super="{{ 'true' if user.is_super_admin else 'false' }}"
|
||||
data-me="{{ user.email }}">
|
||||
<!-- 전체 검색 — 제목·설명·댓글, 내가 볼 수 있는 모든 프로젝트(세부 업무 포함).
|
||||
@@ -38,9 +39,9 @@
|
||||
<span class="pj-side-navbadge" id="pj-mention-badge"
|
||||
{% if not mention_unread %}hidden{% endif %}>{{ mention_unread }}</span>
|
||||
</a>
|
||||
{# 전체 보기(2026-10-08, 관리자만) — 예전 프로젝트 화면 오른쪽 위 "전체 프로젝트" 토글. 지금 프로젝트(없으면 목록 첫 프로젝트)
|
||||
{# 전체 보기(2026-10-08, Pro user 이상 — 멤버인 프로젝트 범위) — 예전 프로젝트 화면 오른쪽 위 "전체 프로젝트" 토글. 지금 프로젝트(없으면 목록 첫 프로젝트)
|
||||
화면을 ?scope=all 로 연다 — 볼 수 있는 모든 프로젝트의 작업. 프로젝트 화면에서는 project.js 가 새로고침 없이 바꾼다. #}
|
||||
{% if is_admin %}
|
||||
{% if pj_pro %}
|
||||
{% set _all_pid = current_pid or ((nav_projects | rejectattr("status", "equalto", "completed") | list | first or {}).id or 0) %}
|
||||
{% if _all_pid %}
|
||||
<a class="pj-side-navlink" id="pj-side-allview" href="/project/p/{{ _all_pid }}?scope=all">
|
||||
@@ -55,8 +56,8 @@
|
||||
<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>
|
||||
{# 휴지통 — 관리자만 보이고(화면·복구 API 도 관리자 전용), 지운 업무를 3개월 보관. #}
|
||||
{% if is_admin %}
|
||||
{# 휴지통 — Pro user 이상만 보이고(화면·복구 API 도 같음), 지운 업무를 3개월 보관. #}
|
||||
{% if pj_pro %}
|
||||
<a class="pj-side-navlink {% if side_active == 'trash' %}is-active{% endif %}" href="/project/trash">
|
||||
<span class="material-symbols-outlined pj-side-navic">delete</span>
|
||||
<span class="pj-side-navtext">휴지통</span>
|
||||
@@ -64,7 +65,7 @@
|
||||
{% endif %}
|
||||
{# 목표 — 누르면 바로 아래에 연도가 펼쳐지고, 연도를 누르면 오른쪽에 그해 전체 목표
|
||||
(/project/goals/{연도}). 펼침 상태는 localStorage(pj_goal_open), 목표 화면에서는 항상 펼침.
|
||||
연도 추가는 관리자만(마이그레이션 013). #}
|
||||
연도 추가는 Pro user 이상(마이그레이션 013). #}
|
||||
{% set goal_open = side_active == 'goals' %}
|
||||
<div class="pj-side-goal{% if goal_open %} is-open{% endif %}" id="pj-side-goal"
|
||||
data-force-open="{{ 'true' if goal_open else 'false' }}">
|
||||
@@ -89,7 +90,7 @@
|
||||
<div class="pj-side-meeting-months" id="pj-side-meeting-months-{{ y }}" data-current-week="{{ week if goal_month is defined else '' }}"></div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% if is_admin %}
|
||||
{% if pj_pro %}
|
||||
<button type="button" class="pj-side-goal-add" id="pj-goal-year-add"
|
||||
data-next="{{ ((goal_years or [0]) | max) + 1 }}">+ 연도 추가</button>
|
||||
{% endif %}
|
||||
@@ -100,23 +101,23 @@
|
||||
<div class="pj-side-block pj-tree-block">
|
||||
<div class="pj-side-head">
|
||||
<span>프로젝트</span>
|
||||
{% if is_admin %}
|
||||
{% if pj_pro %}
|
||||
<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 }}"{% if is_admin %} draggable="true"{% endif %}
|
||||
<li class="pj-tree-li" data-id="{{ p.id }}"{% if pj_pro %} draggable="true"{% endif %}
|
||||
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-icon="{{ p.icon or '' }}">
|
||||
<div class="pj-tree-row {% if p.id == current_pid %}is-active{% endif %}">
|
||||
{% if is_admin %}<span class="pj-tree-handle" title="드래그로 순서 변경">⣿</span>{% endif %}
|
||||
<a class="pj-tree-link" href="/project/p/{{ p.id }}"{% if is_admin %} draggable="false"{% endif %}>
|
||||
{% if pj_pro %}<span class="pj-tree-handle" title="드래그로 순서 변경">⣿</span>{% endif %}
|
||||
<a class="pj-tree-link" href="/project/p/{{ p.id }}"{% if pj_pro %} draggable="false"{% endif %}>
|
||||
<span class="pj-tree-avatar{% if p.icon %} has-icon{% endif %}" style="background: {{ p.color }}">{% if p.icon %}{% set _a = p.icon.startswith("asana:") %}<span class="material-symbols-outlined pj-proj-ic{% if _a %} pj-ic-asana{% endif %}">{{ p.icon[6:] if _a else p.icon }}</span>{% else %}{{ p.name[0] | upper }}{% endif %}</span>
|
||||
<span class="pj-tree-name">{{ p.name }}</span>
|
||||
</a>
|
||||
{% if is_admin %}
|
||||
{% if pj_pro %}
|
||||
<span class="pj-tree-acts">
|
||||
<button type="button" class="pj-icon-btn pj-tree-edit" data-id="{{ p.id }}"
|
||||
data-name="{{ p.name }}" data-desc="{{ p.description or '' }}"
|
||||
@@ -145,11 +146,11 @@
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<!-- 전체 멤버 — 등록된 전체 직원(프로젝트 권한 보유자). 관리자 전용
|
||||
(/api/all-users 도 관리자만). 아이콘 클릭 시 그 사람이 담당자인 업무를
|
||||
<!-- 전체 멤버 — 등록된 전체 직원(프로젝트 권한 보유자). Pro user 이상
|
||||
(/api/all-users 는 @태그 후보로 누구나 부른다). 아이콘 클릭 시 그 사람이 담당자인 업무를
|
||||
팝업으로 보여준다(프로젝트/세션/마감일). 수신함·내 업무·프로젝트 화면
|
||||
모두에서 보인다 — 팝업 마크업은 _member_tasks_modal.html. -->
|
||||
{% if is_admin %}
|
||||
{% if pj_pro %}
|
||||
<div class="pj-side-block">
|
||||
<div class="pj-side-head"><span>전체 멤버</span></div>
|
||||
<div class="pj-allmembers-grid" id="pj-allmembers-grid">불러오는 중…</div>
|
||||
|
||||
Reference in New Issue
Block a user