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
@@ -0,0 +1,23 @@
<div class="pj-goal-format" id="pj-goal-format" role="toolbar" aria-label="선택한 글자 서식" hidden>
<div class="pj-goal-format-group pj-goal-color-picker">
<button type="button" class="pj-goal-format-btn pj-goal-color-toggle" data-goal-format="color" aria-label="글자 색상" title="글자 색상" aria-expanded="false" aria-controls="pj-goal-color-grid" disabled><span class="pj-goal-color-letter" aria-hidden="true">가<span class="pj-goal-color-preview"></span></span><svg class="pj-goal-format-chevron" viewBox="0 0 10 10" fill="none" stroke="currentColor" stroke-width="1.3" aria-hidden="true"><path d="m2 4 3 3 3-3"/></svg></button>
<div class="pj-goal-color-grid" id="pj-goal-color-grid" role="group" aria-label="글자 색상 선택" hidden>
{% for color in ('#000000', '#4B5563', '#9CA3AF', '#DC2626', '#EA580C', '#CA8A04', '#16A34A', '#0891B2', '#2563EB', '#7C3AED', '#DB2777', '#FFFFFF') %}
<button type="button" class="pj-goal-text-swatch" data-goal-color="{{ color }}" style="--swatch: {{ color }}" title="{{ color }}" aria-label="{{ color }}" aria-pressed="false" disabled></button>
{% endfor %}
</div>
</div>
<div class="pj-goal-format-group" role="group" aria-label="글자 크기">
<button type="button" class="pj-goal-format-btn" data-goal-format="size-up" aria-label="글자 크기 2px 키우기" title="글자 크기 2px 키우기" disabled><span class="pj-goal-font-letter" aria-hidden="true">가</span><svg class="pj-goal-font-arrow" viewBox="0 0 10 14" fill="none" stroke="currentColor" stroke-width="1.2" aria-hidden="true"><path d="M5 9V2M2 5l3-3 3 3"/></svg></button>
<button type="button" class="pj-goal-format-btn" data-goal-format="size-down" aria-label="글자 크기 2px 줄이기" title="글자 크기 2px 줄이기" disabled><span class="pj-goal-font-letter" aria-hidden="true">가</span><svg class="pj-goal-font-arrow" viewBox="0 0 10 14" fill="none" stroke="currentColor" stroke-width="1.2" aria-hidden="true"><path d="M5 2v7M2 6l3 3 3-3"/></svg></button>
<output class="pj-goal-size-value" data-goal-format="size" aria-label="선택한 글자 크기">14px</output>
</div>
<div class="pj-goal-format-group" role="group" aria-label="글자 모양">
{% for key, label in (('bold', '굵게'), ('italic', '기울임'), ('underline', '밑줄')) %}
<button type="button" class="pj-goal-format-btn" data-goal-format="{{ key }}" aria-label="{{ label }}" title="{{ label }}" aria-pressed="false" disabled><span class="pj-goal-font-letter" aria-hidden="true">가</span></button>
{% endfor %}
</div>
<div class="pj-goal-format-group" role="group" aria-label="서식 초기화">
<button type="button" class="pj-goal-format-btn" data-goal-format="reset" aria-label="서식 초기화" title="서식 초기화" disabled><svg class="pj-goal-reset-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m16 3 5 5a2 2 0 0 1 0 3L11 21H7l-4-4a2 2 0 0 1 0-3L13 3a2 2 0 0 1 3 0Z"/><path d="m8 9 7 7M11 21h10"/></svg></button>
</div>
</div>
@@ -1,7 +1,7 @@
{% extends "erp_base.html" %}
{% block head_extra %}
<link rel="stylesheet" href="/static/project.css?v=20261003i" />
<link rel="stylesheet" href="/static/project.css?v=20261003j" />
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
{% endblock %}
@@ -87,6 +87,7 @@
</div>
</div>
{% if is_admin and meeting %}{% include "project/_cell_format.html" %}{% endif %}
<div class="pj-view pj-meet-pane" id="pj-meet-pane" data-week="{{ week }}" data-year="{{ goal_year }}"
data-month="{{ goal_month }}" data-admin="{{ 'true' if is_admin else 'false' }}">
@@ -188,12 +189,12 @@
</div>
{# ── 구역별 줄 — 왼쪽: 이번주 / 오른쪽: 전주 리뷰(지난 회의록 같은 줄) ── #}
<table class="pj-meet-table" id="pj-meet-table">
<table class="pj-meet-table" id="pj-meet-table" data-cell-merges="{{ 'true' if meeting.cell_merges else 'false' }}">
{# table-layout: fixed 는 첫 줄(묶음 머리, colspan)로 너비를 정하므로 열 너비는 colgroup 으로 #}
<colgroup>
{# is-this / is-prev — 순서 바꾸기(project.js initMeetOrder)가 이 묶음으로 열을 옮긴다 #}
<col class="pj-meet-w-sec" /><col class="pj-meet-w-label" /><col class="is-this" /><col class="pj-meet-w-amt is-this" />
<col class="is-prev" /><col class="pj-meet-w-amt is-prev" /><col class="pj-meet-w-amt is-prev" /><col class="pj-meet-w-rate is-prev" /><col class="pj-meet-w-eval is-prev" />
<col class="pj-meet-w-sec" data-meet-col="section" /><col class="pj-meet-w-label" data-meet-col="label" /><col class="is-this" data-meet-col="content" /><col class="pj-meet-w-amt is-this" data-meet-col="target" />
<col class="is-prev" data-meet-col="prev_content" /><col class="pj-meet-w-amt is-prev" data-meet-col="prev_target" /><col class="pj-meet-w-amt is-prev" data-meet-col="result" /><col class="pj-meet-w-rate is-prev" data-meet-col="rate" /><col class="pj-meet-w-eval is-prev" data-meet-col="evaluation" />
</colgroup>
<thead>
<tr class="pj-meet-group">
@@ -235,10 +236,12 @@
</span>
{% if edit %}<button type="button" class="pj-icon-btn pj-meet-more" data-meet-act="menu" title="줄 메뉴"><span class="material-symbols-outlined">more_horiz</span></button>{% endif %}
</th>
<td class="pj-meet-c-text">
{% if edit %}<textarea class="pj-meet-text" rows="1" data-field="content" placeholder="이번주 할 일·행사">{{ it.content }}</textarea>
{% else %}<div class="pj-meet-ro">{{ it.content }}</div>{% endif %}
{% if not it.content_hidden %}
<td class="pj-meet-c-text" rowspan="{{ it.content_span or 1 }}" data-meet-item="{{ it.id }}">
{% if edit %}<div class="pj-meet-text pj-goal-text" contenteditable="true" role="textbox" aria-multiline="true" aria-label="{{ it.label }} 이번주 할 일·행사" data-field="content" data-placeholder="이번주 할 일·행사">{% if it.content_html is defined %}{{ it.content_html | safe }}{% else %}{{ it.content }}{% endif %}</div>
{% else %}<div class="pj-meet-ro">{% if it.content_html is defined %}{{ it.content_html | safe }}{% else %}{{ it.content }}{% endif %}</div>{% endif %}
</td>
{% endif %}
<td class="pj-meet-c-amt">
{% if edit %}<input type="text" class="pj-meet-amount" data-field="target_amount" inputmode="decimal" autocomplete="off" value="{{ won(it.target_amount) }}" />
{% else %}{{ won(it.target_amount) }}{% endif %}
@@ -246,7 +249,7 @@
<span class="pj-meet-week-slot" data-auto="{{ it.week_auto if it.week_auto is not none else '' }}"{% if it.week_error %} data-err="1"{% endif %} data-name="{{ it.market_name }}">{% if it.week_auto is not none %}<span class="pj-meet-week-auto" title="실적 모듈 {{ it.market_name }} 이번 주({{ week[5:] | replace('-', '/') }}~ 오늘까지) 매출">이번주 실적 {{ won(it.week_auto) }}{% if it.target_amount %} · {{ "%.0f" | format(it.week_auto / it.target_amount * 100) }}%{% endif %}</span>{% elif it.week_error %}<span class="pj-meet-week-auto is-unknown" title="실적 조회 실패">이번주 실적 미확인</span>{% endif %}</span>
</td>
{% if p %}
<td class="pj-meet-c-text is-prev"><div class="pj-meet-ro">{{ p.content }}</div></td>
<td class="pj-meet-c-text is-prev"><div class="pj-meet-ro">{% if p.content_html is defined %}{{ p.content_html | safe }}{% else %}{{ p.content }}{% endif %}</div></td>
<td class="pj-meet-c-amt is-prev">{{ won(p.target_amount) }}</td>
<td class="pj-meet-c-amt is-prev pj-meet-c-result">
{% if p.not_started %}
@@ -274,6 +277,11 @@
</tbody>
{% endfor %}
</table>
{% if edit %}<p class="pj-goal-note">글자를 선택하면 색상·크기·굵게·기울임·밑줄·서식 초기화를 사용할 수 있습니다.
셀 오른쪽 경계는 너비 조절·더블클릭 자동 맞춤, 우클릭은 현재/전체 열 자동 맞춤입니다.
이번주 할 일 셀의 위·아래·왼쪽 테두리를 끌면 내용과 서식을 옮깁니다.
같은 구역에서 끌기·Shift+클릭으로 범위를 선택한 뒤 Del로 지우고 Ctrl+Z로 되돌립니다.
{% if meeting.cell_merges %}우클릭으로 세로 셀 병합·병합 해제를 사용할 수 있습니다.{% endif %}</p>{% endif %}
{% if edit %}
<div class="pj-goal-foot">
<button type="button" class="pj-btn" id="pj-meet-sec-new">+ 구역 추가</button>
@@ -298,5 +306,7 @@
{% include "project/_side_modals.html" %}
{% include "project/_member_tasks_modal.html" %}
<script src="/static/project.js?v=20261003h" defer></script>
<script src="/static/project-goal-text.js?v=20261003c" defer></script>
<script src="/static/project-meeting-cells.js?v=20261003a" defer></script>
<script src="/static/project.js?v=20261003j" defer></script>
{% endblock %}
@@ -38,29 +38,7 @@
</div>
{% if is_admin and goals_enabled and board %}
<div class="pj-goal-format" id="pj-goal-format" role="toolbar" aria-label="선택한 글자 서식" hidden>
<div class="pj-goal-format-group pj-goal-color-picker">
<button type="button" class="pj-goal-format-btn pj-goal-color-toggle" data-goal-format="color" aria-label="글자 색상" title="글자 색상" aria-expanded="false" aria-controls="pj-goal-color-grid" disabled><span class="pj-goal-color-letter" aria-hidden="true">가<span class="pj-goal-color-preview"></span></span><svg class="pj-goal-format-chevron" viewBox="0 0 10 10" fill="none" stroke="currentColor" stroke-width="1.3" aria-hidden="true"><path d="m2 4 3 3 3-3"/></svg></button>
<div class="pj-goal-color-grid" id="pj-goal-color-grid" role="group" aria-label="글자 색상 선택" hidden>
{% for color in ('#000000', '#4B5563', '#9CA3AF', '#DC2626', '#EA580C', '#CA8A04', '#16A34A', '#0891B2', '#2563EB', '#7C3AED', '#DB2777', '#FFFFFF') %}
<button type="button" class="pj-goal-text-swatch" data-goal-color="{{ color }}" style="--swatch: {{ color }}" title="{{ color }}" aria-label="{{ color }}" aria-pressed="false" disabled></button>
{% endfor %}
</div>
</div>
<div class="pj-goal-format-group" role="group" aria-label="글자 크기">
<button type="button" class="pj-goal-format-btn" data-goal-format="size-up" aria-label="글자 크기 2px 키우기" title="글자 크기 2px 키우기" disabled><span class="pj-goal-font-letter" aria-hidden="true">가</span><svg class="pj-goal-font-arrow" viewBox="0 0 10 14" fill="none" stroke="currentColor" stroke-width="1.2" aria-hidden="true"><path d="M5 9V2M2 5l3-3 3 3"/></svg></button>
<button type="button" class="pj-goal-format-btn" data-goal-format="size-down" aria-label="글자 크기 2px 줄이기" title="글자 크기 2px 줄이기" disabled><span class="pj-goal-font-letter" aria-hidden="true">가</span><svg class="pj-goal-font-arrow" viewBox="0 0 10 14" fill="none" stroke="currentColor" stroke-width="1.2" aria-hidden="true"><path d="M5 2v7M2 6l3 3 3-3"/></svg></button>
<output class="pj-goal-size-value" data-goal-format="size" aria-label="선택한 글자 크기">14px</output>
</div>
<div class="pj-goal-format-group" role="group" aria-label="글자 모양">
{% for key, label in (('bold', '굵게'), ('italic', '기울임'), ('underline', '밑줄')) %}
<button type="button" class="pj-goal-format-btn" data-goal-format="{{ key }}" aria-label="{{ label }}" title="{{ label }}" aria-pressed="false" disabled><span class="pj-goal-font-letter" aria-hidden="true">가</span></button>
{% endfor %}
</div>
<div class="pj-goal-format-group" role="group" aria-label="서식 초기화">
<button type="button" class="pj-goal-format-btn" data-goal-format="reset" aria-label="서식 초기화" title="서식 초기화" disabled><svg class="pj-goal-reset-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m16 3 5 5a2 2 0 0 1 0 3L11 21H7l-4-4a2 2 0 0 1 0-3L13 3a2 2 0 0 1 3 0Z"/><path d="m8 9 7 7M11 21h10"/></svg></button>
</div>
</div>
{% include "project/_cell_format.html" %}
{% endif %}
<div class="pj-view pj-goal-pane" id="pj-goal-pane">
{% if not goals_enabled %}
@@ -611,6 +611,15 @@
</ol>
<p>금액은 <code>1,200,000</code>·<code>120만</code>·<code>1.5억</code>·<code>3천만</code>·<code>1억2천만</code>처럼 입력할 수 있습니다. <kbd>Enter</kbd> 또는 칸을 떠날 때 원 단위로 저장되고, 빈칸은 값을 지웁니다. 글·메모는 입력을 약 0.8초 멈추거나 칸을 떠날 때, 참석자·평가는 바꾸는 즉시 저장됩니다.</p>
<p>이번주 할 일 셀에서는 목표 표의 셀 편집 도구를 함께 사용할 수 있습니다.</p>
<ul>
<li><b>글자 서식</b> — 글자 일부를 선택하고 위쪽 도구에서 색·크기·굵게·기울임·밑줄을 바꿉니다. 초기화 버튼은 선택한 글자의 서식을 지웁니다.</li>
<li><b>열 너비</b> — 오른쪽 경계를 끌어 조절합니다. 경계를 더블클릭하거나 우클릭 메뉴에서 현재 열·전체 열 너비를 내용에 맞춥니다. 너비는 이 브라우저에 기억됩니다.</li>
<li><b>범위 선택·지우기</b> — 같은 구역의 이번주 글 셀을 드래그하거나 첫 셀을 누른 뒤 <kbd>Shift</kbd>+클릭으로 선택합니다. 우클릭의 내용 지우기 또는 <kbd>Delete</kbd>로 지우고, <kbd>Ctrl</kbd>+<kbd>Z</kbd>로 되돌립니다.</li>
<li><b>내용 이동</b> — 셀 테두리를 다른 이번주 글 셀로 끌면 내용과 서식이 함께 이동합니다. 대상에 글이 있으면 덮어쓰기를 확인합니다. 이동 중에는 두 셀의 저장을 기다립니다.</li>
<li><b>병합·해제</b> — 같은 구역의 글 셀을 여러 줄 선택하고 우클릭의 셀 병합을 누릅니다. 해제해도 합친 글은 첫 셀에 남습니다. 병합된 줄을 이동·삭제하거나 그 사이에 줄을 추가하려면 먼저 병합을 해제하세요.</li>
</ul>
<h3 id="meetings-review">지난주 리뷰·결과·평가</h3>
<p>지난주 할 일과 목표는 <b>정확히 7일 전 주의 같은 항목</b>에서 가져옵니다. 이름 변경·순서 이동·회의록 생성 순서와 관계없이 이어진 같은 줄을 찾습니다. 그 주 회의록이 없으면 “회의록 없음”, 회의록은 있지만 항목이 없으면 “지난주 회의록에 없는 줄”로 표시합니다. 몇 주 전 기록을 지난주로 대신 보여 주지 않습니다.</p>
<ul>