diff --git a/src/components/estimate/popup/DocDownOptionPop.jsx b/src/components/estimate/popup/DocDownOptionPop.jsx index f5a967f1..2f250646 100644 --- a/src/components/estimate/popup/DocDownOptionPop.jsx +++ b/src/components/estimate/popup/DocDownOptionPop.jsx @@ -8,7 +8,7 @@ import { usePathname, useSearchParams } from 'next/navigation' import { QcastContext } from '@/app/QcastProvider' import { sessionStore } from '@/store/commonAtom' -export default function DocDownOptionPop({ planNo, setEstimatePopupOpen, docDownPopLockFlg }) { +export default function DocDownOptionPop({ planNo, setEstimatePopupOpen, docDownPopLockFlg, createStoreId = '' }) { const { setIsGlobalLoading } = useContext(QcastContext) const { getMessage } = useMessage() @@ -70,6 +70,8 @@ export default function DocDownOptionPop({ planNo, setEstimatePopupOpen, docDown pwrGnrSimType: 'D', //default 화면에 안보여줌 userId: sessionState.userId ? sessionState.userId : "", saleStoreId: sessionState.storeId ? sessionState.storeId : "", + storeLvl: sessionState.storeLvl, + createStoreId: createStoreId ? createStoreId : '', } const options = { responseType: 'blob' } diff --git a/src/components/fabric/QLine.js b/src/components/fabric/QLine.js index d1e1ada3..f55e351b 100644 --- a/src/components/fabric/QLine.js +++ b/src/components/fabric/QLine.js @@ -88,9 +88,12 @@ export const QLine = fabric.util.createClass(fabric.Line, { addLengthText() { const thisText = this.canvas.getObjects().find((obj) => obj.name === 'lengthText' && obj.parentId === this.id) - if (this.textMode === 'none') { - if (thisText) { - this.canvas.remove(thisText) + if (thisText) { + if (this.attributes?.actualSize) { + thisText.set({ actualSize: this.attributes.actualSize }) + } + if (this.attributes?.planeSize) { + thisText.set({ planeSize: this.attributes.planeSize }) } } else { this.setLength() @@ -101,11 +104,6 @@ export const QLine = fabric.util.createClass(fabric.Line, { const x2 = this.left + this.width * scaleX const y2 = this.top + this.height * scaleY - if (thisText) { - thisText.set({ text: this.getLength().toString(), left: (x1 + x2) / 2, top: (y1 + y2) / 2 }) - this.text = thisText - return - } let left, top if (this.direction === 'left' || this.direction === 'right') { left = (x1 + x2) / 2 @@ -122,6 +120,8 @@ export const QLine = fabric.util.createClass(fabric.Line, { const degree = (Math.atan2(y2 - y1, x2 - x1) * 180) / Math.PI const text = new fabric.Textbox(this.getLength().toString(), { + actualSize: this.attributes?.actualSize, + planeSize: this.attributes?.planeSize, left: left, top: top, fontSize: this.fontSize, diff --git a/src/components/management/StuffDetail.jsx b/src/components/management/StuffDetail.jsx index cc9d71ea..75db2623 100644 --- a/src/components/management/StuffDetail.jsx +++ b/src/components/management/StuffDetail.jsx @@ -54,6 +54,8 @@ export default function StuffDetail() { const globalLocaleState = useRecoilValue(globalLocaleStore) const ref = useRef() const { get, promiseGet, del, promisePost, promisePut } = useAxios(globalLocaleState) + const [createSaleStoreId, setCreateSaleStoreId] = useState('') + //form const formInitValue = { // 물건번호 T...(임시) S...(진짜) @@ -350,6 +352,9 @@ export default function StuffDetail() { promiseGet({ url: `/api/object/${objectNo}/detail` }).then((res) => { setIsGlobalLoading(false) if (res.status === 200) { + + setCreateSaleStoreId(res?.data?.createSaleStoreId); + if (res?.data?.createSaleStoreId === 'T01') { if (session?.storeId !== 'T01') { setShowButton('none') @@ -2936,7 +2941,7 @@ export default function StuffDetail() { )} - {estimatePopupOpen && } + {estimatePopupOpen && } ) } diff --git a/src/hooks/usePolygon.js b/src/hooks/usePolygon.js index bc63c50c..e846760b 100644 --- a/src/hooks/usePolygon.js +++ b/src/hooks/usePolygon.js @@ -1982,7 +1982,7 @@ export const usePolygon = () => { const line1 = allRoofLines[i] const line2 = allRoofLines[j] const diff = Math.abs(line1.length - line2.length) - if (diff > 0 && diff <= 1) { + if (diff > 0 && diff <= 2) { const minLength = Math.min(line1.length, line2.length) line1.setLengthByValue(minLength * 10) line2.setLengthByValue(minLength * 10)