diff --git a/app/modules/cupang/router.py b/app/modules/cupang/router.py index c44a7dd..c562bd4 100644 --- a/app/modules/cupang/router.py +++ b/app/modules/cupang/router.py @@ -418,9 +418,6 @@ async def centers_page(request: Request) -> HTMLResponse: return guard store, user = guard centers = sorted(store.list_centers(include_inactive=True), key=lambda c: c["name"]) - # 사용 중 여부 표시 - for c in centers: - c["in_use"] = store.center_in_use(center_id=c["id"]) return render_template( request, "cupang/centers.html", @@ -429,7 +426,7 @@ async def centers_page(request: Request) -> HTMLResponse: "is_admin": is_admin(user), "nav_items": build_erp_nav(user, active="cupang"), "page_title": "쿠팡 밀크런 — 입고센터 관리", - "page_subtitle": "추가 · 수정 · 비활성화. 사용 중 센터는 삭제되지 않고 비활성화됩니다.", + "page_subtitle": "센터명 등록 · 수정 · 활성/비활성 · 삭제.", "centers": centers, }, ) diff --git a/app/modules/cupang/templates/cupang/box_calc.html b/app/modules/cupang/templates/cupang/box_calc.html index 339a4ed..cd03a6a 100644 --- a/app/modules/cupang/templates/cupang/box_calc.html +++ b/app/modules/cupang/templates/cupang/box_calc.html @@ -1,6 +1,6 @@ {% extends "erp_base.html" %} -{% block head_extra %}{% endblock %} +{% block head_extra %}{% endblock %} {% block content %} diff --git a/app/modules/cupang/templates/cupang/box_rules.html b/app/modules/cupang/templates/cupang/box_rules.html index bdc8375..4f08c7a 100644 --- a/app/modules/cupang/templates/cupang/box_rules.html +++ b/app/modules/cupang/templates/cupang/box_rules.html @@ -1,6 +1,6 @@ {% extends "erp_base.html" %} -{% block head_extra %}{% endblock %} +{% block head_extra %}{% endblock %} {% block content %} diff --git a/app/modules/cupang/templates/cupang/centers.html b/app/modules/cupang/templates/cupang/centers.html index fc1cf95..adc9484 100644 --- a/app/modules/cupang/templates/cupang/centers.html +++ b/app/modules/cupang/templates/cupang/centers.html @@ -1,6 +1,6 @@ {% extends "erp_base.html" %} -{% block head_extra %}{% endblock %} +{% block head_extra %}{% endblock %} {% block content %} @@ -9,58 +9,63 @@ ◀◀ 달력 - + - - - 입고센터 추가 - - + + + + 추가 + - - - - 센터 목록 ({{ centers|length }}) - 사용 중 센터는 삭제 시 비활성화됩니다. - + + 센터 목록 ({{ centers|length }}) + 이름을 고치면 저장, 쓰지 않는 센터는 비활성 또는 삭제. + - - {% for c in centers %} - - - - 저장 - - - {% if c.in_use %}사용중{% endif %} - {% if c.active %}활성 - {% else %}비활성{% endif %} - - - {% if c.active %} - - - 비활성 - - {% else %} - - - 활성 - - {% endif %} - - 삭제 - - - - {% endfor %} - + + + {% for c in centers %} + + + + 저장 + {% if c.active %}비활성{% else %}활성{% endif %} + 삭제 + + {% endfor %} + + {% endblock %} diff --git a/app/modules/cupang/templates/cupang/detail.html b/app/modules/cupang/templates/cupang/detail.html index 4585196..073a871 100644 --- a/app/modules/cupang/templates/cupang/detail.html +++ b/app/modules/cupang/templates/cupang/detail.html @@ -1,6 +1,6 @@ {% extends "erp_base.html" %} -{% block head_extra %}{% endblock %} +{% block head_extra %}{% endblock %} {% block content %} diff --git a/app/modules/cupang/templates/cupang/form.html b/app/modules/cupang/templates/cupang/form.html index 1610fdf..40e1455 100644 --- a/app/modules/cupang/templates/cupang/form.html +++ b/app/modules/cupang/templates/cupang/form.html @@ -1,6 +1,6 @@ {% extends "erp_base.html" %} -{% block head_extra %}{% endblock %} +{% block head_extra %}{% endblock %} {% block content %} diff --git a/app/modules/cupang/templates/cupang/index.html b/app/modules/cupang/templates/cupang/index.html index a9980cb..8f2b3a7 100644 --- a/app/modules/cupang/templates/cupang/index.html +++ b/app/modules/cupang/templates/cupang/index.html @@ -1,6 +1,6 @@ {% extends "erp_base.html" %} -{% block head_extra %}{% endblock %} +{% block head_extra %}{% endblock %} {% block content %} diff --git a/app/modules/cupang/templates/cupang/products.html b/app/modules/cupang/templates/cupang/products.html index 6265fbb..c010525 100644 --- a/app/modules/cupang/templates/cupang/products.html +++ b/app/modules/cupang/templates/cupang/products.html @@ -1,6 +1,6 @@ {% extends "erp_base.html" %} -{% block head_extra %}{% endblock %} +{% block head_extra %}{% endblock %} {% block content %} diff --git a/app/static/cupang.css b/app/static/cupang.css index ecd62dd..2b359b4 100644 --- a/app/static/cupang.css +++ b/app/static/cupang.css @@ -169,45 +169,41 @@ .cpg-inline-form { display: inline-flex; gap: 6px; align-items: center; margin: 0; } .cpg-row-actions { display: flex; gap: 6px; flex-wrap: wrap; } -/* ── 입고센터 관리 (좌: 추가 / 우: 목록) ── */ -.cpg-center-layout { - display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; -} -.cpg-center-add { - width: 360px; flex: 0 0 auto; - padding: 16px; -} -.cpg-center-listcard { - flex: 1 1 480px; min-width: 0; - height: 900px; - display: flex; flex-direction: column; overflow: hidden; -} -@media (max-width: 820px) { - .cpg-center-add, .cpg-center-listcard { width: 100%; flex-basis: 100%; } -} +/* ── 입고센터 관리 (상단: 추가·검색 / 아래: 목록 그리드) ── */ +.cpg-center-card { padding: 16px; } -.cpg-center-add-title { font-size: 15px; font-weight: 600; margin: 0 0 8px; } -.cpg-btn-sm { padding: 3px 8px; font-size: 12px; } +.cpg-center-bar { + display: flex; flex-wrap: wrap; gap: 10px; align-items: center; + padding-bottom: 12px; border-bottom: 1px solid var(--color-subtle-ash); +} +.cpg-center-addform { display: flex; gap: 6px; align-items: center; margin: 0; flex: 1 1 320px; min-width: 0; } +.cpg-center-addinput { flex: 1 1 auto; min-width: 0; } +.cpg-center-search { flex: 0 1 240px; min-width: 0; } -/* 목록: 카드 높이 채우고 내부 스크롤 */ -.cpg-center-list { - flex: 1 1 auto; min-height: 0; overflow-y: auto; - display: flex; flex-direction: column; gap: 6px; +.cpg-center-head { margin: 12px 0 8px; } + +.cpg-center-grid { + display: grid; + grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); + gap: 6px; + max-height: 70vh; overflow-y: auto; padding-right: 4px; } .cpg-center-row { - display: flex; align-items: center; gap: 8px; - padding: 5px 8px; + display: flex; align-items: center; gap: 6px; + margin: 0; padding: 5px 8px; border: 1px solid var(--color-subtle-ash); border-radius: 10px; min-width: 0; } +.cpg-center-dot { + flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%; + background: var(--color-success-green, #10c22b); +} .cpg-center-row.is-inactive { opacity: .55; } -.cpg-center-edit { display: flex; align-items: center; gap: 6px; flex: 1 1 auto; min-width: 0; } +.cpg-center-row.is-inactive .cpg-center-dot { background: var(--color-subtle-ash); } .cpg-center-name { flex: 1 1 auto; min-width: 0; } -.cpg-center-sort { width: 56px; flex: 0 0 auto; } -.cpg-center-state { display: inline-flex; gap: 4px; flex: 0 0 auto; } -.cpg-center-act { display: inline-flex; gap: 4px; flex: 0 0 auto; } +.cpg-btn-sm { padding: 3px 8px; font-size: 12px; flex: 0 0 auto; } /* ── 라인 테이블 ── */ .cpg-lines td { vertical-align: middle; }