|
|
|
@@ -1,8 +1,10 @@
|
|
|
|
|
{% extends "erp_base.html" %}
|
|
|
|
|
{#- 라이브 커머스 설정(2026-11-04) — 호스트 정보. 계좌 등 개인정보·지우기는 ERP 관리자만(router.settings), 칩 권한자는 이름·상태만 보임 — `live_host` = 새 등록, `live_host_edit` = 고치기(개인정보는 빈칸으로 열림, 비워 두면 그대로). 추가·고치기는 같은 창(live.js). 문구 = t()(i18n.py). -#}
|
|
|
|
|
{% block head_extra %}<link rel="stylesheet" href="/static/live.css?v=20261105e" />{% endblock %}
|
|
|
|
|
{% block head_extra %}<link rel="stylesheet" href="/static/live.css?v=20261106a" />{% endblock %}
|
|
|
|
|
|
|
|
|
|
{% block content %}
|
|
|
|
|
{#- 쇼핑몰(005, store.PLATFORMS) — 로고는 말레이시아 배송 모듈 이미지 -#}
|
|
|
|
|
{% set platform_names = {"tiktok": "TikTok", "shopee": "Shopee"} %}
|
|
|
|
|
<section class="lv" lang="{{ lang }}">
|
|
|
|
|
<div class="lv-bar">
|
|
|
|
|
<a class="erp-btn erp-btn-outline" href="/live/">{{ t('◀ 스케줄표') }}</a>
|
|
|
|
@@ -15,10 +17,11 @@
|
|
|
|
|
<div class="erp-card-block">
|
|
|
|
|
<div class="erp-table-wrap">
|
|
|
|
|
<table class="erp-table lv-table">
|
|
|
|
|
<thead><tr><th>{{ t('간단한 이름') }}</th><th>{{ t('이름 (IC 기준)') }}</th>{% if is_admin %}<th>{{ t('전화번호') }}</th><th>{{ t('이메일') }}</th><th>{{ t('주소') }}</th><th>{{ t('은행명') }}</th><th>{{ t('계좌번호') }}</th>{% endif %}<th>{{ t('상태') }}</th>{% if can_edit_host %}<th></th>{% endif %}</tr></thead>
|
|
|
|
|
<thead><tr><th>{{ t('쇼핑몰') }}</th><th>{{ t('간단한 이름') }}</th><th>{{ t('이름 (IC 기준)') }}</th>{% if is_admin %}<th>{{ t('전화번호') }}</th><th>{{ t('이메일') }}</th><th>{{ t('주소') }}</th><th>{{ t('은행명') }}</th><th>{{ t('계좌번호') }}</th>{% endif %}<th>{{ t('상태') }}</th>{% if can_edit_host %}<th></th>{% endif %}</tr></thead>
|
|
|
|
|
<tbody>
|
|
|
|
|
{% for h in hosts %}
|
|
|
|
|
<tr{% if not h.is_active %} class="lv-off"{% endif %}>
|
|
|
|
|
<td data-label="{{ t('쇼핑몰') }}">{% if h.platform %}<img class="lv-logo" src="/static/dispatch/courier/{{ h.platform }}.png" alt="{{ platform_names[h.platform] }}" title="{{ platform_names[h.platform] }}" />{% endif %}</td>
|
|
|
|
|
<td data-label="{{ t('간단한 이름') }}">{{ h.display_name }}</td>
|
|
|
|
|
<td data-label="{{ t('이름 (IC 기준)') }}">{{ h.full_name }}</td>
|
|
|
|
|
{% if is_admin %}
|
|
|
|
@@ -28,21 +31,25 @@
|
|
|
|
|
<td data-label="{{ t('은행명') }}">{{ h.bank_name }}</td>
|
|
|
|
|
<td class="lv-nowrap" data-label="{{ t('계좌번호') }}">{{ h.bank_account }}</td>
|
|
|
|
|
{% endif %}
|
|
|
|
|
{% if can_edit_host %}
|
|
|
|
|
<td data-label="{{ t('상태') }}"><label class="erp-switch" title="{{ t('사용') }}"><input type="checkbox" data-active="/live/settings/hosts/{{ h.id }}/active" aria-label="{{ t('사용') }} — {{ h.display_name or h.full_name }}"{% if h.is_active %} checked{% endif %} /><span class="erp-switch-slider"></span></label></td>
|
|
|
|
|
{% else %}
|
|
|
|
|
<td class="lv-nowrap" data-label="{{ t('상태') }}">{{ t('사용') if h.is_active else t('사용 안 함') }}</td>
|
|
|
|
|
{% endif %}
|
|
|
|
|
{% if can_edit_host %}
|
|
|
|
|
<td class="lv-actions">
|
|
|
|
|
{% if is_admin %}
|
|
|
|
|
<button type="button" class="erp-btn erp-btn-outline erp-btn-sm" data-edit='{{ {"id": h.id, "display_name": h.display_name, "full_name": h.full_name, "phone": h.phone, "email": h.email, "address": h.address, "bank_name": h.bank_name, "bank_account": h.bank_account, "is_active": h.is_active} | tojson }}'>{{ t('고치기') }}</button>
|
|
|
|
|
<button type="button" class="erp-btn erp-btn-outline erp-btn-sm" data-edit='{{ {"id": h.id, "platform": h.platform, "display_name": h.display_name, "full_name": h.full_name, "phone": h.phone, "email": h.email, "address": h.address, "bank_name": h.bank_name, "bank_account": h.bank_account, "is_active": h.is_active} | tojson }}'>{{ t('고치기') }}</button>
|
|
|
|
|
<button type="button" class="erp-btn erp-btn-outline erp-btn-sm" data-post="/live/settings/hosts/{{ h.id }}/delete" data-confirm="{{ t('{name} 호스트를 지울까요?').format(name=h.full_name) }}">{{ t('지우기') }}</button>
|
|
|
|
|
{% else %}
|
|
|
|
|
{#- 개인정보를 페이지에 싣지 않는다 -#}
|
|
|
|
|
<button type="button" class="erp-btn erp-btn-outline erp-btn-sm" data-edit='{{ {"id": h.id, "display_name": h.display_name, "full_name": h.full_name, "is_active": h.is_active} | tojson }}'>{{ t('고치기') }}</button>
|
|
|
|
|
<button type="button" class="erp-btn erp-btn-outline erp-btn-sm" data-edit='{{ {"id": h.id, "platform": h.platform, "display_name": h.display_name, "full_name": h.full_name, "is_active": h.is_active} | tojson }}'>{{ t('고치기') }}</button>
|
|
|
|
|
{% endif %}
|
|
|
|
|
</td>
|
|
|
|
|
{% endif %}
|
|
|
|
|
</tr>
|
|
|
|
|
{% else %}
|
|
|
|
|
<tr><td colspan="{{ 9 if is_admin else 4 if can_edit_host else 3 }}" class="erp-empty">{{ t('등록한 호스트가 없습니다.') }}</td></tr>
|
|
|
|
|
<tr><td colspan="{{ 10 if is_admin else 5 if can_edit_host else 4 }}" class="erp-empty">{{ t('등록한 호스트가 없습니다.') }}</td></tr>
|
|
|
|
|
{% endfor %}
|
|
|
|
|
</tbody>
|
|
|
|
|
</table>
|
|
|
|
@@ -54,6 +61,12 @@
|
|
|
|
|
<form id="lv-form" action="/live/settings/hosts">
|
|
|
|
|
<h3 id="lv-dlg-title" data-add="{{ t('호스트 등록') }}" data-edit="{{ t('호스트 고치기') }}"></h3>
|
|
|
|
|
<input type="hidden" name="id" />
|
|
|
|
|
<fieldset class="lv-platforms">
|
|
|
|
|
<legend>{{ t('쇼핑몰') }}</legend>
|
|
|
|
|
{% for p, name in platform_names.items() %}
|
|
|
|
|
<label class="lv-platform"><input type="radio" name="platform" value="{{ p }}" required /><img class="lv-logo" src="/static/dispatch/courier/{{ p }}.png" alt="{{ name }}" /></label>
|
|
|
|
|
{% endfor %}
|
|
|
|
|
</fieldset>
|
|
|
|
|
<label class="lv-field">{{ t('간단한 이름') }} <input class="erp-input" type="text" name="display_name" maxlength="50" required /></label>
|
|
|
|
|
<label class="lv-field">{{ t('이름 (IC 기준)') }} <input class="erp-input" type="text" name="full_name" maxlength="200" required /></label>
|
|
|
|
|
{% if not is_admin %}<p class="lv-sub" data-edit-only hidden>{{ t('개인정보는 보이지 않습니다. 비워 두면 그대로 유지됩니다.') }}</p>{% endif %}
|
|
|
|
|