dev #727
@ -1,5 +1,6 @@
|
||||
import { MODULE_SETUP_TYPE, POLYGON_TYPE } from '@/common/common'
|
||||
import WithDraggable from '@/components/common/draggable/WithDraggable'
|
||||
import Image from 'next/image'
|
||||
import { Orientation } from '@/components/floor-plan/modal/basic/step/Orientation'
|
||||
import PitchPlacement from '@/components/floor-plan/modal/basic/step/pitch/PitchPlacement'
|
||||
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 [roofsStore, setRoofsStore] = useRecoilState(roofsState)
|
||||
const [isFold, setIsFold] = useState(false)
|
||||
const [useCalcPad, setUseCalcPad] = useState(false)
|
||||
const disableKeypad = !useCalcPad
|
||||
|
||||
// const { initEvent } = useContext(EventContext)
|
||||
const { manualModuleSetup, autoModuleSetup, manualFlatroofModuleSetup, autoFlatroofModuleSetup, manualModuleLayoutSetup, restoreModuleInstArea } =
|
||||
@ -235,6 +238,7 @@ export default function BasicSetting({ id, pos = { x: 50, y: 230 } }) {
|
||||
}
|
||||
|
||||
const orientationProps = {
|
||||
disableKeypad,
|
||||
roofs,
|
||||
setRoofs,
|
||||
tabNum,
|
||||
@ -270,6 +274,7 @@ export default function BasicSetting({ id, pos = { x: 50, y: 230 } }) {
|
||||
updateObjectDataApi,
|
||||
}
|
||||
const trestleProps = {
|
||||
disableKeypad,
|
||||
roofs,
|
||||
setRoofs,
|
||||
setRoofsStore,
|
||||
@ -320,7 +325,10 @@ export default function BasicSetting({ id, pos = { x: 50, y: 230 } }) {
|
||||
)}
|
||||
</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>} */}
|
||||
{basicSetting.roofSizeSet && basicSetting.roofSizeSet != '3' && (
|
||||
<>
|
||||
|
||||
@ -24,6 +24,7 @@ export const Orientation = forwardRef((props, ref) => {
|
||||
const [moduleSeriesList, setModuleSeriesList] = useState([])
|
||||
const [filteredModuleList, setFilteredModuleList] = useState([])
|
||||
const {
|
||||
disableKeypad,
|
||||
roofs,
|
||||
setRoofs,
|
||||
tabNum,
|
||||
@ -462,6 +463,7 @@ export const Orientation = forwardRef((props, ref) => {
|
||||
setInputCompasDeg(value);
|
||||
}
|
||||
}}
|
||||
disableKeypad={disableKeypad}
|
||||
options={{
|
||||
allowNegative: true,
|
||||
allowDecimal: false
|
||||
@ -564,6 +566,7 @@ export const Orientation = forwardRef((props, ref) => {
|
||||
className="input-origin block"
|
||||
value={inputMargin}
|
||||
onChange={(value) => setInputMargin(value)}
|
||||
disableKeypad={disableKeypad}
|
||||
options={{
|
||||
allowNegative: false,
|
||||
allowDecimal: false
|
||||
@ -609,6 +612,7 @@ export const Orientation = forwardRef((props, ref) => {
|
||||
className="input-origin block"
|
||||
value={inputInstallHeight}
|
||||
onChange={(value) => handleChangeInstallHeight(value)}
|
||||
disableKeypad={disableKeypad}
|
||||
options={{
|
||||
allowNegative: false,
|
||||
allowDecimal: false
|
||||
@ -649,6 +653,7 @@ export const Orientation = forwardRef((props, ref) => {
|
||||
className="input-origin block"
|
||||
value={inputVerticalSnowCover}
|
||||
onChange={(value) => handleChangeVerticalSnowCover(value)}
|
||||
disableKeypad={disableKeypad}
|
||||
options={{
|
||||
allowNegative: false,
|
||||
allowDecimal: false
|
||||
|
||||
@ -14,7 +14,7 @@ import { normalizeDigits } from '@/util/input-utils'
|
||||
import { CalculatorInput } from '@/components/common/input/CalcInput'
|
||||
|
||||
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 [selectedTrestle, setSelectedTrestle] = useState()
|
||||
const currentAngleType = useRecoilValue(currentAngleTypeSelector)
|
||||
@ -936,6 +936,7 @@ const Trestle = forwardRef((props, ref) => {
|
||||
className="input-origin block"
|
||||
value={eavesMargin ?? 0}
|
||||
onChange={(value) => setEavesMargin(value)}
|
||||
disableKeypad={disableKeypad}
|
||||
options={{
|
||||
allowNegative: false,
|
||||
allowDecimal: false
|
||||
@ -961,6 +962,7 @@ const Trestle = forwardRef((props, ref) => {
|
||||
className="input-origin block"
|
||||
value={ridgeMargin ?? 0}
|
||||
onChange={(value) => setRidgeMargin(value)}
|
||||
disableKeypad={disableKeypad}
|
||||
options={{
|
||||
allowNegative: false,
|
||||
allowDecimal: false
|
||||
@ -986,6 +988,7 @@ const Trestle = forwardRef((props, ref) => {
|
||||
className="input-origin block"
|
||||
value={kerabaMargin ?? 0}
|
||||
onChange={(value) => setKerabaMargin(value)}
|
||||
disableKeypad={disableKeypad}
|
||||
options={{
|
||||
allowNegative: false,
|
||||
allowDecimal: false
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user