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:
@@ -688,7 +688,7 @@ function titleVal(d) { return d.getElementById("pj-t-title").value; }
|
||||
// ── 대시보드 담당자별 작업 합계 — 사람마다 메인·하위 세로 막대(완료/전체), 막대 → 오른쪽 업무 목록, 항목 → 편집 창 ──
|
||||
{
|
||||
const env = makeEnv(); baseRoutes(env);
|
||||
env.d.querySelector(".pj-project-view").dataset.isAdmin = "true";
|
||||
env.d.querySelector(".pj-project-view").dataset.isPro = "true";
|
||||
let asked = null;
|
||||
env.route("GET", /\/project\/api\/projects\/1\/subtasks-summary\?scope=project$/, function (u) {
|
||||
asked = u;
|
||||
|
||||
@@ -46,7 +46,7 @@ def board() -> dict:
|
||||
|
||||
def goals_ctx(admin: bool) -> dict:
|
||||
return {
|
||||
"user": {"email": ME, "is_super_admin": False}, "is_admin": admin, "nav_projects": [], "goal_years": [2026],
|
||||
"user": {"email": ME, "is_super_admin": False}, "is_admin": admin, "pj_pro": admin, "pj_admin": admin, "nav_projects": [], "goal_years": [2026],
|
||||
"goal_year_active": 2026, "my_open_total": 0, "mention_unread": 0, "color_palette": ["#4573d2"],
|
||||
"project_icons": ["folder"], "goals_enabled": True, "goal_year": 2026, "board": board(),
|
||||
"months": list(range(1, 13)),
|
||||
@@ -104,7 +104,7 @@ def meeting_view(err: bool) -> dict:
|
||||
def meeting_ctx(admin: bool, err: bool, can_sync: bool = True) -> dict:
|
||||
view = meeting_view(err)
|
||||
ctx = {
|
||||
"user": {"email": ME, "is_super_admin": False}, "is_admin": admin, "nav_projects": [], "goal_years": [2026],
|
||||
"user": {"email": ME, "is_super_admin": False}, "is_admin": admin, "pj_pro": admin, "pj_admin": admin, "nav_projects": [], "goal_years": [2026],
|
||||
"goal_year_active": 2026, "my_open_total": 0, "mention_unread": 0, "color_palette": ["#4573d2"],
|
||||
"project_icons": ["folder"], "goal_year": 2026, "goal_month": 9, "meetings_enabled": True,
|
||||
"weeks": [{"start": "2026-09-28", "end": "2026-10-04", "n": 4, "label": "9/28~10/4", "has": True, "now": False,
|
||||
|
||||
@@ -56,7 +56,7 @@ def main() -> None:
|
||||
|
||||
def render_one(env, name: str, admin: bool) -> None:
|
||||
html = env.get_template("project/project.html").render(
|
||||
user={"email": ME, "is_super_admin": False}, is_admin=admin, can_manage=True,
|
||||
user={"email": ME, "is_super_admin": False}, is_admin=admin, pj_pro=admin, pj_admin=admin, can_manage=True,
|
||||
project=PROJECTS[0], current_project_id=1, stages=STAGES[1], tasks=TASKS,
|
||||
members=[{"user_email": ME, "role": "member"}, {"user_email": "bob@test.local", "role": "member"}],
|
||||
projects_meta=PROJECTS, nav_projects=PROJECTS, stages_by_project=STAGES, board_stage_names=["할 일", "완료"],
|
||||
|
||||
Reference in New Issue
Block a user