Compare commits
No commits in common. "7b1c9b681e10938d143f3f61b6d41acf83548fa3" and "cdaeab1d42abc8e7ee363601dfa4a6e6fa25f0b2" have entirely different histories.
7b1c9b681e
...
cdaeab1d42
@ -24,7 +24,7 @@
|
|||||||
"js-cookie": "^3.0.5",
|
"js-cookie": "^3.0.5",
|
||||||
"mathjs": "^13.0.2",
|
"mathjs": "^13.0.2",
|
||||||
"mssql": "^11.0.1",
|
"mssql": "^11.0.1",
|
||||||
"next": "14.2.25",
|
"next": "14.2.21",
|
||||||
"next-international": "^1.2.4",
|
"next-international": "^1.2.4",
|
||||||
"react": "^18",
|
"react": "^18",
|
||||||
"react-chartjs-2": "^5.2.0",
|
"react-chartjs-2": "^5.2.0",
|
||||||
|
|||||||
@ -1361,12 +1361,7 @@ export default function Estimate({}) {
|
|||||||
</th>
|
</th>
|
||||||
<td colSpan={3}>
|
<td colSpan={3}>
|
||||||
<div className="radio-wrap">
|
<div className="radio-wrap">
|
||||||
{/*pkgRank is null, empty 인 경우 : 사용불가, 이전에 등록된 경우 사용가능, style로 제어*/}
|
<div className="d-check-radio light mr10">
|
||||||
<div className="d-check-radio light mr10" style={{display:
|
|
||||||
(isNotEmptyArray(storePriceList) > 0
|
|
||||||
&& storePriceList[0].pkgRank !== null
|
|
||||||
&& storePriceList[0].pkgRank !== ''
|
|
||||||
|| estimateContextState?.estimateType === 'YJSS') ? "" : "none"}}>
|
|
||||||
<input
|
<input
|
||||||
type="radio"
|
type="radio"
|
||||||
name="estimateType"
|
name="estimateType"
|
||||||
|
|||||||
@ -31,13 +31,11 @@ import { useCanvasMenu } from '@/hooks/common/useCanvasMenu'
|
|||||||
import { useEvent } from '@/hooks/useEvent'
|
import { useEvent } from '@/hooks/useEvent'
|
||||||
import { compasDegAtom } from '@/store/orientationAtom'
|
import { compasDegAtom } from '@/store/orientationAtom'
|
||||||
import { hotkeyStore } from '@/store/hotkeyAtom'
|
import { hotkeyStore } from '@/store/hotkeyAtom'
|
||||||
import { usePopup } from '@/hooks/usePopup'
|
|
||||||
|
|
||||||
export default function CanvasFrame() {
|
export default function CanvasFrame() {
|
||||||
const canvasRef = useRef(null)
|
const canvasRef = useRef(null)
|
||||||
const { canvas } = useCanvas('canvas')
|
const { canvas } = useCanvas('canvas')
|
||||||
const { canvasLoadInit, gridInit } = useCanvasConfigInitialize()
|
const { canvasLoadInit, gridInit } = useCanvasConfigInitialize()
|
||||||
const { closeAll } = usePopup()
|
|
||||||
const currentMenu = useRecoilValue(currentMenuState)
|
const currentMenu = useRecoilValue(currentMenuState)
|
||||||
const { floorPlanState } = useContext(FloorPlanContext)
|
const { floorPlanState } = useContext(FloorPlanContext)
|
||||||
const { contextMenu, handleClick } = useContextMenu()
|
const { contextMenu, handleClick } = useContextMenu()
|
||||||
@ -95,8 +93,6 @@ export default function CanvasFrame() {
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
setIsGlobalLoading(false)
|
setIsGlobalLoading(false)
|
||||||
// 혹시 모를 팝업이 떠있는 경우 닫고 시작한다.
|
|
||||||
closeAll()
|
|
||||||
|
|
||||||
return () => {
|
return () => {
|
||||||
canvas?.clear()
|
canvas?.clear()
|
||||||
|
|||||||
@ -248,22 +248,16 @@ export function useRoofAllocationSetting(id) {
|
|||||||
swalFire({ type: 'alert', icon: 'error', text: getMessage('roof.exceed.count') })
|
swalFire({ type: 'alert', icon: 'error', text: getMessage('roof.exceed.count') })
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
setCurrentRoofList([
|
||||||
const originCurrentRoofList = currentRoofList.map((roof) => {
|
...currentRoofList,
|
||||||
return {
|
{
|
||||||
...roof,
|
...currentRoofMaterial,
|
||||||
selected: false,
|
selected: false,
|
||||||
}
|
id: currentRoofMaterial.roofMatlCd,
|
||||||
})
|
name: currentRoofMaterial.roofMatlNm,
|
||||||
originCurrentRoofList.push({
|
index: currentRoofList.length,
|
||||||
...currentRoofMaterial,
|
},
|
||||||
selected: true,
|
])
|
||||||
id: currentRoofMaterial.roofMatlCd,
|
|
||||||
name: currentRoofMaterial.roofMatlNm,
|
|
||||||
index: currentRoofList.length,
|
|
||||||
})
|
|
||||||
|
|
||||||
setCurrentRoofList(originCurrentRoofList)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -273,7 +267,7 @@ export function useRoofAllocationSetting(id) {
|
|||||||
const roofs = canvas.getObjects().filter((obj) => obj.name === POLYGON_TYPE.ROOF)
|
const roofs = canvas.getObjects().filter((obj) => obj.name === POLYGON_TYPE.ROOF)
|
||||||
|
|
||||||
for (let i = 0; i < roofs.length; i++) {
|
for (let i = 0; i < roofs.length; i++) {
|
||||||
if (roofs[i].roofMaterial?.index === idx) {
|
if (roofs[i].roofMaterial.index === idx) {
|
||||||
swalFire({ type: 'alert', icon: 'error', text: getMessage('roof.material.can.not.delete') })
|
swalFire({ type: 'alert', icon: 'error', text: getMessage('roof.material.can.not.delete') })
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
@ -28,7 +28,7 @@ export function useRoofShapePassivitySetting(id) {
|
|||||||
const { addCanvasMouseEventListener, initEvent } = useEvent()
|
const { addCanvasMouseEventListener, initEvent } = useEvent()
|
||||||
// const { addCanvasMouseEventListener, initEvent } = useContext(EventContext)
|
// const { addCanvasMouseEventListener, initEvent } = useContext(EventContext)
|
||||||
const { drawRoofPolygon } = useMode()
|
const { drawRoofPolygon } = useMode()
|
||||||
const { addPolygonByLines, addLengthText } = usePolygon()
|
const { addPolygonByLines } = usePolygon()
|
||||||
const currentObject = useRecoilValue(currentObjectState)
|
const currentObject = useRecoilValue(currentObjectState)
|
||||||
const offsetRef = useRef(null)
|
const offsetRef = useRef(null)
|
||||||
const pitchRef = useRef(null)
|
const pitchRef = useRef(null)
|
||||||
@ -248,7 +248,6 @@ export function useRoofShapePassivitySetting(id) {
|
|||||||
// 완료 한 경우에는 지붕까지 그려줌
|
// 완료 한 경우에는 지붕까지 그려줌
|
||||||
addPitchTextsByOuterLines()
|
addPitchTextsByOuterLines()
|
||||||
const roof = drawRoofPolygon(wall)
|
const roof = drawRoofPolygon(wall)
|
||||||
addLengthText(roof)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
canvas.renderAll()
|
canvas.renderAll()
|
||||||
|
|||||||
@ -107,10 +107,6 @@ export function useEvent() {
|
|||||||
const horizonLines = canvas.getObjects().filter((obj) => obj.name === 'lineGrid' && obj.direction === 'horizontal')
|
const horizonLines = canvas.getObjects().filter((obj) => obj.name === 'lineGrid' && obj.direction === 'horizontal')
|
||||||
const verticalLines = canvas.getObjects().filter((obj) => obj.name === 'lineGrid' && obj.direction === 'vertical')
|
const verticalLines = canvas.getObjects().filter((obj) => obj.name === 'lineGrid' && obj.direction === 'vertical')
|
||||||
|
|
||||||
if (!horizonLines || !verticalLines) {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
const closestHorizontalLine = horizonLines.reduce((prev, curr) => {
|
const closestHorizontalLine = horizonLines.reduce((prev, curr) => {
|
||||||
const prevDistance = calculateDistance(pointer, prev)
|
const prevDistance = calculateDistance(pointer, prev)
|
||||||
const currDistance = calculateDistance(pointer, curr)
|
const currDistance = calculateDistance(pointer, curr)
|
||||||
|
|||||||
@ -20,7 +20,6 @@ import { compasDegAtom } from '@/store/orientationAtom'
|
|||||||
import { moduleSelectionDataState, selectedModuleState } from '@/store/selectedModuleOptions'
|
import { moduleSelectionDataState, selectedModuleState } from '@/store/selectedModuleOptions'
|
||||||
import { useCanvasPopupStatusController } from './common/useCanvasPopupStatusController'
|
import { useCanvasPopupStatusController } from './common/useCanvasPopupStatusController'
|
||||||
import { useCanvasMenu } from './common/useCanvasMenu'
|
import { useCanvasMenu } from './common/useCanvasMenu'
|
||||||
import { QcastContext } from '@/app/QcastProvider'
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 플랜 처리 훅
|
* 플랜 처리 훅
|
||||||
@ -53,9 +52,6 @@ export function usePlan(params = {}) {
|
|||||||
const { fetchBasicSettings, basicSettingCopySave } = useCanvasSetting()
|
const { fetchBasicSettings, basicSettingCopySave } = useCanvasSetting()
|
||||||
const [canvasSetting, setCanvasSetting] = useRecoilState(canvasSettingState)
|
const [canvasSetting, setCanvasSetting] = useRecoilState(canvasSettingState)
|
||||||
|
|
||||||
/** 전역 로딩바 컨텍스트 */
|
|
||||||
const { setIsGlobalLoading } = useContext(QcastContext)
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 플랜 복사 시 모듈이 있을경우 모듈 데이터 복사하기 위한 처리
|
* 플랜 복사 시 모듈이 있을경우 모듈 데이터 복사하기 위한 처리
|
||||||
*/
|
*/
|
||||||
@ -418,7 +414,7 @@ export function usePlan(params = {}) {
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
setSelectedPlan(currentCanvasPlan)
|
setSelectedPlan(currentCanvasPlan)
|
||||||
handleCurrentPlanUrl()
|
handleCurrentPlanUrl()
|
||||||
// resetCurrentObject()
|
resetCurrentObject()
|
||||||
resetModuleSetupSurface()
|
resetModuleSetupSurface()
|
||||||
}, [currentCanvasPlan])
|
}, [currentCanvasPlan])
|
||||||
|
|
||||||
@ -454,21 +450,13 @@ export function usePlan(params = {}) {
|
|||||||
text: `Plan ${currentCanvasPlan.planNo} ` + getMessage('plan.message.confirm.copy'),
|
text: `Plan ${currentCanvasPlan.planNo} ` + getMessage('plan.message.confirm.copy'),
|
||||||
type: 'confirm',
|
type: 'confirm',
|
||||||
confirmFn: async () => {
|
confirmFn: async () => {
|
||||||
setIsGlobalLoading(true)
|
|
||||||
await postObjectPlan(userId, objectNo, true, false)
|
await postObjectPlan(userId, objectNo, true, false)
|
||||||
setIsGlobalLoading(false)
|
|
||||||
},
|
},
|
||||||
denyFn: async () => {
|
denyFn: async () => {
|
||||||
setIsGlobalLoading(true)
|
|
||||||
await postObjectPlan(userId, objectNo, false, false)
|
await postObjectPlan(userId, objectNo, false, false)
|
||||||
setIsGlobalLoading(false)
|
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
: async () => {
|
: await postObjectPlan(userId, objectNo, false, false)
|
||||||
setIsGlobalLoading(true)
|
|
||||||
await postObjectPlan(userId, objectNo, false, false)
|
|
||||||
setIsGlobalLoading(false)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -1,2 +1,2 @@
|
|||||||
var exec = require('child_process').exec
|
var exec = require('child_process').exec
|
||||||
exec('yarn dev', { windowsHide: true })
|
exec('yarn start', { windowsHide: true })
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user