feat(라이브커머스): 달력 보기와 호스트 비용 계산 추가

2시간 칸 × 날짜 달력(카드 머리 = Tiktok Handle, SALES·COM·Fee), 끌어 옮기기·
맞바꾸기, Jump to Date, 날짜별 합계·광고비·ROAS 를 넣는다.
호스트 비용 = 시간 × RM 25 + 판매금액 10%, 표 보기에도 표시한다.
끝 시간을 필수로 바꾸고 광고비 표는 마이그레이션 002 로 추가한다.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-04 16:58:07 +09:00
parent 5d55081464
commit 61f5b3c320
16 changed files with 621 additions and 85 deletions
+18
View File
@@ -0,0 +1,18 @@
{#- 스케줄표·달력 공통 위 막대 — 달 이동, 표/달력 전환, 호스트 설정, 방송 추가. view = table | calendar -#}
{% set here = '/live/calendar' if view == 'calendar' else '/live/' %}
{% set can_add = hosts | selectattr('is_active') | list %}
<div class="lv-bar">
<a class="erp-btn erp-btn-outline" href="{{ here }}?month={{ span.prev }}" aria-label="이전 달">◀</a>
<h2 class="lv-month">{{ span.label }}</h2>
<a class="erp-btn erp-btn-outline" href="{{ here }}?month={{ span.next }}" aria-label="다음 달">▶</a>
<nav class="lv-views" aria-label="보기 방식">
<a class="erp-btn {{ 'erp-btn-primary' if view == 'table' else 'erp-btn-outline' }}" href="/live/?month={{ span.start.strftime('%Y-%m') }}"{% if view == 'table' %} aria-current="page"{% endif %}>표</a>
<a class="erp-btn {{ 'erp-btn-primary' if view == 'calendar' else 'erp-btn-outline' }}" href="/live/calendar?month={{ span.start.strftime('%Y-%m') }}"{% if view == 'calendar' %} aria-current="page"{% endif %}>달력</a>
</nav>
<span class="lv-gap"></span>
{% if is_admin %}<a class="erp-btn erp-btn-outline" href="/live/settings">호스트 설정</a>{% endif %}
<button type="button" class="erp-btn erp-btn-primary" id="lv-add"{% if not can_add %} disabled{% endif %}>+ 방송 추가</button>
</div>
{% if not can_add %}
<p class="lv-note">방송을 추가하려면 먼저 {% if is_admin %}<a href="/live/settings">호스트 설정</a>에서{% else %}ERP 관리자가 호스트 설정에서{% endif %} 호스트를 등록해야 합니다.</p>
{% endif %}