モジュール/架台設定 - 계산기 토클버튼 추가
This commit is contained in:
parent
025b7ede7c
commit
b10fc27014
@ -1,5 +1,6 @@
|
|||||||
import { MODULE_SETUP_TYPE, POLYGON_TYPE } from '@/common/common'
|
import { MODULE_SETUP_TYPE, POLYGON_TYPE } from '@/common/common'
|
||||||
import WithDraggable from '@/components/common/draggable/WithDraggable'
|
import WithDraggable from '@/components/common/draggable/WithDraggable'
|
||||||
|
import Image from 'next/image'
|
||||||
import { Orientation } from '@/components/floor-plan/modal/basic/step/Orientation'
|
import { Orientation } from '@/components/floor-plan/modal/basic/step/Orientation'
|
||||||
import PitchPlacement from '@/components/floor-plan/modal/basic/step/pitch/PitchPlacement'
|
import PitchPlacement from '@/components/floor-plan/modal/basic/step/pitch/PitchPlacement'
|
||||||
import Placement from '@/components/floor-plan/modal/basic/step/Placement'
|
import Placement from '@/components/floor-plan/modal/basic/step/Placement'
|
||||||
@ -75,6 +76,8 @@ export default function BasicSetting({ id, pos = { x: 50, y: 230 } }) {
|
|||||||
const { trigger: placementTrigger } = useCanvasPopupStatusController(3)
|
const { trigger: placementTrigger } = useCanvasPopupStatusController(3)
|
||||||
const [roofsStore, setRoofsStore] = useRecoilState(roofsState)
|
const [roofsStore, setRoofsStore] = useRecoilState(roofsState)
|
||||||
const [isFold, setIsFold] = useState(false)
|
const [isFold, setIsFold] = useState(false)
|
||||||
|
const [useCalcPad, setUseCalcPad] = useState(false)
|
||||||
|
const disableKeypad = !useCalcPad
|
||||||
|
|
||||||
// const { initEvent } = useContext(EventContext)
|
// const { initEvent } = useContext(EventContext)
|
||||||
const { manualModuleSetup, autoModuleSetup, manualFlatroofModuleSetup, autoFlatroofModuleSetup, manualModuleLayoutSetup, restoreModuleInstArea } =
|
const { manualModuleSetup, autoModuleSetup, manualFlatroofModuleSetup, autoFlatroofModuleSetup, manualModuleLayoutSetup, restoreModuleInstArea } =
|
||||||
@ -235,6 +238,7 @@ export default function BasicSetting({ id, pos = { x: 50, y: 230 } }) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const orientationProps = {
|
const orientationProps = {
|
||||||
|
disableKeypad,
|
||||||
roofs,
|
roofs,
|
||||||
setRoofs,
|
setRoofs,
|
||||||
tabNum,
|
tabNum,
|
||||||
@ -270,6 +274,7 @@ export default function BasicSetting({ id, pos = { x: 50, y: 230 } }) {
|
|||||||
updateObjectDataApi,
|
updateObjectDataApi,
|
||||||
}
|
}
|
||||||
const trestleProps = {
|
const trestleProps = {
|
||||||
|
disableKeypad,
|
||||||
roofs,
|
roofs,
|
||||||
setRoofs,
|
setRoofs,
|
||||||
setRoofsStore,
|
setRoofsStore,
|
||||||
@ -320,7 +325,10 @@ export default function BasicSetting({ id, pos = { x: 50, y: 230 } }) {
|
|||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="grid-btn-wrap">
|
<div className="grid-btn-wrap" style={{ display: 'flex', alignItems: 'center', justifyContent: 'flex-end', gap: '5px' }}>
|
||||||
|
<button style={{ width: 'auto' }} onClick={() => setUseCalcPad((prev) => !prev)}>
|
||||||
|
<Image src={useCalcPad ? '/static/images/common/Icon_ON_Black.png' : '/static/images/common/Icon_OFF_Black.png'} alt="toggle" width={34} height={34} />
|
||||||
|
</button>
|
||||||
{/* {tabNum === 1 && <button className="btn-frame modal mr5">{getMessage('modal.common.save')}</button>} */}
|
{/* {tabNum === 1 && <button className="btn-frame modal mr5">{getMessage('modal.common.save')}</button>} */}
|
||||||
{basicSetting.roofSizeSet && basicSetting.roofSizeSet != '3' && (
|
{basicSetting.roofSizeSet && basicSetting.roofSizeSet != '3' && (
|
||||||
<>
|
<>
|
||||||
|
|||||||
@ -24,6 +24,7 @@ export const Orientation = forwardRef((props, ref) => {
|
|||||||
const [moduleSeriesList, setModuleSeriesList] = useState([])
|
const [moduleSeriesList, setModuleSeriesList] = useState([])
|
||||||
const [filteredModuleList, setFilteredModuleList] = useState([])
|
const [filteredModuleList, setFilteredModuleList] = useState([])
|
||||||
const {
|
const {
|
||||||
|
disableKeypad,
|
||||||
roofs,
|
roofs,
|
||||||
setRoofs,
|
setRoofs,
|
||||||
tabNum,
|
tabNum,
|
||||||
@ -462,6 +463,7 @@ export const Orientation = forwardRef((props, ref) => {
|
|||||||
setInputCompasDeg(value);
|
setInputCompasDeg(value);
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
|
disableKeypad={disableKeypad}
|
||||||
options={{
|
options={{
|
||||||
allowNegative: true,
|
allowNegative: true,
|
||||||
allowDecimal: false
|
allowDecimal: false
|
||||||
@ -564,6 +566,7 @@ export const Orientation = forwardRef((props, ref) => {
|
|||||||
className="input-origin block"
|
className="input-origin block"
|
||||||
value={inputMargin}
|
value={inputMargin}
|
||||||
onChange={(value) => setInputMargin(value)}
|
onChange={(value) => setInputMargin(value)}
|
||||||
|
disableKeypad={disableKeypad}
|
||||||
options={{
|
options={{
|
||||||
allowNegative: false,
|
allowNegative: false,
|
||||||
allowDecimal: false
|
allowDecimal: false
|
||||||
@ -609,6 +612,7 @@ export const Orientation = forwardRef((props, ref) => {
|
|||||||
className="input-origin block"
|
className="input-origin block"
|
||||||
value={inputInstallHeight}
|
value={inputInstallHeight}
|
||||||
onChange={(value) => handleChangeInstallHeight(value)}
|
onChange={(value) => handleChangeInstallHeight(value)}
|
||||||
|
disableKeypad={disableKeypad}
|
||||||
options={{
|
options={{
|
||||||
allowNegative: false,
|
allowNegative: false,
|
||||||
allowDecimal: false
|
allowDecimal: false
|
||||||
@ -649,6 +653,7 @@ export const Orientation = forwardRef((props, ref) => {
|
|||||||
className="input-origin block"
|
className="input-origin block"
|
||||||
value={inputVerticalSnowCover}
|
value={inputVerticalSnowCover}
|
||||||
onChange={(value) => handleChangeVerticalSnowCover(value)}
|
onChange={(value) => handleChangeVerticalSnowCover(value)}
|
||||||
|
disableKeypad={disableKeypad}
|
||||||
options={{
|
options={{
|
||||||
allowNegative: false,
|
allowNegative: false,
|
||||||
allowDecimal: false
|
allowDecimal: false
|
||||||
|
|||||||
@ -14,7 +14,7 @@ import { normalizeDigits } from '@/util/input-utils'
|
|||||||
import { CalculatorInput } from '@/components/common/input/CalcInput'
|
import { CalculatorInput } from '@/components/common/input/CalcInput'
|
||||||
|
|
||||||
const Trestle = forwardRef((props, ref) => {
|
const Trestle = forwardRef((props, ref) => {
|
||||||
const { tabNum, setTabNum, trestleTrigger, roofs, setRoofs, moduleSelectionData, setModuleSelectionData, setRoofsStore } = props
|
const { tabNum, setTabNum, trestleTrigger, roofs, setRoofs, moduleSelectionData, setModuleSelectionData, setRoofsStore, disableKeypad } = props
|
||||||
const { getMessage } = useMessage()
|
const { getMessage } = useMessage()
|
||||||
// const [selectedTrestle, setSelectedTrestle] = useState()
|
// const [selectedTrestle, setSelectedTrestle] = useState()
|
||||||
const currentAngleType = useRecoilValue(currentAngleTypeSelector)
|
const currentAngleType = useRecoilValue(currentAngleTypeSelector)
|
||||||
@ -936,6 +936,7 @@ const Trestle = forwardRef((props, ref) => {
|
|||||||
className="input-origin block"
|
className="input-origin block"
|
||||||
value={eavesMargin ?? 0}
|
value={eavesMargin ?? 0}
|
||||||
onChange={(value) => setEavesMargin(value)}
|
onChange={(value) => setEavesMargin(value)}
|
||||||
|
disableKeypad={disableKeypad}
|
||||||
options={{
|
options={{
|
||||||
allowNegative: false,
|
allowNegative: false,
|
||||||
allowDecimal: false
|
allowDecimal: false
|
||||||
@ -961,6 +962,7 @@ const Trestle = forwardRef((props, ref) => {
|
|||||||
className="input-origin block"
|
className="input-origin block"
|
||||||
value={ridgeMargin ?? 0}
|
value={ridgeMargin ?? 0}
|
||||||
onChange={(value) => setRidgeMargin(value)}
|
onChange={(value) => setRidgeMargin(value)}
|
||||||
|
disableKeypad={disableKeypad}
|
||||||
options={{
|
options={{
|
||||||
allowNegative: false,
|
allowNegative: false,
|
||||||
allowDecimal: false
|
allowDecimal: false
|
||||||
@ -986,6 +988,7 @@ const Trestle = forwardRef((props, ref) => {
|
|||||||
className="input-origin block"
|
className="input-origin block"
|
||||||
value={kerabaMargin ?? 0}
|
value={kerabaMargin ?? 0}
|
||||||
onChange={(value) => setKerabaMargin(value)}
|
onChange={(value) => setKerabaMargin(value)}
|
||||||
|
disableKeypad={disableKeypad}
|
||||||
options={{
|
options={{
|
||||||
allowNegative: false,
|
allowNegative: false,
|
||||||
allowDecimal: false
|
allowDecimal: false
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user