From 870e3af59776af42e89b85596f782c675e8dd3b2 Mon Sep 17 00:00:00 2001 From: keyy1315 Date: Thu, 7 Aug 2025 14:05:21 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EC=A1=B0=EC=82=AC=20=EB=A7=A4=EB=AC=BC?= =?UTF-8?q?=20=EC=A0=9C=EC=B6=9C=20=EA=B3=B5=ED=86=B5=EC=BD=94=EB=93=9C=20?= =?UTF-8?q?=EC=A1=B0=ED=9A=8C=20=EB=A1=9C=EC=A7=81=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 제출 대상 지점의 구분값으로 REF_NUM1 값이 사용되므로 공통 코드 타입 정의에 refNum1 추가 --- src/components/popup/SurveySaleSubmitPopup.tsx | 6 +++--- src/types/CommCode.ts | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/components/popup/SurveySaleSubmitPopup.tsx b/src/components/popup/SurveySaleSubmitPopup.tsx index 9104989..71b531b 100644 --- a/src/components/popup/SurveySaleSubmitPopup.tsx +++ b/src/components/popup/SurveySaleSubmitPopup.tsx @@ -63,7 +63,8 @@ export default function SurveySaleSubmitPopup() { /** Admin 제출 폼 데이터 삽입 - 1차 판매점*/ if (session?.role === 'Admin') { getCommCode('SALES_OFFICE_CD').then((codes) => { - setCommCodeList(codes) + const filteredCodes = codes.filter((code) => code.refNum1 === '1') + setCommCodeList(filteredCodes) }) setSubmitData((prev) => ({ ...prev, @@ -221,8 +222,7 @@ export default function SurveySaleSubmitPopup() { onChange={(e) => { const selectedOffice = commCodeList.find((item) => item.code === e.target.value) if (selectedOffice) { - //@ts-ignore - const receiver = selectedOffice.REF_CHR1.split(';') + const receiver = selectedOffice.refChr1?.split(';') || [] setSubmitData((prev) => ({ ...prev, receiver: receiver, diff --git a/src/types/CommCode.ts b/src/types/CommCode.ts index fc82431..d12ea08 100644 --- a/src/types/CommCode.ts +++ b/src/types/CommCode.ts @@ -3,4 +3,5 @@ export type CommCode = { code: string codeJp: string refChr1: string + refNum1: string }