diff --git a/src/app/layout.js b/src/app/layout.js
index dbd6c9a1..e19c6bb7 100644
--- a/src/app/layout.js
+++ b/src/app/layout.js
@@ -58,7 +58,8 @@ export default async function RootLayout({ children }) {
pwdInitYn: session.pwdInitYn,
custCd: session.custCd,
isLoggedIn: session.isLoggedIn,
- builderNo: session.builderNo
+ builderNo: session.builderNo,
+ custNm: session.custNm
}
}
if (!headerPathname.includes('/login') && !session.isLoggedIn) {
diff --git a/src/common/common.js b/src/common/common.js
index 60a57c76..76632014 100644
--- a/src/common/common.js
+++ b/src/common/common.js
@@ -61,6 +61,7 @@ export const LINE_TYPE = {
*/
DEFAULT: 'default',
EAVES: 'eaves',
+ EAVE_HELP_LINE: 'eaveHelpLine',
GABLE: 'gable',
GABLE_LEFT: 'gableLeft', //케라바 왼쪽
GABLE_RIGHT: 'gableRight', //케라바 오른쪽
diff --git a/src/components/community/modal/QnaRegModal.jsx b/src/components/community/modal/QnaRegModal.jsx
index 00c444c6..3ab03e71 100644
--- a/src/components/community/modal/QnaRegModal.jsx
+++ b/src/components/community/modal/QnaRegModal.jsx
@@ -362,6 +362,8 @@ let fileCheck = false;
+ | Customer |
+ |
{getMessage('qna.reg.header.regUserNm')}* |
setQnaData({...qnaData, regUserNm: e.target.value })}
onBlur={(e) => setQnaData({ ...qnaData, regUserNm: e.target.value })} /> |
{getMessage('qna.reg.header.regUserTelNo')} |
- line.attributes?.type === LINE_TYPE.WALLLINE.EAVES)
-
const referenceAngle = calculateAngle(shedLines[0].startPoint, shedLines[0].endPoint)
-
- return eavesLines.filter((line) => {
- const eavesAngle = calculateAngle(line.startPoint, line.endPoint)
- return Math.abs(referenceAngle - eavesAngle) === 180
+ const otherSideLines = lines.filter((line) => {
+ const lineAngle = calculateAngle(line.startPoint, line.endPoint)
+ return Math.abs(referenceAngle - lineAngle) === 180
})
+ const containNotEaves = otherSideLines.filter((line) => line.attributes?.type !== LINE_TYPE.WALLLINE.EAVES)
+
+ if (containNotEaves.length === 0) {
+ return otherSideLines
+ } else {
+ return []
+ }
}
const parallelEaves = getParallelEavesLines(shedLines, lines)
@@ -336,8 +340,8 @@ export const QPolygon = fabric.util.createClass(fabric.Polygon, {
if (types.every((type) => type === LINE_TYPE.WALLLINE.EAVES)) {
// 용마루 -- straight-skeleton
console.log('용마루 지붕')
- //drawRidgeRoof(this.id, this.canvas, textMode)
- drawSkeletonRidgeRoof(this.id, this.canvas, textMode);
+ ///drawRidgeRoof(this.id, this.canvas, textMode)
+ drawSkeletonRidgeRoof(this.id, this.canvas, textMode)
} else if (isGableRoof(types)) {
// A형, B형 박공 지붕
console.log('패턴 지붕')
@@ -347,7 +351,7 @@ export const QPolygon = fabric.util.createClass(fabric.Polygon, {
drawShedRoof(this.id, this.canvas, textMode)
} else {
console.log('변별로 설정')
- drawRidgeRoof(this.id, this.canvas, textMode)
+ drawRoofByAttribute(this.id, this.canvas, textMode)
}
},
diff --git a/src/components/floor-plan/modal/auxiliary/AuxiliaryEdit.jsx b/src/components/floor-plan/modal/auxiliary/AuxiliaryEdit.jsx
index 938b5244..d7696a84 100644
--- a/src/components/floor-plan/modal/auxiliary/AuxiliaryEdit.jsx
+++ b/src/components/floor-plan/modal/auxiliary/AuxiliaryEdit.jsx
@@ -8,6 +8,7 @@ import { currentObjectState } from '@/store/canvasAtom'
import { useAuxiliaryDrawing } from '@/hooks/roofcover/useAuxiliaryDrawing'
import { useSwal } from '@/hooks/useSwal'
import { normalizeDigits } from '@/util/input-utils'
+import { CalculatorInput } from '@/components/common/input/CalcInput'
export default function AuxiliaryEdit(props) {
const contextPopupPosition = useRecoilValue(contextPopupPositionState)
@@ -66,7 +67,19 @@ export default function AuxiliaryEdit(props) {
{getMessage('length')}
- setVerticalSize(normalizeDigits(e.target.value))} />
+ {/* setVerticalSize(normalizeDigits(e.target.value))} />*/}
+ setVerticalSize(value)}
+ options={{
+ allowNegative: false,
+ allowDecimal: false
+ }}
+ />
mm
@@ -88,7 +101,19 @@ export default function AuxiliaryEdit(props) {
- setHorizonSize(normalizeDigits(e.target.value))} />
+ {/* setHorizonSize(normalizeDigits(e.target.value))} />*/}
+ setHorizonSize(value)}
+ options={{
+ allowNegative: false,
+ allowDecimal: false
+ }}
+ />
mm
diff --git a/src/components/floor-plan/modal/auxiliary/AuxiliarySize.jsx b/src/components/floor-plan/modal/auxiliary/AuxiliarySize.jsx
index 5a9cde6f..40fb9f76 100644
--- a/src/components/floor-plan/modal/auxiliary/AuxiliarySize.jsx
+++ b/src/components/floor-plan/modal/auxiliary/AuxiliarySize.jsx
@@ -8,19 +8,21 @@ import { useEffect, useState } from 'react'
import Big from 'big.js'
import { calcLineActualSize, calcLinePlaneSize } from '@/util/qpolygon-utils'
import { normalizeDigits } from '@/util/input-utils'
+import { CalculatorInput } from '@/components/common/input/CalcInput'
export default function AuxiliarySize(props) {
const contextPopupPosition = useRecoilValue(contextPopupPositionState)
const { id, pos = contextPopupPosition } = props
const [checkedRadio, setCheckedRadio] = useState(null)
- const [value1, setValue1] = useState(null)
- const [value2, setValue2] = useState(null)
+ const [value1, setValue1] = useState('')
+ const [value2, setValue2] = useState('')
const [size, setSize] = useState(0)
const { getMessage } = useMessage()
const { closePopup } = usePopup()
const currentObject = useRecoilValue(currentObjectState)
const canvas = useRecoilValue(canvasState)
+
useEffect(() => {
return () => {
canvas?.discardActiveObject()
@@ -37,7 +39,7 @@ export default function AuxiliarySize(props) {
}, [currentObject])
const handleInput = (e) => {
- let value = e.target.value.replace(/^0+/, '')
+ let value = e.replace(/^0+/, '')
if (value === '') {
if (checkedRadio === 1) setValue1(value)
if (checkedRadio === 2) setValue2(value)
@@ -130,7 +132,20 @@ export default function AuxiliarySize(props) {
@@ -149,7 +164,20 @@ export default function AuxiliarySize(props) {
diff --git a/src/components/floor-plan/modal/movement/type/FlowLine.jsx b/src/components/floor-plan/modal/movement/type/FlowLine.jsx
index 7c400fd4..d4267a27 100644
--- a/src/components/floor-plan/modal/movement/type/FlowLine.jsx
+++ b/src/components/floor-plan/modal/movement/type/FlowLine.jsx
@@ -2,6 +2,7 @@ import { useMessage } from '@/hooks/useMessage'
import { useState } from 'react'
import { currentObjectState } from '@/store/canvasAtom'
import { useRecoilValue } from 'recoil'
+import { CalculatorInput } from '@/components/common/input/CalcInput'
const FLOW_LINE_TYPE = {
DOWN_LEFT: 'downLeft',
@@ -69,13 +70,27 @@ export default function FlowLine({ FLOW_LINE_REF }) {
@@ -68,13 +70,27 @@ export default function Updown({ UP_DOWN_REF }) {
-
+ {/**/}
+ {}} // No-op function to prevent error
+ options={{
+ allowNegative: false,
+ allowDecimal: false,
+ }}
+ />
mm
diff --git a/src/components/floor-plan/modal/placementShape/PlacementShapeSetting.jsx b/src/components/floor-plan/modal/placementShape/PlacementShapeSetting.jsx
index e283fff0..4ec45dd5 100644
--- a/src/components/floor-plan/modal/placementShape/PlacementShapeSetting.jsx
+++ b/src/components/floor-plan/modal/placementShape/PlacementShapeSetting.jsx
@@ -350,7 +350,7 @@ export default function PlacementShapeSetting({ id, pos = { x: 50, y: 180 }, pla
label=""
className="input-origin block"
readOnly={currentRoof?.roofAngleSet !== item.value}
- value={index === 0 ? currentRoof?.pitch || '0' : currentRoof?.angle || '0'}
+ value={index === 0 ? (currentRoof?.pitch ?? basicSetting?.inclBase ?? '0') : (currentRoof?.angle ?? '0')}
onChange={(value) => {
if (index === 0) {
const pitch = value === '' ? '' : Number(value);
@@ -372,7 +372,7 @@ export default function PlacementShapeSetting({ id, pos = { x: 50, y: 180 }, pla
}}
options={{
allowNegative: false,
- allowDecimal: true //(index !== 0),
+ allowDecimal: true
}}
/>
@@ -520,7 +520,7 @@ export default function PlacementShapeSetting({ id, pos = { x: 50, y: 180 }, pla
label=""
className="input-origin block"
ref={roofRef.hajebichi}
- value={currentRoof?.hajebichi || '0'}
+ value={currentRoof?.hajebichi ?? basicSetting?.roofPchBase ?? '0'}
onChange={(value) => {
const hajebichi = value === '' ? '' : Number(value);
setCurrentRoof(prev => ({
diff --git a/src/components/floor-plan/modal/placementSurface/PlacementSurface.jsx b/src/components/floor-plan/modal/placementSurface/PlacementSurface.jsx
index 7ab89106..4ede1367 100644
--- a/src/components/floor-plan/modal/placementSurface/PlacementSurface.jsx
+++ b/src/components/floor-plan/modal/placementSurface/PlacementSurface.jsx
@@ -1,6 +1,7 @@
import Image from 'next/image'
import { useMessage } from '@/hooks/useMessage'
import { forwardRef, useState } from 'react'
+import { CalculatorInput } from '@/components/common/input/CalcInput'
const PlacementSurface = forwardRef((props, refs) => {
const { getMessage } = useMessage()
@@ -74,10 +75,32 @@ const PlacementSurface = forwardRef((props, refs) => {
diff --git a/src/components/floor-plan/modal/roofShape/passivity/Shed.jsx b/src/components/floor-plan/modal/roofShape/passivity/Shed.jsx
index 474c2f60..67a47bb0 100644
--- a/src/components/floor-plan/modal/roofShape/passivity/Shed.jsx
+++ b/src/components/floor-plan/modal/roofShape/passivity/Shed.jsx
@@ -1,4 +1,5 @@
import { useMessage } from '@/hooks/useMessage'
+import { CalculatorInput } from '@/components/common/input/CalcInput'
export default function Shed({ offsetRef }) {
const { getMessage } = useMessage()
@@ -9,7 +10,20 @@ export default function Shed({ offsetRef }) {
{getMessage('shed.width')}
-
+ {/**/}
+ {}}
+ options={{
+ allowNegative: false,
+ allowDecimal: false
+ }}
+ />
mm
diff --git a/src/components/floor-plan/modal/wallLineOffset/type/Offset.jsx b/src/components/floor-plan/modal/wallLineOffset/type/Offset.jsx
index 76f09cc7..79ae0898 100644
--- a/src/components/floor-plan/modal/wallLineOffset/type/Offset.jsx
+++ b/src/components/floor-plan/modal/wallLineOffset/type/Offset.jsx
@@ -1,6 +1,7 @@
import { useMessage } from '@/hooks/useMessage'
import { useEffect, useState } from 'react'
import { useEvent } from '@/hooks/useEvent'
+import { CalculatorInput } from '@/components/common/input/CalcInput'
export default function Offset({ length1Ref, arrow1Ref, currentWallLineRef }) {
const { getMessage } = useMessage()
@@ -74,7 +75,20 @@ export default function Offset({ length1Ref, arrow1Ref, currentWallLineRef }) {
diff --git a/src/components/floor-plan/modal/wallLineOffset/type/WallLine.jsx b/src/components/floor-plan/modal/wallLineOffset/type/WallLine.jsx
index 92f6a10b..d78a202f 100644
--- a/src/components/floor-plan/modal/wallLineOffset/type/WallLine.jsx
+++ b/src/components/floor-plan/modal/wallLineOffset/type/WallLine.jsx
@@ -1,6 +1,7 @@
import { useMessage } from '@/hooks/useMessage'
import { forwardRef, useEffect, useImperativeHandle, useState } from 'react'
import { useEvent } from '@/hooks/useEvent'
+import { CalculatorInput } from '@/components/common/input/CalcInput'
export default forwardRef(function WallLine({ length1Ref, length2Ref, arrow1Ref, arrow2Ref, radioTypeRef, currentWallLineRef }, ref) {
const { getMessage } = useMessage()
@@ -46,7 +47,21 @@ export default forwardRef(function WallLine({ length1Ref, length2Ref, arrow1Ref,
@@ -80,7 +95,21 @@ export default forwardRef(function WallLine({ length1Ref, length2Ref, arrow1Ref,
diff --git a/src/components/management/StuffDetail.jsx b/src/components/management/StuffDetail.jsx
index e0843b5d..dfcc547c 100644
--- a/src/components/management/StuffDetail.jsx
+++ b/src/components/management/StuffDetail.jsx
@@ -23,6 +23,7 @@ import { QcastContext } from '@/app/QcastProvider'
import { useCanvasMenu } from '@/hooks/common/useCanvasMenu'
import { useSwal } from '@/hooks/useSwal'
import { sanitizeIntegerInputEvent } from '@/util/input-utils'
+import { CalculatorInput } from '@/components/common/input/CalcInput'
export default function StuffDetail() {
const [stuffSearch, setStuffSearch] = useRecoilState(stuffSearchState)
@@ -1204,8 +1205,10 @@ export default function StuffDetail() {
}
// 저장
- const onValid = async () => {
- const formData = form.getValues()
+ const onValid = async (actionType) => {
+ const formData = form.getValues();
+ if(actionType !== 'save') return false
+ console.log('Action type:', actionType); // 'save' 또는 'tempSave'
let errors = {}
let fieldNm
@@ -1715,7 +1718,7 @@ export default function StuffDetail() {
- |