fix(orders): 비고 수정 = REQUESTED + APPROVED 두 상태 모두 허용 (출고완료 포함)
Deploy momo-erp / deploy (push) Successful in 2m34s

This commit is contained in:
chpark
2026-05-14 01:22:11 +09:00
parent e2c5c5b396
commit f29024744d
+3 -3
View File
@@ -1,5 +1,5 @@
// 발주 라인의 비고(remark) 수정 — 관리자 또는 본인.
// REQUESTED 상태에서 수정 가능. ITEM/DELIVERY/CHARTER 모두 가능.
// REQUESTED(출고요청)/APPROVED(출고완료) 상태에서 수정 가능. ITEM/DELIVERY/CHARTER 모두.
import { NextRequest, NextResponse } from "next/server";
import { pool } from "@/lib/db";
import { requireMomoUser } from "@/lib/momo-guard";
@@ -32,8 +32,8 @@ export async function POST(req: NextRequest) {
if (!isAdmin && row.customer_objid !== userOwn && row.customer_objid !== r.user.userId) {
return NextResponse.json({ success: false, message: "권한이 없습니다." }, { status: 403 });
}
if (row.status !== "REQUESTED") {
return NextResponse.json({ success: false, message: "출고 요청 상태에서만 비고를 수정할 수 있습니다." }, { status: 400 });
if (row.status !== "REQUESTED" && row.status !== "APPROVED") {
return NextResponse.json({ success: false, message: "출고요청/출고완료 상태에서만 비고를 수정할 수 있습니다." }, { status: 400 });
}
await pool.query(