From 2d7f8c18e9c6c55d3f7355dfc7cf3ad65824b0c4 Mon Sep 17 00:00:00 2001 From: basssy Date: Mon, 11 Nov 2024 10:55:07 +0900 Subject: [PATCH] =?UTF-8?q?=EA=B2=AC=EC=A0=81=EC=84=9C=20=EC=95=84?= =?UTF-8?q?=EC=9D=B4=ED=85=9C=20=EC=9E=90=EB=8F=99=EC=99=84=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/estimate/Estimate.jsx | 30 ++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/src/components/estimate/Estimate.jsx b/src/components/estimate/Estimate.jsx index ca7059ec..8c6af884 100644 --- a/src/components/estimate/Estimate.jsx +++ b/src/components/estimate/Estimate.jsx @@ -34,6 +34,9 @@ export default function Estimate({ params }) { //견적특이사항 접고 펼치기 const [hidden, setHidden] = useState(false) + //아이템 자동완성 리스트 + const [displayItemList, setDisplayItemList] = useState([]) + //공통코드 const { findCommonCode } = useCommonCode() const [honorificCodeList, setHonorificCodeList] = useState([]) //경칭 공통코드 @@ -81,6 +84,17 @@ export default function Estimate({ params }) { if (code1 != null) { setHonorificCodeList(code1) } + + //아이템 자동완성 목록 가져오기 + const param = { + saleStoreId: session.storeId, + } + const apiUrl = `/api/display-item/item-list?${queryStringFormatter(param)}` + get({ url: apiUrl }).then((res) => { + if (res.length > 0) { + setDisplayItemList(res) + } + }) }, []) useEffect(() => { @@ -775,19 +789,19 @@ export default function Estimate({ params }) {