feat(project): add meeting cell editing

Apply project_db migration 019 to enable vertical cell merges. Other cell editing remains available before migration.
This commit is contained in:
2026-10-03 15:11:41 +09:00
parent 193da56edf
commit 090e508bf3
18 changed files with 1054 additions and 78 deletions
+21
View File
@@ -401,6 +401,10 @@ class GoalCellConflict(RuntimeError):
"""셀 이동 전에 다른 창에서 원본 또는 대상 내용이 바뀜."""
class MeetingCellMigrationNeeded(RuntimeError):
"""회의록 셀 병합 메타데이터(019)가 아직 없다."""
GOAL_YEAR = 0 # 업무 영역 글 칸 — 연간
# 분기 글 칸(2026-10-01 상·하반기 → 1~4분기). 칸 번호는 예전 반기 칸을 그대로 이어 쓴다 — 데이터 옮기기 없이
# 예전 상반기 글(13)은 1분기, 하반기 글(14)은 3분기에 보인다. 2분기(15)·4분기(16)는 마이그레이션 017 뒤에 저장.
@@ -563,6 +567,23 @@ def merge_goal_texts(bodies: list[str]) -> str:
return validate_goal_text(GOAL_RICH_PREFIX + json.dumps(runs, ensure_ascii=False))
def validate_meeting_content(body: Any) -> str:
"""회의록 편집기와 같은 서식 조각 합치기로 이동 예상값을 비교한다."""
value = validate_goal_text(body)
if not value.startswith(GOAL_RICH_PREFIX):
return value
runs: list[dict[str, Any]] = []
keys = ("bold", "italic", "underline", "color", "size")
for run in goal_text_runs(value):
if runs and all(runs[-1].get(k) == run.get(k) for k in keys):
runs[-1]["text"] += run["text"]
else:
runs.append(dict(run))
if not any(len(run) > 1 for run in runs):
return validate_goal_text("".join(run["text"] for run in runs))
return GOAL_RICH_PREFIX + json.dumps(runs, ensure_ascii=False, separators=(",", ":"))
# ── 엑셀식 사각형 병합(마이그레이션 015) ──────────────────────────────
class GoalMigration015Needed(RuntimeError):
"""세로 병합·주간 회의록은 마이그레이션 015 뒤에만 된다."""