From 125eb3213b04e20b53534b673274a40e5fa0e0d2 Mon Sep 17 00:00:00 2001 From: basssy Date: Thu, 6 Mar 2025 13:50:47 +0900 Subject: [PATCH] =?UTF-8?q?=EB=AC=BC=EA=B1=B4=EC=83=81=EC=84=B8=202?= =?UTF-8?q?=EC=B0=A8=EC=A0=90=20=EC=A6=90=EA=B2=A8=EC=B0=BE=EA=B8=B0=20?= =?UTF-8?q?=EA=B4=80=EB=A0=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/management/StuffDetail.jsx | 11 +++++------ src/components/management/StuffSubHeader.jsx | 4 ++-- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/components/management/StuffDetail.jsx b/src/components/management/StuffDetail.jsx index 266f1779..6ececba1 100644 --- a/src/components/management/StuffDetail.jsx +++ b/src/components/management/StuffDetail.jsx @@ -528,12 +528,12 @@ export default function StuffDetail() { } get({ url: url }).then((res) => { if (!isEmptyArray(res)) { + //즐겨찾기 구분 추가 + res.map((row) => { + row.value = row.saleStoreId + row.label = row.saleStoreName + }) if (session?.storeId === 'T01') { - //즐겨찾기 구분 추가 - res.map((row) => { - row.value = row.saleStoreId - row.label = row.saleStoreName - }) firstList = res.filter((row) => row.saleStoreLevel === '1') firstList.sort((a, b) => (a.saleStoreId !== 'T01') - (b.saleStoreId !== 'T01') || a.saleStoreId - b.saleStoreId) favList = firstList.filter((row) => row.saleStoreId === 'T01' || row.priority !== 'B') @@ -553,7 +553,6 @@ export default function StuffDetail() { let data = managementState?.firstAgentId ? managementState.firstAgentId : managementState.saleStoreId url = `/api/object/saleStore/${data}/list?firstFlg=0&userId=${session?.userId}` - get({ url: url }).then((res) => { if (!isEmptyArray(res)) { res.map((row) => { diff --git a/src/components/management/StuffSubHeader.jsx b/src/components/management/StuffSubHeader.jsx index f35c6c53..fccafbdc 100644 --- a/src/components/management/StuffSubHeader.jsx +++ b/src/components/management/StuffSubHeader.jsx @@ -23,7 +23,7 @@ export default function StuffSubHeader({ type }) { const setFloorPlanObjectNo = useSetRecoilState(floorPlanObjectState) - const { managementState, setManagementState } = useContext(GlobalDataContext) + const { managementState } = useContext(GlobalDataContext) const [buttonStyle, setButtonStyle] = useState('') @@ -31,11 +31,11 @@ export default function StuffSubHeader({ type }) { useEffect(() => { window.scrollTo(0, 0) - setManagementState({}) }, []) useEffect(() => { if (type === 'detail') { + setButtonStyle('') if (isObjectNotEmpty(managementState)) { if (managementState?.createSaleStoreId === 'T01') { if (session?.storeId !== 'T01') {