feat(cupang): 설정 화면 2열 개편 — itemcode 다중선택 등록 + 활성/삭제

- 수동 등록 카드 제거
- 왼쪽: itemcode_db 전체 목록(낱개+세트) 다중선택, 등록된 항목 진회색+흰글씨
  /cupang/api/products/all + /cupang/products/bulk(JSON 일괄 upsert)
- 오른쪽: 등록 제품명 목록 — 제품명/코드/상태 + 활성·비활성 토글 + 완전삭제
  /products/{id}/active (토글), /products/{id}/delete (hard delete)
- ItemcodeReader.list_all 추가

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-05-30 03:46:35 +09:00
parent 96e2c49506
commit 1d33761003
5 changed files with 229 additions and 94 deletions
+3 -3
View File
@@ -237,11 +237,11 @@ class CupangDBStore:
).fetchone()
return self._product_serialize(row)
def deactivate_product(self, *, product_id: int) -> None:
def set_product_active(self, *, product_id: int, active: bool) -> None:
with self._pool.connection() as conn:
cur = conn.execute(
"UPDATE cupang_products SET active = FALSE WHERE id = %s",
(product_id,),
"UPDATE cupang_products SET active = %s WHERE id = %s",
(bool(active), product_id),
)
if cur.rowcount == 0:
raise KeyError(product_id)