ui(malaysia): 이동이력 날짜필터+요일, Ref열 제거, 헤딩 변경(낱개/콤보 상품)

- 이동 이력에 날짜 선택 필터(요일 포함 표시), 날짜+종류 조합 유지
- 이력 Ref 컬럼 삭제
- "낱개 아이템"→"낱개 상품", "세트 아이템 — 출고(OUT)"→"콤보 상품"
- 안내 문구 삭제

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-11 16:05:50 +09:00
parent 300f4e23c8
commit 9039d1d80b
2 changed files with 43 additions and 17 deletions
+27 -5
View File
@@ -40,6 +40,21 @@ def _bom_map(request: Request) -> dict[str, list[dict[str, Any]]]:
return r.set_bom_map() if r else {}
_WEEKDAYS_KO = ("", "", "", "", "", "", "")
def _date_label(iso: str | None) -> str:
"""'2026-06-11''2026-06-11 (목)'. 파싱 실패 시 원문."""
from datetime import date as _date # noqa: WPS433
s = (iso or "").strip()
try:
d = _date.fromisoformat(s[:10])
except (ValueError, TypeError):
return s
return f"{d.isoformat()} ({_WEEKDAYS_KO[d.weekday()]})"
def _require_user(request: Request) -> dict[str, Any]:
from app.main import get_current_user_record # noqa: WPS433
from app.store import has_module # noqa: WPS433
@@ -151,6 +166,16 @@ async def movements_page(request: Request) -> HTMLResponse:
st, user = guard
wh = _selected_wh(request, st)
mtype = (request.query_params.get("type") or "").strip().upper()
fdate = (request.query_params.get("date") or "").strip()
movements = st.list_movements(
warehouse_code=wh,
movement_type=mtype if mtype in store.MOVEMENT_TYPES else None,
date_from=fdate or None,
date_to=fdate or None,
limit=300,
)
for m in movements:
m["date_label"] = _date_label(m.get("movement_date"))
ctx = _base_ctx(request, user, st, wh=wh)
ctx.update(
{
@@ -158,13 +183,10 @@ async def movements_page(request: Request) -> HTMLResponse:
"page_subtitle": f"{wh} · 입고/출고/조정 일괄 등록",
"individual_items": st.list_items(kind="individual"),
"set_items": st.list_items(kind="set"),
"movements": st.list_movements(
warehouse_code=wh,
movement_type=mtype if mtype in store.MOVEMENT_TYPES else None,
limit=200,
),
"movements": movements,
"today": today_kst().isoformat(),
"filter_type": mtype if mtype in store.MOVEMENT_TYPES else "",
"filter_date": fdate,
}
)
return render_template(request, "malaysia/movements.html", ctx)