feat(orders/admin): 기본 조회 필터 EDITABLE 에 입금완료(PAID) 포함
Deploy momo-erp / deploy (push) Successful in 1m58s
Deploy momo-erp / deploy (push) Successful in 1m58s
이전 commit(474cf79)에서 PAID 도 수정 가능해졌으므로, 기본 노출 대상에 포함.
- statuses: ["REQUESTED", "APPROVED"] → ["REQUESTED", "APPROVED", "PAID"]
- select option 라벨: "출고요청+출고완료" → "출고요청+출고완료+입금완료"
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -69,7 +69,8 @@ export default function AdminOrdersPage() {
|
||||
// URL 쿼리 우선: dateFrom/dateTo 키가 있으면 그 값 사용 (빈 문자열도 명시적 = 전체 기간).
|
||||
// 키가 없을 때 기본값 — 한 달 전 ~ 오늘
|
||||
const initial = (() => {
|
||||
// 기본 status = "EDITABLE" → REQUESTED + APPROVED (출고요청 + 출고완료) 두 건만 노출
|
||||
// 기본 status = "EDITABLE" → REQUESTED + APPROVED + PAID (출고요청 + 출고완료 + 입금완료) 노출
|
||||
// (admin 은 입금완료 발주도 품목/택배/용차 추가·수정 가능하므로 기본 노출 대상에 포함)
|
||||
if (typeof window === "undefined") return { status: "EDITABLE", dateFrom: oneMonthAgoStr(), dateTo: todayStr(), keyword: "" };
|
||||
const q = new URLSearchParams(window.location.search);
|
||||
return {
|
||||
@@ -127,7 +128,7 @@ export default function AdminOrdersPage() {
|
||||
method: "POST", headers: { "Content-Type": "application/json" },
|
||||
body: JSON.stringify({
|
||||
status: status === "EDITABLE" ? undefined : (status || undefined),
|
||||
statuses: status === "EDITABLE" ? ["REQUESTED", "APPROVED"] : undefined,
|
||||
statuses: status === "EDITABLE" ? ["REQUESTED", "APPROVED", "PAID"] : undefined,
|
||||
dateFrom: dateFrom || undefined,
|
||||
dateTo: dateTo || undefined,
|
||||
keyword: keyword || undefined,
|
||||
@@ -423,7 +424,7 @@ export default function AdminOrdersPage() {
|
||||
className="h-8 sm:h-9 px-2 rounded border border-slate-200 text-xs sm:text-sm min-w-0 flex-1 sm:flex-none sm:w-[140px]" />
|
||||
<select value={status} onChange={(e) => setStatus(e.target.value)}
|
||||
className="h-8 sm:h-9 px-2 rounded border border-slate-200 text-xs sm:text-sm bg-white sm:w-[180px]">
|
||||
<option value="EDITABLE">출고요청+출고완료</option>
|
||||
<option value="EDITABLE">출고요청+출고완료+입금완료</option>
|
||||
<option value="">전체 상태</option>
|
||||
{Object.entries(STATUS_LABEL).map(([k, v]) => <option key={k} value={k}>{v}</option>)}
|
||||
</select>
|
||||
|
||||
Reference in New Issue
Block a user