From 5bf483eb8b79bccf6f5fefb1220e6edfdb814c88 Mon Sep 17 00:00:00 2001 From: yoosangwook Date: Wed, 5 Feb 2025 15:09:02 +0900 Subject: [PATCH 1/9] =?UTF-8?q?=F0=9F=93=8Cfix:=20QcastProvider=20?= =?UTF-8?q?=EC=9C=84=EC=B9=98=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/layout.js | 40 +++++++++++++++++++++------------------- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/src/app/layout.js b/src/app/layout.js index 8c78f6c7..c68f8127 100644 --- a/src/app/layout.js +++ b/src/app/layout.js @@ -58,26 +58,28 @@ export default async function RootLayout({ children }) { return ( - - - {headerPathname === '/login' || headerPathname === '/join' ? ( - {children} - ) : ( - - -
-
-
- {children} + + + + {headerPathname === '/login' || headerPathname === '/join' ? ( + { children } + ) : ( + <> + +
+
+
+ {children} +
+
-
-
- - )} - - - - + + )} + + + + + ) From fbb4183e25b4e8968ed34b3c930ddabfc7dc6367 Mon Sep 17 00:00:00 2001 From: basssy Date: Wed, 5 Feb 2025 15:19:37 +0900 Subject: [PATCH 2/9] =?UTF-8?q?=EB=AC=BC=EA=B1=B4=EC=83=81=EC=84=B8&=20?= =?UTF-8?q?=EA=B2=AC=EC=A0=81=EC=84=9C=EC=83=81=EC=84=B8=20=EB=AC=B8?= =?UTF-8?q?=EC=84=9C=EB=8B=A4=EC=9A=B4=EB=A1=9C=EB=93=9C=20=ED=8C=9D?= =?UTF-8?q?=EC=97=85=20=EB=A6=AC=EC=BD=94=EC=9D=BC=20=EA=B4=80=EB=A0=A8=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/estimate/popup/DocDownOptionPop.jsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/estimate/popup/DocDownOptionPop.jsx b/src/components/estimate/popup/DocDownOptionPop.jsx index 50dfd018..25461dc6 100644 --- a/src/components/estimate/popup/DocDownOptionPop.jsx +++ b/src/components/estimate/popup/DocDownOptionPop.jsx @@ -4,13 +4,14 @@ import { useMessage } from '@/hooks/useMessage' import { useAxios } from '@/hooks/useAxios' import { useRecoilValue } from 'recoil' import { floorPlanObjectState, estimateState } from '@/store/floorPlanObjectAtom' -import { usePathname } from 'next/navigation' +import { usePathname, useSearchParams } from 'next/navigation' export default function DocDownOptionPop({ planNo, setEstimatePopupOpen, docDownPopLockFlg }) { const { getMessage } = useMessage() const { promisePost } = useAxios() const pathName = usePathname() + const searchParams = useSearchParams() //EXCEL, PDF 구분 const [schDownload, setSchDownload] = useState('EXCEL') @@ -53,8 +54,9 @@ export default function DocDownOptionPop({ planNo, setEstimatePopupOpen, docDown defaultSchDrawingFlg = defaultSchDrawingFlg.concat('|', '2', '|', '3') } + //objectRecoil.floorPlanObjectNo가 비워지는 경우가 있어서 없으면 url에서 뺴오도록 추가 const params = { - objectNo: objectRecoil.floorPlanObjectNo, + objectNo: objectRecoil?.floorPlanObjectNo ? objectRecoil.floorPlanObjectNo : searchParams.get('objectNo'), planNo: planNo, schDownload: schDownload, schUnitPriceFlg: sendUnitPriceFlg, From f30a2f7c30341a6bf50fdb65dc21b44a1727f567 Mon Sep 17 00:00:00 2001 From: yoosangwook Date: Wed, 5 Feb 2025 15:23:58 +0900 Subject: [PATCH 3/9] =?UTF-8?q?=F0=9F=9A=A8fix:=20=ED=9A=8C=EB=A1=9C=20?= =?UTF-8?q?=EC=84=A4=EC=A0=95=20=EB=A9=94=EB=89=B4=20=EC=A7=84=EC=9E=85?= =?UTF-8?q?=EC=8B=9C=20objectNo=20=EC=9E=83=EC=96=B4=EB=B2=84=EB=A6=AC?= =?UTF-8?q?=EB=8A=94=20=ED=98=84=EC=83=81=20=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hooks/usePlan.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/hooks/usePlan.js b/src/hooks/usePlan.js index 3691035e..f3b89fe3 100644 --- a/src/hooks/usePlan.js +++ b/src/hooks/usePlan.js @@ -296,7 +296,10 @@ export function usePlan(params = {}) { const handleCurrentPlanUrl = () => { const currentPlan = plans.find((plan) => plan.isCurrent) - if (currentPlan) router.push(`${pathname}?pid=${currentPlan?.planNo}&objectNo=${floorPlanState?.objectNo}`) + // if (currentPlan) router.push(`${pathname}?pid=${currentPlan?.planNo}&objectNo=${floorPlanState?.objectNo}`) + if (currentPlan !== currentCanvasPlan) { + router.push(`${pathname}?pid=${currentPlan?.planNo}&objectNo=${currentPlan.objectNo}`) + } } const setBgImage = () => { From 9754fb6049701aa234f25e3be95486468ac63851 Mon Sep 17 00:00:00 2001 From: yoosangwook Date: Wed, 5 Feb 2025 15:33:31 +0900 Subject: [PATCH 4/9] =?UTF-8?q?=F0=9F=9A=A8fix:=20handleCurrentPlanUrl=20?= =?UTF-8?q?=EC=A3=BC=EC=84=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hooks/usePlan.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/hooks/usePlan.js b/src/hooks/usePlan.js index f3b89fe3..dd3c2739 100644 --- a/src/hooks/usePlan.js +++ b/src/hooks/usePlan.js @@ -298,7 +298,9 @@ export function usePlan(params = {}) { const currentPlan = plans.find((plan) => plan.isCurrent) // if (currentPlan) router.push(`${pathname}?pid=${currentPlan?.planNo}&objectNo=${floorPlanState?.objectNo}`) if (currentPlan !== currentCanvasPlan) { - router.push(`${pathname}?pid=${currentPlan?.planNo}&objectNo=${currentPlan.objectNo}`) + // todo: [유상욱] 현재 플랜과 현재 캔버스 플랜이 다른 경우 플랜 이동 + // 우선 주석처리 + // router.push(`${pathname}?pid=${currentPlan?.planNo}&objectNo=${currentPlan.objectNo}`) } } From bd31ce079135ca09b7d68df4084fac4af671fff9 Mon Sep 17 00:00:00 2001 From: "hyojun.choi" Date: Wed, 5 Feb 2025 16:00:23 +0900 Subject: [PATCH 5/9] =?UTF-8?q?api=20error=20=EC=B2=98=EB=A6=AC=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 --- src/hooks/module/useTrestle.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/hooks/module/useTrestle.js b/src/hooks/module/useTrestle.js index c9a0184b..c04bb3ce 100644 --- a/src/hooks/module/useTrestle.js +++ b/src/hooks/module/useTrestle.js @@ -6,6 +6,7 @@ import { getDegreeByChon } from '@/util/canvas-util' import { v4 as uuidv4 } from 'uuid' import { useMasterController } from '@/hooks/common/useMasterController' import { basicSettingState } from '@/store/settingAtom' +import { useSwal } from '@/hooks/useSwal' // 회로 및 가대설정 export const useTrestle = () => { @@ -14,7 +15,7 @@ export const useTrestle = () => { const { getQuotationItem } = useMasterController() const currentAngleType = useRecoilValue(currentAngleTypeSelector) const roofSizeSet = useRecoilValue(basicSettingState).roofSizeSet - + const { swalFire } = useSwal() const apply = () => { try { //처마력바가 체크되어 있는 경우 exposedBottomPoints를 이용해 처마력바 그려줘야함. @@ -616,11 +617,13 @@ export const useTrestle = () => { }) const params = { trestles: surfaces.map((surface) => surface.quotationParam), pcses } //견적서 itemList 조회 - const res = await getQuotationItem(params) - if (!res.data) { + const { data: itemList, data2, result } = await getQuotationItem(params) + + if (result.resultCode === 'E') { + swalFire({ text: result.resultMsg, icon: 'error' }) return null } - const itemList = res.data + //northArrangement 북면 설치 여부 const northArrangement = getNorthArrangement() // circuitItemList의 경우는 moduleList에서 circuitId만 groupBy한다. @@ -678,10 +681,7 @@ export const useTrestle = () => { } }) - const estimateParam = { itemList, northArrangement, roofSurfaceList, circuitItemList } - - // 정상적으로 완료 되면 true 반환 - return estimateParam + return { itemList, northArrangement, roofSurfaceList, circuitItemList } } const getNorthArrangement = () => { From 936b6c0458f958f4d8a4560e976217789f280d75 Mon Sep 17 00:00:00 2001 From: yoosangwook Date: Wed, 5 Feb 2025 16:17:10 +0900 Subject: [PATCH 6/9] =?UTF-8?q?=F0=9F=93=8Cfix:=20addPlan=20=EB=B2=84?= =?UTF-8?q?=ED=8A=BC=20=EC=A1=B0=EA=B1=B4=EB=B6=80=20=EB=A0=8C=EB=8D=94?= =?UTF-8?q?=EB=A7=81=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/floor-plan/CanvasLayout.jsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/floor-plan/CanvasLayout.jsx b/src/components/floor-plan/CanvasLayout.jsx index bc1a4007..499fac57 100644 --- a/src/components/floor-plan/CanvasLayout.jsx +++ b/src/components/floor-plan/CanvasLayout.jsx @@ -1,6 +1,7 @@ 'use client' import { useContext, useEffect } from 'react' +import { usePathname } from 'next/navigation' import { useRecoilValue } from 'recoil' import { FloorPlanContext } from '@/app/floor-plan/FloorPlanProvider' import { SessionContext } from '@/app/SessionProvider' @@ -12,6 +13,7 @@ import { globalLocaleStore } from '@/store/localeAtom' export default function CanvasLayout({ children }) { // const { menuNumber } = props + const pathname = usePathname() const { menuNumber } = useCanvasMenu() const { session } = useContext(SessionContext) const { floorPlanState } = useContext(FloorPlanContext) @@ -54,7 +56,7 @@ export default function CanvasLayout({ children }) { ))}
- {plans.length < 10 && ( + {plans.length < 10 && !pathname.includes('/estimate') && !pathname.includes('/simulator') && (