feat(project): meeting header with plan, notes and quick task table

Three header areas that stay visible while the table scrolls:
month plan with the four numbers in one compact line, decisions/notes,
and a task table (title, assignee, project, section) whose cells open
pick lists; Apply creates the task in that project.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-07 16:24:23 +09:00
parent 50153139fc
commit da27c9990a
12 changed files with 327 additions and 72 deletions
@@ -1,7 +1,7 @@
{% extends "project/_meeting_content_base.html" if meeting_embedded else "erp_base.html" %}
{% block head_extra %}
<link rel="stylesheet" href="/static/project.css?v=20261007d" />
<link rel="stylesheet" href="/static/project.css?v=20261007e" />
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
{% endblock %}
@@ -11,8 +11,11 @@
{%- macro num(v) -%}{% if v is not none %}{% if v == v | int %}{{ "{:,}".format(v | int) }}{% else %}{{ "{:,.2f}".format(v) }}{% endif %}{% endif %}{%- endmacro -%}
{% block content %}
{% set h = head if head is defined and head else {} %}
{% set unk = h.unknown or [] %}
{%- macro unknown_val() -%}<span class="pj-meet-unknown" title="실적 조회 실패 — 알 수 없는 값이라 0 으로 보이지 않습니다">미확인</span>{%- endmacro -%}
{# 주간 회의록 — 목표 표 월 머리를 누르면 열린다(/project/goals/{연도}/meetings/{월}?week=주차 시작일).
주차(store.month_weeks — 그 달 안, 1주차는 1일부터)마다 회의록 하나: 위쪽 고정 영역(왼쪽 숫자 4칸 | 오른쪽 결정 사항·메모)
주차(store.month_weeks — 그 달 안, 1주차는 1일부터)마다 회의록 하나: 머리 영역 3칸(월 계획 + 숫자 한 줄 | 결정 사항·메모 | 작업 등록)
+ 구역(목표 표 업무 영역)별 줄 — 주요 업무·정량 목표 | 지난주: 전주 업무·결과(글)·전주 목표·결과(금액).
지난주 칸은 바로 앞 주차 회의록의 같은 줄(연결키). 월 누적 실적은 실적 모듈, 월 누적 목표는 목표 표 주차별 목표 합.
입력은 관리자만(칸별 즉시 저장, project.js initGoalMeeting). DB: project_db 015·020. #}
@@ -21,7 +24,7 @@
{% if not meeting_embedded %}{% with current_pid = 0, side_active = "goals" %}{% include "project/_side.html" %}{% endwith %}{% endif %}
<section class="pj-main">
{# 머리 — 왼쪽: 제목·이전/다음 달·인쇄·회의록 삭제·주차 탭(한 줄) + 이 달 계획(달력 앞까지) / 오른쪽 위: 작은 달력 #}
{# 머리 — 왼쪽: 제목·이전/다음 달·인쇄·회의록 삭제·주차 탭(한 줄) + 영역 3칸(월 계획·숫자 | 결정 사항 | 작업 등록) / 오른쪽 위: 작은 달력 #}
<div class="pj-meet-headgrid">
<div class="pj-meet-headleft">
<div class="pj-meet-title">
@@ -53,24 +56,69 @@
{% endfor %}
</nav>
</div>
{# 이 달 계획 — 연간 목표 표의 그 달 열 글(업무 영역별, router._month_plan) #}
{% if month_plan is not none %}
<section class="pj-meet-plan">
<div class="pj-meet-plan-head"><span class="material-symbols-outlined">event_note</span>{{ goal_month }}월 계획</div>
{% if month_plan %}
<div class="pj-meet-plan-grid">
{% for a in month_plan %}
<div class="pj-meet-plan-area" style="--goal-bg: {{ a.color or '#f4f5f7' }}">
<b class="pj-meet-plan-name">{{ a.name }}</b>
{% for it in a.lines %}
<div class="pj-meet-plan-item">{% if it.label %}<span class="pj-meet-plan-label">{{ it.label }}</span>{% endif %}<span class="pj-meet-plan-text">{{ it.text_html | safe }}</span>{% if it.range %}<em>{{ it.range }}</em>{% endif %}</div>
{# ── 머리 영역 3칸(스크롤해도 보임 — 표만 아래 .pj-meet-pane 에서 스크롤) ──
① 월 계획 + 머리 줄 오른쪽에 숫자 4개를 작게 한 줄로 ② 결정 사항·메모 ③ 작업 빠른 등록 표(project.js initMeetQuickTasks) #}
<div class="pj-meet-board">
<section class="pj-meet-area pj-meet-plan">
<div class="pj-meet-plan-head">
<span class="pj-meet-plan-title"><span class="material-symbols-outlined">event_note</span>{{ goal_month }}월 계획</span>
{% if h %}
<div class="pj-meet-kpiline">
<span class="pj-meet-kpi" title="월 목표 매출(연간 목표 표){% if h.month_target_won is not none %} = {{ won(h.month_target_won) }}원{% endif %}">
<span class="pj-meet-kpi-label">월 목표</span>
<span class="pj-meet-kpi-val">{% if h.sales_target is not none %}{{ num(h.sales_target) }}<small>{{ h.sales_unit }}</small>{% else %}<span class="pj-muted">—</span>{% endif %}</span>
</span>
<span class="pj-meet-kpi" title="월 누적 목표 매출 — 연간 목표 표에서 입력한 주차별 매출 목표의 1주차~{{ week_n }}주차 합계{% if not h.week_targets_set %} — 목표 표에서 주차별 목표를 입력하세요{% endif %}">
<span class="pj-meet-kpi-label">누적 목표 <small>({{ week_n }}주차)</small></span>
<span class="pj-meet-kpi-val">{% if h.cum_target_won is not none %}{{ won(h.cum_target_won) }}<small>원</small>{% else %}<span class="pj-muted">—</span>{% endif %}</span>
</span>
<span class="pj-meet-kpi" title="월 누적 실적(1일~{{ h.mtd_end[5:] | replace('-', '/') if h.mtd_end else '' }}){% if h.fresh_tip %} · {{ h.fresh_tip }}{% endif %}">
<span class="pj-meet-kpi-label">누적 실적 {% if h.mtd_end %}<small>({{ h.mtd_end[5:] | replace('-', '/') }})</small>{% endif %}</span>
<span class="pj-meet-kpi-val">{% if h.mtd is not none %}{{ won(h.mtd) }}<small>원</small>{% elif 'mtd' in unk %}{{ unknown_val() }}{% else %}<span class="pj-muted">—</span>{% endif %}</span>
</span>
<span class="pj-meet-kpi" title="누적 목표 대비 달성 — 월 누적 실적 − 월 누적 목표 매출 (월 누적 실적 ÷ 월 누적 목표 매출)">
<span class="pj-meet-kpi-label">목표 대비</span>
{% if h.gap is not none %}<span class="pj-meet-kpi-val {{ 'is-good' if h.gap >= 0 else 'is-low' }}">{{ '+' if h.gap > 0 else '' }}{{ won(h.gap) }}<small>원</small>{% if h.rate is not none %} <small class="pj-meet-kpi-rate">{{ h.rate }}%</small>{% endif %}</span>
{% elif 'mtd' in unk and h.cum_target_won is not none %}<span class="pj-meet-kpi-val">{{ unknown_val() }}</span>
{% else %}<span class="pj-meet-kpi-val"><span class="pj-muted">—</span></span>{% endif %}
</span>
</div>
{% endif %}
</div>
<div class="pj-meet-area-body">
{% if month_plan is none %}<p class="pj-meet-plan-empty">연간 목표 표가 없어 월 계획을 보여 줄 수 없습니다.</p>
{% elif month_plan %}
<div class="pj-meet-plan-grid">
{% for a in month_plan %}
<div class="pj-meet-plan-area" style="--goal-bg: {{ a.color or '#f4f5f7' }}">
<b class="pj-meet-plan-name">{{ a.name }}</b>
{% for it in a.lines %}
<div class="pj-meet-plan-item">{% if it.label %}<span class="pj-meet-plan-label">{{ it.label }}</span>{% endif %}<span class="pj-meet-plan-text">{{ it.text_html | safe }}</span>{% if it.range %}<em>{{ it.range }}</em>{% endif %}</div>
{% endfor %}
</div>
{% endfor %}
</div>
{% endfor %}
</div>
{% else %}<p class="pj-meet-plan-empty">목표 표에 {{ goal_month }}월 계획이 아직 없습니다.</p>{% endif %}
</section>
{% endif %}
{% else %}<p class="pj-meet-plan-empty">목표 표에 {{ goal_month }}월 계획이 아직 없습니다.</p>{% endif %}
</div>
</section>
<section class="pj-meet-area pj-meet-notes">
<h3>결정 사항 · 메모</h3>
{% if meeting %}
{% if is_admin %}<textarea id="pj-meet-notes" rows="4" placeholder="이번 회의에서 정한 것, 다음 주까지 확인할 것">{{ meeting.notes }}</textarea>
{% else %}<div class="pj-meet-ro">{{ meeting.notes or '—' }}</div>{% endif %}
{% else %}<p class="pj-meet-plan-empty">이 주차 회의록을 만들면 적을 수 있습니다.</p>{% endif %}
</section>
<section class="pj-meet-area pj-meet-quick" id="pj-meet-quick">
<h3>작업 등록 <small>제목을 쓰고 담당자·프로젝트·섹션 칸을 눌러 고른 뒤 [적용]</small></h3>
<div class="pj-meet-area-body">
<table class="pj-meet-quick-table">
<thead><tr><th>제목</th><th>담당자</th><th>프로젝트</th><th>섹션</th><th></th></tr></thead>
<tbody></tbody>
</table>
<button type="button" class="pj-meet-quick-add" data-quick="add">+ 줄 추가</button>
</div>
</section>
</div>
</div>
{# 작은 달력 — 월요일 시작 줄, 줄을 누르면 그 줄의 이 달 날짜가 든 주차 회의록(보고 있는 주차의 줄은 영역 표시). 점 = 회의록 있음. #}
<div class="pj-meet-cal" aria-label="{{ goal_month }}월 달력">
@@ -102,43 +150,7 @@
{% endif %}
</div>
{% else %}
{% set h = head %}
{% set edit = is_admin %}
{% set unk = h.unknown or [] %}
{%- macro unknown_val() -%}<span class="pj-meet-unknown" title="실적 조회 실패 — 알 수 없는 값이라 0 으로 보이지 않습니다">미확인</span>{%- endmacro -%}
{# ── 위쪽 고정 영역(스크롤해도 보임) — 왼쪽 절반: 숫자 4칸 / 오른쪽 절반: 결정 사항·메모.
높이는 project.js initMeetTop 이 --pj-meet-top-h 로 알려 표 머리 줄이 그 아래에 붙는다 ── #}
<div class="pj-meet-top" id="pj-meet-top">
<div class="pj-meet-kpibar">
<div class="pj-meet-kpi">
<span class="pj-meet-kpi-label">월 목표 매출</span>
<span class="pj-meet-kpi-val">{% if h.sales_target is not none %}{{ num(h.sales_target) }}<small>{{ h.sales_unit }}</small>{% else %}<span class="pj-muted">목표 표에 없음</span>{% endif %}</span>
{% if h.month_target_won is not none and h.sales_unit and h.sales_unit != '원' %}<span class="pj-meet-kpi-sub">= {{ won(h.month_target_won) }}원</span>{% endif %}
</div>
<div class="pj-meet-kpi" title="연간 목표 표에서 입력한 주차별 매출 목표의 1주차~{{ week_n }}주차 합계">
<span class="pj-meet-kpi-label">월 누적 목표 매출 <small>({{ week_n }}주차까지)</small></span>
<span class="pj-meet-kpi-val">{% if h.cum_target_won is not none %}{{ won(h.cum_target_won) }}<small>원</small>{% else %}<span class="pj-muted">—</span>{% endif %}</span>
{% if not h.week_targets_set %}<a class="pj-meet-kpi-sub pj-meet-kpi-link" href="/project/goals/{{ goal_year }}">목표 표에서 주차별 목표 입력</a>{% endif %}
</div>
<div class="pj-meet-kpi"{% if h.fresh_tip %} title="{{ h.fresh_tip }}"{% endif %}>
<span class="pj-meet-kpi-label">월 누적 실적 {% if h.mtd_end %}<small>({{ h.mtd_end[5:] | replace('-', '/') }}까지)</small>{% endif %}</span>
<span class="pj-meet-kpi-val">{% if h.mtd is not none %}{{ won(h.mtd) }}<small>원</small>{% elif 'mtd' in unk %}{{ unknown_val() }}{% else %}<span class="pj-muted">—</span>{% endif %}</span>
</div>
<div class="pj-meet-kpi is-accent" title="월 누적 실적 − 월 누적 목표 매출 (월 누적 실적 ÷ 월 누적 목표 매출)">
<span class="pj-meet-kpi-label">누적 목표 대비 달성</span>
{% if h.gap is not none %}
<span class="pj-meet-kpi-val {{ 'is-good' if h.gap >= 0 else 'is-low' }}">{{ '+' if h.gap > 0 else '' }}{{ won(h.gap) }}<small>원</small></span>
{% if h.rate is not none %}<span class="pj-meet-kpi-sub {{ 'is-good' if h.rate >= 100 else 'is-low' }}">{{ h.rate }}%</span>{% endif %}
{% elif 'mtd' in unk and h.cum_target_won is not none %}<span class="pj-meet-kpi-val">{{ unknown_val() }}</span>
{% else %}<span class="pj-meet-kpi-val"><span class="pj-muted">—</span></span>{% endif %}
</div>
</div>
<div class="pj-meet-notes">
<h3>결정 사항 · 메모</h3>
{% if edit %}<textarea id="pj-meet-notes" rows="4" placeholder="이번 회의에서 정한 것, 다음 주까지 확인할 것">{{ meeting.notes }}</textarea>
{% else %}<div class="pj-meet-ro">{{ meeting.notes or '—' }}</div>{% endif %}
</div>
</div>
{# 매출 자료 갱신 — 주차를 열면 실적 모듈 매출 업데이트(지난 주차 시작 ~ 이 주차 오늘)를 한 번 더 돌리고 숫자 칸만 다시 그린다
(project.js initMeetingSync, 같은 주는 10분에 한 번). 정상이면 아무것도 보이지 않는다(2026-10-01 요청 — 큰 상태 줄 없음).
실패·일부 실패면 이 작은 안내 + [다시 시도], 실적 권한이 없으면 부르지 않고 한 줄 설명. 마지막 갱신 성공 시각은 서버 기록(data-fresh). #}
@@ -267,5 +279,5 @@
<script src="/static/project-goal-text.js?v=20261003d" defer></script>
<script src="/static/project-meeting-cells.js?v=20261007a" defer></script>
<script src="/static/project.js?v=20261007i" defer></script>
<script src="/static/project.js?v=20261007j" defer></script>
{% endblock %}
@@ -207,5 +207,5 @@
{% include "project/_member_tasks_modal.html" %}
<script src="/static/project-goal-text.js?v=20261003d" defer></script>
<script src="/static/project.js?v=20261007i" defer></script>
<script src="/static/project.js?v=20261007j" defer></script>
{% endblock %}
@@ -597,8 +597,13 @@
<h3 id="meetings-month-plan">이 달 계획 확인</h3>
<p>제목 아래 <span class="pjh-ui">해당 월 계획</span>은 연간 목표 표에 적은 월 계획을 업무 영역별로 보여 줍니다. 굵게·기울임·밑줄·글자 색상과 줄바꿈·들여쓰기를 유지하고, 글자 크기는 월 계획의 기본 크기로 표시합니다. 빈 계획은 생략하고, 병합 칸은 해당 월을 포함하는 계획을 한 번 표시합니다. 여기서는 읽기만 하므로 수정하려면 연간 목표 표로 돌아갑니다.</p>
<h3 id="meetings-kpis">위쪽 숫자(월 목표·누적 목표·누적 실적·달성)와 결정 사항</h3>
<p>위쪽 영역은 화면을 스크롤해도 고정됩니다. 왼쪽 절반은 숫자 4칸, 오른쪽 절반은 <b>결정 사항 · 메모</b>입니다.</p>
<h3 id="meetings-kpis">위쪽 3칸 — 월 계획·숫자, 결정 사항, 작업 등록</h3>
<p>제목 아래 세 칸은 표를 스크롤해도 그대로 보입니다. 왼쪽은 <b>월 계획</b>이고 그 머리 줄 오른쪽에 숫자 4개(월 목표 · 누적 목표 · 누적 실적 · 목표 대비)가 작게 한 줄로 나옵니다(숫자에 마우스를 올리면 자세한 뜻). 가운데는 <b>결정 사항 · 메모</b>, 오른쪽은 <b>작업 등록</b> 표입니다.</p>
<ol class="pjh-steps">
<li><b>작업 등록</b> — 제목 칸에 작업 이름을 씁니다. 담당자·프로젝트·섹션 칸을 누르면 고를 수 있는 목록이 나옵니다.</li>
<li>프로젝트는 내가 멤버인 프로젝트만 나오고, 고르면 첫 섹션이 자동으로 들어갑니다. 담당자는 그 프로젝트의 멤버·소유자 중에서 고릅니다(프로젝트를 먼저 고르면 정확합니다).</li>
<li>맨 오른쪽 <span class="pjh-ui">적용</span>을 누르면 그 프로젝트에 작업이 만들어지고, 줄에 <b>등록됨</b> 링크가 생깁니다. 아직 적용하지 않은 줄은 이 브라우저에 남아 있어 새로고침해도 사라지지 않습니다. <span class="pjh-ui">+ 줄 추가</span>로 줄을 늘립니다.</li>
</ol>
<table class="pjh-table">
<tr><th>지표</th><th>뜻과 출처</th></tr>
<tr><td>월 목표 매출</td><td>연간 목표 표의 해당 월 매출 목표(= 주차별 목표 합계)입니다. 매출 단위가 원·천원·만원·십만원·백만원·천만원·억원이면 원으로 환산해 함께 보여 줍니다.</td></tr>
@@ -614,7 +619,7 @@
<li>각 항목의 <b>주요 업무</b>에 실행할 일과 일정을 적습니다.</li>
<li><span class="pjh-ui">참석자</span>를 눌러 프로젝트 관리 권한이 있는 등록 직원 중 선택합니다. 찾기·전원 선택·모두 해제를 사용할 수 있으며, 칩의 <span class="pjh-ui">×</span>로 참석자를 뺍니다.</li>
<li>참석자 오른쪽 <span class="pjh-ui">회의록 보드</span>를 누르면 그 주차의 Google 슬라이드가 새 창으로 열립니다. 처음 누르면 회의록 보드 공유 드라이브에 빈 슬라이드(제목 틀 없음)를 <b>"10월 2주차 (10/5~10/11)"</b> 같은 이름으로 만들고, 다음부터는 같은 파일을 엽니다. 직원 누구나 열 수 있으며, 슬라이드 편집 권한은 공유 드라이브 권한을 따릅니다. 창이 안 뜨면 브라우저의 팝업 허용을 확인하세요.</li>
<li>위쪽 오른쪽 <b>결정 사항 · 메모</b>에 회의 결론과 다음주까지 확인할 일을 적습니다.</li>
<li>위쪽 가운데 <b>결정 사항 · 메모</b>에 회의 결론과 다음주까지 확인할 일을 적습니다.</li>
</ol>
<p>금액은 <code>1,200,000</code>·<code>120만</code>·<code>1.5억</code>·<code>3천만</code>·<code>1억2천만</code>처럼 입력할 수 있습니다. <kbd>Enter</kbd> 또는 칸을 떠날 때 원 단위로 저장되고, 빈칸은 값을 지웁니다. 숫자로 읽히지 않는 값(예: <code>20개</code>)은 적은 글 그대로 저장됩니다. 글·메모는 입력을 약 0.8초 멈추거나 칸을 떠날 때, 참석자는 바꾸는 즉시 저장됩니다.</p>
@@ -104,5 +104,5 @@
{% include "project/_side_modals.html" %}
{% include "project/_member_tasks_modal.html" %}
<script src="/static/project.js?v=20261007i" defer></script>
<script src="/static/project.js?v=20261007j" defer></script>
{% endblock %}
@@ -100,5 +100,5 @@
"today": {{ today | tojson }}
}
</script>
<script src="/static/project.js?v=20261007i" defer></script>
<script src="/static/project.js?v=20261007j" defer></script>
{% endblock %}
@@ -487,5 +487,5 @@
</script>
<script src="/static/vendor/vis-timeline/vis-timeline-graph2d.min.js"></script>
<script src="/static/project.js?v=20261007i" defer></script>
<script src="/static/project.js?v=20261007j" defer></script>
{% endblock %}
@@ -70,5 +70,5 @@
{% include "project/_side_modals.html" %}
{% include "project/_member_tasks_modal.html" %}
<script src="/static/project.js?v=20261007i" defer></script>
<script src="/static/project.js?v=20261007j" defer></script>
{% endblock %}
+53 -3
View File
@@ -2482,7 +2482,58 @@ html.pj-goal-selecting, html.pj-goal-selecting * { user-select: none !important;
/* 머리 — 왼쪽: 제목·인쇄·삭제 … 주차 탭(달력 쪽 끝) + 이 달 계획(달력 앞까지) / 오른쪽 위: 작은 달력(폭 174px, 글자 10.5px) */
.pj-meet-headgrid { display: flex; align-items: flex-start; gap: 10px; margin: 8px 0 12px; }
.pj-meet-headleft { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.pj-meet-headleft > .pj-meet-plan { margin: 0; }
/* 머리 영역 3칸(2026-10-07) — ① 월 계획 + 숫자 한 줄 ② 결정 사항·메모 ③ 작업 등록. 머리는 스크롤되지 않아 늘 보인다 */
.pj-meet-board { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .9fr) minmax(0, 1.35fr); gap: 10px; }
@media (max-width: 1500px) { .pj-meet-board { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .pj-meet-quick { grid-column: 1 / -1; } }
.pj-meet-area {
display: flex; flex-direction: column; min-width: 0; height: 230px; margin: 0; padding: 8px 10px;
border: 1px solid var(--pj-border); border-radius: 10px; background: #fff;
}
.pj-meet-area h3, .pj-meet-area.pj-meet-notes h3 { margin: 0 0 6px; font-size: 13px; font-weight: 600; }
.pj-meet-area.pj-meet-notes { margin: 0; } /* 예전 .pj-meet-notes 여백(16px) 덮기 */
.pj-meet-area h3 small { margin-left: 6px; font-size: 11px; font-weight: 400; color: var(--pj-ink-soft); }
.pj-meet-area-body { flex: 1 1 auto; min-height: 0; overflow: auto; }
.pj-meet-area.pj-meet-notes textarea, .pj-meet-area.pj-meet-notes .pj-meet-ro {
flex: 1 1 auto; min-height: 0; max-height: none; height: auto !important; overflow-y: auto; padding: 8px 10px;
border: 1px solid #dfe2e6; border-radius: 8px; background: #fff;
}
/* ① 머리 줄 — 제목 + 숫자 4개(작게 한 줄) */
.pj-meet-plan-title { display: inline-flex; align-items: center; gap: 6px; flex: none; }
.pj-meet-kpiline {
display: flex; align-items: baseline; gap: 10px; flex: 1 1 0; flex-wrap: nowrap; min-width: 0; margin-left: 10px;
font-size: 11px; overflow: hidden; white-space: nowrap; /* 늘 1행 — 좁으면 끝이 가려지고 말풍선으로 */
}
.pj-meet-kpiline .pj-meet-kpi { display: inline-flex; flex-direction: row; align-items: baseline; gap: 4px; padding: 0; border: none; background: none; white-space: nowrap; }
.pj-meet-kpiline .pj-meet-kpi + .pj-meet-kpi::before { content: "·"; margin-right: 6px; color: #c4c8cf; }
.pj-meet-kpiline .pj-meet-kpi { flex: none; }
.pj-meet-kpiline .pj-meet-kpi-label { font-size: 11px; font-weight: 500; overflow: visible; }
.pj-meet-kpiline .pj-meet-kpi-val { font-size: 12px; font-weight: 700; }
.pj-meet-kpiline .pj-meet-kpi-val small { font-size: 10px; }
.pj-meet-kpiline .pj-meet-kpi-rate { color: inherit; font-weight: 700; }
/* ③ 작업 등록 표 — 빈 칸을 누르면 목록(body 에 붙는 메뉴) */
.pj-meet-quick-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 12.5px; }
.pj-meet-quick-table th { position: sticky; top: 0; z-index: 1; background: #f7f8f9; padding: 4px 6px; font-size: 11.5px; font-weight: 600; color: var(--pj-ink-soft); text-align: left; border-bottom: 1px solid var(--pj-border); }
.pj-meet-quick-table th:nth-child(1) { width: 34%; }
.pj-meet-quick-table th:nth-child(2) { width: 17%; }
.pj-meet-quick-table th:nth-child(3) { width: 20%; }
.pj-meet-quick-table th:nth-child(4) { width: 15%; }
.pj-meet-quick-table th:nth-child(5) { width: 14%; }
.pj-meet-quick-table td { padding: 2px 3px; border-bottom: 1px solid #eef0f2; vertical-align: middle; }
.pj-meet-quick-table input { width: 100%; box-sizing: border-box; height: 26px; padding: 0 6px; border: 1px solid transparent; border-radius: 6px; background: transparent; font: inherit; }
.pj-meet-quick-table input:hover, .pj-meet-quick-table input:focus { border-color: #dfe2e6; background: #fff; outline: none; }
.pj-meet-pick-cell {
display: block; width: 100%; height: 26px; padding: 0 6px; border: 1px dashed transparent; border-radius: 6px; background: none;
font: inherit; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; color: var(--pj-ink);
}
.pj-meet-pick-cell.is-empty { color: #a7adb6; }
.pj-meet-pick-cell:hover { border-color: #cfd4da; background: #fafbfc; }
.pj-meet-quick-apply { height: 26px; padding: 0 10px; border: none; border-radius: 6px; background: var(--pj-accent); color: #fff; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.pj-meet-quick-apply:disabled { opacity: .5; cursor: default; }
.pj-meet-quick-done { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; color: #1f8a4c; white-space: nowrap; }
.pj-meet-quick-done a { color: inherit; }
.pj-meet-quick-table tr.is-done input, .pj-meet-quick-table tr.is-done .pj-meet-pick-cell { color: var(--pj-ink-soft); pointer-events: none; }
.pj-meet-quick-add { margin-top: 4px; padding: 2px 6px; border: none; background: none; color: var(--pj-accent-dark); font: inherit; font-size: 12px; cursor: pointer; }
@media print { .pj-meet-quick { display: none !important; } .pj-meet-area { height: auto; } }
.pj-meet-title { flex-wrap: wrap; }
.pj-meet-title-acts { display: inline-flex; align-items: center; gap: 6px; margin-left: 4px; }
.pj-meet-title-acts .material-symbols-outlined { font-size: 16px; margin-right: 3px; }
@@ -2593,8 +2644,7 @@ html.pj-goal-selecting, html.pj-goal-selecting * { user-select: none !important;
@media (max-width: 1300px) { .pj-meet-kpibar { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pj-meet-kpi:nth-child(2) { border-right: none; } .pj-meet-kpi:nth-child(-n+2) { border-bottom: 1px solid var(--pj-border); } }
/* 이 달 계획 — 연간 목표 표의 그 달 열(업무 영역별 작은 카드) */
.pj-meet-plan { margin: 0 0 10px; padding: 8px 10px; border: 1px solid var(--pj-border); border-radius: 10px; background: #fff; }
.pj-meet-plan-head { display: flex; align-items: center; gap: 6px; font-size: var(--pj-text-size); font-weight: 500; margin-bottom: 6px; line-height: 20px; color: var(--pj-ink); }
.pj-meet-plan-head { display: flex; align-items: center; flex-wrap: nowrap; gap: 6px; min-width: 0; font-size: var(--pj-text-size); font-weight: 500; margin-bottom: 6px; line-height: 20px; color: var(--pj-ink); }
.pj-meet-plan-head .material-symbols-outlined { font-size: 18px; color: var(--pj-accent); }
.pj-meet-plan-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px; }
.pj-meet-plan-area { padding: 6px 8px; border-radius: 8px; background: var(--goal-bg, #f4f5f7); font-size: 12px; line-height: 1.45; min-width: 0; }
+142
View File
@@ -10238,12 +10238,154 @@
});
}
// ── 회의록 머리 ③ 작업 등록 표 — 제목 입력, 담당자·프로젝트·섹션 칸을 누르면 목록(showContextMenu — body 에 붙음),
// [적용] = 그 프로젝트에 작업 만들기(POST /project/api/projects/{id}/tasks, 담당자는 그 프로젝트 멤버·소유자만 —
// 서버 _check_assignee). 프로젝트 목록은 내가 멤버인 최상위 프로젝트(GET /project/api/projects).
// 아직 적용 안 한 줄은 이 브라우저에 보관(localStorage pj_meet_quick:{이메일}) — 새로고침해도 남는다.
function initMeetQuickTasks() {
const box = el("pj-meet-quick");
if (!box) return;
const tbody = box.querySelector("tbody");
const wrap = document.querySelector(".pj-wrap");
const KEY = "pj_meet_quick:" + ((wrap && wrap.dataset.me) || "");
const people = {};
(window.PJ_MEET_MEMBERS || []).forEach(function (m) { people[String(m.email).toLowerCase()] = m.name; });
const nameOf = function (email) { return people[String(email).toLowerCase()] || capName(idOf(email)); };
const blank = function () { return { title: "", assignee: "", projectId: null, projectName: "", stageId: null, stageName: "" }; };
let rows = [];
try { rows = (JSON.parse(localStorage.getItem(KEY) || "[]") || []).filter(function (r) { return r && !r.done; }); } catch (_) { rows = []; }
while (rows.length < 3) rows.push(blank());
const save = function () {
try { localStorage.setItem(KEY, JSON.stringify(rows.filter(function (r) { return !r.done && (r.title || r.projectId || r.assignee); }))); } catch (_) {}
};
let projects = null;
const memberCache = {}, stageCache = {};
async function loadProjects() {
if (projects) return projects;
const res = await api("GET", "/project/api/projects");
projects = (res.projects || []).filter(function (p) { return !p.parent_id; });
return projects;
}
async function membersOf(pid) {
if (memberCache[pid]) return memberCache[pid];
const res = await api("GET", "/project/api/projects/" + pid + "/members");
const list = (res.members || []).map(function (m) { return String(m.user_email).toLowerCase(); });
const proj = (projects || []).find(function (p) { return p.id === pid; });
if (proj && proj.owner_email && list.indexOf(String(proj.owner_email).toLowerCase()) < 0) list.unshift(String(proj.owner_email).toLowerCase());
memberCache[pid] = list;
return list;
}
async function stagesOf(pid) {
if (stageCache[pid]) return stageCache[pid];
const res = await api("GET", "/project/api/projects/" + pid + "/stages");
stageCache[pid] = (res.stages || []).slice().sort(function (a, b) { return a.sort_order - b.sort_order; });
return stageCache[pid];
}
function cell(kind, text, placeholder) {
return '<button type="button" class="pj-meet-pick-cell' + (text ? "" : " is-empty") + '" data-pick="' + kind + '">' +
escapeHtml(text || placeholder) + "</button>";
}
function render() {
tbody.innerHTML = rows.map(function (r, i) {
return '<tr data-i="' + i + '"' + (r.done ? ' class="is-done"' : "") + ">" +
'<td><input type="text" data-field="title" maxlength="200" placeholder="작업 제목" value="' + escapeHtml(r.title) + '"></td>' +
"<td>" + cell("assignee", r.assignee ? nameOf(r.assignee) : "", "담당자") + "</td>" +
"<td>" + cell("project", r.projectName, "프로젝트") + "</td>" +
"<td>" + cell("stage", r.stageName, "섹션") + "</td>" +
"<td>" + (r.done
? '<span class="pj-meet-quick-done"><span class="material-symbols-outlined" style="font-size:16px">check_circle</span>' +
'<a href="/project/p/' + r.done.pid + "?task=" + r.done.id + '" target="_blank" rel="noopener">등록됨</a></span>'
: '<button type="button" class="pj-meet-quick-apply" data-quick="apply">적용</button>') + "</td></tr>";
}).join("");
}
function menuAt(btn, items) {
const r = btn.getBoundingClientRect();
showContextMenu(r.left, r.bottom + 2, items.length ? items : [{ label: "고를 항목이 없습니다", onClick: function () {} }]);
}
async function pickProject(r, btn) {
const list = await loadProjects();
menuAt(btn, list.map(function (p) {
return { label: p.name, icon: menuIcon("folder"), checked: r.projectId === p.id, onClick: async function () {
if (r.projectId !== p.id) { r.stageId = null; r.stageName = ""; }
r.projectId = p.id; r.projectName = p.name;
try {
const [mem, stages] = await Promise.all([membersOf(p.id), stagesOf(p.id)]);
if (r.assignee && mem.indexOf(r.assignee.toLowerCase()) < 0) {
showToast(nameOf(r.assignee) + "님은 이 프로젝트 멤버가 아니어서 담당자를 비웠습니다.");
r.assignee = "";
}
if (!r.stageId && stages.length) { r.stageId = stages[0].id; r.stageName = stages[0].name; }
} catch (e) { showToast("프로젝트 정보를 읽지 못했습니다: " + e.message, "error"); }
save(); render();
} };
}));
}
async function pickAssignee(r, btn) {
// 프로젝트를 골랐으면 그 프로젝트 멤버·소유자만(작업을 볼 수 있는 사람), 아니면 프로젝트 권한이 있는 전체 직원
const emails = r.projectId ? await membersOf(r.projectId)
: (window.PJ_MEET_MEMBERS || []).map(function (m) { return String(m.email).toLowerCase(); });
menuAt(btn, [{ label: "담당자 없음", icon: menuIcon("person_off"), checked: !r.assignee, onClick: function () { r.assignee = ""; save(); render(); } }, null]
.concat(emails.map(function (e) {
return { label: nameOf(e), icon: menuIcon("person"), checked: r.assignee === e, onClick: function () { r.assignee = e; save(); render(); } };
})));
}
async function pickStage(r, btn) {
if (!r.projectId) { showToast("프로젝트를 먼저 고르세요."); return; }
const stages = await stagesOf(r.projectId);
menuAt(btn, stages.map(function (st) {
return { label: st.name, icon: menuIcon("view_column"), checked: r.stageId === st.id, onClick: function () { r.stageId = st.id; r.stageName = st.name; save(); render(); } };
}));
}
async function apply(r, btn) {
if (!r.title.trim()) { showToast("작업 제목을 쓰세요."); return; }
if (!r.projectId) { showToast("프로젝트를 고르세요."); return; }
btn.disabled = true;
try {
const res = await api("POST", "/project/api/projects/" + r.projectId + "/tasks", {
title: r.title.trim(), stage_id: r.stageId, assignee_email: r.assignee || "",
assignee_name: r.assignee ? nameOf(r.assignee) : "",
});
r.done = { id: res.task.id, pid: r.projectId };
showToast("‘" + r.projectName + "’에 작업을 등록했습니다.");
if (!rows.some(function (x) { return !x.done; })) rows.push(blank());
save(); render();
} catch (e) {
btn.disabled = false;
showToast("작업 등록 실패: " + e.message, "error");
}
}
tbody.addEventListener("input", function (e) {
const inp = e.target.closest("input[data-field=title]");
if (!inp) return;
rows[+inp.closest("tr").dataset.i].title = inp.value;
save();
});
tbody.addEventListener("keydown", function (e) {
const inp = e.target.closest("input[data-field=title]");
if (inp && e.key === "Enter" && !isImeEnter(e)) { e.preventDefault(); inp.closest("tr").querySelector('[data-pick="assignee"]').click(); }
});
tbody.addEventListener("click", function (e) {
const tr = e.target.closest("tr");
if (!tr) return;
const r = rows[+tr.dataset.i], pick = e.target.closest("[data-pick]");
if (r.done) return;
const fail = function (err) { showToast("목록을 읽지 못했습니다: " + err.message, "error"); };
if (pick) {
e.stopPropagation();
({ project: pickProject, assignee: pickAssignee, stage: pickStage })[pick.dataset.pick](r, pick).catch(fail);
} else if (e.target.closest('[data-quick="apply"]')) apply(r, e.target.closest('[data-quick="apply"]'));
});
box.querySelector('[data-quick="add"]').addEventListener("click", function () { rows.push(blank()); save(); render(); });
render();
}
function initGoalMeeting() {
const pane = el("pj-meet-pane");
if (!pane) return;
initMeetOrder();
initMeetTop(pane);
initMeetBoard(pane.dataset.week);
initMeetQuickTasks();
const week = pane.dataset.week, year = pane.dataset.year;
const isAdmin = pane.dataset.admin === "true";
const SCROLL_KEY = "pj_meet_scroll";