diff --git a/.env.development b/.env.development index 50d1be04..cfc50e71 100644 --- a/.env.development +++ b/.env.development @@ -1,10 +1,11 @@ NEXT_PUBLIC_API_SERVER_PATH="http://1.248.227.176:38080" -NEXT_PUBLIC_HOST_URL="http://localhost:4000" +NEXT_PUBLIC_HOST_URL="http://1.248.227.176:4000" SESSION_SECRET="i3iHH1yp2/2SpQSIySQ4bpyc4g0D+zCF9FAn5xUG0+Y=" -NEXT_PUBLIC_CONVERTER_API_URL="https://v2.convertapi.com/convert/dwg/to/png?Secret=secret_bV5zuYMyyIYFlOb3" +# NEXT_PUBLIC_CONVERTER_API_URL="https://v2.convertapi.com/convert/dwg/to/png?Secret=secret_bV5zuYMyyIYFlOb3" +NEXT_PUBLIC_CONVERTER_API_URL="https://v2.convertapi.com/convert/dwg/to/png?Secret=secret_yAS4QDalL9jgQ7vS" NEXT_PUBLIC_Q_ORDER_AUTO_LOGIN_URL="http://q-order-stg.q-cells.jp:8120/eos/login/autoLogin" NEXT_PUBLIC_Q_MUSUBI_AUTO_LOGIN_URL="http://q-musubi-stg.q-cells.jp:8120/qm/login/autoLogin" \ No newline at end of file diff --git a/.env.production b/.env.production index 517ae831..381c7264 100644 --- a/.env.production +++ b/.env.production @@ -1,10 +1,11 @@ NEXT_PUBLIC_API_SERVER_PATH="http://1.248.227.176:38080" -NEXT_PUBLIC_HOST_URL="http://localhost:4000" +NEXT_PUBLIC_HOST_URL="http://1.248.227.176:4000" SESSION_SECRET="i3iHH1yp2/2SpQSIySQ4bpyc4g0D+zCF9FAn5xUG0+Y=" -NEXT_PUBLIC_CONVERTER_API_URL="https://v2.convertapi.com/convert/dwg/to/png?Secret=secret_bV5zuYMyyIYFlOb3" +# NEXT_PUBLIC_CONVERTER_API_URL="https://v2.convertapi.com/convert/dwg/to/png?Secret=secret_bV5zuYMyyIYFlOb3" +NEXT_PUBLIC_CONVERTER_API_URL="https://v2.convertapi.com/convert/dwg/to/png?Secret=secret_yAS4QDalL9jgQ7vS" NEXT_PUBLIC_Q_ORDER_AUTO_LOGIN_URL="https://q-order.q-cells.jp/eos/login/autoLogin" NEXT_PUBLIC_Q_MUSUBI_AUTO_LOGIN_URL="https://q-musubi.q-cells.jp/qm/login/autoLogin" \ No newline at end of file diff --git a/src/components/auth/AutoLogin.jsx b/src/components/auth/AutoLogin.jsx index 0d539cbb..d400f2c4 100644 --- a/src/components/auth/AutoLogin.jsx +++ b/src/components/auth/AutoLogin.jsx @@ -1,21 +1,27 @@ 'use client' +import { useState } from 'react' import { useMessage } from '@/hooks/useMessage' +import GlobalSpinner from '@/components/common/spinner/GlobalSpinner' export default function AutoLoginPage() { + const [isLoading, setIsLoading] = useState(true) const { getMessage } = useMessage() return ( -
-
- {getMessage('site.name')} - {getMessage('site.sub_name')} -
-
-
- {getMessage('login.auto.page.text')} + <> + {isLoading && } +
+
+ {getMessage('site.name')} + {getMessage('site.sub_name')} +
+
+
+ {getMessage('login.auto.page.text')} +
-
+ ) } diff --git a/src/components/auth/Login.jsx b/src/components/auth/Login.jsx index eca80361..b23f9c53 100644 --- a/src/components/auth/Login.jsx +++ b/src/components/auth/Login.jsx @@ -10,14 +10,15 @@ import { useMessage } from '@/hooks/useMessage' import { globalLocaleStore } from '@/store/localeAtom' import { sessionStore } from '@/store/commonAtom' import { useRouter } from 'next/navigation' - -import Cookies from 'js-cookie' - import { useSearchParams } from 'next/navigation' +import GlobalSpinner from '@/components/common/spinner/GlobalSpinner' +import Cookies from 'js-cookie' import AutoLogin from './AutoLogin' export default function Login() { + const [isLoading, setIsLoading] = useState(false) + // 자동 로그인 const initParams = useSearchParams() const autoLoginParam = initParams.get('autoLoginParam1') @@ -35,11 +36,13 @@ export default function Login() { }, []) const autoLoginProcess = async (autoLoginParam) => { + setIsLoading(true) await promisePost({ url: '/api/login/v1.0/user/login/autoLoginDecryptData', data: { loginId: autoLoginParam } }) .then((res) => { if (res) { if (res.data) { post({ url: '/api/login/v1.0/user', data: { loginId: res.data } }).then((response) => { + setIsLoading(false) if (response) { const result = { ...response, storeLvl: response.groupId === '60000' ? '1' : '2', pwdInitYn: 'Y' } setSession(result) @@ -53,6 +56,7 @@ export default function Login() { } }) .catch((error) => { + setIsLoading(false) router.push('/login') }) } @@ -93,9 +97,11 @@ export default function Login() { loginId: formData.get('id'), pwd: formData.get('password'), } + setIsLoading(true) await promisePost({ url: '/api/login/v1.0/login', data: param }) .then((res) => { if (res) { + setIsLoading(false) if (res.data.result.resultCode === 'S') { setSession(res.data.data) setSessionState(res.data.data) @@ -105,7 +111,6 @@ export default function Login() { } else { Cookies.remove('chkLoginId') } - // router.push('/') login() } else { alert(res.data.result.resultMsg) @@ -113,6 +118,7 @@ export default function Login() { } }) .catch((error) => { + setIsLoading(false) alert(error.response.data.message) }) } @@ -123,12 +129,14 @@ export default function Login() { loginId: checkId, email: checkEmail, } + setIsLoading(true) await promisePatch({ url: '/api/login/v1.0/user/init-password', data: param, }) .then((res) => { if (res) { + setIsLoading(false) if (res.data.result.resultCode == 'S') { alert(getMessage('login.init_password.complete_message')) setCheckId('') @@ -140,36 +148,135 @@ export default function Login() { } }) .catch((error) => { + setIsLoading(false) alert(error.response.data.message) }) } return ( -
-
- - react - - {!autoLoginParam && passwordReset === 1 && ( - <> -
-
-
- {getMessage('site.name')} - {getMessage('site.sub_name')} + <> + {isLoading && } +
+
+ + react + + {!autoLoginParam && passwordReset === 1 && ( + <> +
+ +
+ {getMessage('site.name')} + {getMessage('site.sub_name')} +
+
+
+ { + setUserId(e.target.value) + }} + onFocus={() => setIdFocus(true)} + onBlur={() => setIdFocus(false)} + /> + +
+
+ { + setPasswordVisible(passwordVisible) + }} + onFocus={() => setSecFocus(true)} + onBlur={() => setSecFocus(false)} + /> + +
+
+ { + setChkLoginId(e.target.checked) + }} + /> + +
+
+ +
+
+ +
+
+ +
+
+ + {getMessage('login.guide.text')} +
+ {getMessage('login.guide.sub1')} {getMessage('login.guide.join.btn')} + {getMessage('login.guide.sub2')} +
+ + )} + {!autoLoginParam && passwordReset === 2 && ( + <> +
+
+ {getMessage('login.init_password.title')} + {getMessage('login.init_password.sub_title')}
{ - setUserId(e.target.value) + setCheckId(e.target.value) }} onFocus={() => setIdFocus(true)} onBlur={() => setIdFocus(false)} @@ -177,146 +284,58 @@ export default function Login() {
-
+
{ - setPasswordVisible(passwordVisible) + setCheckEmail(e.target.value) }} + placeholder={getMessage('login.init_password.email.placeholder')} onFocus={() => setSecFocus(true)} onBlur={() => setSecFocus(false)} />
-
- { - setChkLoginId(e.target.checked) +
+
-
- -
-
-
- -
-
- - {getMessage('login.guide.text')} -
- {getMessage('login.guide.sub1')} {getMessage('login.guide.join.btn')} - {getMessage('login.guide.sub2')} -
- - )} - {!autoLoginParam && passwordReset === 2 && ( - <> -
-
- {getMessage('login.init_password.title')} - {getMessage('login.init_password.sub_title')}
-
-
- { - setCheckId(e.target.value) - }} - onFocus={() => setIdFocus(true)} - onBlur={() => setIdFocus(false)} - /> - -
-
- { - setCheckEmail(e.target.value) - }} - placeholder={getMessage('login.init_password.email.placeholder')} - onFocus={() => setSecFocus(true)} - onBlur={() => setSecFocus(false)} - /> - -
-
- - -
-
-
- - )} - {autoLoginParam && } + + )} + {autoLoginParam && } +
+
COPYRIGHT©2024 Hanwha Japan All Rights Reserved.
-
COPYRIGHT©2024 Hanwha Japan All Rights Reserved.
-
+ ) } diff --git a/src/components/estimate/Estimate.jsx b/src/components/estimate/Estimate.jsx index b5d8bce0..18fd2343 100644 --- a/src/components/estimate/Estimate.jsx +++ b/src/components/estimate/Estimate.jsx @@ -1188,7 +1188,7 @@ export default function Estimate({}) { @@ -1206,7 +1206,7 @@ export default function Estimate({}) { @@ -1297,13 +1297,13 @@ export default function Estimate({}) { //사양시공 let constructSpecificationMulti = estimateContextState?.constructSpecificationMulti?.split('、') return ( -
+
- +
{constructSpecificationMulti ? (
- +
) : null}
@@ -1316,7 +1316,6 @@ export default function Estimate({}) { {getMessage('estimate.detail.remarks')}
- {/* */} + onClick={(e) => { + //삭제 아이콘 눌렀는데 handleCurrentPlan실행되서 추가 + e.stopPropagation() swalFire({ text: `Plan ${plan.planNo} ` + getMessage('plan.message.confirm.delete'), type: 'confirm', @@ -50,7 +52,7 @@ export default function CanvasLayout({ children }) { handleDeletePlan(e, plan) }, }) - } + }} > )} diff --git a/src/components/floor-plan/CanvasMenu.jsx b/src/components/floor-plan/CanvasMenu.jsx index 44c22d4b..ed2249b0 100644 --- a/src/components/floor-plan/CanvasMenu.jsx +++ b/src/components/floor-plan/CanvasMenu.jsx @@ -112,7 +112,7 @@ export default function CanvasMenu(props) { const params = { objectNo: objectNo, - planNo: pid, + planNo: selectedPlan.planNo, schDownload: donwloadType, schDrawingFlg: drawingFlg, pwrGnrSimType: pwrGnrSimTypeRecoil.type, @@ -156,6 +156,7 @@ export default function CanvasMenu(props) { text: getMessage('stuff.detail.move.confirmMsg'), type: 'confirm', confirmFn: () => { + setIsGlobalLoading(true) router.push(`/management/stuff/detail?objectNo=${objectNo}`, { scroll: false }) }, }) @@ -172,38 +173,51 @@ export default function CanvasMenu(props) { setType('surface') break case 4: - if (!checkMenuAndCanvasState()) { - swalFire({ text: getMessage('menu.validation.canvas.roof') }) - return + console.log('🚀 ~ onClickNav ~ menu:', menu) + console.log('🚀 ~ onClickNav ~ menuNumber:', menuNumber) + if (menuNumber < menu.index) { + if (!checkMenuAndCanvasState()) { + swalFire({ text: getMessage('menu.validation.canvas.roof') }) + return + } else { + setType('module') + } } else { - setType('module') + router.push(`/floor-plan?pid=${pid}&objectNo=${objectNo}`) } + break case 5: - // let pid = urlParams.get('pid') + setIsGlobalLoading(true) + //로딩바해제는 견적서 상세조회쪽(useEstimateController.js)에서 setIsGlobalLoading(false) promiseGet({ url: `/api/estimate/${objectNo}/${selectedPlan.planNo}/detail` }).then((res) => { if (res.status === 200) { const estimateDetail = res.data - if (estimateDetail.tempFlg === '0' && estimateDetail.estimateDate !== null) { + // if (estimateDetail.tempFlg === '0' && estimateDetail.estimateDate !== null) { + if (estimateDetail.estimateDate !== null) { setMenuNumber(menu.index) setCurrentMenu(menu.title) setFloorPlanObjectNo({ floorPlanObjectNo: objectNo }) router.push(`/floor-plan/estimate/${menu.index}?pid=${selectedPlan.planNo}&objectNo=${objectNo}`) } else { + setIsGlobalLoading(false) swalFire({ text: getMessage('estimate.menu.move.valid1') }) } } }) break case 6: + setIsGlobalLoading(true) + //로딩바해제는 발전시뮬레이션 조회쪽에서(Simulator.jsx) setIsGlobalLoading(false) promiseGet({ url: `/api/estimate/${objectNo}/${selectedPlan.planNo}/detail` }).then((res) => { if (res.status === 200) { const estimateDetail = res.data - if (estimateDetail.tempFlg === '0') { + if (estimateDetail.estimateDate !== null) { setMenuNumber(menu.index) setCurrentMenu(menu.title) router.push(`/floor-plan/simulator/${menu.index}?pid=${selectedPlan.planNo}&objectNo=${objectNo}`) } else { + setIsGlobalLoading(false) swalFire({ text: getMessage('simulator.menu.move.valid1') }) } } @@ -215,9 +229,10 @@ export default function CanvasMenu(props) { setMenuNumber(menu.index) setCurrentMenu(menu.title) } - if (pathname !== '/floor-plan') { - if (menu.index !== 0) { + // if (menu.index !== 0 ) { + //견적서 or 발전시뮬레이션 탭에서 같은 탭 클릭시 화면 이동했다 돌아오지않도록.. + if (menu.index !== 0 && menu.index !== 5 && menu.index !== 6) { router.push(`/floor-plan?pid=${pid}&objectNo=${objectNo}`) } } @@ -257,7 +272,7 @@ export default function CanvasMenu(props) { // 저장버튼(btn08) 클릭 시 호출되는 함수 const handleSaveCanvas = async () => { - await saveCanvas() + await saveCanvas(true) } // 나가기 버튼 클릭 @@ -312,15 +327,15 @@ export default function CanvasMenu(props) { confirmFn: async () => { setIsGlobalLoading(true) const params = { - objectNo: objectNo, - planNo: pid, + objectNo: estimateRecoilState.objectNo, + planNo: estimateRecoilState.planNo, userId: sessionState.userId, } try { await promisePost({ url: '/api/estimate/reset-estimate', data: params }).then((res) => { if (res.status === 201) { swalFire({ text: getMessage('estimate.detail.reset.alertMsg'), type: 'alert' }) - fetchSetting(objectNo, pid, 'R') + fetchSetting(estimateRecoilState.objectNo, estimateRecoilState.planNo, 'R') } }) } catch (error) { @@ -359,9 +374,14 @@ export default function CanvasMenu(props) { }, [basicSetting])*/ const checkMenuState = (menu) => { - return (['2', '3'].includes(canvasSetting?.roofSizeSet) && menu.index === 2) || (menuNumber === 4 && menu.index === 2) + return (['2', '3'].includes(canvasSetting?.roofSizeSet) && menu.index === 2) || (menuNumber === 4 && [1, 2].includes(menu.index)) } + /** + * 모듈, 회로 구성 이전 메뉴에서 메뉴 클릭으로 넘어올때 + * 지붕면 할당이 끝난 지붕이 하나라도 있는지 체크 + * @returns {boolean} + */ const checkMenuAndCanvasState = () => { const roofs = canvas?.getObjects().filter((obj) => obj.name === POLYGON_TYPE.ROOF) // 지붕면 할당이 끝난 지붕이 하나라도 있는지 체크 @@ -372,40 +392,109 @@ export default function CanvasMenu(props) { useEffect(() => { if (isObjectNotEmpty(estimateRecoilState)) { - if (estimateRecoilState?.createUser === 'T01') { - if (sessionState.userId !== 'T01') { - setButtonStyle1('none') - setButtonStyle2('none') - setButtonStyle3('none') - setButtonStyle4('none') - setButtonStyle5('none') - } - } else { - if (estimateRecoilState?.tempFlg === '1') { - setButtonStyle1('none') - setButtonStyle2('') - setButtonStyle3('none') - setButtonStyle4('none') - setButtonStyle5('none') - } else { - if (estimateRecoilState?.tempFlg === '0' && estimateRecoilState?.lockFlg === '0') { - setButtonStyle1('') - setButtonStyle2('') - setButtonStyle3('') - setButtonStyle4('') - setButtonStyle5('') + const { createUser, tempFlg, lockFlg } = estimateRecoilState + + if (createUser && tempFlg && lockFlg) { + if (createUser === 'T01') { + if (sessionState.storeId !== 'T01') { + setAllButtonStyles('none') } else { - setButtonStyle1('') - setButtonStyle2('none') - setButtonStyle3('none') - setButtonStyle4('') - setButtonStyle5('') + handleButtonStyles(tempFlg, lockFlg) } + } else { + handleButtonStyles(tempFlg, lockFlg) } } } }, [estimateRecoilState]) + const setAllButtonStyles = (style) => { + setButtonStyle1(style) + setButtonStyle2(style) + setButtonStyle3(style) + setButtonStyle4(style) + setButtonStyle5(style) + } + + const handleButtonStyles = (tempFlg, lockFlg) => { + if (tempFlg === '1') { + setAllButtonStyles('none') + setButtonStyle2('') + } else if (tempFlg === '0' && lockFlg === '0') { + setAllButtonStyles('') + } else { + setButtonStyle1('') + setButtonStyle2('none') + setButtonStyle3('none') + setButtonStyle4('') + setButtonStyle5('') + } + } + + // useEffect(() => { + // if (isObjectNotEmpty(estimateRecoilState)) { + // if (estimateRecoilState?.createUser && estimateRecoilState?.tempFlg && estimateRecoilState.lockFlg) { + // if (estimateRecoilState?.createUser === 'T01') { + // if (sessionState.storeId !== 'T01') { + // setButtonStyle1('none') + // setButtonStyle2('none') + // setButtonStyle3('none') + // setButtonStyle4('none') + // setButtonStyle5('none') + // } else { + // if (estimateRecoilState?.tempFlg === '1') { + // setButtonStyle1('none') + // setButtonStyle2('') + // setButtonStyle3('none') + // setButtonStyle4('none') + // setButtonStyle5('none') + // } else { + // if (estimateRecoilState?.tempFlg === '0' && estimateRecoilState?.lockFlg === '0') { + // setButtonStyle1('') + // setButtonStyle2('') + // setButtonStyle3('') + // setButtonStyle4('') + // setButtonStyle5('') + // } else { + // setButtonStyle1('') + // setButtonStyle2('none') + // setButtonStyle3('none') + // setButtonStyle4('') + // setButtonStyle5('') + // } + // } + // } + // } else { + // if (isObjectNotEmpty(estimateRecoilState)) { + // if (estimateRecoilState?.tempFlg && estimateRecoilState.lockFlg) { + // if (estimateRecoilState?.tempFlg === '1') { + // setButtonStyle1('none') + // setButtonStyle2('') + // setButtonStyle3('none') + // setButtonStyle4('none') + // setButtonStyle5('none') + // } else { + // if (estimateRecoilState?.tempFlg === '0' && estimateRecoilState?.lockFlg === '0') { + // setButtonStyle1('') + // setButtonStyle2('') + // setButtonStyle3('') + // setButtonStyle4('') + // setButtonStyle5('') + // } else { + // setButtonStyle1('') + // setButtonStyle2('none') + // setButtonStyle3('none') + // setButtonStyle4('') + // setButtonStyle5('') + // } + // } + // } + // } + // } + // } + // } + // }, [estimateRecoilState]) + /** * 견적서 잠금 / 해제 * lockFlg : 0 잠금해제상태 / 1 잠금상태 @@ -415,7 +504,6 @@ export default function CanvasMenu(props) { */ const handleEstimateLockController = (estimateRecoilState) => { swalFire({ - // text: estimateRecoilState.lockFlg === '0' ? getMessage('estimate.detail.lock.alertMsg') : getMessage('estimate.detail.unlock.alertMsg'), html: estimateRecoilState.lockFlg === '0' ? getMessage('estimate.detail.lock.alertMsg') : getMessage('estimate.detail.unlock.alertMsg'), confirmButtonText: estimateRecoilState.lockFlg === '1' ? getMessage('estimate.detail.unlock.confirmBtnName') : '', type: 'confirm', @@ -431,37 +519,49 @@ export default function CanvasMenu(props) { await promisePost({ url: '/api/estimate/save-estimate-lock', data: params }).then((res) => { if (res.status === 201) { estimateRecoilState.lockFlg = estimateRecoilState.lockFlg === '0' ? '1' : '0' - if (estimateRecoilState?.createUser === 'T01') { - if (sessionState.userId !== 'T01') { - setButtonStyle1('none') - setButtonStyle2('none') - setButtonStyle3('none') - setButtonStyle4('none') - setButtonStyle5('none') - } - } else { - if (estimateRecoilState?.tempFlg === '1') { - setButtonStyle1('none') - setButtonStyle2('') - setButtonStyle3('none') - setButtonStyle4('none') - setButtonStyle5('none') - } else { - if (estimateRecoilState?.tempFlg === '0' && estimateRecoilState?.lockFlg === '0') { - setButtonStyle1('') - setButtonStyle2('') - setButtonStyle3('') - setButtonStyle4('') - setButtonStyle5('') + const { createUser, tempFlg, lockFlg } = estimateRecoilState + if (createUser && tempFlg && lockFlg) { + if (createUser === 'T01') { + if (sessionState.storeId !== 'T01') { + setAllButtonStyles('none') } else { - setButtonStyle1('') - setButtonStyle2('none') - setButtonStyle3('none') - setButtonStyle4('') - setButtonStyle5('') + handleButtonStyles(tempFlg, lockFlg) } + } else { + handleButtonStyles(tempFlg, lockFlg) } } + // if (estimateRecoilState?.createUser === 'T01') { + // if (sessionState.storeId !== 'T01') { + // setButtonStyle1('none') + // setButtonStyle2('none') + // setButtonStyle3('none') + // setButtonStyle4('none') + // setButtonStyle5('none') + // } + // } else { + // if (estimateRecoilState?.tempFlg === '1') { + // setButtonStyle1('none') + // setButtonStyle2('') + // setButtonStyle3('none') + // setButtonStyle4('none') + // setButtonStyle5('none') + // } else { + // if (estimateRecoilState?.tempFlg === '0' && estimateRecoilState?.lockFlg === '0') { + // setButtonStyle1('') + // setButtonStyle2('') + // setButtonStyle3('') + // setButtonStyle4('') + // setButtonStyle5('') + // } else { + // setButtonStyle1('') + // setButtonStyle2('none') + // setButtonStyle3('none') + // setButtonStyle4('') + // setButtonStyle5('') + // } + // } + // } } setIsGlobalLoading(false) }) @@ -493,7 +593,7 @@ export default function CanvasMenu(props) { className={`canvas-menu-item ${menuNumber === menu.index ? 'active' : ''}`} onClick={() => { if (['2', '3'].includes(canvasSetting?.roofSizeSet) && menu.index === 2) return - if (menuNumber === 4 && menu.index === 2) return + if (menuNumber === 4 && [1, 2].includes(menu.index)) return onClickNav(menu) }} > @@ -572,20 +672,17 @@ export default function CanvasMenu(props) { {menuNumber === 5 && ( <>
- {/*
-
-
- {getMessage('slope')} -
- { - handleChangePitch(e, index) - }} - defaultValue={currentAngleType === 'slope' ? roof.pitch : roof.angle} - /> + {roof.raftAuth && ( +
+
+ {getMessage('modal.placement.initial.setting.rafter')} + {raftCodes.length > 0 && ( +
+ +
+ )}
- {pitchText}
-
+ )} + {(roof.widAuth || roof.lenAuth) && ( <> {roof.widAuth && ( @@ -139,7 +142,15 @@ export default function ContextRoofAllocationSetting(props) {
W
- + { + handleChangeInput(e, 'width', index) + }} + />
@@ -148,44 +159,15 @@ export default function ContextRoofAllocationSetting(props) {
L -
- -
-
-
- )} - - )} - {(roof.raftAuth || roof.roofPchAuth) && ( - <> - {roof.raftAuth && ( -
-
- {getMessage('modal.placement.initial.setting.rafter')} - {raftCodes.length > 0 && ( -
- -
- )} -
-
- )} - {roof.roofPchAuth && ( -
-
- {getMessage('hajebichi')}
{ + handleChangeInput(e, 'length', index) + }} />
@@ -193,6 +175,39 @@ export default function ContextRoofAllocationSetting(props) { )} )} + {roof.roofPchAuth && ( +
+
+ {getMessage('hajebichi')} +
+ handleChangeInput(e, 'hajebichi', index)} + /> +
+
+
+ )} +
+
+ {getMessage('slope')} +
+ { + handleChangeInput(e, currentAngleType === 'slope' ? 'pitch' : 'angle', index) + handleChangePitch(e, index) + }} + defaultValue={currentAngleType === 'slope' ? roof.pitch : roof.angle} + /> +
+ {pitchText} +
+
-
-
- {getMessage('slope')} -
- { - handleChangePitch(e, index) - }} - defaultValue={currentAngleType === 'slope' ? roof.pitch : roof.angle} - /> + + {roof.raftAuth && ( +
+
+ {getMessage('modal.placement.initial.setting.rafter')} + {raftCodes.length > 0 && ( +
+ handleChangeRaft(e, index)} + /> +
+ )}
- {pitchText}
-
+ )} + {(roof.widAuth || roof.lenAuth) && ( <> {roof.widAuth && ( @@ -170,45 +174,38 @@ export default function RoofAllocationSetting(props) { )} )} - {(roof.raftAuth || roof.roofPchAuth) && ( - <> - {roof.raftAuth && ( -
-
- {getMessage('modal.placement.initial.setting.rafter')} - {raftCodes.length > 0 && ( -
- handleChangeRaft(e, index)} - /> -
- )} -
+ {roof.roofPchAuth && ( +
+
+ {getMessage('hajebichi')} +
+ handleChangeInput(e, 'hajebichi', index)} + value={parseInt(roof.hajebichi)} + readOnly={roof.roofPchAuth === 'R'} + />
- )} - {roof.roofPchAuth && ( -
-
- {getMessage('hajebichi')} -
- handleChangeInput(e, 'hajebichi', index)} - value={parseInt(roof.hajebichi)} - readOnly={roof.roofPchAuth === 'R'} - /> -
-
-
- )} - +
+
)} +
+
+ {getMessage('slope')} +
+ { + handleChangePitch(e, index) + }} + defaultValue={currentAngleType === 'slope' ? roof.pitch : roof.angle} + /> +
+ {pitchText} +
+