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