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
+2
View File
@@ -2811,6 +2811,8 @@ th.pj-meet-c-label { position: relative; font-weight: 600; color: #3b4048; text-
.pj-meet-more { position: absolute; top: 3px; right: 2px; width: 24px; height: 24px; opacity: 0; transition: opacity .12s; }
.pj-meet-more .material-symbols-outlined { font-size: 18px; }
th.pj-meet-c-label:hover .pj-meet-more, .pj-meet-more:focus { opacity: 1; }
/* 구분(구역) 칸 ⋮ — 구역 위로·아래로(줄 메뉴와 같은 모양) */
th.pj-meet-c-sec:hover .pj-meet-sec-more { opacity: 1; }
textarea.pj-meet-text, textarea.pj-meet-rnote, .pj-meet-notes textarea {
display: block; width: 100%; box-sizing: border-box; min-height: 38px; padding: 6px; border: none; background: transparent;
font: inherit; line-height: var(--pj-text-leading); color: inherit; resize: none; overflow: hidden;
+31 -1
View File
@@ -11197,6 +11197,26 @@
} },
].concat(cellGrid ? [null].concat(cellGrid.widthItems(tr.querySelector("th.pj-meet-c-label"))) : []));
}
// ── 구역 메뉴(구분 칸 ⋯ · 우클릭) — 구역을 통째로 위/아래(그 안의 줄 순서·병합은 그대로), 구역 끝에 줄 추가 ──
function secMenu(x, y, tbody) {
const blocks = Array.prototype.slice.call(table.querySelectorAll("tbody.pj-meet-sec"));
const i = blocks.indexOf(tbody);
const first = tbody.querySelector("tr[data-item]");
if (!first) return;
const mv = function (dir) {
return function () {
run(async function () { await api("POST", itemUrl(first.dataset.item) + "/move-section", { direction: dir }); return true; });
};
};
const items = [];
if (i > 0) items.push({ label: "구역 위로", icon: menuIcon("arrow_upward"), onClick: mv(-1) });
if (i < blocks.length - 1) items.push({ label: "구역 아래로", icon: menuIcon("arrow_downward"), onClick: mv(1) });
if (items.length) items.push(null);
items.push({ label: "구역 끝에 줄 추가", icon: menuIcon("add_row_below"), onClick: function () {
run(function () { return addRow(tbody.dataset.section, null, "below"); });
} });
showContextMenu(x, y, items);
}
table.addEventListener("click", function (e) {
const b = e.target.closest("[data-meet-act]");
if (!b) return;
@@ -11204,13 +11224,23 @@
if (b.dataset.meetAct === "menu") {
const r = b.getBoundingClientRect();
rowMenu(r.left, r.bottom + 4, tr);
} else if (b.dataset.meetAct === "sec-menu") {
const r = b.getBoundingClientRect();
secMenu(r.left, r.bottom + 4, b.closest("tbody"));
} else if (b.dataset.meetAct === "sec-add") {
run(function () { return addRow(b.closest("tbody").dataset.section, null, "below"); });
}
});
table.addEventListener("contextmenu", function (e) {
if (e.target.closest(".is-editing")) return;
const sec = e.target.closest("tbody.pj-meet-sec th.pj-meet-c-sec");
if (sec && canEdit) {
e.preventDefault();
secMenu(e.clientX, e.clientY, sec.closest("tbody"));
return;
}
const th = e.target.closest("th.pj-meet-c-label");
if (!th || e.target.closest(".is-editing")) return;
if (!th) return;
e.preventDefault();
rowMenu(e.clientX, e.clientY, th.closest("tr"));
});