Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
58ca5abfed
@ -21,6 +21,8 @@ const Placement = forwardRef((props, refs) => {
|
|||||||
const moduleSelectionData = useRecoilValue(moduleSelectionDataState)
|
const moduleSelectionData = useRecoilValue(moduleSelectionDataState)
|
||||||
const { makeModuleInitArea } = useModuleBasicSetting(3)
|
const { makeModuleInitArea } = useModuleBasicSetting(3)
|
||||||
|
|
||||||
|
const [isMultiModule, setIsMultiModule] = useState(false)
|
||||||
|
|
||||||
//모듈 배치면 생성
|
//모듈 배치면 생성
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (moduleSelectionData) {
|
if (moduleSelectionData) {
|
||||||
@ -49,6 +51,11 @@ const Placement = forwardRef((props, refs) => {
|
|||||||
setSelectedItems(initCheckedModule)
|
setSelectedItems(initCheckedModule)
|
||||||
setSelectedModules(moduleSelectionData.module)
|
setSelectedModules(moduleSelectionData.module)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//모듈 배치면 생성
|
||||||
|
if (moduleSelectionData.module.itemList.length > 1) {
|
||||||
|
setIsMultiModule(true)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}, [moduleSelectionData])
|
}, [moduleSelectionData])
|
||||||
|
|
||||||
@ -190,6 +197,7 @@ const Placement = forwardRef((props, refs) => {
|
|||||||
checked={setupLocation === 'center'}
|
checked={setupLocation === 'center'}
|
||||||
value={'center'}
|
value={'center'}
|
||||||
onChange={handleSetupLocation}
|
onChange={handleSetupLocation}
|
||||||
|
disabled={isMultiModule}
|
||||||
/>
|
/>
|
||||||
<label htmlFor="ra03">{getMessage('modal.module.basic.setting.module.placement.arrangement.standard.center')}</label>
|
<label htmlFor="ra03">{getMessage('modal.module.basic.setting.module.placement.arrangement.standard.center')}</label>
|
||||||
</div>
|
</div>
|
||||||
@ -212,6 +220,7 @@ const Placement = forwardRef((props, refs) => {
|
|||||||
checked={setupLocation === 'ridge'}
|
checked={setupLocation === 'ridge'}
|
||||||
value={'ridge'}
|
value={'ridge'}
|
||||||
onChange={handleSetupLocation}
|
onChange={handleSetupLocation}
|
||||||
|
disabled={isMultiModule}
|
||||||
/>
|
/>
|
||||||
<label htmlFor="ra05">{getMessage('modal.module.basic.setting.module.placement.arrangement.standard.ridge')}</label>
|
<label htmlFor="ra05">{getMessage('modal.module.basic.setting.module.placement.arrangement.standard.ridge')}</label>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -2076,7 +2076,7 @@ export const useTrestle = () => {
|
|||||||
mixMatlNo: module.mixMatlNo,
|
mixMatlNo: module.mixMatlNo,
|
||||||
raftBaseCd: addRoof.raft,
|
raftBaseCd: addRoof.raft,
|
||||||
inclCd: addRoof.pitch,
|
inclCd: addRoof.pitch,
|
||||||
roofPitch: addRoof.roofPchBase,
|
roofPitch: !addRoof.roofPchBase ? addRoof.roofPchBase : Number(addRoof.roofPchBase),
|
||||||
exposedLowerBottomTotCnt: result.exposedBottom, // 노출 최하면 갯수
|
exposedLowerBottomTotCnt: result.exposedBottom, // 노출 최하면 갯수
|
||||||
exposedHalfBottomTotCnt: result.exposedHalfBottom, // 노출 반하면 갯수
|
exposedHalfBottomTotCnt: result.exposedHalfBottom, // 노출 반하면 갯수
|
||||||
exposedTopTotCnt: result.exposedTop, // 노출 상면 총 수
|
exposedTopTotCnt: result.exposedTop, // 노출 상면 총 수
|
||||||
@ -2443,25 +2443,25 @@ export const useTrestle = () => {
|
|||||||
(centerPoint) => Math.abs(centerPoint.x - halfTopRightPoint.x) < maxX && Math.abs(centerPoint.y - halfTopRightPoint.y) < maxY,
|
(centerPoint) => Math.abs(centerPoint.x - halfTopRightPoint.x) < maxX && Math.abs(centerPoint.y - halfTopRightPoint.y) < maxY,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
if (leftModule) {
|
if (!leftModule) {
|
||||||
leftPoint = { x: x - width, y: y }
|
leftPoint = { x: x - width, y: y }
|
||||||
leftModule = centerPoints.find(
|
leftModule = centerPoints.find(
|
||||||
(centerPoint) => Math.abs(centerPoint.x - leftPoint.x) < maxX && Math.abs(centerPoint.y - leftPoint.y) < maxY,
|
(centerPoint) => Math.abs(centerPoint.x - leftPoint.x) < maxX && Math.abs(centerPoint.y - leftPoint.y) < maxY,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
if (rightModule) {
|
if (!rightModule) {
|
||||||
rightPoint = { x: x + width, y: y }
|
rightPoint = { x: x + width, y: y }
|
||||||
rightModule = centerPoints.find(
|
rightModule = centerPoints.find(
|
||||||
(centerPoint) => Math.abs(centerPoint.x - rightPoint.x) < maxX && Math.abs(centerPoint.y - rightPoint.y) < maxY,
|
(centerPoint) => Math.abs(centerPoint.x - rightPoint.x) < maxX && Math.abs(centerPoint.y - rightPoint.y) < maxY,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
if (bottomLeftModule) {
|
if (!bottomLeftModule) {
|
||||||
bottomLeftPoint = { x: x - width, y: y + h }
|
bottomLeftPoint = { x: x - width, y: y + h }
|
||||||
bottomLeftModule = centerPoints.find(
|
bottomLeftModule = centerPoints.find(
|
||||||
(centerPoint) => Math.abs(centerPoint.x - bottomLeftPoint.x) < maxX && Math.abs(centerPoint.y - bottomLeftPoint.y) < maxY,
|
(centerPoint) => Math.abs(centerPoint.x - bottomLeftPoint.x) < maxX && Math.abs(centerPoint.y - bottomLeftPoint.y) < maxY,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
if (bottomRightModule) {
|
if (!bottomRightModule) {
|
||||||
bottomRightPoint = { x: x + width, y: y + h }
|
bottomRightPoint = { x: x + width, y: y + h }
|
||||||
bottomRightModule = centerPoints.find(
|
bottomRightModule = centerPoints.find(
|
||||||
(centerPoint) => Math.abs(centerPoint.x - bottomRightPoint.x) < maxX && Math.abs(centerPoint.y - bottomRightPoint.y) < maxY,
|
(centerPoint) => Math.abs(centerPoint.x - bottomRightPoint.x) < maxX && Math.abs(centerPoint.y - bottomRightPoint.y) < maxY,
|
||||||
@ -2504,25 +2504,25 @@ export const useTrestle = () => {
|
|||||||
(centerPoint) => Math.abs(centerPoint.x - halfTopRightPoint.x) < maxX && Math.abs(centerPoint.y - halfTopRightPoint.y) < maxY,
|
(centerPoint) => Math.abs(centerPoint.x - halfTopRightPoint.x) < maxX && Math.abs(centerPoint.y - halfTopRightPoint.y) < maxY,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
if (leftModule) {
|
if (!leftModule) {
|
||||||
leftPoint = { x: x + width, y: y }
|
leftPoint = { x: x + width, y: y }
|
||||||
leftModule = centerPoints.find(
|
leftModule = centerPoints.find(
|
||||||
(centerPoint) => Math.abs(centerPoint.x - leftPoint.x) < maxX && Math.abs(centerPoint.y - leftPoint.y) < maxY,
|
(centerPoint) => Math.abs(centerPoint.x - leftPoint.x) < maxX && Math.abs(centerPoint.y - leftPoint.y) < maxY,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
if (rightModule) {
|
if (!rightModule) {
|
||||||
rightPoint = { x: x - width, y: y }
|
rightPoint = { x: x - width, y: y }
|
||||||
rightModule = centerPoints.find(
|
rightModule = centerPoints.find(
|
||||||
(centerPoint) => Math.abs(centerPoint.x - rightPoint.x) < maxX && Math.abs(centerPoint.y - rightPoint.y) < maxY,
|
(centerPoint) => Math.abs(centerPoint.x - rightPoint.x) < maxX && Math.abs(centerPoint.y - rightPoint.y) < maxY,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
if (bottomLeftModule) {
|
if (!bottomLeftModule) {
|
||||||
bottomLeftPoint = { x: x + width, y: y - h }
|
bottomLeftPoint = { x: x + width, y: y - h }
|
||||||
bottomLeftModule = centerPoints.find(
|
bottomLeftModule = centerPoints.find(
|
||||||
(centerPoint) => Math.abs(centerPoint.x - bottomLeftPoint.x) < maxX && Math.abs(centerPoint.y - bottomLeftPoint.y) < maxY,
|
(centerPoint) => Math.abs(centerPoint.x - bottomLeftPoint.x) < maxX && Math.abs(centerPoint.y - bottomLeftPoint.y) < maxY,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
if (bottomRightModule) {
|
if (!bottomRightModule) {
|
||||||
bottomRightPoint = { x: x - width, y: y - h }
|
bottomRightPoint = { x: x - width, y: y - h }
|
||||||
bottomRightModule = centerPoints.find(
|
bottomRightModule = centerPoints.find(
|
||||||
(centerPoint) => Math.abs(centerPoint.x - bottomRightPoint.x) < maxX && Math.abs(centerPoint.y - bottomRightPoint.y) < maxY,
|
(centerPoint) => Math.abs(centerPoint.x - bottomRightPoint.x) < maxX && Math.abs(centerPoint.y - bottomRightPoint.y) < maxY,
|
||||||
|
|||||||
@ -333,7 +333,7 @@ export function usePlan(params = {}) {
|
|||||||
*/
|
*/
|
||||||
const handleAddPlan = async (userId, objectNo) => {
|
const handleAddPlan = async (userId, objectNo) => {
|
||||||
if (currentCanvasPlan?.id) {
|
if (currentCanvasPlan?.id) {
|
||||||
await saveCanvas(true)
|
await saveCanvas(false)
|
||||||
}
|
}
|
||||||
JSON.parse(currentCanvasData()).objects.length > 0
|
JSON.parse(currentCanvasData()).objects.length > 0
|
||||||
? swalFire({
|
? swalFire({
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user