From 4e963254d1ac2cab4f2b46b54c11a12b4e0832e2 Mon Sep 17 00:00:00 2001 From: basssy Date: Wed, 26 Feb 2025 16:41:39 +0900 Subject: [PATCH 1/5] =?UTF-8?q?=EB=AC=BC=EA=B1=B4=EC=83=81=EC=84=B8=20->?= =?UTF-8?q?=20=ED=94=8C=EB=9E=9C=20=EA=B7=B8=EB=A6=AC=EB=93=9C=20=EB=8D=94?= =?UTF-8?q?=EB=B8=94=ED=81=B4=EB=A6=AD=20=EB=8F=84=EB=A9=B4=EC=9E=91?= =?UTF-8?q?=EC=84=B1=20=EC=9D=B4=EB=8F=99=20/=20=EC=83=81=EB=8B=A8?= =?UTF-8?q?=EC=97=90=20=EB=8F=84=EB=A9=B4=EC=9E=91=EC=84=B1=20=EB=B2=84?= =?UTF-8?q?=ED=8A=BC=EC=9C=BC=EB=A1=9C=20=EC=9D=B4=EB=8F=99=EC=8B=9C=20Sel?= =?UTF-8?q?ectedMenu=20=EB=B6=84=EB=A6=AC=EC=B2=98=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/management/StuffDetail.jsx | 20 +++++++------------- src/components/management/StuffSubHeader.jsx | 15 ++++++++++++++- 2 files changed, 21 insertions(+), 14 deletions(-) diff --git a/src/components/management/StuffDetail.jsx b/src/components/management/StuffDetail.jsx index aacaeea4..0c825c20 100644 --- a/src/components/management/StuffDetail.jsx +++ b/src/components/management/StuffDetail.jsx @@ -1625,17 +1625,6 @@ export default function StuffDetail() { input.value = input.value.replace(/[^0-9]/g, '') } - //자동완성 옵션 없을때 메세지 컴포넌트.. - const NoOptionsMessage = (props) => { - return ( - - - TEXTTTTTTT - - - ) - } - // 그리드 더블 클릭 해당플랜의 도면작성 화면으로 이동 const getCellDoubleClicked = (params) => { if (managementState?.createSaleStoreId === 'T01') { @@ -1653,7 +1642,13 @@ export default function StuffDetail() { pid: planNo, objectNo: objectNo, } - setSelectedMenu(null) + // 견적서 생성 여부에 따라 selectedMenu 셋팅 + if (params?.data?.estimateDate) { + setSelectedMenu('module') + } else { + setSelectedMenu('surface') + } + const url = `/floor-plan?${queryStringFormatter(param)}` router.push(url) } @@ -1946,7 +1941,6 @@ export default function StuffDetail() {
{ - handleChangeTabsData({ ...s, range: e.target.value }) - }} - /> - { - handleChangeTabsData({ ...s, maker: e.target.value }) - }} - /> - { - handleChangeTabsData({ ...s, law: e.target.value }) - }} - /> - { - handleChangeTabsData({ ...s, basis: e.target.value }) - }} - /> -
- - - - ))} - - - - ) -} From 15c51547ce9a7b47801c87ca622b5c45702b0bcc Mon Sep 17 00:00:00 2001 From: "hyojun.choi" Date: Thu, 27 Feb 2025 10:09:06 +0900 Subject: [PATCH 5/5] =?UTF-8?q?=EA=B0=80=EB=8C=80=20=EA=B4=80=EB=A0=A8=20i?= =?UTF-8?q?tem=20=EC=83=81=EC=88=98=ED=99=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/common/common.js | 9 +++++++++ src/hooks/module/useTrestle.js | 34 +++++++++++++++++----------------- 2 files changed, 26 insertions(+), 17 deletions(-) diff --git a/src/common/common.js b/src/common/common.js index 1452aa3a..ca472a11 100644 --- a/src/common/common.js +++ b/src/common/common.js @@ -116,6 +116,15 @@ export const POLYGON_TYPE = { OBJECT_SURFACE: 'objectOffset', } +// 가대 관련 상수 +export const TRESTLE_MATERIAL = { + EAVE_BAR: 'eaveBar', + HALF_EAVE_BAR: 'halfEaveBar', + RACK: 'rack', + SMART_RACK: 'smartRack', + BRACKET: 'bracket', +} + export const SAVE_KEY = [ 'selectable', 'name', diff --git a/src/hooks/module/useTrestle.js b/src/hooks/module/useTrestle.js index 38c56f84..2b35aaf6 100644 --- a/src/hooks/module/useTrestle.js +++ b/src/hooks/module/useTrestle.js @@ -1,6 +1,6 @@ import { useRecoilValue } from 'recoil' import { canvasState, currentAngleTypeSelector } from '@/store/canvasAtom' -import { POLYGON_TYPE } from '@/common/common' +import { POLYGON_TYPE, TRESTLE_MATERIAL } from '@/common/common' import { moduleSelectionDataState } from '@/store/selectedModuleOptions' import { getDegreeByChon } from '@/util/canvas-util' import { v4 as uuidv4 } from 'uuid' @@ -147,7 +147,7 @@ export const useTrestle = () => { if (!bottomPoints) return const eaveBar = new fabric.Line([bottomPoints[0].x, bottomPoints[0].y, bottomPoints[1].x, bottomPoints[1].y], { parent: surface, - name: 'eaveBar', + name: TRESTLE_MATERIAL.EAVE_BAR, stroke: 'blue', strokeWidth: 4, selectable: false, @@ -178,7 +178,7 @@ export const useTrestle = () => { if (!bottomPoints) return const halfEaveBar = new fabric.Line(barPoints, { parent: surface, - name: 'halfEaveBar', + name: TRESTLE_MATERIAL.HALF_EAVE_BAR, stroke: 'blue', strokeWidth: 4, selectable: false, @@ -208,7 +208,7 @@ export const useTrestle = () => { if (!bottomPoints) return const halfEaveBar = new fabric.Line(barPoints, { parent: surface, - name: 'halfEaveBar', + name: TRESTLE_MATERIAL.HALF_EAVE_BAR, stroke: 'blue', strokeWidth: 4, selectable: false, @@ -1086,7 +1086,7 @@ export const useTrestle = () => { rackLength = getTrestleLength(setRackTpLen, degree) / 10 if (setRackTpCd === 'RACK') { const rack = new fabric.Line([startPointX, startPointY, startPointX, startPointY - rackLength], { - name: 'smartRack', + name: TRESTLE_MATERIAL.SMART_RACK, stroke: 'red', strokeWidth: 4, selectable: true, @@ -1117,7 +1117,7 @@ export const useTrestle = () => { }) } else { const rack = new fabric.Line([startPointX, startPointY, startPointX, startPointY - rackLength], { - name: 'rack', + name: TRESTLE_MATERIAL.RACK, stroke: 'red', strokeWidth: 4, selectable: false, @@ -1159,7 +1159,7 @@ export const useTrestle = () => { rackLength = getTrestleLength(setRackTpLen, degree) / 10 if (setRackTpCd === 'RACK') { const rack = new fabric.Line([startPointX, startPointY, startPointX - rackLength, startPointY], { - name: 'smartRack', + name: TRESTLE_MATERIAL.SMART_RACK, stroke: 'red', strokeWidth: 4, selectable: false, @@ -1190,7 +1190,7 @@ export const useTrestle = () => { }) } else { const rack = new fabric.Line([startPointX, startPointY, startPointX - rackLength, startPointY], { - name: 'rack', + name: TRESTLE_MATERIAL.RACK, stroke: 'red', shadow: { color: 'black', // Outline color @@ -1231,7 +1231,7 @@ export const useTrestle = () => { rackLength = getTrestleLength(setRackTpLen, degree) / 10 if (setRackTpCd === 'RACK') { const rack = new fabric.Line([startPointX, startPointY, startPointX + rackLength, startPointY], { - name: 'smartRack', + name: TRESTLE_MATERIAL.SMART_RACK, stroke: 'red', strokeWidth: 4, selectable: false, @@ -1262,7 +1262,7 @@ export const useTrestle = () => { }) } else { const rack = new fabric.Line([startPointX, startPointY, startPointX + rackLength, startPointY], { - name: 'rack', + name: TRESTLE_MATERIAL.RACK, stroke: 'red', shadow: { color: 'black', // Outline color @@ -1301,7 +1301,7 @@ export const useTrestle = () => { rackLength = getTrestleLength(setRackTpLen, degree) / 10 if (setRackTpCd === 'RACK') { const rack = new fabric.Line([startPointX, startPointY, startPointX, startPointY + rackLength], { - name: 'smartRack', + name: TRESTLE_MATERIAL.SMART_RACK, stroke: 'red', strokeWidth: 4, selectable: false, @@ -1332,7 +1332,7 @@ export const useTrestle = () => { }) } else { const rack = new fabric.Line([startPointX, startPointY, startPointX, startPointY + rackLength], { - name: 'rack', + name: TRESTLE_MATERIAL.RACK, stroke: 'red', shadow: { color: 'black', // Outline color @@ -1394,7 +1394,7 @@ export const useTrestle = () => { left: x2 - bracketLength / 3, top: len, fill: 'green', - name: 'bracket', + name: TRESTLE_MATERIAL.BRACKET, parentId: rack.parentId, visible: isTrestleDisplay, surfaceId: surface.id, @@ -1416,7 +1416,7 @@ export const useTrestle = () => { left: len, top: y2 - bracketLength / 3, fill: 'green', - name: 'bracket', + name: TRESTLE_MATERIAL.BRACKET, parentId: rack.parentId, visible: isTrestleDisplay, surfaceId: surface.id, @@ -1441,7 +1441,7 @@ export const useTrestle = () => { parentId: rack.parentId, visible: isTrestleDisplay, surfaceId: surface.id, - name: 'bracket', + name: TRESTLE_MATERIAL.BRACKET, width: bracketLength, height: bracketLength, selectable: false, @@ -1459,7 +1459,7 @@ export const useTrestle = () => { left: x2 - bracketLength / 3, top: len, fill: 'green', - name: 'bracket', + name: TRESTLE_MATERIAL.BRACKET, parentId: rack.parentId, visible: isTrestleDisplay, surfaceId: surface.id, @@ -1645,7 +1645,7 @@ export const useTrestle = () => { left: startPointX - 5, top: startPointY - 5, fill: 'green', - name: 'bracket', + name: TRESTLE_MATERIAL.BRACKET, parentId: module.id, surfaceId: module.surfaceId, width: 10,