From f87bfb902e28cbb4dc43962144ec37c56f661bdb Mon Sep 17 00:00:00 2001 From: ysCha Date: Wed, 1 Apr 2026 15:14:14 +0900 Subject: [PATCH] =?UTF-8?q?[1423]=EC=84=A4=EA=B3=84=20=EA=B0=80=EC=A0=B8?= =?UTF-8?q?=EC=98=A4=EA=B8=B0=20=EA=B8=B0=EB=8A=A5=EC=97=90=20=EB=8C=80?= =?UTF-8?q?=ED=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/management/StuffDetail.jsx | 27 +++++++++++++++++++ .../management/popup/PlanRequestPop.jsx | 3 ++- 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/src/components/management/StuffDetail.jsx b/src/components/management/StuffDetail.jsx index a3a0a607..12eef9ff 100644 --- a/src/components/management/StuffDetail.jsx +++ b/src/components/management/StuffDetail.jsx @@ -1046,6 +1046,33 @@ export default function StuffDetail() { form.setValue('otherSaleStoreId', info.saleStoreId) form.setValue('otherSaleStoreName', info.saleStoreName) form.setValue('otherSaleStoreLevel', info.saleStoreLevel) + get({ url: `/api/object/saleStore/${info.saleStoreId}/firstAgent` }).then((res) => { + if (res?.firstAgentId) { + const firstAgent = { saleStoreId: res.firstAgentId, saleStoreName: res.firstAgentName } + setSaleStoreList((prev) => { + const exists = prev.some((s) => s.saleStoreId === res.firstAgentId) + return exists ? prev : [...prev, firstAgent] + }) + setShowSaleStoreList((prev) => { + const exists = prev.some((s) => s.saleStoreId === res.firstAgentId) + return exists ? prev : [...prev, firstAgent] + }) + setSelOptions(res.firstAgentId) + form.setValue('saleStoreId', res.firstAgentId) + form.setValue('saleStoreName', res.firstAgentName) + form.setValue('saleStoreLevel', '1') + } else { + setSelOptions('') + form.setValue('saleStoreId', '') + form.setValue('saleStoreName', '') + form.setValue('saleStoreLevel', '') + } + }).catch(() => { + setSelOptions('') + form.setValue('saleStoreId', '') + form.setValue('saleStoreName', '') + form.setValue('saleStoreLevel', '') + }) } } diff --git a/src/components/management/popup/PlanRequestPop.jsx b/src/components/management/popup/PlanRequestPop.jsx index 2714a4e4..25df22f0 100644 --- a/src/components/management/popup/PlanRequestPop.jsx +++ b/src/components/management/popup/PlanRequestPop.jsx @@ -11,7 +11,7 @@ import { isObjectNotEmpty, queryStringFormatter } from '@/util/common-utils' import QPagination from '@/components/common/pagination/QPagination' import { useSwal } from '@/hooks/useSwal' import { QcastContext } from '@/app/QcastProvider' -import { sanitizeDecimalInputEvent } from '@/util/input-utils' +import { sanitizeDecimalInputEvent, sanitizeIntegerInputEvent } from '@/util/input-utils' export default function PlanRequestPop(props) { const [pageNo, setPageNo] = useState(1) //현재 페이지 번호 @@ -212,6 +212,7 @@ export default function PlanRequestPop(props) { //설계의뢰 그리드에서 선택한 설계의뢰 정보 const getSelectedRowdata = (data) => { if (isNotEmptyArray(data)) { + console.log('planReqObject fields:', data[0]) setPlanReqObject(data[0]) } else { setPlanReqObject({})