feat(project): 회의록 주차를 열면 매출 자료를 쇼핑몰에서 한 번 더 받아 숫자 갱신

- 실적 모듈 매출 업데이트(POST /performance/api/sync, background)를 지난주 월요일 ~ 이번 주 오늘 기간으로 실행,
  진행 상황(쇼핑몰 n/m·받은 자료)을 상태 줄에 표시
- 끝나면 화면을 서버에서 다시 받아 숫자 칸만 교체(머리 카드·자동 결과·달성률·이번주 실적), 입력 중인 칸은 그대로
- 같은 주는 10분에 한 번만 자동(새로고침마다 쇼핑몰 API 를 부르지 않게), [매출 갱신] 버튼은 언제나,
  다른 업데이트가 돌면 그 작업을 기다림, 실적 권한 없음·실패 쇼핑몰 안내
- project.css/js 캐시 버전 20261001f, 문서 갱신

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-01 12:04:14 +09:00
parent 45a671940b
commit be298777af
11 changed files with 131 additions and 16 deletions
@@ -1,7 +1,7 @@
{% extends "erp_base.html" %}
{% block head_extra %}
<link rel="stylesheet" href="/static/project.css?v=20261001e" />
<link rel="stylesheet" href="/static/project.css?v=20261001f" />
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
{% endblock %}
@@ -71,6 +71,15 @@
{% else %}
{% set h = head %}
{% set edit = is_admin %}
{# 매출 자료 갱신 — 주차를 열면 실적 모듈 매출 업데이트(지난주 월요일 ~ 이번 주 오늘)를 한 번 더 돌리고 숫자를 다시 그린다
(project.js initMeetingSync, 같은 주는 10분에 한 번, [매출 갱신] 버튼은 언제나) #}
{% if h.perf and sync_from %}
<div class="pj-meet-sync" id="pj-meet-sync" data-from="{{ sync_from }}" data-to="{{ sync_to }}">
<span class="material-symbols-outlined">sync</span>
<span class="pj-meet-sync-text">저장된 실적으로 보여 주는 중</span>
<button type="button" class="pj-btn pj-btn-sm" id="pj-meet-sync-btn" title="{{ sync_from[5:] | replace('-', '/') }} ~ {{ sync_to[5:] | replace('-', '/') }} 매출을 쇼핑몰에서 다시 받습니다">매출 갱신</button>
</div>
{% endif %}
{# ── 머리 — 월 목표 대비 누적·남은 주 필요 매출 / 전주 리뷰 / 금주 목표 ── #}
<div class="pj-meet-kpis">
<div class="pj-meet-kpi">
@@ -117,7 +126,7 @@
{% else %}
<span class="pj-meet-kpi-val">{% if meeting.week_target is not none %}{{ won(meeting.week_target) }}<small>원</small>{% else %}<span class="pj-muted">—</span>{% endif %}</span>
{% endif %}
{% if h.need_per_week is not none %}<span class="pj-meet-kpi-sub">필요 {{ won(h.need_per_week) }}원</span>{% endif %}
<span class="pj-meet-sub-slot">{% if h.need_per_week is not none %}<span class="pj-meet-kpi-sub">필요 {{ won(h.need_per_week) }}원</span>{% endif %}</span>
</div>
<div class="pj-meet-kpi">
<span class="pj-meet-kpi-label">금주 현재 실적</span>
@@ -180,12 +189,12 @@
<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 %}
{% 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>{% endif %}
<span class="pj-meet-week-slot">{% 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>{% 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-amt is-prev">{{ won(p.target_amount) }}</td>
<td class="pj-meet-c-amt is-prev">
<td class="pj-meet-c-amt is-prev pj-meet-c-result">
{% if p.not_started %}
<span class="pj-muted" title="지난 회의록의 주({{ p.period }})가 아직 시작되지 않았습니다">진행 전</span>
{% elif p.auto_result is not none %}
@@ -232,5 +241,5 @@
{% include "project/_side_modals.html" %}
{% include "project/_member_tasks_modal.html" %}
<script src="/static/project.js?v=20261001e" defer></script>
<script src="/static/project.js?v=20261001f" defer></script>
{% endblock %}
@@ -1,7 +1,7 @@
{% extends "erp_base.html" %}
{% block head_extra %}
<link rel="stylesheet" href="/static/project.css?v=20261001e" />
<link rel="stylesheet" href="/static/project.css?v=20261001f" />
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
{% endblock %}
@@ -207,5 +207,5 @@
{% include "project/_side_modals.html" %}
{% include "project/_member_tasks_modal.html" %}
<script src="/static/project.js?v=20261001e" defer></script>
<script src="/static/project.js?v=20261001f" defer></script>
{% endblock %}
@@ -1,7 +1,7 @@
{% extends "erp_base.html" %}
{% block head_extra %}
<link rel="stylesheet" href="/static/project.css?v=20261001e" />
<link rel="stylesheet" href="/static/project.css?v=20261001f" />
<link rel="stylesheet" href="/static/project-help.css?v=20260926v" />
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
{% endblock %}
@@ -1,7 +1,7 @@
{% extends "erp_base.html" %}
{% block head_extra %}
<link rel="stylesheet" href="/static/project.css?v=20261001e" />
<link rel="stylesheet" href="/static/project.css?v=20261001f" />
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
{% endblock %}
@@ -104,5 +104,5 @@
{% include "project/_side_modals.html" %}
{% include "project/_member_tasks_modal.html" %}
<script src="/static/project.js?v=20261001e" defer></script>
<script src="/static/project.js?v=20261001f" defer></script>
{% endblock %}
@@ -1,7 +1,7 @@
{% extends "erp_base.html" %}
{% block head_extra %}
<link rel="stylesheet" href="/static/project.css?v=20261001e" />
<link rel="stylesheet" href="/static/project.css?v=20261001f" />
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
{% endblock %}
@@ -100,5 +100,5 @@
"today": {{ today | tojson }}
}
</script>
<script src="/static/project.js?v=20261001e" defer></script>
<script src="/static/project.js?v=20261001f" defer></script>
{% endblock %}
@@ -1,7 +1,7 @@
{% extends "erp_base.html" %}
{% block head_extra %}
<link rel="stylesheet" href="/static/project.css?v=20261001e" />
<link rel="stylesheet" href="/static/project.css?v=20261001f" />
<!-- 구글 머티리얼 심볼(담당자 아이콘 등) — self-host -->
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
<!-- 타임라인 vis-timeline — self-host -->
@@ -496,5 +496,5 @@
</script>
<script src="/static/vendor/vis-timeline/vis-timeline-graph2d.min.js"></script>
<script src="/static/project.js?v=20261001e" defer></script>
<script src="/static/project.js?v=20261001f" defer></script>
{% endblock %}
@@ -1,7 +1,7 @@
{% extends "erp_base.html" %}
{% block head_extra %}
<link rel="stylesheet" href="/static/project.css?v=20261001e" />
<link rel="stylesheet" href="/static/project.css?v=20261001f" />
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
{% endblock %}
@@ -70,5 +70,5 @@
{% include "project/_side_modals.html" %}
{% include "project/_member_tasks_modal.html" %}
<script src="/static/project.js?v=20261001e" defer></script>
<script src="/static/project.js?v=20261001f" defer></script>
{% endblock %}