feat(입출고): 발주 목록 상태 보기를 사람마다 기억

진행 중·완료·종결·취소·전체 중 고른 보기를 다음 접속에도 유지한다.
inout_settings 에 list_status:{이메일} 키로 저장해 마이그레이션은 없고,
005 미적용이면 기억만 하지 않는다.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-04 11:27:01 +09:00
parent 321041b65a
commit 6055d50dbe
4 changed files with 58 additions and 2 deletions
+6 -2
View File
@@ -171,13 +171,17 @@ def _opt_date(v: Any) -> date | None:
# 발주 목록 · 미입고 현황
# ────────────────────────────────────────────────────────────
@router.get("/", response_class=HTMLResponse)
def index(request: Request, status: str = "active", factory: str = "", q: str = "", date_from: str = Query("", alias="from"),
def index(request: Request, status: str = "", factory: str = "", q: str = "", date_from: str = Query("", alias="from"),
date_to: str = Query("", alias="to")) -> Any:
got = _ctx(request)
if not isinstance(got, tuple):
return got
st, user = got
status = status if status in store.STATUS_FILTERS else "active"
saved = st.get_list_status(user.get("email", ""))
if status not in store.STATUS_FILTERS: # 주소에 상태가 없으면 이 사람이 마지막으로 고른 보기
status = saved if saved in store.STATUS_FILTERS else "active"
elif status != saved:
st.save_list_status(user.get("email", ""), status)
orders = st.list_orders(status=status, factory_id=_opt_int(factory), q=q, date_from=_opt_date(date_from),
date_to=_opt_date(date_to))
return _render(request, "inout/index.html", user, {