feat(project): 연간 목표 엑셀식 칸 병합(끌어 고르기·우클릭 병합/해제) + 월별 주간 회의록
엑셀식 칸 병합 (예전 Shift+클릭·병합 버튼·오른쪽/왼쪽 칸 병합 메뉴 대체)
- 글 칸을 마우스로 끌어(또는 Shift+클릭) 사각형 선택 → 우클릭 "셀 병합 (N줄 × M칸)" / "병합 해제"
- 같은 업무 영역 안 세로(row_span) + 같은 반기 월 칸 가로, 연간·상·하반기 칸은 세로로만
- 걸친 병합은 엑셀처럼 범위를 넓혀 흡수, 글은 왼쪽 위부터 이어 왼쪽 위 칸에, 해제하면 왼쪽 위 칸에 남음
- POST /api/goals/areas/{id}/merge {row_from,row_to,col_from,col_to} (db.merge_goal_rect), router._goal_area_layout(colspan·rowspan)
- 가려진 칸 저장 거절(세로 포함), 병합 안쪽 줄 끼우기 +1 / 가려진 줄 지우기 -1, 세로 병합에 걸린 줄 이동 거절
주간 회의록 (/project/goals/{연도}/meetings/{월}, 목표 표 월 머리 클릭)
- 주(월~일) 탭, 주마다 회의록: 이번주 할 일·목표 금액 | 지난주 할 일·목표·결과·달성률·평가
- 앞선 회의록 줄 이어받기(carry_from), 처음이면 목표 표 업무 영역 + 기본 양식 줄(유통 줄 쇼핑몰 연결 추측)
- 머리: 월 목표·지난주까지 누적·주당 필요 매출(페이싱)·전주 목표/결과/달성률·금주 목표/현재 실적
- 쇼핑몰 연결 줄의 결과·누적·주간 매출은 실적 모듈 performance_store 읽기 전용(없으면 직접 입력)
- 금액 입력 120만·1.5억·3천만·1억2천만, 참석자·결정 사항 메모, 줄 메뉴(추가·순서·쇼핑몰 연결·삭제), 인쇄
마이그레이션 015(project_db): goal_cell_merges.row_span + CHECK 교체, goal_meetings, goal_meeting_items
캐시 버전 20261001c, 테스트(DB 회귀 test_goal_rect_merges·test_goal_meetings)·문서 갱신
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+139
-4
@@ -2147,17 +2147,152 @@ textarea.pj-goal-text::placeholder { color: rgba(0, 0, 0, .3); }
|
||||
.pj-goal-row-text[data-goal-edit]:empty { min-height: 1.5em; }
|
||||
.pj-goal-row-text[data-goal-edit]:empty:hover::before { content: "줄 이름"; color: rgba(0, 0, 0, .3); font-weight: 500; }
|
||||
|
||||
/* 월 칸 병합 — Shift+클릭 선택 표시와 떠 있는 병합 버튼(body 에 붙음) */
|
||||
/* 칸 병합 — 끌어서(또는 Shift+클릭) 고른 범위 표시. 우클릭 메뉴로 셀 병합·병합 해제 */
|
||||
.pj-goal-table td.pj-goal-texttd.is-merge-sel {
|
||||
box-shadow: inset 0 0 0 2px var(--pj-accent);
|
||||
background-image: linear-gradient(rgba(123, 104, 238, .12), rgba(123, 104, 238, .12));
|
||||
}
|
||||
.pj-goal-mergebar { position: fixed; z-index: 1000; }
|
||||
.pj-goal-mergebar .pj-btn { display: inline-flex; align-items: center; gap: 4px; box-shadow: 0 6px 18px rgba(16, 24, 40, .2); }
|
||||
.pj-goal-mergebar .material-symbols-outlined { font-size: 18px; }
|
||||
|
||||
.pj-goal-foot { display: flex; align-items: center; gap: 12px; margin: 12px 0 4px; }
|
||||
|
||||
/* 칸 병합 — 끌어서 고르는 동안 글 선택 막기 */
|
||||
html.pj-goal-selecting, html.pj-goal-selecting * { user-select: none !important; cursor: cell !important; }
|
||||
/* 월 머리 → 그 달 주간 회의록 */
|
||||
.pj-goal-mlink { color: inherit; text-decoration: none; border-radius: 5px; padding: 2px 4px; }
|
||||
.pj-goal-mlink:hover { color: var(--pj-accent-dark); background: var(--pj-accent-tint); }
|
||||
.pj-btn-sm { padding: 4px 10px; font-size: 12.5px; text-decoration: none; display: inline-flex; align-items: center; }
|
||||
|
||||
/* ════════════════════════════════════════════════════════════
|
||||
주간 회의록(goal_meeting.html) — 주차 탭 · 머리 숫자 카드 · 구역별 줄(이번주 | 지난주 리뷰) · 메모
|
||||
════════════════════════════════════════════════════════════ */
|
||||
.pj-meet-pane { flex: 1 1 auto; min-height: 0; overflow: auto; }
|
||||
.pj-meet-title { display: flex; align-items: center; gap: 8px; }
|
||||
.pj-meet-title h2 { margin: 0 6px 0 0; }
|
||||
.pj-meet-back { display: inline-flex; color: var(--pj-ink-soft); border-radius: 6px; padding: 2px; }
|
||||
.pj-meet-back:hover { background: #f1f2f4; color: var(--pj-ink); }
|
||||
.pj-goal-head-acts .pj-btn .material-symbols-outlined { font-size: 17px; vertical-align: -3px; }
|
||||
|
||||
.pj-meet-weeks { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; padding-top: 9px; } /* "이번 주" 꼬리표 자리 */
|
||||
.pj-meet-week {
|
||||
position: relative; display: flex; flex-direction: column; gap: 1px; min-width: 104px; padding: 7px 12px;
|
||||
border: 1px solid var(--pj-border); border-radius: 10px; background: #fff; color: var(--pj-ink); text-decoration: none;
|
||||
}
|
||||
.pj-meet-week b { font-size: 13px; }
|
||||
.pj-meet-week span { font-size: 11.5px; color: var(--pj-ink-soft); }
|
||||
.pj-meet-week em { position: absolute; top: -8px; right: 8px; font-style: normal; font-size: 10.5px; font-weight: 700;
|
||||
padding: 0 6px; border-radius: 999px; background: var(--pj-accent); color: #fff; }
|
||||
.pj-meet-week:hover { border-color: #cfd3d8; background: #fafafb; }
|
||||
.pj-meet-week.is-on { border-color: var(--pj-accent); box-shadow: inset 0 0 0 1px var(--pj-accent); background: var(--pj-accent-tint); }
|
||||
.pj-meet-dot { position: absolute; top: 9px; right: 9px; width: 7px; height: 7px; border-radius: 50%; background: #34a853; }
|
||||
|
||||
.pj-meet-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 8px; }
|
||||
.pj-meet-kpis.is-week { grid-template-columns: repeat(5, minmax(0, 1fr)); margin-bottom: 12px; }
|
||||
.pj-meet-kpi {
|
||||
display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--pj-border);
|
||||
border-radius: 10px; background: #fff; min-width: 0;
|
||||
}
|
||||
.pj-meet-kpi.is-accent { border-color: #cfc6fb; background: #faf9ff; }
|
||||
.pj-meet-kpi.is-input { border-color: #f6c69a; background: #fffaf4; }
|
||||
.pj-meet-kpi-label { font-size: 12px; color: var(--pj-ink-soft); font-weight: 600; }
|
||||
.pj-meet-kpi-label small { font-weight: 500; }
|
||||
.pj-meet-kpi-val { font-size: 19px; font-weight: 800; font-variant-numeric: tabular-nums; display: flex; align-items: baseline; gap: 3px; }
|
||||
.pj-meet-kpi-val small { font-size: 12px; font-weight: 600; color: var(--pj-ink-soft); }
|
||||
.pj-meet-kpi-val.is-good { color: #1f8a4c; }
|
||||
.pj-meet-kpi-val.is-low { color: #c2410c; }
|
||||
.pj-meet-kpi-sub { font-size: 11.5px; color: var(--pj-ink-soft); }
|
||||
.pj-meet-kpi .pj-meet-amount {
|
||||
font-size: 18px; font-weight: 800; height: 30px; width: 100%; max-width: 190px; text-align: left;
|
||||
border: 1px solid #f3d2b0; border-radius: 7px; background: #fff; padding: 0 8px;
|
||||
}
|
||||
@media (max-width: 1100px) { .pj-meet-kpis, .pj-meet-kpis.is-week { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
|
||||
|
||||
.pj-meet-attend { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 12.5px; font-weight: 600; color: var(--pj-ink-soft); }
|
||||
.pj-meet-attend input { flex: 0 1 420px; height: 30px; padding: 0 8px; border: 1px solid var(--pj-border); border-radius: 7px; font: inherit; color: var(--pj-ink); font-weight: 500; }
|
||||
|
||||
.pj-meet-table {
|
||||
width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed; font-size: 12.5px;
|
||||
background: #fff; border: 1px solid #dfe2e6; border-radius: 10px; color: var(--pj-ink);
|
||||
}
|
||||
.pj-meet-table th, .pj-meet-table td {
|
||||
box-sizing: border-box; border-right: 1px solid #e6e8eb; border-bottom: 1px solid #e6e8eb; padding: 0; vertical-align: top;
|
||||
}
|
||||
.pj-meet-table tr > :last-child { border-right: none; }
|
||||
.pj-meet-table thead th {
|
||||
position: sticky; top: 0; z-index: 3; background: #f7f8f9; height: 32px; padding: 0 8px; font-weight: 700;
|
||||
text-align: center; vertical-align: middle; white-space: nowrap;
|
||||
}
|
||||
.pj-meet-table thead tr.pj-meet-group th { top: 0; height: 26px; font-size: 12px; }
|
||||
.pj-meet-table thead tr:nth-child(2) th { top: 26px; }
|
||||
.pj-meet-table thead th.is-this { background: #fff7ed; color: #9a4b0b; }
|
||||
.pj-meet-table thead th.is-prev { background: #f1f3f6; color: #4b5563; }
|
||||
.pj-meet-w-sec { width: 80px; }
|
||||
.pj-meet-w-label { width: 160px; }
|
||||
.pj-meet-w-amt { width: 122px; }
|
||||
.pj-meet-w-rate { width: 76px; }
|
||||
.pj-meet-w-eval { width: 88px; }
|
||||
.pj-meet-sec > tr > th, .pj-meet-sec > tr > td:not(.is-prev) { background: var(--goal-bg, #fff); border-color: rgba(0, 0, 0, .07); }
|
||||
.pj-meet-sec > tr > td.is-prev { background: #fafbfc; }
|
||||
.pj-meet-sec > tr:first-child > * { border-top: 1px solid rgba(0, 0, 0, .12); }
|
||||
.pj-meet-sec th { padding: 7px 8px; vertical-align: middle; text-align: center; }
|
||||
th.pj-meet-c-sec { position: relative; font-size: 13px; font-weight: 800; }
|
||||
.pj-meet-sec-add {
|
||||
display: block; margin: 4px auto 0; width: 22px; height: 22px; border: 1px dashed rgba(0, 0, 0, .25); border-radius: 6px;
|
||||
background: rgba(255, 255, 255, .6); color: var(--pj-ink-soft); cursor: pointer; line-height: 18px; opacity: 0; transition: opacity .12s;
|
||||
}
|
||||
th.pj-meet-c-sec:hover .pj-meet-sec-add, .pj-meet-sec-add:focus { opacity: 1; }
|
||||
th.pj-meet-c-label { position: relative; font-weight: 600; color: #3b4048; text-align: left; }
|
||||
.pj-meet-label { word-break: keep-all; overflow-wrap: anywhere; }
|
||||
.pj-meet-label[data-meet-edit] { cursor: text; border-radius: 5px; padding: 1px 3px; margin: -1px -3px; }
|
||||
.pj-meet-label[data-meet-edit]:hover { background: rgba(255, 255, 255, .65); box-shadow: 0 0 0 1px rgba(0, 0, 0, .14); }
|
||||
.pj-meet-label.is-editing { background: #fff; box-shadow: 0 0 0 2px var(--pj-accent); outline: none; }
|
||||
.pj-meet-label[data-meet-edit]:empty { display: inline-block; min-width: 3em; min-height: 1.4em; }
|
||||
.pj-meet-market {
|
||||
display: inline-block; margin-left: 4px; padding: 0 6px; border-radius: 999px; font-size: 10.5px; font-weight: 700;
|
||||
background: #e8f1ff; color: #1d4ed8; vertical-align: 1px;
|
||||
}
|
||||
.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; }
|
||||
textarea.pj-meet-text, .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: 1.5; color: inherit; resize: none; overflow: hidden;
|
||||
}
|
||||
textarea.pj-meet-text:focus, .pj-meet-notes textarea:focus { outline: 2px solid var(--pj-accent); outline-offset: -2px; background: rgba(255, 255, 255, .8); }
|
||||
.pj-meet-ro { min-height: 38px; padding: 6px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
|
||||
.pj-meet-table td.pj-meet-c-amt { text-align: right; vertical-align: middle; padding: 0 6px; font-variant-numeric: tabular-nums; }
|
||||
input.pj-meet-amount {
|
||||
display: block; width: 100%; box-sizing: border-box; height: 34px; padding: 0 4px; border: none; background: transparent;
|
||||
font: inherit; text-align: right; font-variant-numeric: tabular-nums;
|
||||
}
|
||||
input.pj-meet-amount:focus { outline: 2px solid var(--pj-accent); outline-offset: -2px; background: #fff; }
|
||||
input.pj-meet-amount::placeholder { color: rgba(0, 0, 0, .28); }
|
||||
.pj-meet-auto { color: #1d4ed8; font-weight: 600; }
|
||||
.pj-meet-auto::before { content: "자동 "; font-size: 10.5px; font-weight: 700; color: #6b8fd6; }
|
||||
.pj-meet-c-rate { text-align: right; vertical-align: middle !important; padding: 0 6px !important; font-weight: 700; }
|
||||
.pj-meet-c-rate .is-good { color: #1f8a4c; }
|
||||
.pj-meet-c-rate .is-low { color: #c2410c; }
|
||||
.pj-meet-c-eval { vertical-align: middle !important; text-align: center; }
|
||||
select.pj-meet-eval { width: calc(100% - 8px); height: 28px; margin: 0 4px; border: 1px solid var(--pj-border); border-radius: 6px; background: #fff; font: inherit; }
|
||||
select.pj-meet-eval[data-v="done"], .pj-meet-eval-ro[data-v="done"] { color: #1f8a4c; font-weight: 700; }
|
||||
select.pj-meet-eval[data-v="partial"], .pj-meet-eval-ro[data-v="partial"] { color: #b45309; font-weight: 700; }
|
||||
select.pj-meet-eval[data-v="miss"], .pj-meet-eval-ro[data-v="miss"] { color: #c22b10; font-weight: 700; }
|
||||
.pj-meet-table td.is-none { vertical-align: middle; padding: 0 8px; font-size: 12px; }
|
||||
.pj-meet-table td.is-saved, .pj-meet-table th.is-saved, .pj-meet-notes textarea.is-saved, #pj-meet-attendees.is-saved {
|
||||
animation: pj-goal-saved 1s ease-out;
|
||||
}
|
||||
.pj-meet-notes { margin: 16px 0 8px; }
|
||||
.pj-meet-notes h3 { margin: 0 0 6px; font-size: 14px; }
|
||||
.pj-meet-notes textarea, .pj-meet-notes .pj-meet-ro { border: 1px solid #dfe2e6; border-radius: 10px; background: #fff; min-height: 90px; padding: 10px; }
|
||||
|
||||
/* 인쇄 — 회의록 표만 */
|
||||
@media print {
|
||||
.erp-sidebar, .erp-topbar, .pj-side, .pj-goal-head-acts, .pj-meet-weeks, .pj-goal-foot, .pj-meet-more, .pj-meet-sec-add,
|
||||
.pj-meet-back, .pj-meet-title .pj-btn { display: none !important; }
|
||||
.pj-meet-pane { overflow: visible; }
|
||||
.pj-meet-table thead th { position: static; }
|
||||
input.pj-meet-amount, select.pj-meet-eval { border: none; appearance: none; }
|
||||
}
|
||||
|
||||
/* 영역 색 고르기 팝업(body 에 붙음) */
|
||||
.pj-goal-colorpop {
|
||||
position: fixed; z-index: 1000; display: grid; grid-template-columns: repeat(8, 26px); gap: 6px;
|
||||
|
||||
+396
-83
@@ -8458,123 +8458,435 @@
|
||||
document.execCommand("insertText", false, text);
|
||||
});
|
||||
|
||||
// ── 월 칸 병합(마이그레이션 014) — 한 줄의 같은 반기 안에서만.
|
||||
// · Shift+클릭: 마지막으로 누른 월 칸부터 그 칸까지 고른 뒤 떠 있는 "N~M월 병합" 버튼
|
||||
// · 우클릭: 선택한 칸 병합 / 오른쪽·왼쪽 칸과 병합 / 병합 해제
|
||||
// 글은 서버가 월 순서대로 줄바꿈으로 이어 첫 칸에 모은다. 해제하면 글은 첫 칸에 남는다.
|
||||
// ── 칸 병합 — 엑셀처럼: 업무 영역 글 칸을 마우스로 끌어(또는 Shift+클릭) 사각형으로 고른 뒤 우클릭 → 셀 병합,
|
||||
// 병합된 칸은 우클릭 → 병합 해제(글은 왼쪽 위 칸에 남는다). 같은 업무 영역 안에서만, 가로는 같은 반기 월 칸끼리
|
||||
// (연간·상반기·하반기 칸은 세로로만). 고른 범위가 병합된 칸에 걸치면 엑셀처럼 그 칸 전체로 넓힌다.
|
||||
// 병합하면 서버가 범위 안 글을 왼쪽 위부터 이어 왼쪽 위 칸에 모은다(글을 잃지 않게).
|
||||
if (table.dataset.halves === "true") {
|
||||
let anchor = null; // 마지막으로 누른 월 칸
|
||||
let mergeSel = null; // {row, h, start, end}
|
||||
let mergeBar = null;
|
||||
const monthTd = function (node) {
|
||||
const td = node && node.closest && node.closest("td.pj-goal-texttd.pj-goal-m");
|
||||
return td && table.contains(td) ? td : null;
|
||||
const ORDER = [0, 1, 2, 3, 4, 5, 6, 13, 7, 8, 9, 10, 11, 12, 14]; // store.GOAL_COL_ORDER
|
||||
const groupOf = function (m) { return m === 0 ? "y" : m === 13 ? "h1" : m === 14 ? "h2" : (m <= 6 ? "m1" : "m2"); };
|
||||
const textTd = function (node) {
|
||||
const td = node && node.closest && node.closest("td.pj-goal-texttd");
|
||||
return td && table.contains(td) && td.closest("tbody.pj-goal-area") ? td : null;
|
||||
};
|
||||
const cellInfo = function (td) {
|
||||
const m = parseInt(td.dataset.month, 10);
|
||||
const span = parseInt(td.dataset.span || "1", 10);
|
||||
return { row: td.closest("tr").dataset.rowId, h: td.dataset.h, start: m, end: m + span - 1, span: span };
|
||||
// 영역 하나의 칸 배치 — 칸마다 덮는 사각형(줄 순번 r0~r1, 칸 순번 c0~c1)
|
||||
const gridOf = function (tbody) {
|
||||
const cells = [];
|
||||
Array.prototype.forEach.call(tbody.rows, function (tr, ri) {
|
||||
tr.querySelectorAll("td.pj-goal-texttd").forEach(function (td) {
|
||||
const ci = ORDER.indexOf(parseInt(td.dataset.month, 10));
|
||||
const span = parseInt(td.dataset.span || "1", 10), rspan = parseInt(td.dataset.rspan || "1", 10);
|
||||
cells.push({ td: td, r0: ri, r1: ri + rspan - 1, c0: ci, c1: ci + span - 1, merged: span > 1 || rspan > 1 });
|
||||
});
|
||||
});
|
||||
return cells;
|
||||
};
|
||||
const cellOf = function (cells, td) { return cells.find(function (c) { return c.td === td; }); };
|
||||
const hits = function (c, s) { return c.r0 <= s.r1 && c.r1 >= s.r0 && c.c0 <= s.c1 && c.c1 >= s.c0; };
|
||||
// 걸친 병합 칸을 통째로 품을 때까지 넓힌다(엑셀 선택과 같음)
|
||||
const expand = function (cells, s) {
|
||||
let grown = true;
|
||||
while (grown) {
|
||||
grown = false;
|
||||
cells.forEach(function (c) {
|
||||
if (!hits(c, s)) return;
|
||||
const n = { r0: Math.min(s.r0, c.r0), r1: Math.max(s.r1, c.r1), c0: Math.min(s.c0, c.c0), c1: Math.max(s.c1, c.c1) };
|
||||
if (n.r0 !== s.r0 || n.r1 !== s.r1 || n.c0 !== s.c0 || n.c1 !== s.c1) { s = n; grown = true; }
|
||||
});
|
||||
}
|
||||
return s;
|
||||
};
|
||||
|
||||
let sel = null; // {tbody, cells, r0, r1, c0, c1, n(칸 수)}
|
||||
let anchorCell = null; // 마지막으로 누른 칸 {tbody, cell}
|
||||
let drag = null;
|
||||
clearMergeSel = function () {
|
||||
mergeSel = null;
|
||||
sel = null;
|
||||
table.querySelectorAll("td.is-merge-sel").forEach(function (td) { td.classList.remove("is-merge-sel"); });
|
||||
if (mergeBar) { mergeBar.remove(); mergeBar = null; }
|
||||
};
|
||||
const mergeCells = async function (rowId, start, end) {
|
||||
const paint = function () {
|
||||
table.querySelectorAll("td.is-merge-sel").forEach(function (td) { td.classList.remove("is-merge-sel"); });
|
||||
if (!sel) return;
|
||||
sel.cells.forEach(function (c) { if (hits(c, sel)) c.td.classList.add("is-merge-sel"); });
|
||||
};
|
||||
const select = function (tbody, a, b) {
|
||||
const cells = gridOf(tbody);
|
||||
const ca = cellOf(cells, a), cb = cellOf(cells, b);
|
||||
if (!ca || !cb) return;
|
||||
const s = expand(cells, { r0: Math.min(ca.r0, cb.r0), r1: Math.max(ca.r1, cb.r1),
|
||||
c0: Math.min(ca.c0, cb.c0), c1: Math.max(ca.c1, cb.c1) });
|
||||
sel = Object.assign({ tbody: tbody, cells: cells, n: cells.filter(function (c) { return hits(c, s); }).length }, s);
|
||||
paint();
|
||||
};
|
||||
const mergeSel = async function (s) {
|
||||
const cols = ORDER.slice(s.c0, s.c1 + 1);
|
||||
const groups = cols.map(groupOf).filter(function (g, i, a) { return a.indexOf(g) === i; });
|
||||
if (groups.length > 1) {
|
||||
showToast("연간·상반기·하반기 칸은 세로로만, 월 칸은 같은 반기 안에서만 합칠 수 있습니다.", "error");
|
||||
return;
|
||||
}
|
||||
const rows = s.tbody.rows;
|
||||
try {
|
||||
await flushTexts();
|
||||
await api("POST", "/project/api/goals/rows/" + rowId + "/merge", { start: start, end: end });
|
||||
await api("POST", "/project/api/goals/areas/" + s.tbody.dataset.areaId + "/merge", {
|
||||
row_from: rows[s.r0].dataset.rowId, row_to: rows[s.r1].dataset.rowId, col_from: cols[0], col_to: cols[cols.length - 1],
|
||||
});
|
||||
reloadKeepScroll();
|
||||
} catch (err) { showToast("병합 실패: " + err.message, "error"); }
|
||||
};
|
||||
const unmergeCell = async function (rowId, start) {
|
||||
const unmerge = async function (cellsToSplit) {
|
||||
try {
|
||||
await flushTexts();
|
||||
await api("DELETE", "/project/api/goals/rows/" + rowId + "/merge/" + start);
|
||||
for (const c of cellsToSplit) {
|
||||
await api("DELETE", "/project/api/goals/rows/" + c.td.closest("tr").dataset.rowId + "/merge/" + c.td.dataset.month);
|
||||
}
|
||||
reloadKeepScroll();
|
||||
} catch (err) { showToast("병합 해제 실패: " + err.message, "error"); }
|
||||
};
|
||||
const showMergeSel = function (rowId, h, start, end) {
|
||||
clearMergeSel();
|
||||
mergeSel = { row: rowId, h: h, start: start, end: end };
|
||||
let last = null;
|
||||
table.querySelectorAll('tr[data-row-id="' + rowId + '"] > td.pj-goal-texttd.pj-goal-m[data-h="' + h + '"]')
|
||||
.forEach(function (td) {
|
||||
const c = cellInfo(td);
|
||||
if (c.start >= start && c.end <= end) { td.classList.add("is-merge-sel"); last = td; }
|
||||
});
|
||||
// 떠 있는 병합 버튼 — body 에 붙인다(화면 배율 밖)
|
||||
mergeBar = document.createElement("div");
|
||||
mergeBar.className = "pj-goal-mergebar";
|
||||
const btn = document.createElement("button");
|
||||
btn.type = "button";
|
||||
btn.className = "pj-btn pj-btn-primary";
|
||||
btn.innerHTML = '<span class="material-symbols-outlined">cell_merge</span>';
|
||||
btn.appendChild(document.createTextNode(start + "~" + end + "월 병합"));
|
||||
btn.addEventListener("click", function () {
|
||||
const s = mergeSel;
|
||||
clearMergeSel();
|
||||
if (s) mergeCells(s.row, s.start, s.end);
|
||||
});
|
||||
mergeBar.appendChild(btn);
|
||||
document.body.appendChild(mergeBar);
|
||||
const r = last.getBoundingClientRect();
|
||||
const vw = document.documentElement.clientWidth, vh = document.documentElement.clientHeight;
|
||||
mergeBar.style.left = Math.max(8, Math.min(r.right - mergeBar.offsetWidth, vw - mergeBar.offsetWidth - 8)) + "px";
|
||||
mergeBar.style.top = Math.max(8, Math.min(r.bottom + 6, vh - mergeBar.offsetHeight - 8)) + "px";
|
||||
};
|
||||
|
||||
// 끌어서 고르기 — 다른 칸으로 넘어가는 순간부터 범위 선택(글 선택·입력칸 포커스는 막는다)
|
||||
table.addEventListener("mousedown", function (e) {
|
||||
if (e.button !== 0) return;
|
||||
const td = monthTd(e.target);
|
||||
const td = textTd(e.target);
|
||||
if (!td) return;
|
||||
const c = cellInfo(td);
|
||||
if (e.shiftKey && anchor && anchor.row === c.row && anchor.h === c.h && anchor.start !== c.start) {
|
||||
e.preventDefault(); // 글 선택·포커스 이동 없이 범위만 고른다
|
||||
showMergeSel(c.row, c.h, Math.min(anchor.start, c.start), Math.max(anchor.end, c.end));
|
||||
const tbody = td.closest("tbody");
|
||||
if (e.shiftKey && anchorCell && anchorCell.tbody === tbody && anchorCell.td !== td) {
|
||||
e.preventDefault(); // Shift+클릭 = 마지막으로 누른 칸부터 여기까지
|
||||
select(tbody, anchorCell.td, td);
|
||||
return;
|
||||
}
|
||||
anchor = c;
|
||||
clearMergeSel();
|
||||
anchorCell = { tbody: tbody, td: td };
|
||||
drag = { tbody: tbody, td: td, moved: false };
|
||||
});
|
||||
// 다른 곳을 누르거나 Esc·스크롤이면 선택 해제
|
||||
table.addEventListener("mouseover", function (e) {
|
||||
if (!drag) return;
|
||||
const td = textTd(e.target);
|
||||
if (!td || td.closest("tbody") !== drag.tbody) return;
|
||||
if (td === drag.td && !drag.moved) return;
|
||||
if (!drag.moved) {
|
||||
drag.moved = true;
|
||||
document.documentElement.classList.add("pj-goal-selecting");
|
||||
if (document.activeElement && document.activeElement.blur) document.activeElement.blur();
|
||||
}
|
||||
const s = window.getSelection && window.getSelection();
|
||||
if (s && s.removeAllRanges) s.removeAllRanges();
|
||||
select(drag.tbody, drag.td, td);
|
||||
});
|
||||
document.addEventListener("mouseup", function () {
|
||||
if (!drag) return;
|
||||
drag = null;
|
||||
document.documentElement.classList.remove("pj-goal-selecting");
|
||||
});
|
||||
// 다른 곳을 누르거나 Esc 면 선택 해제
|
||||
document.addEventListener("mousedown", function (e) {
|
||||
if (!mergeSel || (mergeBar && mergeBar.contains(e.target)) || monthTd(e.target)) return;
|
||||
clearMergeSel();
|
||||
if (sel && !textTd(e.target) && !e.target.closest(".pj-ctxmenu")) clearMergeSel();
|
||||
}, true);
|
||||
document.addEventListener("keydown", function (e) { if (e.key === "Escape" && mergeSel) clearMergeSel(); });
|
||||
pane.addEventListener("scroll", function () { if (mergeSel) clearMergeSel(); });
|
||||
document.addEventListener("keydown", function (e) { if (e.key === "Escape" && sel) clearMergeSel(); });
|
||||
|
||||
// 우클릭 — 셀 병합(고른 범위가 2칸 이상) / 병합 해제(병합된 칸). 해당 없으면 브라우저 기본 메뉴
|
||||
table.addEventListener("contextmenu", function (e) {
|
||||
const td = monthTd(e.target);
|
||||
const td = textTd(e.target);
|
||||
if (!td) return;
|
||||
e.preventDefault();
|
||||
const c = cellInfo(td);
|
||||
const isMonth = function (x) { return x && x.classList.contains("pj-goal-m") && x.dataset.h === c.h; };
|
||||
const tbody = td.closest("tbody");
|
||||
if (!sel || sel.tbody !== tbody || !sel.cells.some(function (c) { return c.td === td && hits(c, sel); })) {
|
||||
select(tbody, td, td); // 범위 밖을 우클릭하면 그 칸만(엑셀처럼)
|
||||
}
|
||||
const s = sel;
|
||||
const inSel = s.cells.filter(function (c) { return hits(c, s); });
|
||||
const mergedIn = inSel.filter(function (c) { return c.merged; });
|
||||
const items = [];
|
||||
const s = mergeSel;
|
||||
if (s && s.row === c.row && c.start >= s.start && c.end <= s.end) {
|
||||
items.push({ label: "선택한 칸 병합 (" + s.start + "~" + s.end + "월)",
|
||||
onClick: function () { clearMergeSel(); mergeCells(s.row, s.start, s.end); } });
|
||||
if (s.n >= 2) {
|
||||
const rowsN = s.r1 - s.r0 + 1, colsN = s.c1 - s.c0 + 1;
|
||||
items.push({ label: "셀 병합 (" + rowsN + "줄 × " + colsN + "칸)", onClick: function () { clearMergeSel(); mergeSel(s); } });
|
||||
}
|
||||
const next = td.nextElementSibling, prev = td.previousElementSibling;
|
||||
if (isMonth(next)) {
|
||||
const n = cellInfo(next);
|
||||
items.push({ label: "오른쪽 칸과 병합 (" + c.start + "~" + n.end + "월)",
|
||||
onClick: function () { mergeCells(c.row, c.start, n.end); } });
|
||||
if (mergedIn.length) {
|
||||
items.push({ label: "병합 해제" + (mergedIn.length > 1 ? " (" + mergedIn.length + "곳)" : ""),
|
||||
onClick: function () { clearMergeSel(); unmerge(mergedIn); } });
|
||||
}
|
||||
if (isMonth(prev)) {
|
||||
const p = cellInfo(prev);
|
||||
items.push({ label: "왼쪽 칸과 병합 (" + p.start + "~" + c.end + "월)",
|
||||
onClick: function () { mergeCells(c.row, p.start, c.end); } });
|
||||
}
|
||||
if (c.span > 1) {
|
||||
if (items.length) items.push(null);
|
||||
items.push({ label: "병합 해제", onClick: function () { unmergeCell(c.row, c.start); } });
|
||||
}
|
||||
if (items.length) showContextMenu(e.clientX, e.clientY, items);
|
||||
if (!items.length) { clearMergeSel(); return; }
|
||||
e.preventDefault();
|
||||
showContextMenu(e.clientX, e.clientY, items);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// ── 주간 회의록(/project/goals/{연도}/meetings/{월}?week=) — 관리자만 입력, 칸마다 바로 저장.
|
||||
// · 글(이번주 할 일·메모): 0.8초 멈춤·칸 떠남·페이지 떠남에 저장. 금액·참석자: 칸 떠남·Enter 에 저장.
|
||||
// · 지난주 결과·평가는 지난 회의록의 같은 줄(tr data-prev)에 저장하고 달성률을 바로 다시 그린다.
|
||||
// · 줄 추가·순서·삭제·쇼핑몰 연결·구역 추가는 저장 뒤 새로고침(스크롤 위치 되살림). 메뉴는 body 에 붙는다.
|
||||
function initGoalMeeting() {
|
||||
const pane = el("pj-meet-pane");
|
||||
if (!pane) return;
|
||||
const week = pane.dataset.week, year = pane.dataset.year;
|
||||
const isAdmin = pane.dataset.admin === "true";
|
||||
const SCROLL_KEY = "pj_meet_scroll";
|
||||
function reloadKeepScroll() {
|
||||
try { sessionStorage.setItem(SCROLL_KEY, JSON.stringify([location.pathname + location.search, window.scrollY, pane.scrollTop])); } catch (_) {}
|
||||
location.reload();
|
||||
}
|
||||
try {
|
||||
const s = JSON.parse(sessionStorage.getItem(SCROLL_KEY) || "null");
|
||||
sessionStorage.removeItem(SCROLL_KEY);
|
||||
if (s && s[0] === location.pathname + location.search) { window.scrollTo(0, s[1]); pane.scrollTop = s[2]; }
|
||||
} catch (_) {}
|
||||
const won = function (v) { return v == null || v === "" ? "" : Number(v).toLocaleString("ko-KR"); };
|
||||
const printBtn = el("pj-meet-print");
|
||||
if (printBtn) printBtn.addEventListener("click", function () { window.print(); });
|
||||
const create = el("pj-meet-create");
|
||||
if (create) create.addEventListener("click", async function () {
|
||||
create.disabled = true;
|
||||
try {
|
||||
await api("POST", "/project/api/goals/meetings/" + week, { year: year });
|
||||
location.reload();
|
||||
} catch (e) { create.disabled = false; showToast("만들기 실패: " + e.message, "error"); }
|
||||
});
|
||||
if (!isAdmin) return;
|
||||
const table = el("pj-meet-table");
|
||||
|
||||
function flashSaved(node) {
|
||||
if (!node) return;
|
||||
node.classList.remove("is-saved");
|
||||
void node.offsetWidth;
|
||||
node.classList.add("is-saved");
|
||||
}
|
||||
function fit(ta) {
|
||||
if (!ta.offsetParent) return;
|
||||
ta.style.height = "auto";
|
||||
ta.style.height = ta.scrollHeight + "px";
|
||||
}
|
||||
const meetingUrl = "/project/api/goals/meetings/" + week;
|
||||
function itemUrl(id) { return "/project/api/goals/meeting-items/" + id; }
|
||||
|
||||
// ── 머리 — 금주 목표·참석자·메모 ──
|
||||
const tgt = el("pj-meet-target");
|
||||
if (tgt) {
|
||||
tgt.dataset.saved = tgt.value;
|
||||
tgt.addEventListener("keydown", function (e) { if (e.key === "Enter") { e.preventDefault(); tgt.blur(); } });
|
||||
tgt.addEventListener("change", async function () {
|
||||
try {
|
||||
await api("PUT", meetingUrl, { week_target: tgt.value });
|
||||
reloadKeepScroll(); // 달성률·필요 매출 문구를 서버 계산으로 다시
|
||||
} catch (e) { tgt.value = tgt.dataset.saved; showToast("저장 실패: " + e.message, "error"); }
|
||||
});
|
||||
}
|
||||
const att = el("pj-meet-attendees");
|
||||
if (att) att.addEventListener("change", async function () {
|
||||
try { await api("PUT", meetingUrl, { attendees: att.value }); flashSaved(att); }
|
||||
catch (e) { showToast("저장 실패: " + e.message, "error"); }
|
||||
});
|
||||
|
||||
// ── 글 칸(이번주 할 일·메모) — 멈추면 저장 ──
|
||||
const pending = new Map(); // textarea → {timer, save}
|
||||
function queue(ta, save) {
|
||||
const p = pending.get(ta);
|
||||
if (p) clearTimeout(p.timer);
|
||||
pending.set(ta, { timer: setTimeout(function () { flush(ta); }, 800), save: save });
|
||||
}
|
||||
async function flush(ta) {
|
||||
const p = pending.get(ta);
|
||||
if (!p) return;
|
||||
clearTimeout(p.timer);
|
||||
pending.delete(ta);
|
||||
if (ta.value === ta.dataset.saved) return;
|
||||
try { await p.save(ta.value); ta.dataset.saved = ta.value; flashSaved(ta.closest("td") || ta); }
|
||||
catch (e) { showToast("저장 실패: " + e.message, "error"); }
|
||||
}
|
||||
function flushAll() { return Promise.all(Array.from(pending.keys()).map(flush)); }
|
||||
const notes = el("pj-meet-notes");
|
||||
if (notes) {
|
||||
notes.dataset.saved = notes.value;
|
||||
const save = function (v) { return api("PUT", meetingUrl, { notes: v }); };
|
||||
notes.addEventListener("input", function () { fit(notes); queue(notes, save); });
|
||||
notes.addEventListener("blur", function () { flush(notes); });
|
||||
fit(notes);
|
||||
}
|
||||
if (table) table.querySelectorAll("textarea.pj-meet-text").forEach(function (ta) {
|
||||
ta.dataset.saved = ta.value;
|
||||
const id = ta.closest("tr").dataset.item;
|
||||
const save = function (v) { return api("PUT", itemUrl(id), { content: v }); };
|
||||
fit(ta);
|
||||
ta.addEventListener("input", function () { fit(ta); queue(ta, save); });
|
||||
ta.addEventListener("blur", function () { flush(ta); });
|
||||
});
|
||||
window.addEventListener("resize", function () { document.querySelectorAll("textarea.pj-meet-text, #pj-meet-notes").forEach(fit); });
|
||||
window.addEventListener("beforeunload", function () {
|
||||
pending.forEach(function (p, ta) {
|
||||
clearTimeout(p.timer);
|
||||
if (ta.value === ta.dataset.saved) return;
|
||||
const isNotes = ta.id === "pj-meet-notes";
|
||||
try {
|
||||
fetch(isNotes ? meetingUrl : itemUrl(ta.closest("tr").dataset.item), {
|
||||
method: "PUT", keepalive: true, headers: { "Content-Type": "application/json" },
|
||||
body: JSON.stringify(isNotes ? { notes: ta.value } : { content: ta.value }),
|
||||
});
|
||||
} catch (_) {}
|
||||
});
|
||||
});
|
||||
|
||||
if (!table) return;
|
||||
// ── 달성률(지난주 결과 ÷ 지난주 목표) ──
|
||||
function paintRate(tr, result) {
|
||||
const td = tr.querySelector("[data-rate]");
|
||||
if (!td) return;
|
||||
const target = Number(tr.dataset.prevTarget || 0);
|
||||
if (result == null || !target) { td.innerHTML = ""; return; }
|
||||
const r = Math.round(result / target * 1000) / 10;
|
||||
td.innerHTML = '<span class="' + (r >= 100 ? "is-good" : "is-low") + '">' + r.toLocaleString("ko-KR") + "%</span>";
|
||||
}
|
||||
// ── 금액 칸 — 이번주 목표 금액(이 줄) · 지난주 결과(지난 회의록 줄) ──
|
||||
table.querySelectorAll("input.pj-meet-amount").forEach(function (inp) {
|
||||
inp.dataset.saved = inp.value;
|
||||
inp.addEventListener("focus", function () { inp.select(); });
|
||||
inp.addEventListener("keydown", function (e) {
|
||||
if (e.key === "Enter") { e.preventDefault(); inp.blur(); }
|
||||
else if (e.key === "Escape") { inp.value = inp.dataset.saved; inp.blur(); }
|
||||
});
|
||||
inp.addEventListener("change", async function () {
|
||||
const tr = inp.closest("tr");
|
||||
const toPrev = inp.dataset.target === "prev";
|
||||
const body = {};
|
||||
body[inp.dataset.field] = inp.value;
|
||||
try {
|
||||
const res = await api("PUT", itemUrl(toPrev ? tr.dataset.prev : tr.dataset.item), body);
|
||||
inp.value = won(res.item[inp.dataset.field]);
|
||||
inp.dataset.saved = inp.value;
|
||||
if (toPrev) paintRate(tr, res.item.result_amount);
|
||||
flashSaved(inp.closest("td"));
|
||||
} catch (e) { inp.value = inp.dataset.saved; showToast("저장 실패: " + e.message, "error"); }
|
||||
});
|
||||
});
|
||||
// ── 평가(지난주 줄) ──
|
||||
table.querySelectorAll("select.pj-meet-eval").forEach(function (selEl) {
|
||||
selEl.addEventListener("change", async function () {
|
||||
const tr = selEl.closest("tr");
|
||||
try {
|
||||
await api("PUT", itemUrl(tr.dataset.prev), { status: selEl.value });
|
||||
selEl.dataset.v = selEl.value;
|
||||
flashSaved(selEl.closest("td"));
|
||||
} catch (e) { selEl.value = selEl.dataset.v || ""; showToast("저장 실패: " + e.message, "error"); }
|
||||
});
|
||||
});
|
||||
|
||||
// ── 줄 이름 — 눌러서 그 자리에서 수정(Enter·칸 떠남 = 저장, Esc = 취소) ──
|
||||
table.addEventListener("click", function (e) {
|
||||
const span = e.target.closest("[data-meet-edit]");
|
||||
if (!span || span.isContentEditable) return;
|
||||
const orig = span.textContent;
|
||||
const tr = span.closest("tr");
|
||||
span.contentEditable = "true";
|
||||
span.classList.add("is-editing");
|
||||
span.focus();
|
||||
const r = document.createRange();
|
||||
r.selectNodeContents(span);
|
||||
const s = window.getSelection();
|
||||
s.removeAllRanges();
|
||||
s.addRange(r);
|
||||
let done = false;
|
||||
async function finish(save) {
|
||||
if (done) return;
|
||||
done = true;
|
||||
span.contentEditable = "false";
|
||||
span.classList.remove("is-editing");
|
||||
span.removeEventListener("keydown", onKey);
|
||||
span.removeEventListener("blur", onBlur);
|
||||
const v = span.textContent.replace(/\s+/g, " ").trim();
|
||||
if (!save || v === orig.trim()) { span.textContent = orig; return; }
|
||||
span.textContent = v;
|
||||
try { await api("PUT", itemUrl(tr.dataset.item), { label: v }); flashSaved(span.closest("th")); }
|
||||
catch (err) { span.textContent = orig; showToast("이름 변경 실패: " + err.message, "error"); }
|
||||
}
|
||||
function onKey(ev) {
|
||||
if (isImeEnter(ev)) return;
|
||||
if (ev.key === "Enter") { ev.preventDefault(); span.blur(); }
|
||||
else if (ev.key === "Escape") { ev.preventDefault(); ev.stopPropagation(); finish(false); span.blur(); }
|
||||
}
|
||||
function onBlur() { finish(true); }
|
||||
span.addEventListener("keydown", onKey);
|
||||
span.addEventListener("blur", onBlur);
|
||||
});
|
||||
|
||||
// ── 줄 메뉴(⋯ · 항목 우클릭) — 위/아래 줄 추가 · 순서 · 쇼핑몰 연결 · 삭제 ──
|
||||
async function run(fn) {
|
||||
try {
|
||||
if (!(await fn())) return;
|
||||
await flushAll();
|
||||
reloadKeepScroll();
|
||||
} catch (err) { showToast("처리 실패: " + err.message, "error"); }
|
||||
}
|
||||
async function addRow(section, ref, place) {
|
||||
const v = await prompt("새 줄 이름 (예: 쿠팡 — 비워 둬도 됩니다)", "");
|
||||
if (v == null) return false;
|
||||
await api("POST", meetingUrl + "/items", { section: section, label: String(v).trim(), ref_item_id: ref, place: place });
|
||||
return true;
|
||||
}
|
||||
function marketMenu(x, y, tr) {
|
||||
const markets = window.PJ_MEET_MARKETS || [];
|
||||
if (!markets.length) { showToast("실적 모듈 쇼핑몰 목록을 불러오지 못했습니다.", "error"); return; }
|
||||
const cur = tr.dataset.market || "";
|
||||
const pick = function (code) {
|
||||
return function () { run(async function () { await api("PUT", itemUrl(tr.dataset.item), { marketplace_code: code }); return true; }); };
|
||||
};
|
||||
showContextMenu(x, y, [{ label: "연결 안 함(결과 직접 입력)", checked: !cur, onClick: pick("") }, null].concat(
|
||||
markets.map(function (m) { return { label: m.name, checked: m.code === cur, onClick: pick(m.code) }; })));
|
||||
}
|
||||
function rowMenu(x, y, tr) {
|
||||
const id = tr.dataset.item, section = tr.dataset.section;
|
||||
const label = (tr.querySelector(".pj-meet-label") || {}).textContent || "";
|
||||
showContextMenu(x, y, [
|
||||
{ label: "위에 줄 추가", onClick: function () { run(function () { return addRow(section, id, "above"); }); } },
|
||||
{ label: "아래에 줄 추가", onClick: function () { run(function () { return addRow(section, id, "below"); }); } },
|
||||
{ label: "위로", onClick: function () { run(async function () { await api("POST", itemUrl(id) + "/move", { direction: -1 }); return true; }); } },
|
||||
{ label: "아래로", onClick: function () { run(async function () { await api("POST", itemUrl(id) + "/move", { direction: 1 }); return true; }); } },
|
||||
{ label: "쇼핑몰 연결(결과 자동)…", onClick: function () { setTimeout(function () { marketMenu(x, y, tr); }, 0); } },
|
||||
null,
|
||||
{ label: "줄 삭제", danger: true, onClick: function () {
|
||||
run(async function () {
|
||||
const ok = await confirm("'" + (label.trim() || "이 줄") + "' 줄을 삭제할까요? 이번주 할 일·금액도 함께 삭제됩니다.",
|
||||
{ okText: "삭제", cancelText: "취소" });
|
||||
if (!ok) return false;
|
||||
await api("DELETE", itemUrl(id));
|
||||
return true;
|
||||
});
|
||||
} },
|
||||
]);
|
||||
}
|
||||
table.addEventListener("click", function (e) {
|
||||
const b = e.target.closest("[data-meet-act]");
|
||||
if (!b) return;
|
||||
const tr = b.closest("tr");
|
||||
if (b.dataset.meetAct === "menu") {
|
||||
const r = b.getBoundingClientRect();
|
||||
rowMenu(r.left, r.bottom + 4, tr);
|
||||
} else if (b.dataset.meetAct === "sec-add") {
|
||||
run(function () { return addRow(b.closest("tbody").dataset.section, null, "below"); });
|
||||
}
|
||||
});
|
||||
table.addEventListener("contextmenu", function (e) {
|
||||
const th = e.target.closest("th.pj-meet-c-label");
|
||||
if (!th || e.target.closest(".is-editing")) return;
|
||||
e.preventDefault();
|
||||
rowMenu(e.clientX, e.clientY, th.closest("tr"));
|
||||
});
|
||||
const secNew = el("pj-meet-sec-new");
|
||||
if (secNew) secNew.addEventListener("click", function () {
|
||||
run(async function () {
|
||||
const name = await prompt("새 구역 이름 (예: 물류)", "");
|
||||
if (name == null || !String(name).trim()) return false;
|
||||
await api("POST", meetingUrl + "/items", { section: String(name).trim(), label: "" });
|
||||
return true;
|
||||
});
|
||||
});
|
||||
const del = el("pj-meet-del");
|
||||
if (del) del.addEventListener("click", async function () {
|
||||
const ok = await confirm("이 주 회의록을 삭제할까요? 줄·금액·메모가 모두 삭제되고, 다음 주 회의록의 '지난주' 칸도 비게 됩니다.",
|
||||
{ okText: "삭제", cancelText: "취소" });
|
||||
if (!ok) return;
|
||||
try { await api("DELETE", meetingUrl); location.reload(); }
|
||||
catch (e) { showToast("삭제 실패: " + e.message, "error"); }
|
||||
});
|
||||
}
|
||||
|
||||
// ── 휴지통(관리자 전용 화면) — [복구] 누르면 원래 id 그대로 되살리고 줄을 지운다.
|
||||
function initTrash() {
|
||||
const table = el("pj-trash-table");
|
||||
@@ -8610,6 +8922,7 @@
|
||||
initTrash();
|
||||
initGoalSide();
|
||||
initGoals();
|
||||
initGoalMeeting();
|
||||
initMyTasks();
|
||||
initProject();
|
||||
initAllMembers();
|
||||
|
||||
Reference in New Issue
Block a user