feat(cupang): 박스 계산 화면 추가

달력 상단 "박스 계산" 버튼 → /cupang/box-calc. 제품명+수량을 여러 행
입력하면 제품별 박스 수·남은 낱개·총 필요 박스와 박스명별 합계를 계산.
수량/제품을 고치고 "계산 / 재계산" 으로 다시 계산할 수 있다(수량 칸에서
Enter 도 동일). 저장하지 않는 계산 전용 화면.

계산은 POST /cupang/api/box-calc 에서 store.compute_boxes 로 수행 —
클라이언트 계산을 신뢰하지 않는다. 입수량 규칙이 없는 제품은 "미설정"
으로 표시하고 합계에서 제외.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-28 12:18:52 +09:00
parent 7eb63ff664
commit c72c0710ad
4 changed files with 331 additions and 0 deletions
+9
View File
@@ -326,3 +326,12 @@
}
.cpg-sort.is-asc .cpg-sort-ind::after { content: "▲"; opacity: 1; }
.cpg-sort.is-desc .cpg-sort-ind::after { content: "▼"; opacity: 1; }
/* 박스 계산기 */
.cpg-calc-table .cpg-calc-num { text-align: right; white-space: nowrap; }
.cpg-calc-table th.cpg-calc-num { text-align: right; }
.cpg-calc-table .cpg-calc-name { min-width: 240px; }
.cpg-calc-table .cpg-calc-qty { width: 96px; text-align: right; }
.cpg-calc-row.cpg-calc-warn { background: color-mix(in srgb, var(--color-callout-red) 8%, transparent); }
.cpg-calc-actions { margin-top: 12px; gap: 8px; align-items: center; }
.cpg-calc-sum { margin-top: 16px; }