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 }) {