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:
2026-10-07 17:37:23 +09:00
parent 21fc78adb9
commit 5278d568de
21 changed files with 325 additions and 46 deletions
+4 -3
View File
@@ -196,9 +196,6 @@ class MeetingCellTests(unittest.TestCase):
endpoints = [("POST", "/meeting-cells/move", self.payload),
("POST", "/meeting-cells/merge", dict(item_from=1, item_to=2)),
("DELETE", "/meeting-items/1/cell-merge", None)]
with patch.object(api, "_require_user", return_value=dict(role="user", email="user@test.local")):
for method, endpoint, body in endpoints:
self.assertEqual(client.request(method, "/project/api/goals" + endpoint, json=body).status_code, 403)
with patch.object(api, "_require_user", return_value=dict(role="admin", email="admin@test.local")):
url = "/project/api/goals/meeting-cells/move"
self.assertEqual(client.post(url, json={}).status_code, 400)
@@ -207,6 +204,10 @@ class MeetingCellTests(unittest.TestCase):
self.st._meeting_cells = lambda conn: False
self.assertEqual(client.post("/project/api/goals/meeting-cells/merge", json=dict(item_from=1, item_to=2)).status_code, 503)
self.assertEqual(client.post(url, json=self.payload).status_code, 200, "Move/formatting work without 019")
# 회의록은 누구나 고친다(2026-10-07) — 관리자가 아니어도 셀 이동·병합·해제를 막지 않는다(잠금은 회의 완료로)
with patch.object(api, "_require_user", return_value=dict(role="user", email="user@test.local")):
for method, endpoint, body in endpoints:
self.assertNotEqual(client.request(method, "/project/api/goals" + endpoint, json=body).status_code, 403)
def test_amount_cells_accept_text_after_021_and_result_note_reaches_store(self):
"""정량 목표·결과 — 숫자면 원 정수 칸, 글(예: 20개)이면 글 칸(021). 지난주 결과 글(result_note, 020)은 API 를 거쳐 저장된다."""