feat(dispatch): 작업 단계를 3개로 축소(라벨부착·Kagayaku전달·택배스캔)
상품은 미리 제작·박스 포장까지 끝나 들어오므로 상품준비/포장완료 단계 제거. - STATUS_FIELDS 3개로 축소(DB 컬럼 product_ready/packed 는 보존) - 카드 버튼·필터(미포장/포장완료 → 미완료) 갱신 - 완료 판정/카운트는 STATUS_FIELDS 기준이라 자동 반영 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -20,9 +20,10 @@ from typing import Any, Iterable
|
||||
|
||||
# ── 작업 상태 필드(토글 대상) ──
|
||||
# 순서 = 작업 진행 순서. label_ko/label_en 은 버튼 표기.
|
||||
# 상품은 미리 제작·박스 포장까지 끝난 상태로 들어오므로 product_ready/packed
|
||||
# 단계는 화면에서 쓰지 않는다(DB 컬럼은 보존 — 과거 데이터/확장 대비).
|
||||
# 실제 작업: 송장 라벨 부착 → Kagayaku 전달 → 택배 스캔 확인.
|
||||
STATUS_FIELDS: tuple[str, ...] = (
|
||||
"product_ready",
|
||||
"packed",
|
||||
"label_attached",
|
||||
"handed_to_kagayaku",
|
||||
"courier_scanned",
|
||||
|
||||
@@ -42,8 +42,7 @@
|
||||
<div class="dsp-toolbar">
|
||||
<div class="dsp-filter" id="dsp-filter">
|
||||
<button class="erp-btn erp-btn-primary" data-filter="all" type="button">전체</button>
|
||||
<button class="erp-btn erp-btn-outline" data-filter="unpacked" type="button">미포장</button>
|
||||
<button class="erp-btn erp-btn-outline" data-filter="packed" type="button">포장완료</button>
|
||||
<button class="erp-btn erp-btn-outline" data-filter="incomplete" type="button">미완료</button>
|
||||
<button class="erp-btn erp-btn-outline" data-filter="label_attached" type="button">라벨부착</button>
|
||||
<button class="erp-btn erp-btn-outline" data-filter="handed_to_kagayaku" type="button">Kagayaku 전달</button>
|
||||
<button class="erp-btn erp-btn-outline" data-filter="courier_scanned" type="button">택배스캔 확인</button>
|
||||
@@ -54,11 +53,9 @@
|
||||
|
||||
<div class="dsp-cards" id="dsp-cards">
|
||||
{% for p in parcels %}
|
||||
{% set is_done = p.product_ready and p.packed and p.label_attached and p.handed_to_kagayaku and p.courier_scanned %}
|
||||
{% set is_done = p.label_attached and p.handed_to_kagayaku and p.courier_scanned %}
|
||||
<article class="dsp-card {% if is_done %}is-done{% endif %}"
|
||||
data-parcel="{{ p.id }}"
|
||||
data-product_ready="{{ p.product_ready|lower }}"
|
||||
data-packed="{{ p.packed|lower }}"
|
||||
data-label_attached="{{ p.label_attached|lower }}"
|
||||
data-handed_to_kagayaku="{{ p.handed_to_kagayaku|lower }}"
|
||||
data-courier_scanned="{{ p.courier_scanned|lower }}"
|
||||
@@ -152,7 +149,10 @@
|
||||
function matchesFilter(card) {
|
||||
switch (currentFilter) {
|
||||
case 'all': return true;
|
||||
case 'unpacked': return card.getAttribute('data-packed') !== 'true';
|
||||
case 'incomplete':
|
||||
return !STATUS_FIELDS.every(function (f) {
|
||||
return card.getAttribute('data-' + f) === 'true';
|
||||
});
|
||||
default: return card.getAttribute('data-' + currentFilter) === 'true';
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user