feat(project): weekly meetings editable by anyone, admin completes to lock
Meeting write APIs now accept any project user; deleting a meeting and the
new POST /api/goals/meetings/{week}/complete (complete/reopen) stay admin
only. A completed meeting (migration 022: completed_at, completed_by)
rejects edits with 409; last-week result fields follow the next meeting's
lock instead. The page shows a complete button / locked badge.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -103,7 +103,7 @@ def meeting_view(err: bool) -> dict:
|
||||
|
||||
def meeting_ctx(admin: bool, err: bool, can_sync: bool = True) -> dict:
|
||||
view = meeting_view(err)
|
||||
return {
|
||||
ctx = {
|
||||
"user": {"email": ME, "is_super_admin": False}, "is_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,
|
||||
@@ -114,6 +114,16 @@ def meeting_ctx(admin: bool, err: bool, can_sync: bool = True) -> dict:
|
||||
"can_sync": can_sync, "meeting_status": store.MEETING_STATUS, "meet_members": [], "month_plan": None,
|
||||
"attendee_list": [], **copy.deepcopy(view),
|
||||
}
|
||||
# 회의록은 누구나 고친다(2026-10-07) — 보기 전용은 "회의 완료"된 회의록뿐. 관리자 아닌 화면 = 완료된 회의록으로 시험
|
||||
ctx["meeting"].update(can_complete=True, completed=not admin, completed_at="2026-10-02 18:00" if not admin else "",
|
||||
completed_by="admin@test.local" if not admin else "")
|
||||
return ctx
|
||||
|
||||
|
||||
def member_ctx() -> dict:
|
||||
ctx = meeting_ctx(False, False, can_sync=False)
|
||||
ctx["meeting"].update(completed=False, completed_at="", completed_by="")
|
||||
return ctx
|
||||
|
||||
|
||||
def meeting_layout_ctx(admin: bool) -> dict:
|
||||
@@ -156,6 +166,8 @@ def main() -> None:
|
||||
"meeting_admin.html": ("project/goal_meeting.html", meeting_ctx(True, False)),
|
||||
"meeting_err.html": ("project/goal_meeting.html", meeting_ctx(True, True)),
|
||||
"meeting_ro.html": ("project/goal_meeting.html", meeting_ctx(False, False, can_sync=False)),
|
||||
# 관리자 아닌 직원 + 아직 완료 전 회의록 — 누구나 고친다(2026-10-07)
|
||||
"meeting_member.html": ("project/goal_meeting.html", member_ctx()),
|
||||
"meeting_layout_admin.html": ("project/goal_meeting.html", meeting_layout_ctx(True)),
|
||||
"meeting_layout_ro.html": ("project/goal_meeting.html", meeting_layout_ctx(False)),
|
||||
"meeting_merged.html": ("project/goal_meeting.html", meeting_merged_ctx()),
|
||||
|
||||
Reference in New Issue
Block a user