feat(project): move whole meeting sections up/down from the 구분 column

- 구분 cell: right-click or ⋯ menu → 구역 위로 / 구역 아래로 / 구역 끝에 줄 추가
- POST /api/goals/meeting-items/{id}/move-section swaps the contiguous section block
  with its neighbour under the meeting lock (row order and merges follow; 409 after completion)
- Next meetings inherit the new order; help + docs; tests (DB-less, real PostgreSQL, jsdom)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-12 13:29:53 +09:00
parent ae6b6ec603
commit ee09e8bfd1
17 changed files with 185 additions and 18 deletions
+16
View File
@@ -3737,3 +3737,19 @@ def api_move_meeting_item(request: Request, item_id: int, payload: dict[str, Any
st = _db_or_503(request)
_goal_call(st.move_meeting_item, item_id=item_id, direction=int(payload.get("direction") or 0))
return JSONResponse({"ok": True})
@router.post("/api/goals/meeting-items/{item_id}/move-section")
def api_move_meeting_section(request: Request, item_id: int, payload: dict[str, Any] = Body(...)) -> JSONResponse:
"""구역(첫 열 "구분") 통째로 위/아래 {direction: -1|1} — item_id = 그 구역의 아무 줄. 줄 순서와 같은 권한(누구나,
회의 완료 전까지). 다음 회의록은 이 순서를 이어받는다."""
_require_user(request)
st = _db_or_503(request)
try:
direction = int(payload.get("direction") or 0)
except (TypeError, ValueError):
raise HTTPException(status_code=400, detail="direction 이 올바르지 않습니다.")
if direction not in (-1, 1):
raise HTTPException(status_code=400, detail="direction 은 -1(위) 또는 1(아래)입니다.")
_goal_call(st.move_meeting_section, item_id=item_id, direction=direction)
return JSONResponse({"ok": True})