From e3f97d20fb16f8afdd89b1bd1009e9d2b1d53119 Mon Sep 17 00:00:00 2001 From: "hyojun.choi" Date: Fri, 14 Mar 2025 12:37:26 +0900 Subject: [PATCH 01/13] =?UTF-8?q?=EC=A7=80=EB=B6=95=EC=9E=AC=20=ED=95=A0?= =?UTF-8?q?=EB=8B=B9=20=ED=8C=9D=EC=97=85=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hooks/roofcover/useRoofAllocationSetting.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/hooks/roofcover/useRoofAllocationSetting.js b/src/hooks/roofcover/useRoofAllocationSetting.js index 671d4c7e..536a2127 100644 --- a/src/hooks/roofcover/useRoofAllocationSetting.js +++ b/src/hooks/roofcover/useRoofAllocationSetting.js @@ -446,12 +446,10 @@ export function useRoofAllocationSetting(id) { * 지붕재 변경 */ const handleChangeRoofMaterial = (value, index) => { - const selectedIndex = roofMaterials.findIndex((roof) => roof.selected) - const selectedRoofMaterial = roofMaterials.find((roof) => roof.roofMatlCd === value.id) const newRoofList = currentRoofList.map((roof, idx) => { if (idx === index) { - return { ...selectedRoofMaterial } + return { ...selectedRoofMaterial, selected: roof.selected } } return roof }) From 7b8927c7cc992888c3ed969fdcf59f33c73c96c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EB=AF=BC=EC=8B=9D?= <43837214+Minsiki@users.noreply.github.com> Date: Fri, 14 Mar 2025 12:58:01 +0900 Subject: [PATCH 02/13] =?UTF-8?q?PCS=20Validation=20=EC=A1=B0=EA=B1=B4=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modal/circuitTrestle/step/PowerConditionalSelect.jsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/components/floor-plan/modal/circuitTrestle/step/PowerConditionalSelect.jsx b/src/components/floor-plan/modal/circuitTrestle/step/PowerConditionalSelect.jsx index f531f97f..89aa30d7 100644 --- a/src/components/floor-plan/modal/circuitTrestle/step/PowerConditionalSelect.jsx +++ b/src/components/floor-plan/modal/circuitTrestle/step/PowerConditionalSelect.jsx @@ -160,6 +160,11 @@ export default function PowerConditionalSelect(props) { return } + + if (selectedModels.find((m) => m.pcsSerParallelYn === 'Y') && selectedRow.pcsSerParallelYn === 'Y') { + return + } + if (selectedMaker.pcsMkrMultiType === PCS_MKR_MULTI_TYPE.MULTI) { setSelectedModels([...selectedModels, { ...selectedRow, id: uuidv4() }]) } else if (!selectedModels.find((m) => m.itemId === selectedRow.itemId)) { From 4772c6e34cb9343eca092f4602e087c7a3f1888d Mon Sep 17 00:00:00 2001 From: basssy Date: Fri, 14 Mar 2025 14:05:10 +0900 Subject: [PATCH 03/13] =?UTF-8?q?=EB=AC=BC=EA=B1=B4=ED=98=84=ED=99=A9=20?= =?UTF-8?q?=EC=9D=BC=EB=B3=B8=EC=96=B4=20=EC=B6=94=EA=B0=80=20=EB=B2=88?= =?UTF-8?q?=EC=97=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/locales/ja.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/locales/ja.json b/src/locales/ja.json index ecc1b73c..d839315d 100644 --- a/src/locales/ja.json +++ b/src/locales/ja.json @@ -5,7 +5,7 @@ "header.menus.management": "見積書管理画面", "header.menus.management.newStuff": "新規見積登録", "header.menus.management.detail": "物件詳細", - "header.menus.management.stuffList": "見積状況", + "header.menus.management.stuffList": "物件検索", "header.menus.community": "コミュニティ", "header.menus.community.notice": "お知らせ", "header.menus.community.faq": "FAQ", From 428f56bf449dff5ccf80569990ba61ee5b76f12f Mon Sep 17 00:00:00 2001 From: "hyojun.choi" Date: Fri, 14 Mar 2025 14:08:24 +0900 Subject: [PATCH 04/13] =?UTF-8?q?=EB=82=B4=EC=9A=A9=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hooks/roofcover/useAuxiliaryDrawing.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hooks/roofcover/useAuxiliaryDrawing.js b/src/hooks/roofcover/useAuxiliaryDrawing.js index da6391b8..7863aea0 100644 --- a/src/hooks/roofcover/useAuxiliaryDrawing.js +++ b/src/hooks/roofcover/useAuxiliaryDrawing.js @@ -832,7 +832,7 @@ export function useAuxiliaryDrawing(id, isUseEffect = true) { } const handleFix = () => { - if (!confirm('지붕선 완료하시겠습니까?')) { + if (!confirm('보조선 작성을 완료하시겠습니까?')) { return } From 197c107e7a7c50e9c697f57ef758902d45524c0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EB=AF=BC=EC=8B=9D?= <43837214+Minsiki@users.noreply.github.com> Date: Fri, 14 Mar 2025 14:59:07 +0900 Subject: [PATCH 05/13] =?UTF-8?q?WithDraggablePanel=20=EA=B4=80=EB=A0=A8?= =?UTF-8?q?=20=EB=B6=80=EB=B6=84=20=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/draggable/WithDraggable.jsx | 28 ++++--------------- 1 file changed, 5 insertions(+), 23 deletions(-) diff --git a/src/components/common/draggable/WithDraggable.jsx b/src/components/common/draggable/WithDraggable.jsx index e2f769cc..49552eac 100644 --- a/src/components/common/draggable/WithDraggable.jsx +++ b/src/components/common/draggable/WithDraggable.jsx @@ -3,16 +3,7 @@ import { useState } from 'react' import Draggable from 'react-draggable' -export default function WithDraggable({ - isShow, - children, - pos = { x: 0, y: 0 }, - handle = '', - className = '', - isModal = true, - hasFooter = true, - isHidden = false, -}) { +export default function WithDraggable({ isShow, children, pos = { x: 0, y: 0 }, handle = '', className = '', hasFooter = true, isHidden = false }) { const [position, setPosition] = useState(pos) const handleOnDrag = (e, data) => { @@ -31,14 +22,10 @@ export default function WithDraggable({ onDrag={(e, data) => handleOnDrag(e, data)} handle={handle === '' ? '.modal-handle' : handle} > - {isModal ? ( -
- {children} - {hasFooter && } -
- ) : ( - <>{children} - )} +
+ {children} + {hasFooter && } +
)} @@ -68,15 +55,10 @@ function WithDraggableBody({ children }) { ) } -function WithDraggablePanel({ children }) { - return <>{children} -} - function WithDraggableFooter() { return
} WithDraggable.Header = WithDraggableHeader WithDraggable.Body = WithDraggableBody -WithDraggable.Panel = WithDraggablePanel WithDraggable.Footer = WithDraggableFooter From d7d4768ed7783b7c255a5c7a590d73215dfec58d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EB=AF=BC=EC=8B=9D?= <43837214+Minsiki@users.noreply.github.com> Date: Fri, 14 Mar 2025 14:59:45 +0900 Subject: [PATCH 06/13] =?UTF-8?q?=EC=A7=91=EA=B3=84=ED=91=9C=20=EB=8B=A8?= =?UTF-8?q?=EB=8F=85=EC=9C=BC=EB=A1=9C=20Draggable=20Component=20=EC=A0=81?= =?UTF-8?q?=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modal/panelBatch/PanelBatchStatistics.jsx | 78 ++++++++++--------- 1 file changed, 41 insertions(+), 37 deletions(-) diff --git a/src/components/floor-plan/modal/panelBatch/PanelBatchStatistics.jsx b/src/components/floor-plan/modal/panelBatch/PanelBatchStatistics.jsx index e789bc4a..fa4703be 100644 --- a/src/components/floor-plan/modal/panelBatch/PanelBatchStatistics.jsx +++ b/src/components/floor-plan/modal/panelBatch/PanelBatchStatistics.jsx @@ -11,60 +11,64 @@ import { canvasState } from '@/store/canvasAtom' import { POLYGON_TYPE } from '@/common/common' import { useCircuitTrestle } from '@/hooks/useCirCuitTrestle' import { moduleSelectionDataState } from '@/store/selectedModuleOptions' +import Draggable from 'react-draggable' export default function PanelBatchStatistics() { const { getMessage } = useMessage() const [isFold, setIsFold] = useState(false) - const [pos, setPos] = useState({ - x: 0, - y: 30, - }) const canvas = useRecoilValue(canvasState) const { header, rows, footer } = useRecoilValue(moduleStatisticsState) const { setModuleStatisticsData } = useCircuitTrestle(true) const [moduleSelectionDataStore, setModuleSelectionDataStore] = useRecoilState(moduleSelectionDataState) + const [position, setPosition] = useState({ + x: 0, + y: 30, + }) + + const handleOnDrag = (e, data) => { + e.stopPropagation() + setPosition({ x: data.x, y: data.y }) + } useEffect(() => { if (moduleSelectionDataStore && moduleSelectionDataStore.module) setModuleStatisticsData() }, []) return ( - - -
-

{getMessage('modal.panel.batch.statistic')}

- -
- - - - {header.map((item, index) => ( - - ))} - - - - {rows.map((row, index) => ( - - {header.map((item, i) => ( - - ))} - + handleOnDrag(e, data)} handle=".penal-wrap"> +
+

{getMessage('modal.panel.batch.statistic')}

+ +
+
{item.name}
{row[item.prop] ?? 0}
+ + + {header.map((item, index) => ( + ))} - - {header.map((header, index) => ( - + + + + {rows.map((row, index) => ( + + {header.map((item, i) => ( + ))} - -
{item.name}
- {typeof footer[header.prop] === 'number' - ? footer[header.prop].toLocaleString('ko-KR', { maximumFractionDigits: 4 }) - : footer[header.prop]} -
{row[item.prop] ?? 0}
-
+ ))} + + {header.map((header, index) => ( + + {typeof footer[header.prop] === 'number' + ? footer[header.prop].toLocaleString('ko-KR', { maximumFractionDigits: 4 }) + : footer[header.prop]} + + ))} + + +
-
-
+ + ) } From d39b57f302a29272b8fbf08925d3e101b725edec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EB=AF=BC=EC=8B=9D?= <43837214+Minsiki@users.noreply.github.com> Date: Fri, 14 Mar 2025 15:00:15 +0900 Subject: [PATCH 07/13] =?UTF-8?q?=EB=B3=91=EC=84=A4=EC=9A=A9=20PCS=20Valid?= =?UTF-8?q?ation=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../step/PowerConditionalSelect.jsx | 22 ++++++++++++------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/src/components/floor-plan/modal/circuitTrestle/step/PowerConditionalSelect.jsx b/src/components/floor-plan/modal/circuitTrestle/step/PowerConditionalSelect.jsx index 89aa30d7..b48ecffd 100644 --- a/src/components/floor-plan/modal/circuitTrestle/step/PowerConditionalSelect.jsx +++ b/src/components/floor-plan/modal/circuitTrestle/step/PowerConditionalSelect.jsx @@ -165,6 +165,15 @@ export default function PowerConditionalSelect(props) { return } + if (selectedRow.pcsSerParallelYn === 'Y' && selectedModels.length === 0 && selectedMaker.pcsMkrMultiType === PCS_MKR_MULTI_TYPE.SINGLE_P) { + swalFire({ + title: getMessage('modal.module.pcs.error1'), + icon: 'warning', + }) + + return + } + if (selectedMaker.pcsMkrMultiType === PCS_MKR_MULTI_TYPE.MULTI) { setSelectedModels([...selectedModels, { ...selectedRow, id: uuidv4() }]) } else if (!selectedModels.find((m) => m.itemId === selectedRow.itemId)) { @@ -174,6 +183,11 @@ export default function PowerConditionalSelect(props) { } const onRemoveSelectedModel = (model) => { + const tempModels = selectedModels.filter((m) => m.id !== model.id) + if (tempModels.length === 1 && tempModels[0].pcsSerParallelYn === 'Y') { + setSelectedModels([]) + return + } setSelectedModels(selectedModels.filter((m) => m.id !== model.id)) } @@ -282,14 +296,6 @@ export default function PowerConditionalSelect(props) { - {/*
- - -
*/} ) } From 91be8396b14a980dd5870d1530696b8578847e11 Mon Sep 17 00:00:00 2001 From: yoosangwook Date: Fri, 14 Mar 2025 15:04:22 +0900 Subject: [PATCH 08/13] =?UTF-8?q?fix:=20=EB=B2=88=EC=97=AD=20=EC=A0=81?= =?UTF-8?q?=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 개발자 확인용 한글 제거 처리 --- .../floor-plan/modal/wallLineOffset/type/Offset.jsx | 2 +- src/hooks/roofcover/useAuxiliaryDrawing.js | 7 +++++-- src/hooks/roofcover/useOuterLineWall.js | 4 ++-- src/hooks/roofcover/useWallLineOffsetSetting.js | 2 +- src/hooks/surface/usePlacementShapeDrawing.js | 4 ++-- src/locales/ja.json | 3 ++- src/locales/ko.json | 3 ++- src/util/qpolygon-utils.js | 6 +++--- 8 files changed, 18 insertions(+), 13 deletions(-) diff --git a/src/components/floor-plan/modal/wallLineOffset/type/Offset.jsx b/src/components/floor-plan/modal/wallLineOffset/type/Offset.jsx index 418a9419..16036485 100644 --- a/src/components/floor-plan/modal/wallLineOffset/type/Offset.jsx +++ b/src/components/floor-plan/modal/wallLineOffset/type/Offset.jsx @@ -23,7 +23,7 @@ export default function Offset({ length1Ref, arrow1Ref, currentWallLineRef }) { const keyDown = (e) => { if (currentWallLineRef.current === null) { - alert('보조선을 먼저 선택하세요') + // alert('보조선을 먼저 선택하세요') return } diff --git a/src/hooks/roofcover/useAuxiliaryDrawing.js b/src/hooks/roofcover/useAuxiliaryDrawing.js index 7863aea0..6023bce8 100644 --- a/src/hooks/roofcover/useAuxiliaryDrawing.js +++ b/src/hooks/roofcover/useAuxiliaryDrawing.js @@ -22,6 +22,7 @@ import { useSwal } from '@/hooks/useSwal' import { usePopup } from '@/hooks/usePopup' import { calculateAngle, isSamePoint } from '@/util/qpolygon-utils' import { POLYGON_TYPE } from '@/common/common' +import { useMessage } from '../useMessage' // 보조선 작성 export function useAuxiliaryDrawing(id, isUseEffect = true) { @@ -34,6 +35,7 @@ export function useAuxiliaryDrawing(id, isUseEffect = true) { const { swalFire } = useSwal() const { getAdsorptionPoints } = useAdsorptionPoint() const { closePopup } = usePopup() + const { getMessage } = useMessage() const adsorptionRange = useRecoilValue(adsorptionRangeState) @@ -411,7 +413,7 @@ export function useAuxiliaryDrawing(id, isUseEffect = true) { const length1Value = length1Ref.current.value if (diagonalLength <= length1Value) { - alert('대각선 길이는 직선 길이보다 길어야 합니다.') + // alert('대각선 길이는 직선 길이보다 길어야 합니다.') return } @@ -832,7 +834,8 @@ export function useAuxiliaryDrawing(id, isUseEffect = true) { } const handleFix = () => { - if (!confirm('보조선 작성을 완료하시겠습니까?')) { + // if (!confirm('보조선 작성을 완료하시겠습니까?')) { + if (!confirm(getMessage('want.to.complete.auxiliary.creation'))) { return } diff --git a/src/hooks/roofcover/useOuterLineWall.js b/src/hooks/roofcover/useOuterLineWall.js index 7e94f074..bced656b 100644 --- a/src/hooks/roofcover/useOuterLineWall.js +++ b/src/hooks/roofcover/useOuterLineWall.js @@ -567,7 +567,7 @@ export function useOuterLineWall(id, propertiesId) { const length1Value = length1Ref.current.value if (diagonalLength <= length1Value) { - alert('대각선 길이는 직선 길이보다 길어야 합니다.') + // alert('대각선 길이는 직선 길이보다 길어야 합니다.') return } @@ -890,7 +890,7 @@ export function useOuterLineWall(id, propertiesId) { }) if (isAllRightAngle) { - alert('부정확한 다각형입니다.') + // alert('부정확한 다각형입니다.') return } diff --git a/src/hooks/roofcover/useWallLineOffsetSetting.js b/src/hooks/roofcover/useWallLineOffsetSetting.js index 22af0f49..01fbec09 100644 --- a/src/hooks/roofcover/useWallLineOffsetSetting.js +++ b/src/hooks/roofcover/useWallLineOffsetSetting.js @@ -192,7 +192,7 @@ export function useWallLineOffsetSetting(id) { const handleSave = () => { if (currentWallLineRef.current === null) { - alert('보조선을 먼저 선택하세요') + // alert('보조선을 먼저 선택하세요') return } switch (type) { diff --git a/src/hooks/surface/usePlacementShapeDrawing.js b/src/hooks/surface/usePlacementShapeDrawing.js index 983583ba..b1e92f90 100644 --- a/src/hooks/surface/usePlacementShapeDrawing.js +++ b/src/hooks/surface/usePlacementShapeDrawing.js @@ -564,7 +564,7 @@ export function usePlacementShapeDrawing(id) { const length1Value = length1Ref.current.value if (diagonalLength <= length1Value) { - alert('대각선 길이는 직선 길이보다 길어야 합니다.') + // alert('대각선 길이는 직선 길이보다 길어야 합니다.') return } @@ -886,7 +886,7 @@ export function usePlacementShapeDrawing(id) { }) if (isAllRightAngle) { - alert('부정확한 다각형입니다.') + // alert('부정확한 다각형입니다.') return } diff --git a/src/locales/ja.json b/src/locales/ja.json index d839315d..0028a047 100644 --- a/src/locales/ja.json +++ b/src/locales/ja.json @@ -1033,5 +1033,6 @@ "canvas.infomation.text": "数字は [半角] 入力のみ可能です。", "roof.exceed.count": "屋根材は4つまで選択可能です。", "outerLine.property.fix": "外壁線の属性設定 を完了しますか?", - "outerLine.property.close": "外壁線の属性設定 を終了しますか?" + "outerLine.property.close": "外壁線の属性設定 を終了しますか?", + "want.to.complete.auxiliary.creation": "보補助線の作成を完了しますか?" } diff --git a/src/locales/ko.json b/src/locales/ko.json index 0d00105b..4c051305 100644 --- a/src/locales/ko.json +++ b/src/locales/ko.json @@ -1033,5 +1033,6 @@ "canvas.infomation.text": "숫자는 [반각] 입력만 가능합니다.", "roof.exceed.count": "지붕재는 4개까지 선택 가능합니다.", "outerLine.property.fix": "외벽선 속성 설정을 완료하시겠습니까?", - "outerLine.property.close": "외벽선 속성 설정을 종료하시겠습니까?" + "outerLine.property.close": "외벽선 속성 설정을 종료하시겠습니까?", + "want.to.complete.auxiliary.creation": "보조선 작성을 완료하시겠습니까?" } diff --git a/src/util/qpolygon-utils.js b/src/util/qpolygon-utils.js index 348f1291..cded90ee 100644 --- a/src/util/qpolygon-utils.js +++ b/src/util/qpolygon-utils.js @@ -320,7 +320,7 @@ export const drawGabledRoof = (roofId, canvas, textMode) => { const wallLines = canvas?.getObjects().find((object) => object.name === POLYGON_TYPE.WALL && object.attributes.roofId === roof.id).lines const hasNonParallelLines = roofLines.filter((line) => line.x1 !== line.x2 && line.y1 !== line.y2) if (hasNonParallelLines.length > 0) { - alert('대각선이 존재합니다.') + // alert('대각선이 존재합니다.') return } @@ -648,7 +648,7 @@ export const drawShedRoof = (roofId, canvas, textMode) => { const roof = canvas?.getObjects().find((object) => object.id === roofId) const hasNonParallelLines = roof.lines.filter((line) => Math.abs(line.x1 - line.x2) > 1 && Math.abs(line.y1 - line.y2) > 1) if (hasNonParallelLines.length > 0) { - alert('대각선이 존재합니다.') + // alert('대각선이 존재합니다.') return } @@ -739,7 +739,7 @@ export const drawRidgeRoof = (roofId, canvas, textMode) => { //Math.abs(line.x1 - line.x2) > 1 && Math.abs(line.y1 - line.y2) > 1 const hasNonParallelLines = roof.lines.filter((line) => Big(line.x1).minus(Big(line.x2)).gt(1) && Big(line.y1).minus(Big(line.y2)).gt(1)) if (hasNonParallelLines.length > 0) { - alert('대각선이 존재합니다.') + // alert('대각선이 존재ㄴ합니다.') return } From 89a7708529afef0291f88c681b078fb2a761d5f9 Mon Sep 17 00:00:00 2001 From: basssy Date: Fri, 14 Mar 2025 15:41:34 +0900 Subject: [PATCH 09/13] =?UTF-8?q?=EB=AC=BC=EA=B1=B4=EC=83=81=EC=84=B8=20?= =?UTF-8?q?=ED=94=8C=EB=9E=9C=EB=A6=AC=EC=8A=A4=ED=8A=B8=20=EA=B7=B8?= =?UTF-8?q?=EB=A6=AC=EB=93=9C=20moduleModel=20=ED=97=A4=EB=8D=94=20autoHei?= =?UTF-8?q?ght=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/management/StuffDetail.jsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/management/StuffDetail.jsx b/src/components/management/StuffDetail.jsx index 06a9b35a..b3e73597 100644 --- a/src/components/management/StuffDetail.jsx +++ b/src/components/management/StuffDetail.jsx @@ -140,6 +140,7 @@ export default function StuffDetail() { headerName: getMessage('stuff.detail.planGridHeader.moduleModel'), flex: 1, wrapText: true, + autoHeight: true, cellStyle: { alignItems: 'flex-start' /* 좌측정렬*/, cursor: 'pointer' }, cellRenderer: (params) => { let origin = params.value From b57c3fe94306c912bb35a620443729c25a22983e Mon Sep 17 00:00:00 2001 From: "hyojun.choi" Date: Fri, 14 Mar 2025 17:06:57 +0900 Subject: [PATCH 10/13] add toFixed attribute in QPolygon --- src/common/common.js | 1 + src/components/fabric/QPolygon.js | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/common/common.js b/src/common/common.js index 0fa678db..d82d43f0 100644 --- a/src/common/common.js +++ b/src/common/common.js @@ -202,6 +202,7 @@ export const SAVE_KEY = [ 'fontStyle', 'fontWeight', 'dormerAttributes', + 'toFixed', ] export const OBJECT_PROTOTYPE = [fabric.Line.prototype, fabric.Polygon.prototype, fabric.Triangle.prototype, fabric.Group.prototype] diff --git a/src/components/fabric/QPolygon.js b/src/components/fabric/QPolygon.js index a075b776..85bb03dd 100644 --- a/src/components/fabric/QPolygon.js +++ b/src/components/fabric/QPolygon.js @@ -23,6 +23,7 @@ export const QPolygon = fabric.util.createClass(fabric.Polygon, { initOptions: null, direction: null, arrow: null, + toFixed: 1, initialize: function (points, options, canvas) { this.lines = [] this.texts = [] @@ -33,11 +34,12 @@ export const QPolygon = fabric.util.createClass(fabric.Polygon, { this.innerLines = [] this.children = [] this.separatePolygon = [] + this.toFixed = options.toFixed ?? 1 // 소수점 전부 제거 points.forEach((point) => { - point.x = Number(point.x.toFixed(1)) - point.y = Number(point.y.toFixed(1)) + point.x = Number(point.x.toFixed(this.toFixed)) + point.y = Number(point.y.toFixed(this.toFixed)) }) options.selectable = options.selectable ?? true options.sort = options.sort ?? true From 3762b6b81eb806bba6f29f2182215504c4aa0f88 Mon Sep 17 00:00:00 2001 From: "hyojun.choi" Date: Fri, 14 Mar 2025 17:19:14 +0900 Subject: [PATCH 11/13] =?UTF-8?q?canvasSize=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../floor-plan/modal/setting01/planSize/PlanSizeSetting.jsx | 6 +++--- src/hooks/option/useCanvasSetting.js | 3 +++ src/store/canvasAtom.js | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/components/floor-plan/modal/setting01/planSize/PlanSizeSetting.jsx b/src/components/floor-plan/modal/setting01/planSize/PlanSizeSetting.jsx index 1d4b1e58..10f9adc1 100644 --- a/src/components/floor-plan/modal/setting01/planSize/PlanSizeSetting.jsx +++ b/src/components/floor-plan/modal/setting01/planSize/PlanSizeSetting.jsx @@ -49,7 +49,7 @@ export default function PlanSizeSetting(props) { setPlanSizeSettingMode((prev) => { return { ...prev, - [name]: Number(value), + [name]: Number(value) / 10, } }) } @@ -72,7 +72,7 @@ export default function PlanSizeSetting(props) { type="text" className="input-origin block" name={`originHorizon`} - value={planSizeSettingMode.originHorizon} + value={planSizeSettingMode.originHorizon * 10} onChange={(e) => onlyNumberInputChange(e, changeInput)} /> @@ -85,7 +85,7 @@ export default function PlanSizeSetting(props) { type="text" className="input-origin block" name={`originVertical`} - value={planSizeSettingMode.originVertical} + value={planSizeSettingMode.originVertical * 10} onChange={(e) => onlyNumberInputChange(e, changeInput)} /> diff --git a/src/hooks/option/useCanvasSetting.js b/src/hooks/option/useCanvasSetting.js index 539c43ec..76f42075 100644 --- a/src/hooks/option/useCanvasSetting.js +++ b/src/hooks/option/useCanvasSetting.js @@ -612,6 +612,9 @@ export function useCanvasSetting(executeEffect = true) { /** 도면크기 설정 */ setPlanSizeSettingMode({ ...planSizeSettingMode, originHorizon: res.originHorizon, originVertical: res.originVertical }) + canvas.setWidth(res.originHorizon) + canvas.setHeight(res.originVertical) + canvas.renderAll() /** 데이터 설정 */ setSettingModalFirstOptions({ diff --git a/src/store/canvasAtom.js b/src/store/canvasAtom.js index 772e55be..ddeed03d 100644 --- a/src/store/canvasAtom.js +++ b/src/store/canvasAtom.js @@ -43,7 +43,7 @@ export const fontSizeState = atom({ export const canvasSizeState = atom({ key: 'canvasSize', default: { - vertical: 1000, + vertical: 1600, horizontal: 1600, }, }) From 20b90d0df66f44025b66225cb714e12140302c85 Mon Sep 17 00:00:00 2001 From: basssy Date: Fri, 14 Mar 2025 17:26:59 +0900 Subject: [PATCH 12/13] #900 YJSS --- src/components/estimate/Estimate.jsx | 39 +++++-------------- src/components/floor-plan/CanvasMenu.jsx | 5 --- src/components/management/StuffDetail.jsx | 2 + .../estimate/useEstimateController.js | 25 +++++++----- 4 files changed, 26 insertions(+), 45 deletions(-) diff --git a/src/components/estimate/Estimate.jsx b/src/components/estimate/Estimate.jsx index 38ff2289..a44af878 100644 --- a/src/components/estimate/Estimate.jsx +++ b/src/components/estimate/Estimate.jsx @@ -480,10 +480,6 @@ export default function Estimate({}) { //Pricing 버튼 const handlePricing = async (showPriceCd) => { - //todo: 추후 YJSS가 다시 나타날 경우 아래 swalFire 제거 필요 - if (estimateContextState.estimateType === 'YJSS') { - return swalFire({ text: getMessage('estimate.detail.save.requiredEstimateType'), type: 'alert', icon: 'warning' }) - } const param = { saleStoreId: session.storeId, sapSalesStoreCd: session.custCd, @@ -699,14 +695,10 @@ export default function Estimate({}) { /* 케이블 select 변경시 */ const onChangeDisplayCableItem = (value, itemList) => { - //todo: 추후 YJSS가 다시 나타날 경우 아래 swalFire 제거 필요 - if (estimateContextState.estimateType === 'YJSS') { - return swalFire({ text: getMessage('estimate.detail.save.requiredEstimateType'), type: 'alert', icon: 'warning' }) - } itemList.map((item, index) => { if (item.dispCableFlg === '1') { if (value !== '') { - onChangeDisplayItem(value, item.dispOrder, index) + onChangeDisplayItem(value, item.dispOrder, index, true) } } }) @@ -714,11 +706,7 @@ export default function Estimate({}) { } // 아이템 자동완성 검색시 아이템 추가/변경시 - const onChangeDisplayItem = (itemId, dispOrder, index) => { - //todo: 추후 YJSS가 다시 나타날 경우 아래 swalFire 제거 필요 - if (estimateContextState.estimateType === 'YJSS') { - return swalFire({ text: getMessage('estimate.detail.save.requiredEstimateType'), type: 'alert', icon: 'warning' }) - } + const onChangeDisplayItem = (itemId, dispOrder, index, flag) => { const param = { itemId: itemId, coldZoneFlg: estimateContextState?.coldRegionFlg, @@ -748,7 +736,7 @@ export default function Estimate({}) { updates.itemGroup = res.itemGroup updates.delFlg = '0' // 삭제플래그 0 updates.saleTotPrice = (res.salePrice * estimateContextState.itemList[index].amount).toString() - updates.amount = '' + updates.amount = flag ? estimateContextState.itemList[index].amount : '' updates.openFlg = res.openFlg if (estimateContextState.estimateType === 'YJSS') { @@ -1032,7 +1020,6 @@ export default function Estimate({}) { }) let dispCableFlgCnt = 0 estimateContextState.itemList.forEach((item) => { - // console.log('YJSS::::::::', item) if (item.delFlg === '0') { let amount = Number(item.amount?.replace(/[^0-9]/g, '').replaceAll(',', '')) || 0 let salePrice @@ -1068,7 +1055,6 @@ export default function Estimate({}) { } if (item.dispCableFlg === '1') { - // console.log('YJSS22222::::::::', item) dispCableFlgCnt++ setCableItem(item.itemId) } @@ -1356,7 +1342,7 @@ export default function Estimate({}) {
- {/*
+
-
*/} +
{ - //todo: 추후 YJSS가 다시 나타날 경우 아래 주석풀기 - // setHandlePricingFlag(true) + setHandlePricingFlag(true) setEstimateContextState({ estimateType: e.target.value }) }} /> @@ -1677,9 +1662,8 @@ export default function Estimate({}) {
- {/* //todo: 추후 YJSS가 다시 나타날 경우 주석 풀기 */} {/* YJOD면 아래영역 숨김 */} - {/*
+
@@ -1714,7 +1698,7 @@ export default function Estimate({}) {
-
*/} +
{/* 제품정보 끝 */} {/* 가격표시영역시작 */}
@@ -1871,7 +1855,7 @@ export default function Estimate({}) { options={originDisplayItemList} onChange={(e) => { if (isObjectNotEmpty(e)) { - onChangeDisplayItem(e.itemId, item.dispOrder, index) + onChangeDisplayItem(e.itemId, item.dispOrder, index, false) } }} menuPlacement={'auto'} @@ -1895,11 +1879,6 @@ export default function Estimate({}) { classNamePrefix="custom" placeholder="Select" options={cableItemList} - onChange={(e) => { - if (isObjectNotEmpty(e)) { - onChangeDisplayItem(e.clRefChr1, item.dispOrder, index) - } - }} menuPlacement={'auto'} getOptionLabel={(x) => x.clRefChr3} getOptionValue={(x) => x.clRefChr1} diff --git a/src/components/floor-plan/CanvasMenu.jsx b/src/components/floor-plan/CanvasMenu.jsx index 66dbf43a..e10d9ebc 100644 --- a/src/components/floor-plan/CanvasMenu.jsx +++ b/src/components/floor-plan/CanvasMenu.jsx @@ -365,11 +365,6 @@ export default function CanvasMenu(props) { // 견적서 초기화 버튼 const handleEstimateReset = () => { - //todo: 추후 YJSS가 다시 나타날 경우 아래 swalFire 제거 필요 - if (estimateRecoilState.estimateType === 'YJSS') { - return swalFire({ text: getMessage('estimate.detail.save.requiredEstimateType'), type: 'alert', icon: 'warning' }) - } - swalFire({ text: getMessage('estimate.detail.reset.confirmMsg'), type: 'confirm', diff --git a/src/components/management/StuffDetail.jsx b/src/components/management/StuffDetail.jsx index b3e73597..b5020d5b 100644 --- a/src/components/management/StuffDetail.jsx +++ b/src/components/management/StuffDetail.jsx @@ -371,6 +371,7 @@ export default function StuffDetail() { swalFire({ text: getMessage('stuff.detail.header.notExistObjectNo'), type: 'alert', + icon: 'error', confirmFn: () => { router.push('/management/stuff', { scroll: false }) }, @@ -388,6 +389,7 @@ export default function StuffDetail() { swalFire({ text: getMessage('stuff.detail.header.notExistObjectNo'), type: 'alert', + icon: 'error', confirmFn: () => { router.push('/management/stuff', { scroll: false }) }, diff --git a/src/hooks/floorPlan/estimate/useEstimateController.js b/src/hooks/floorPlan/estimate/useEstimateController.js index 1b957e0a..c326a964 100644 --- a/src/hooks/floorPlan/estimate/useEstimateController.js +++ b/src/hooks/floorPlan/estimate/useEstimateController.js @@ -166,11 +166,6 @@ export const useEstimateController = (planNo, flag) => { //견적서 저장 const handleEstimateSubmit = async () => { - //todo: 추후 YJSS가 다시 나타날 경우 아래 swalFire 제거 필요 - if (estimateData.estimateType === 'YJSS') { - return swalFire({ text: getMessage('estimate.detail.save.requiredEstimateType'), type: 'alert', icon: 'warning' }) - } - //0. 필수체크 let flag = true let originFileFlg = false @@ -300,6 +295,19 @@ export const useEstimateController = (planNo, flag) => { } } } else { + //견적서를 복사하면 API에서 봄컴포넌트는 salePrice, unitPrice를 0으로 내려옴..front에서 처리 + if (item.salePrice === null) { + item.salePrice = '0' + } else if (isNaN(item.salePrice)) { + item.salePrice = '0' + } + + if (item.unitPrice === null) { + item.unitPrice = '0' + } else if (isNaN(item.unitPrice)) { + item.unitPrice = '0' + } + //봄 컴포넌트 제품은 0으로 item.openFlg = '0' } @@ -386,6 +394,7 @@ export const useEstimateController = (planNo, flag) => { estimateData.estimateOption = estimateOptions // console.log('최종아이템:::', estimateData.itemList) + if (fileList?.length > 0) { estimateData.fileList = fileList } else { @@ -413,7 +422,7 @@ export const useEstimateController = (planNo, flag) => { }) } catch (e) { setIsGlobalLoading(false) - console.log('error::::::::::::', e.response.data.message) + console.error('error::::::::::::', e.response.data.message) } } @@ -423,10 +432,6 @@ export const useEstimateController = (planNo, flag) => { * T01관리자 계정 및 1차판매점에게만 제공 */ const handleEstimateCopy = async (sendPlanNo, copyReceiveUser, saleStoreId, otherSaleStoreId, setEstimateCopyPopupOpen) => { - //todo: 추후 YJSS가 다시 나타날 경우 아래 swalFire 제거 필요 - if (estimateData.estimateType === 'YJSS') { - return swalFire({ text: getMessage('estimate.detail.save.requiredEstimateType'), type: 'alert', icon: 'warning' }) - } if (saleStoreId === '') { return swalFire({ text: getMessage('estimate.detail.productFeaturesPopup.requiredStoreId'), From 0956bcc4ad6f8ddd9bd7aca8be39dac931535829 Mon Sep 17 00:00:00 2001 From: basssy Date: Fri, 14 Mar 2025 17:55:58 +0900 Subject: [PATCH 13/13] =?UTF-8?q?=EC=A3=BC=EC=84=9D=20=EC=A0=95=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hooks/floorPlan/estimate/useEstimateController.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/hooks/floorPlan/estimate/useEstimateController.js b/src/hooks/floorPlan/estimate/useEstimateController.js index c326a964..d509a1e0 100644 --- a/src/hooks/floorPlan/estimate/useEstimateController.js +++ b/src/hooks/floorPlan/estimate/useEstimateController.js @@ -295,7 +295,6 @@ export const useEstimateController = (planNo, flag) => { } } } else { - //견적서를 복사하면 API에서 봄컴포넌트는 salePrice, unitPrice를 0으로 내려옴..front에서 처리 if (item.salePrice === null) { item.salePrice = '0' } else if (isNaN(item.salePrice)) {