diff --git a/src/components/common/draggable/WithDraggable.jsx b/src/components/common/draggable/WithDraggable.jsx index 49552eac..9a51358c 100644 --- a/src/components/common/draggable/WithDraggable.jsx +++ b/src/components/common/draggable/WithDraggable.jsx @@ -2,9 +2,13 @@ import { useState } from 'react' import Draggable from 'react-draggable' +import PopSpinner from '../spinner/PopSpinner' +import { popSpinnerState } from '@/store/popupAtom' +import { useRecoilState } from 'recoil' export default function WithDraggable({ isShow, children, pos = { x: 0, y: 0 }, handle = '', className = '', hasFooter = true, isHidden = false }) { const [position, setPosition] = useState(pos) + const [popSpinnerStore, setPopSpinnerStore] = useRecoilState(popSpinnerState) const handleOnDrag = (e, data) => { e.stopPropagation() @@ -25,6 +29,7 @@ export default function WithDraggable({ isShow, children, pos = { x: 0, y: 0 },
{children} {hasFooter && } + {popSpinnerStore && }
)} diff --git a/src/components/fabric/QPolygon.js b/src/components/fabric/QPolygon.js index 85bb03dd..f19687aa 100644 --- a/src/components/fabric/QPolygon.js +++ b/src/components/fabric/QPolygon.js @@ -136,8 +136,20 @@ export const QPolygon = fabric.util.createClass(fabric.Polygon, { this.on('removed', () => { // const children = getAllRelatedObjects(this.id, this.canvas) const children = this.canvas.getObjects().filter((obj) => obj.parentId === this.id) + children.forEach((child) => { this.canvas.remove(child) + + //그룹일때 + if (child.hasOwnProperty('_objects')) { + child._objects.forEach((obj) => { + if (obj.hasOwnProperty('texts')) { + obj.texts.forEach((text) => { + this.canvas?.remove(text) + }) + } + }) + } }) }) diff --git a/src/components/floor-plan/CanvasMenu.jsx b/src/components/floor-plan/CanvasMenu.jsx index e10d9ebc..0d9ddc0a 100644 --- a/src/components/floor-plan/CanvasMenu.jsx +++ b/src/components/floor-plan/CanvasMenu.jsx @@ -89,11 +89,11 @@ export default function CanvasMenu(props) { const selectedRoofMaterial = useRecoilValue(selectedRoofMaterialSelector) //견적서버튼 노출용 - const [buttonStyle1, setButtonStyle1] = useState('') //문서 다운로드 버튼 - const [buttonStyle2, setButtonStyle2] = useState('') //저장 버튼 - const [buttonStyle3, setButtonStyle3] = useState('') //초기화 버튼 - const [buttonStyle4, setButtonStyle4] = useState('') //견적서 복사 버튼 - const [buttonStyle5, setButtonStyle5] = useState('') //잠금 버튼 + const [docDownButtonStyle, setDocDownButtonStyle] = useState('') //문서 다운로드 버튼 + const [saveButtonStyle, setSaveButtonStyle] = useState('') //저장 버튼 + const [resetButtonStyle, setResetButtonStyle] = useState('') //초기화 버튼 + const [copyButtonStyle, setCopyButtonStyle] = useState('') //견적서 복사 버튼 + const [lockButtonStyle, setLockButtonStyle] = useState('') //잠금 버튼 const setFloorPlanObjectNo = useSetRecoilState(floorPlanObjectState) //견적서 화면용 물건번호리코일 @@ -442,28 +442,28 @@ export default function CanvasMenu(props) { }, [estimateContextState?.createUser, estimateContextState?.tempFlg, estimateContextState?.lockFlg, estimateContextState.docNo]) const setAllButtonStyles = (style) => { - setButtonStyle1(style) - setButtonStyle2(style) - setButtonStyle3(style) - setButtonStyle4(style) - setButtonStyle5(style) + setDocDownButtonStyle(style) + setSaveButtonStyle(style) + setResetButtonStyle(style) + setCopyButtonStyle(style) + setLockButtonStyle(style) } const handleButtonStyles = (tempFlg, lockFlg, docNo) => { if (tempFlg === '1') { setAllButtonStyles('none') - setButtonStyle2('') + setSaveButtonStyle('') } else if (tempFlg === '0' && lockFlg === '0') { setAllButtonStyles('') } else { - setButtonStyle1('') - setButtonStyle2('none') - setButtonStyle3('none') - setButtonStyle4('') - setButtonStyle5('') + setDocDownButtonStyle('') + setSaveButtonStyle('none') + setResetButtonStyle('none') + setCopyButtonStyle('') + setLockButtonStyle('') } if (!docNo) { - setButtonStyle1('none') + setDocDownButtonStyle('none') } } @@ -513,11 +513,11 @@ export default function CanvasMenu(props) { // 문서다운로드 팝업에서 다운로드 하면 문서 잠금 const docDownPopLockFlg = () => { - setButtonStyle1('') - setButtonStyle2('none') - setButtonStyle3('none') - setButtonStyle4('') - setButtonStyle5('') + setDocDownButtonStyle('') + setSaveButtonStyle('none') + setResetButtonStyle('none') + setCopyButtonStyle('') + setLockButtonStyle('') } return ( @@ -627,17 +627,22 @@ export default function CanvasMenu(props) { > {getMessage('stuff.search.btn.register')} - - + + + + +
+ +
+ + + ) +} diff --git a/src/components/management/StuffDetail.jsx b/src/components/management/StuffDetail.jsx index b5020d5b..9f9dfdbf 100644 --- a/src/components/management/StuffDetail.jsx +++ b/src/components/management/StuffDetail.jsx @@ -283,17 +283,17 @@ export default function StuffDetail() { autoHeight: true, cellStyle: { justifyContent: 'center' }, cellRenderer: (params) => { - let buttonStyle = '' - let buttonStyle2 = '' + let estimateDetailButtonStyle = '' + let docDownButtonStyle = '' if (params.value == null) { - buttonStyle = 'none' - buttonStyle2 = 'none' + estimateDetailButtonStyle = 'none' + docDownButtonStyle = 'none' } else { if (params?.data?.createSaleStoreId === 'T01' && session?.storeId !== 'T01') { - buttonStyle = 'none' + estimateDetailButtonStyle = 'none' } if (params?.data?.tempFlg === '1' || !params?.data?.docNo) { - buttonStyle2 = 'none' + docDownButtonStyle = 'none' } } @@ -301,7 +301,7 @@ export default function StuffDetail() { <>