feat(입출고): 날짜 칸을 ERP 공용 달력으로
발주 목록 기간, 발주일, 입고 예정일, 입고일을 erp-datepop 으로 교체. 국경일·대체공휴일을 빨강·이름으로 표시하고 마우스를 올리면 이름을 보여 준다. 필수 칸은 지우기를 빼고, 잠긴 입고일은 버튼도 비활성화. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -106,6 +106,16 @@ def _require(st: Any, user: dict[str, Any], what: str) -> dict[str, bool]:
|
||||
return p
|
||||
|
||||
|
||||
def _date_holidays() -> dict[str, str]:
|
||||
"""날짜 칸 달력(erp-datepop)의 국경일·대체공휴일 — 프로젝트 달력과 같은 표."""
|
||||
try:
|
||||
from app.modules.project.store import KR_HOLIDAYS # noqa: WPS433
|
||||
|
||||
return dict(KR_HOLIDAYS)
|
||||
except Exception: # noqa: BLE001 — 표를 못 읽어도 날짜 입력은 된다
|
||||
return {}
|
||||
|
||||
|
||||
def _render(request: Request, name: str, user: dict[str, Any], ctx: dict[str, Any], status_code: int = 200) -> HTMLResponse:
|
||||
from app.main import build_erp_nav, render_template # noqa: WPS433
|
||||
|
||||
@@ -114,7 +124,7 @@ def _render(request: Request, name: str, user: dict[str, Any], ctx: dict[str, An
|
||||
return render_template(request, name, {
|
||||
"user": user, "is_admin": perms["admin"], "perms": perms,
|
||||
"nav_items": build_erp_nav(user, active="inout"),
|
||||
"msg": request.query_params.get("msg", ""), "today": today_kst(),
|
||||
"msg": request.query_params.get("msg", ""), "today": today_kst(), "date_holidays": _date_holidays(),
|
||||
"open_options": request.query_params.get("options") == "1" and perms["admin"], # 톱니 팝업 바로 열기
|
||||
**ctx,
|
||||
}, status_code=status_code)
|
||||
|
||||
Reference in New Issue
Block a user