Merge branch 'dev' into dev-yj
This commit is contained in:
commit
ed5d01d976
@ -41,7 +41,7 @@ import { isObjectNotEmpty } from '@/util/common-utils'
|
|||||||
import KO from '@/locales/ko.json'
|
import KO from '@/locales/ko.json'
|
||||||
import JA from '@/locales/ja.json'
|
import JA from '@/locales/ja.json'
|
||||||
|
|
||||||
import { MENU } from '@/common/common'
|
import { MENU, POLYGON_TYPE } from '@/common/common'
|
||||||
|
|
||||||
import { QcastContext } from '@/app/QcastProvider'
|
import { QcastContext } from '@/app/QcastProvider'
|
||||||
|
|
||||||
@ -167,7 +167,12 @@ export default function CanvasMenu(props) {
|
|||||||
setType('surface')
|
setType('surface')
|
||||||
break
|
break
|
||||||
case 4:
|
case 4:
|
||||||
setType('module')
|
if (!checkMenuAndCanvasState()) {
|
||||||
|
swalFire({ text: getMessage('estimate.menu.move.valid1') })
|
||||||
|
return
|
||||||
|
} else {
|
||||||
|
setType('module')
|
||||||
|
}
|
||||||
break
|
break
|
||||||
case 5:
|
case 5:
|
||||||
// let pid = urlParams.get('pid')
|
// let pid = urlParams.get('pid')
|
||||||
@ -328,6 +333,14 @@ export default function CanvasMenu(props) {
|
|||||||
return (['2', '3'].includes(canvasSetting?.roofSizeSet) && menu.index === 2) || (menuNumber === 4 && menu.index === 2)
|
return (['2', '3'].includes(canvasSetting?.roofSizeSet) && menu.index === 2) || (menuNumber === 4 && menu.index === 2)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const checkMenuAndCanvasState = () => {
|
||||||
|
const roofs = canvas?.getObjects().filter((obj) => obj.name === POLYGON_TYPE.ROOF)
|
||||||
|
// 지붕면 할당이 끝난 지붕이 하나라도 있는지 체크
|
||||||
|
const isExist = roofs?.some((roof) => roof.roofMaterial)
|
||||||
|
console.log('🚀 ~ checkMenuAndCanvasState ~ isExist:', isExist)
|
||||||
|
return isExist
|
||||||
|
}
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (isObjectNotEmpty(estimateRecoilState)) {
|
if (isObjectNotEmpty(estimateRecoilState)) {
|
||||||
if (estimateRecoilState?.createUser === 'T01') {
|
if (estimateRecoilState?.createUser === 'T01') {
|
||||||
|
|||||||
@ -11,7 +11,7 @@ import { compasDegAtom } from '@/store/orientationAtom'
|
|||||||
import { currentCanvasPlanState } from '@/store/canvasAtom'
|
import { currentCanvasPlanState } from '@/store/canvasAtom'
|
||||||
|
|
||||||
export function useCanvasPopupStatusController(param = 1) {
|
export function useCanvasPopupStatusController(param = 1) {
|
||||||
const popupType = param
|
const popupType = parseInt(param)
|
||||||
|
|
||||||
const [compasDeg, setCompasDeg] = useRecoilState(compasDegAtom)
|
const [compasDeg, setCompasDeg] = useRecoilState(compasDegAtom)
|
||||||
const [moduleSelectionDataStore, setModuleSelectionDataStore] = useRecoilState(moduleSelectionDataState)
|
const [moduleSelectionDataStore, setModuleSelectionDataStore] = useRecoilState(moduleSelectionDataState)
|
||||||
@ -67,7 +67,7 @@ export function useCanvasPopupStatusController(param = 1) {
|
|||||||
objectNo: currentCanvasPlan.objectNo,
|
objectNo: currentCanvasPlan.objectNo,
|
||||||
planNo: parseInt(currentCanvasPlan.planNo),
|
planNo: parseInt(currentCanvasPlan.planNo),
|
||||||
popupType: popupType.toString(),
|
popupType: popupType.toString(),
|
||||||
popupStatus: JSON.stringify(arg).replace(/"/g, '\"'),
|
popupStatus: popupType === 1 ? arg : JSON.stringify(arg).replace(/"/g, '\"'),
|
||||||
}
|
}
|
||||||
postFetcher(`/api/v1/canvas-popup-status`, params)
|
postFetcher(`/api/v1/canvas-popup-status`, params)
|
||||||
},
|
},
|
||||||
|
|||||||
@ -194,6 +194,9 @@ export function useCanvasSetting() {
|
|||||||
}
|
}
|
||||||
const { column } = corridorDimension
|
const { column } = corridorDimension
|
||||||
const lengthTexts = canvas.getObjects().filter((obj) => obj.name === 'lengthText')
|
const lengthTexts = canvas.getObjects().filter((obj) => obj.name === 'lengthText')
|
||||||
|
lengthTexts.forEach((obj) => {
|
||||||
|
obj.set({ text: '' })
|
||||||
|
})
|
||||||
switch (column) {
|
switch (column) {
|
||||||
case 'corridorDimension':
|
case 'corridorDimension':
|
||||||
lengthTexts.forEach((obj) => {
|
lengthTexts.forEach((obj) => {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user