3d28d59e4d
- 2시간 방송 = 두 칸(rowspan), 30분이라도 걸치면 그 칸까지, 자정 넘김은 그날 마지막 칸까지
- 합친 칸 안에서 시작하는 다른 방송도 같은 칸에 넣고 더 길면 칸을 늘림
- 직전 커밋 1babc39 의 메시지는 잘못 들어감 — 실제 내용은 달력 시간 칸 1시간 단위 변경
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
92 lines
5.6 KiB
HTML
92 lines
5.6 KiB
HTML
{% extends "erp_base.html" %}
|
|
{#- 라이브 커머스 달력 보기(2026-11-04) — 줄 = 2시간 칸, 열 = 날짜, 맨 아래 = 날짜별 합계. 카드 머리 = 호스트 간단한 이름 + 그 방송의 틱톡 계정.
|
|
카드 머리를 끌어 빈 칸으로 옮기거나 다른 카드 위에 놓아 맞바꾼다(live.js). 문구 = t()(i18n.py), 영문은 CSS 로 대문자(받은 화면과 같게). -#}
|
|
{% block head_extra %}<link rel="stylesheet" href="/static/live.css?v=20261106c" />
|
|
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
|
|
<link rel="stylesheet" href="/static/erp-datepop.css?v=20261102a" />{% endblock %}
|
|
|
|
{% block content %}
|
|
<div class="lv-split">
|
|
<section class="lv" lang="{{ lang }}">
|
|
{% include "live/_bar.html" %}
|
|
|
|
<div class="lv-kpis">
|
|
<div class="lv-kpi"><span>{{ t('총 판매금액') }}</span><b>RM {{ cal.totals.sales }}</b></div>
|
|
<div class="lv-kpi"><span>{{ t('광고비') }}</span><b>RM {{ cal.totals.spend }}</b></div>
|
|
<div class="lv-kpi"><span>{{ t('호스트 비용') }}</span><b>RM {{ cal.totals.fee }}</b></div>
|
|
<div class="lv-kpi"><span>ROAS</span><b>{{ cal.totals.roas }}</b></div>
|
|
</div>
|
|
|
|
<p class="lv-tip">{{ t('팁: 카드 머리를 끌어 옮기거나 맞바꿀 수 있습니다. 오른쪽으로 스크롤하면 이달 {n}일을 모두 볼 수 있습니다.').format(n=cal.days | length) }}</p>
|
|
|
|
<div class="lv-cal-wrap" id="lv-cal-wrap">
|
|
<table class="lv-cal">
|
|
<thead>
|
|
<tr>
|
|
<th class="lv-cal-time" scope="col">{{ t('시간') }}</th>
|
|
{% for d in cal.days %}
|
|
<th scope="col" data-day="{{ d.iso }}"{% if d.is_today %} data-today="1"{% endif %} class="{% if d.is_weekend %}is-weekend{% endif %}{% if d.is_today %} is-today{% endif %}">
|
|
<div class="lv-cal-weekday">{{ d.weekday }} <span class="lv-cal-count">{{ d.count }}</span></div>
|
|
<div class="lv-cal-date">{{ d.label }}</div>
|
|
</th>
|
|
{% endfor %}
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for slot in cal.slots %}
|
|
<tr>
|
|
<th class="lv-cal-time" scope="row">{{ slot.label }}<small>{{ cal.slot_note }}</small></th>
|
|
{% for cell in slot.cells %}{% if not cell.skip %}{#- skip = 위 칸에 합쳐진 칸(방송이 걸친 시간만큼 rowspan) -#}
|
|
<td class="lv-cell{% if cell.is_weekend %} is-weekend{% endif %}"{% if cell.rowspan > 1 %} rowspan="{{ cell.rowspan }}"{% endif %} data-drop data-day="{{ cell.iso }}" data-start="{{ slot.start }}">
|
|
{% for c in cell.cards %}
|
|
<article class="lv-card" data-card="{{ c.id }}">
|
|
<header class="lv-card-head" draggable="true" style="background:{{ c.color }}" title="{{ c.host_name }} · {{ c.times }}{% if c.venue %} · {{ c.venue }}{% endif %}">
|
|
<span class="lv-card-grip" aria-hidden="true">✥</span>
|
|
<span class="lv-card-name">{{ c.label }}{% if c.tiktok_handle %}<small>@{{ c.tiktok_handle }}</small>{% endif %}</span>
|
|
<button type="button" class="lv-card-edit" data-edit='{{ c.edit | tojson }}' aria-label="{{ t('{name} {date} {times} 고치기').format(name=c.label, date=c.date, times=c.times) }}">✎</button>
|
|
</header>
|
|
<div class="lv-card-nums">
|
|
<div><span>{{ t('판매금액') }}</span><b>{{ c.card_sales }}</b></div>
|
|
<div><span>{{ t('커미션') }} ({{ cal.commission_percent }}%)</span><b>{{ c.card_commission }}</b></div>
|
|
</div>
|
|
<footer class="lv-card-foot"><span>{{ t('비용') }}: <b>RM{{ c.card_fee }}</b></span>{% if c.images %}<a href="/live/images/{{ c.images[0].id }}" target="_blank" rel="noopener" title="{{ t('방송 결과 이미지') }}">{{ t('이미지 {n}').format(n=c.images | length) }}</a>{% endif %}</footer>
|
|
</article>
|
|
{% endfor %}
|
|
{% if not cell.cards and hosts | selectattr('is_active') | list %}
|
|
<button type="button" class="lv-cell-add" data-new='{{ {"broadcast_date": cell.iso, "start_time": slot.start, "end_time": slot.end} | tojson }}' aria-label="{{ t('{date} {slot} 방송 추가').format(date=cell.iso, slot=slot.label) }}">+</button>
|
|
{% endif %}
|
|
</td>
|
|
{% endif %}{% endfor %}
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
<tfoot>
|
|
<tr>
|
|
<th class="lv-cal-time" scope="row">{{ t('합계 & ROAS') }}</th>
|
|
{% for d in cal.days %}
|
|
<td>
|
|
<dl class="lv-total">
|
|
<div><dt>{{ t('총 판매금액') }}:</dt><dd class="is-sales">RM {{ d.sales_text }}</dd></div>
|
|
<div><dt>{{ t('광고비') }}:</dt><dd>RM {{ d.spend_text }} <button type="button" class="lv-total-edit" data-spend="{{ d.iso }}" data-value="{{ d.spend if d.spend else '' }}" aria-label="{{ t('{date} 광고비 고치기').format(date=d.iso) }}">✎</button></dd></div>
|
|
<div><dt>{{ t('호스트 비용') }}:</dt><dd>RM {{ d.fee_text }}</dd></div>
|
|
<div><dt>ROAS:</dt><dd>{{ d.roas }}</dd></div>
|
|
</dl>
|
|
</td>
|
|
{% endfor %}
|
|
</tr>
|
|
</tfoot>
|
|
</table>
|
|
</div>
|
|
</section>
|
|
{#- 화면 오른쪽 위에 붙는 달력 — 날짜를 누르면 그 날이 표 맨 왼쪽(live.js), 말레이시아 공휴일(holidays.py) -#}
|
|
<aside class="lv-side-cal" id="lv-side-cal"></aside>
|
|
</div>
|
|
|
|
{% include "live/_dialog.html" %}
|
|
{% endblock %}
|
|
|
|
{% block scripts %}<script type="application/json" id="lv-my-holidays">{{ my_holidays | tojson }}</script>
|
|
<script type="application/json" id="lv-live-days">{{ live_days | tojson }}</script>
|
|
<script src="/static/erp-datepop.js?v=20261106a" defer></script>
|
|
{% include "live/_scripts.html" %}{% endblock %}
|