diff --git a/src/app/floor-plan/FloorPlanProvider.js b/src/app/floor-plan/FloorPlanProvider.js index 37399ddd..649deb78 100644 --- a/src/app/floor-plan/FloorPlanProvider.js +++ b/src/app/floor-plan/FloorPlanProvider.js @@ -23,6 +23,17 @@ const defaultEstimateData = { priceCd: '', } +/** + * 모듈,회로 구성 상태 데이터 + * 각 설정 팝업 상태를 저장하는 데이터 + */ +const defaultProcessStep = { + gnbStep: 0, + processStep: 0, + moduleCofigureData: {}, + pcsConfigureData: {}, +} + export const FloorPlanContext = createContext({ floorPlanState: {}, setFloorPlanState: () => {}, @@ -57,8 +68,12 @@ const FloorPlanProvider = ({ children }) => { const [estimateContextState, setEstimateContextState] = useReducer(reducer, defaultEstimateData) + const [processStepState, setProcessStepState] = useReducer(reducer, defaultProcessStep) + return ( - + {children} ) diff --git a/src/app/floor-plan/layout.js b/src/app/floor-plan/layout.js index e87ca2e8..5ea3b08c 100644 --- a/src/app/floor-plan/layout.js +++ b/src/app/floor-plan/layout.js @@ -1,9 +1,9 @@ 'use client' +import { usePathname } from 'next/navigation' import FloorPlanProvider from './FloorPlanProvider' import FloorPlan from '@/components/floor-plan/FloorPlan' import CanvasLayout from '@/components/floor-plan/CanvasLayout' -import { usePathname } from 'next/navigation' export default function FloorPlanLayout({ children }) { console.log('🚀 ~ FloorPlanLayout ~ FloorPlanLayout:') diff --git a/src/components/estimate/Estimate.jsx b/src/components/estimate/Estimate.jsx index 4241f916..990f4007 100644 --- a/src/components/estimate/Estimate.jsx +++ b/src/components/estimate/Estimate.jsx @@ -993,7 +993,11 @@ export default function Estimate({}) { {/* 2차 판매점명 */} {getMessage('estimate.detail.otherSaleStoreId')} - {estimateContextState?.agencySaleStoreName} + + {session?.storeLvl === '1' && estimateContextState?.saleStoreLevel === '1' + ? getMessage('estimate.detail.noOtherSaleStoreId') + : estimateContextState?.agencySaleStoreName} + {/* 담당자 */} {getMessage('estimate.detail.receiveUser')} * diff --git a/src/components/floor-plan/CanvasMenu.jsx b/src/components/floor-plan/CanvasMenu.jsx index d61c29c6..91173b89 100644 --- a/src/components/floor-plan/CanvasMenu.jsx +++ b/src/components/floor-plan/CanvasMenu.jsx @@ -135,6 +135,15 @@ export default function CanvasMenu(props) { const onClickNav = (menu) => { switch (menu.index) { + case 0: + swalFire({ + text: getMessage('stuff.detail.move.confirmMsg'), + type: 'confirm', + confirmFn: () => { + router.push(`/management/stuff/detail?objectNo=${objectNo}`) + }, + }) + break case 1: setType('placementShape') onClickPlacementInitialMenu() @@ -153,6 +162,11 @@ export default function CanvasMenu(props) { case 4: setType('module') break + case 5: + setMenuNumber(menu.index) + setCurrentMenu(menu.title) + router.push(`/floor-plan/estimate/5?pid=${pid}&objectNo=${objectNo}`) + break case 6: promiseGet({ url: `/api/estimate/${objectNo}/${pid}/detail` }).then((res) => { if (res.status === 200) { @@ -169,12 +183,14 @@ export default function CanvasMenu(props) { break } - if (menu.index !== 6) { + if (menu.index !== 6 && menu.index !== 0) { setMenuNumber(menu.index) setCurrentMenu(menu.title) } - if (pathname !== '/floor-plan') router.push(`/floor-plan?pid=${pid}&objectNo=${objectNo}`) + if (pathname !== '/floor-plan' && pathname !== '/floor-plan/estimate/5') { + router.push(`/floor-plan?pid=${pid}&objectNo=${objectNo}`) + } } const changeSelectedRoofMaterial = (e) => { @@ -236,6 +252,7 @@ export default function CanvasMenu(props) { // 견적서 초기화 버튼 const handleEstimateReset = () => { + return alert('개발전입니다;;;') // console.log('estimateRecoilState::', estimateRecoilState) //objectNo, planNo swalFire({ diff --git a/src/components/floor-plan/modal/roofAllocation/RoofAllocationSetting.jsx b/src/components/floor-plan/modal/roofAllocation/RoofAllocationSetting.jsx index 0a46e18f..dbd4d992 100644 --- a/src/components/floor-plan/modal/roofAllocation/RoofAllocationSetting.jsx +++ b/src/components/floor-plan/modal/roofAllocation/RoofAllocationSetting.jsx @@ -11,6 +11,9 @@ import { useCanvasSetting } from '@/hooks/option/useCanvasSetting' import { useCommonCode } from '@/hooks/common/useCommonCode' import { globalLocaleStore } from '@/store/localeAtom' import { useRoofShapeSetting } from '@/hooks/roofcover/useRoofShapeSetting' +import { currentAngleTypeSelector, pitchTextSelector } from '@/store/canvasAtom' +import { getDegreeByChon } from '@/util/canvas-util' +import { onlyNumberWithDotInputChange } from '@/util/input-utils' export default function RoofAllocationSetting(props) { const contextPopupPosition = useRecoilValue(contextPopupPositionState) @@ -29,11 +32,13 @@ export default function RoofAllocationSetting(props) { handleChangeRaft, handleChangeLayout, currentRoofList, + handleChangeInput, } = useRoofAllocationSetting(id) - const { pitchText } = useRoofShapeSetting(id) + const pitchText = useRecoilValue(pitchTextSelector) const { findCommonCode } = useCommonCode() const [raftCodes, setRaftCodes] = useState([]) const globalLocale = useRecoilValue(globalLocaleStore) + const currentAngleType = useRecoilValue(currentAngleTypeSelector) useEffect(() => { const raftCodeList = findCommonCode('203800') setRaftCodes(raftCodeList.map((raft) => ({ ...raft, name: raft.clCodeNm }))) @@ -110,7 +115,14 @@ export default function RoofAllocationSetting(props) {
{getMessage('slope')}
- + { + handleChangeInput(e, 'pitch', index) + }} + defaultValue={currentAngleType === 'slope' ? roof.pitch : getDegreeByChon(roof.pitch)} + />
{pitchText}
@@ -121,7 +133,13 @@ export default function RoofAllocationSetting(props) {
W
- + handleChangeInput(e, 'width', index)} + readOnly={roof.widAuth === 'R'} + />
)} @@ -129,7 +147,13 @@ export default function RoofAllocationSetting(props) {
L
- + handleChangeInput(e, 'length', index)} + readOnly={roof.lenAuth === 'R'} + />
)} @@ -164,6 +188,7 @@ export default function RoofAllocationSetting(props) { handleChangeInput(e, 'hajebichi', index)} value={parseInt(roof.hajebichi)} readOnly={roof.roofPchAuth === 'R'} /> diff --git a/src/components/management/StuffDetail.jsx b/src/components/management/StuffDetail.jsx index 9912a180..506df945 100644 --- a/src/components/management/StuffDetail.jsx +++ b/src/components/management/StuffDetail.jsx @@ -331,7 +331,7 @@ export default function StuffDetail() { //createUser가 T01인데 로그인사용자가 T01이 아니면 버튼숨기기 setShowButton('none') } - console.log('상세::', res.data) + // console.log('상세::', res.data) if (isObjectNotEmpty(res.data)) { let surfaceTypeValue if (res.data.surfaceType === 'Ⅲ・Ⅳ') { diff --git a/src/components/management/popup/PlanRequestPop.jsx b/src/components/management/popup/PlanRequestPop.jsx index 228a5b20..2dafe914 100644 --- a/src/components/management/popup/PlanRequestPop.jsx +++ b/src/components/management/popup/PlanRequestPop.jsx @@ -19,7 +19,7 @@ export default function PlanRequestPop(props) { //공통코드 const { commonCode, findCommonCode } = useCommonCode() - const [planStatCdList, setPlanStatCdList] = useState([]) + // const [planStatCdList, setPlanStatCdList] = useState([]) const globalLocaleState = useRecoilValue(globalLocaleStore) @@ -169,13 +169,13 @@ export default function PlanRequestPop(props) { gridData: [], isPageable: false, gridColumns: [ - { - field: 'planStatName', - headerName: getMessage('stuff.planReqPopup.gridHeader.planStatName'), - minWidth: 150, - checkboxSelection: true, - showDisabledCheckboxes: true, - }, + // { + // field: 'planStatName', + // headerName: getMessage('stuff.planReqPopup.gridHeader.planStatName'), + // minWidth: 150, + // checkboxSelection: true, + // showDisabledCheckboxes: true, + // }, { field: 'planReqNo', headerName: getMessage('stuff.planReqPopup.gridHeader.planReqNo'), @@ -234,12 +234,12 @@ export default function PlanRequestPop(props) { } } - useEffect(() => { - const code1 = findCommonCode(115800) //상태 - if (code1 != null) { - setPlanStatCdList(code1) - } - }, [commonCode]) + // useEffect(() => { + // const code1 = findCommonCode(115800) //상태 + // if (code1 != null) { + // setPlanStatCdList(code1) + // } + // }, [commonCode]) useEffect(() => { onSubmit(pageNo, 'S') @@ -380,7 +380,7 @@ export default function PlanRequestPop(props) { /> - {getMessage('stuff.planReqPopup.search.planStatName')} + {/* {getMessage('stuff.planReqPopup.search.planStatName')}