Compare commits
No commits in common. "3365000b878239f7efb657a0cc0b2652d8faffdf" and "1dd4e0cf83a9885bb9a271bd8d55a2605617ed60" have entirely different histories.
3365000b87
...
1dd4e0cf83
Binary file not shown.
|
Before Width: | Height: | Size: 660 B |
Binary file not shown.
|
Before Width: | Height: | Size: 683 B |
Binary file not shown.
|
Before Width: | Height: | Size: 660 B |
Binary file not shown.
|
Before Width: | Height: | Size: 723 B |
@ -3,7 +3,7 @@ import { createCalculator } from '@/util/calc-utils'
|
|||||||
import '@/styles/calc.scss'
|
import '@/styles/calc.scss'
|
||||||
|
|
||||||
export const CalculatorInput = forwardRef(
|
export const CalculatorInput = forwardRef(
|
||||||
({ value, onChange, label, options = {}, id, className = 'calculator-input', readOnly = false, placeholder, name='', disabled = false, maxLength = 12, disableKeypad = false }, ref) => {
|
({ value, onChange, label, options = {}, id, className = 'calculator-input', readOnly = false, placeholder, name='', disabled = false, maxLength = 12 }, ref) => {
|
||||||
const [showKeypad, setShowKeypad] = useState(false)
|
const [showKeypad, setShowKeypad] = useState(false)
|
||||||
const [displayValue, setDisplayValue] = useState(value || '0')
|
const [displayValue, setDisplayValue] = useState(value || '0')
|
||||||
const [hasOperation, setHasOperation] = useState(false)
|
const [hasOperation, setHasOperation] = useState(false)
|
||||||
@ -478,7 +478,7 @@ export const CalculatorInput = forwardRef(
|
|||||||
maxLength={maxLength}
|
maxLength={maxLength}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
{showKeypad && !readOnly && !disableKeypad && (
|
{showKeypad && !readOnly && (
|
||||||
<div className="keypad-container">
|
<div className="keypad-container">
|
||||||
<div className="keypad-grid">
|
<div className="keypad-grid">
|
||||||
<button
|
<button
|
||||||
|
|||||||
@ -25,10 +25,7 @@ import { QcastContext } from '@/app/QcastProvider'
|
|||||||
import { useCanvasMenu } from '@/hooks/common/useCanvasMenu'
|
import { useCanvasMenu } from '@/hooks/common/useCanvasMenu'
|
||||||
import {normalizeDigits, normalizeDecimal} from '@/util/input-utils'
|
import {normalizeDigits, normalizeDecimal} from '@/util/input-utils'
|
||||||
import { CalculatorInput } from '@/components/common/input/CalcInput'
|
import { CalculatorInput } from '@/components/common/input/CalcInput'
|
||||||
import Image from 'next/image'
|
|
||||||
export default function Estimate({}) {
|
export default function Estimate({}) {
|
||||||
const [useCalcPad, setUseCalcPad] = useState(false)
|
|
||||||
const disableKeypad = !useCalcPad
|
|
||||||
const [uniqueData, setUniqueData] = useState([])
|
const [uniqueData, setUniqueData] = useState([])
|
||||||
const [handlePricingFlag, setHandlePricingFlag] = useState(false)
|
const [handlePricingFlag, setHandlePricingFlag] = useState(false)
|
||||||
const [specialNoteFirstFlg, setSpecialNoteFirstFlg] = useState(false)
|
const [specialNoteFirstFlg, setSpecialNoteFirstFlg] = useState(false)
|
||||||
@ -1983,9 +1980,6 @@ export default function Estimate({}) {
|
|||||||
<span className="minus"></span>
|
<span className="minus"></span>
|
||||||
{getMessage('estimate.detail.showPrice.delItem')}
|
{getMessage('estimate.detail.showPrice.delItem')}
|
||||||
</button>
|
</button>
|
||||||
<button style={{ width: 'auto', marginLeft: '8px' }} type="button" onClick={() => setUseCalcPad((prev) => !prev)}>
|
|
||||||
<Image src={useCalcPad ? '/static/images/common/Icon_ON.png' : '/static/images/common/Icon_OFF.png'} alt="toggle" width={34} height={34} />
|
|
||||||
</button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -2154,7 +2148,6 @@ export default function Estimate({}) {
|
|||||||
onChange={(value) =>{
|
onChange={(value) =>{
|
||||||
onChangeAmount(value, item.dispOrder, index)
|
onChangeAmount(value, item.dispOrder, index)
|
||||||
}}
|
}}
|
||||||
disableKeypad={disableKeypad}
|
|
||||||
options={{
|
options={{
|
||||||
allowNegative: false,
|
allowNegative: false,
|
||||||
allowDecimal: false
|
allowDecimal: false
|
||||||
@ -2212,7 +2205,6 @@ export default function Estimate({}) {
|
|||||||
onChangeSalePrice(value, item.dispOrder, index)
|
onChangeSalePrice(value, item.dispOrder, index)
|
||||||
}}
|
}}
|
||||||
maxLength={12}
|
maxLength={12}
|
||||||
disableKeypad={disableKeypad}
|
|
||||||
options={{
|
options={{
|
||||||
allowNegative: false,
|
allowNegative: false,
|
||||||
allowDecimal: false
|
allowDecimal: false
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
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'
|
||||||
@ -76,8 +75,6 @@ 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 } =
|
||||||
@ -238,7 +235,6 @@ export default function BasicSetting({ id, pos = { x: 50, y: 230 } }) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const orientationProps = {
|
const orientationProps = {
|
||||||
disableKeypad,
|
|
||||||
roofs,
|
roofs,
|
||||||
setRoofs,
|
setRoofs,
|
||||||
tabNum,
|
tabNum,
|
||||||
@ -274,7 +270,6 @@ export default function BasicSetting({ id, pos = { x: 50, y: 230 } }) {
|
|||||||
updateObjectDataApi,
|
updateObjectDataApi,
|
||||||
}
|
}
|
||||||
const trestleProps = {
|
const trestleProps = {
|
||||||
disableKeypad,
|
|
||||||
roofs,
|
roofs,
|
||||||
setRoofs,
|
setRoofs,
|
||||||
setRoofsStore,
|
setRoofsStore,
|
||||||
@ -325,10 +320,7 @@ export default function BasicSetting({ id, pos = { x: 50, y: 230 } }) {
|
|||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="grid-btn-wrap" style={{ display: 'flex', alignItems: 'center', justifyContent: 'flex-end', gap: '5px' }}>
|
<div className="grid-btn-wrap">
|
||||||
<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,7 +24,6 @@ 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,
|
||||||
@ -463,7 +462,6 @@ export const Orientation = forwardRef((props, ref) => {
|
|||||||
setInputCompasDeg(value);
|
setInputCompasDeg(value);
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
disableKeypad={disableKeypad}
|
|
||||||
options={{
|
options={{
|
||||||
allowNegative: true,
|
allowNegative: true,
|
||||||
allowDecimal: false
|
allowDecimal: false
|
||||||
@ -566,7 +564,6 @@ 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
|
||||||
@ -612,7 +609,6 @@ 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
|
||||||
@ -653,7 +649,6 @@ 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, disableKeypad } = props
|
const { tabNum, setTabNum, trestleTrigger, roofs, setRoofs, moduleSelectionData, setModuleSelectionData, setRoofsStore } = props
|
||||||
const { getMessage } = useMessage()
|
const { getMessage } = useMessage()
|
||||||
// const [selectedTrestle, setSelectedTrestle] = useState()
|
// const [selectedTrestle, setSelectedTrestle] = useState()
|
||||||
const currentAngleType = useRecoilValue(currentAngleTypeSelector)
|
const currentAngleType = useRecoilValue(currentAngleTypeSelector)
|
||||||
@ -936,7 +936,6 @@ 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
|
||||||
@ -962,7 +961,6 @@ 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
|
||||||
@ -988,7 +986,6 @@ 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
|
||||||
|
|||||||
@ -6,7 +6,7 @@ import { useEffect } from 'react'
|
|||||||
|
|
||||||
export default function Angle({ props }) {
|
export default function Angle({ props }) {
|
||||||
const { getMessage } = useMessage()
|
const { getMessage } = useMessage()
|
||||||
const { angle1, setAngle1, angle1Ref, length1, setLength1, length1Ref, disableKeypad } = props
|
const { angle1, setAngle1, angle1Ref, length1, setLength1, length1Ref } = props
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
@ -45,7 +45,6 @@ export default function Angle({ props }) {
|
|||||||
}}
|
}}
|
||||||
placeholder="45"
|
placeholder="45"
|
||||||
onFocus={() => (angle1Ref.current.value = '')}
|
onFocus={() => (angle1Ref.current.value = '')}
|
||||||
disableKeypad={disableKeypad}
|
|
||||||
options={{
|
options={{
|
||||||
allowNegative: true,
|
allowNegative: true,
|
||||||
allowDecimal: true
|
allowDecimal: true
|
||||||
@ -81,7 +80,6 @@ export default function Angle({ props }) {
|
|||||||
onChange={(value) => setLength1(value)}
|
onChange={(value) => setLength1(value)}
|
||||||
placeholder="3000"
|
placeholder="3000"
|
||||||
onFocus={() => (length1Ref.current.value = '')}
|
onFocus={() => (length1Ref.current.value = '')}
|
||||||
disableKeypad={disableKeypad}
|
|
||||||
options={{
|
options={{
|
||||||
allowNegative: false,
|
allowNegative: false,
|
||||||
allowDecimal: false
|
allowDecimal: false
|
||||||
|
|||||||
@ -19,7 +19,6 @@ export default function Diagonal({ props }) {
|
|||||||
setArrow1,
|
setArrow1,
|
||||||
arrow2,
|
arrow2,
|
||||||
setArrow2,
|
setArrow2,
|
||||||
disableKeypad,
|
|
||||||
} = props
|
} = props
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
@ -51,7 +50,6 @@ export default function Diagonal({ props }) {
|
|||||||
onChange={(value) => setDiagonalLength(value)}
|
onChange={(value) => setDiagonalLength(value)}
|
||||||
placeholder="3000"
|
placeholder="3000"
|
||||||
onFocus={() => (diagonalLengthRef.current.value = '')}
|
onFocus={() => (diagonalLengthRef.current.value = '')}
|
||||||
disableKeypad={disableKeypad}
|
|
||||||
options={{
|
options={{
|
||||||
allowNegative: false,
|
allowNegative: false,
|
||||||
allowDecimal: false
|
allowDecimal: false
|
||||||
@ -89,7 +87,6 @@ export default function Diagonal({ props }) {
|
|||||||
onChange={(value) => setLength1(value)}
|
onChange={(value) => setLength1(value)}
|
||||||
placeholder="3000"
|
placeholder="3000"
|
||||||
onFocus={() => (length1Ref.current.value = '')}
|
onFocus={() => (length1Ref.current.value = '')}
|
||||||
disableKeypad={disableKeypad}
|
|
||||||
options={{
|
options={{
|
||||||
allowNegative: false,
|
allowNegative: false,
|
||||||
allowDecimal: false
|
allowDecimal: false
|
||||||
@ -163,7 +160,6 @@ export default function Diagonal({ props }) {
|
|||||||
onChange={(value) => setLength2(value)}
|
onChange={(value) => setLength2(value)}
|
||||||
placeholder="3000"
|
placeholder="3000"
|
||||||
onFocus={() => (length2Ref.current.value = '')}
|
onFocus={() => (length2Ref.current.value = '')}
|
||||||
disableKeypad={disableKeypad}
|
|
||||||
options={{
|
options={{
|
||||||
allowNegative: false,
|
allowNegative: false,
|
||||||
allowDecimal: false
|
allowDecimal: false
|
||||||
|
|||||||
@ -24,7 +24,6 @@ export default function DoublePitch({ props }) {
|
|||||||
setArrow2,
|
setArrow2,
|
||||||
arrow1Ref,
|
arrow1Ref,
|
||||||
arrow2Ref,
|
arrow2Ref,
|
||||||
disableKeypad,
|
|
||||||
} = props
|
} = props
|
||||||
|
|
||||||
const getLength2 = (angle1, angle2, length1) => {
|
const getLength2 = (angle1, angle2, length1) => {
|
||||||
@ -69,7 +68,6 @@ export default function DoublePitch({ props }) {
|
|||||||
onChange={(value) => setAngle1(value)}
|
onChange={(value) => setAngle1(value)}
|
||||||
placeholder="45"
|
placeholder="45"
|
||||||
onFocus={() => (angle1Ref.current.value = '')}
|
onFocus={() => (angle1Ref.current.value = '')}
|
||||||
disableKeypad={disableKeypad}
|
|
||||||
options={{
|
options={{
|
||||||
allowNegative: false,
|
allowNegative: false,
|
||||||
allowDecimal: true
|
allowDecimal: true
|
||||||
@ -102,7 +100,6 @@ export default function DoublePitch({ props }) {
|
|||||||
onChange={(value) => setLength1(value)}
|
onChange={(value) => setLength1(value)}
|
||||||
placeholder="3000"
|
placeholder="3000"
|
||||||
onFocus={() => (length1Ref.current.value = '')}
|
onFocus={() => (length1Ref.current.value = '')}
|
||||||
disableKeypad={disableKeypad}
|
|
||||||
options={{
|
options={{
|
||||||
allowNegative: false,
|
allowNegative: false,
|
||||||
allowDecimal: false
|
allowDecimal: false
|
||||||
@ -183,7 +180,6 @@ export default function DoublePitch({ props }) {
|
|||||||
}}
|
}}
|
||||||
placeholder="45"
|
placeholder="45"
|
||||||
onFocus={() => (angle2Ref.current.value = '')}
|
onFocus={() => (angle2Ref.current.value = '')}
|
||||||
disableKeypad={disableKeypad}
|
|
||||||
options={{
|
options={{
|
||||||
allowNegative: false,
|
allowNegative: false,
|
||||||
allowDecimal: true
|
allowDecimal: true
|
||||||
|
|||||||
@ -9,7 +9,7 @@ import { useEffect, useRef } from 'react'
|
|||||||
export default function OuterLineWall({ props }) {
|
export default function OuterLineWall({ props }) {
|
||||||
const { getMessage } = useMessage()
|
const { getMessage } = useMessage()
|
||||||
|
|
||||||
const { length1, setLength1, length1Ref, arrow1, setArrow1, disableKeypad } = props
|
const { length1, setLength1, length1Ref, arrow1, setArrow1 } = props
|
||||||
|
|
||||||
// 키보드 입력 처리
|
// 키보드 입력 처리
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
@ -81,7 +81,6 @@ export default function OuterLineWall({ props }) {
|
|||||||
}}
|
}}
|
||||||
placeholder={'3000'}
|
placeholder={'3000'}
|
||||||
ref={length1Ref}
|
ref={length1Ref}
|
||||||
disableKeypad={disableKeypad}
|
|
||||||
onFocus={() => {
|
onFocus={() => {
|
||||||
if (length1Ref.current && length1Ref.current.value === '0') {
|
if (length1Ref.current && length1Ref.current.value === '0') {
|
||||||
length1Ref.current.value = ''
|
length1Ref.current.value = ''
|
||||||
|
|||||||
@ -4,7 +4,7 @@ import { CalculatorInput } from '@/components/common/input/CalcInput'
|
|||||||
|
|
||||||
export default function RightAngle({ props }) {
|
export default function RightAngle({ props }) {
|
||||||
const { getMessage } = useMessage()
|
const { getMessage } = useMessage()
|
||||||
const { length1, setLength1, length1Ref, length2, setLength2, length2Ref, arrow1, setArrow1, arrow2, setArrow2, disableKeypad } = props
|
const { length1, setLength1, length1Ref, length2, setLength2, length2Ref, arrow1, setArrow1, arrow2, setArrow2 } = props
|
||||||
|
|
||||||
const handleClickArrow = (arrow) => {
|
const handleClickArrow = (arrow) => {
|
||||||
const arrowType = arrow === '↑' ? 'ArrowUp' : arrow === '↓' ? 'ArrowDown' : arrow === '←' ? 'ArrowLeft' : arrow === '→' ? 'ArrowRight' : ''
|
const arrowType = arrow === '↑' ? 'ArrowUp' : arrow === '↓' ? 'ArrowDown' : arrow === '←' ? 'ArrowLeft' : arrow === '→' ? 'ArrowRight' : ''
|
||||||
@ -42,7 +42,6 @@ export default function RightAngle({ props }) {
|
|||||||
ref={length1Ref}
|
ref={length1Ref}
|
||||||
onChange={(value) => setLength1(value)}
|
onChange={(value) => setLength1(value)}
|
||||||
onFocus={() => (length1Ref.current.value = '')}
|
onFocus={() => (length1Ref.current.value = '')}
|
||||||
disableKeypad={disableKeypad}
|
|
||||||
options={{
|
options={{
|
||||||
allowNegative: false,
|
allowNegative: false,
|
||||||
allowDecimal: false
|
allowDecimal: false
|
||||||
@ -126,7 +125,6 @@ export default function RightAngle({ props }) {
|
|||||||
onFocus={() => (length2Ref.current.value = '')}
|
onFocus={() => (length2Ref.current.value = '')}
|
||||||
onChange={(value) => setLength2(value)}
|
onChange={(value) => setLength2(value)}
|
||||||
placeholder="3000"
|
placeholder="3000"
|
||||||
disableKeypad={disableKeypad}
|
|
||||||
options={{
|
options={{
|
||||||
allowNegative: false,
|
allowNegative: false,
|
||||||
allowDecimal: false
|
allowDecimal: false
|
||||||
|
|||||||
@ -14,7 +14,6 @@ import TriangleDormer from '@/components/floor-plan/modal/object/type/TriangleDo
|
|||||||
import PentagonDormer from '@/components/floor-plan/modal/object/type/PentagonDormer'
|
import PentagonDormer from '@/components/floor-plan/modal/object/type/PentagonDormer'
|
||||||
import { usePopup } from '@/hooks/usePopup'
|
import { usePopup } from '@/hooks/usePopup'
|
||||||
import { normalizeDecimalLimit, normalizeDigits } from '@/util/input-utils'
|
import { normalizeDecimalLimit, normalizeDigits } from '@/util/input-utils'
|
||||||
import Image from 'next/image'
|
|
||||||
|
|
||||||
export default function ObjectSetting({ id, pos = { x: 50, y: 230 } }) {
|
export default function ObjectSetting({ id, pos = { x: 50, y: 230 } }) {
|
||||||
const { getMessage } = useMessage()
|
const { getMessage } = useMessage()
|
||||||
@ -22,7 +21,6 @@ export default function ObjectSetting({ id, pos = { x: 50, y: 230 } }) {
|
|||||||
const [buttonAct, setButtonAct] = useState(1)
|
const [buttonAct, setButtonAct] = useState(1)
|
||||||
const { swalFire } = useSwal()
|
const { swalFire } = useSwal()
|
||||||
const [isHidden, setIsHidden] = useState(false)
|
const [isHidden, setIsHidden] = useState(false)
|
||||||
const [useCalcPad, setUseCalcPad] = useState(false)
|
|
||||||
const { applyOpeningAndShadow, applyDormers } = useObjectBatch({ isHidden, setIsHidden })
|
const { applyOpeningAndShadow, applyDormers } = useObjectBatch({ isHidden, setIsHidden })
|
||||||
const { closePopup } = usePopup()
|
const { closePopup } = usePopup()
|
||||||
|
|
||||||
@ -114,15 +112,12 @@ export default function ObjectSetting({ id, pos = { x: 50, y: 230 } }) {
|
|||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
<div className="properties-setting-wrap outer">
|
<div className="properties-setting-wrap outer">
|
||||||
{buttonAct === 1 && <OpenSpace ref={objectPlacement} disableKeypad={!useCalcPad} />}
|
{buttonAct === 1 && <OpenSpace ref={objectPlacement} />}
|
||||||
{buttonAct === 2 && <Shadow ref={objectPlacement} disableKeypad={!useCalcPad} />}
|
{buttonAct === 2 && <Shadow ref={objectPlacement} />}
|
||||||
{buttonAct === 3 && <TriangleDormer ref={dormerPlacement} disableKeypad={!useCalcPad} />}
|
{buttonAct === 3 && <TriangleDormer ref={dormerPlacement} />}
|
||||||
{buttonAct === 4 && <PentagonDormer ref={dormerPlacement} disableKeypad={!useCalcPad} />}
|
{buttonAct === 4 && <PentagonDormer ref={dormerPlacement} />}
|
||||||
</div>
|
</div>
|
||||||
<div className="grid-btn-wrap">
|
<div className="grid-btn-wrap">
|
||||||
<button className="mr5" style={{ verticalAlign: 'middle' }} 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>
|
|
||||||
<button
|
<button
|
||||||
className="btn-frame modal act"
|
className="btn-frame modal act"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
|||||||
@ -1,7 +1,6 @@
|
|||||||
'use client'
|
'use client'
|
||||||
|
|
||||||
import { useRecoilValue } from 'recoil'
|
import { useRecoilValue } from 'recoil'
|
||||||
import Image from 'next/image'
|
|
||||||
import { useMessage } from '@/hooks/useMessage'
|
import { useMessage } from '@/hooks/useMessage'
|
||||||
import WithDraggable from '@/components/common/draggable/WithDraggable'
|
import WithDraggable from '@/components/common/draggable/WithDraggable'
|
||||||
import { usePopup } from '@/hooks/usePopup'
|
import { usePopup } from '@/hooks/usePopup'
|
||||||
@ -24,8 +23,6 @@ export default function SizeSetting(props) {
|
|||||||
const heightRef = useRef(null)
|
const heightRef = useRef(null)
|
||||||
const [width, setWidth] = useState(target?.width ? (target.width * 10).toFixed() : 0)
|
const [width, setWidth] = useState(target?.width ? (target.width * 10).toFixed() : 0)
|
||||||
const [height, setHeight] = useState(target?.height ? (target.height * 10) : 0)
|
const [height, setHeight] = useState(target?.height ? (target.height * 10) : 0)
|
||||||
const [useCalcPad, setUseCalcPad] = useState(false)
|
|
||||||
const disableKeypad = !useCalcPad
|
|
||||||
// const { initEvent } = useEvent()
|
// const { initEvent } = useEvent()
|
||||||
// const { initEvent } = useContext(EventContext)
|
// const { initEvent } = useContext(EventContext)
|
||||||
|
|
||||||
@ -75,7 +72,6 @@ export default function SizeSetting(props) {
|
|||||||
value={width}
|
value={width}
|
||||||
ref={widthRef}
|
ref={widthRef}
|
||||||
onChange={(value) => setWidth(value)}
|
onChange={(value) => setWidth(value)}
|
||||||
disableKeypad={disableKeypad}
|
|
||||||
options={{
|
options={{
|
||||||
allowNegative: false,
|
allowNegative: false,
|
||||||
allowDecimal: false
|
allowDecimal: false
|
||||||
@ -103,7 +99,6 @@ export default function SizeSetting(props) {
|
|||||||
value={height}
|
value={height}
|
||||||
ref={heightRef}
|
ref={heightRef}
|
||||||
onChange={(value) => setHeight(value)}
|
onChange={(value) => setHeight(value)}
|
||||||
disableKeypad={disableKeypad}
|
|
||||||
options={{
|
options={{
|
||||||
allowNegative: false,
|
allowNegative: false,
|
||||||
allowDecimal: false
|
allowDecimal: false
|
||||||
@ -122,10 +117,7 @@ export default function SizeSetting(props) {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="grid-btn-wrap" style={{ display: 'flex', alignItems: 'center', justifyContent: 'flex-end', gap: '5px' }}>
|
<div className="grid-btn-wrap">
|
||||||
<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>
|
|
||||||
<button className="btn-frame modal act" onClick={() => handleReSizeObject(id)}>
|
<button className="btn-frame modal act" onClick={() => handleReSizeObject(id)}>
|
||||||
{getMessage('write')}
|
{getMessage('write')}
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@ -3,7 +3,7 @@ import { useMessage } from '@/hooks/useMessage'
|
|||||||
import { INPUT_TYPE } from '@/common/common'
|
import { INPUT_TYPE } from '@/common/common'
|
||||||
import { CalculatorInput } from '@/components/common/input/CalcInput'
|
import { CalculatorInput } from '@/components/common/input/CalcInput'
|
||||||
|
|
||||||
const OpenSpace = forwardRef(({ disableKeypad }, refs) => {
|
const OpenSpace = forwardRef((props, refs) => {
|
||||||
const { getMessage } = useMessage()
|
const { getMessage } = useMessage()
|
||||||
const [selectedType, setSelectedType] = useState(INPUT_TYPE.FREE)
|
const [selectedType, setSelectedType] = useState(INPUT_TYPE.FREE)
|
||||||
const [width, setWidth] = useState(0)
|
const [width, setWidth] = useState(0)
|
||||||
@ -70,7 +70,6 @@ const OpenSpace = forwardRef(({ disableKeypad }, refs) => {
|
|||||||
ref={refs.widthRef}
|
ref={refs.widthRef}
|
||||||
onChange={(value) => setWidth(value)}
|
onChange={(value) => setWidth(value)}
|
||||||
disabled={selectedType !== INPUT_TYPE.DIMENSION}
|
disabled={selectedType !== INPUT_TYPE.DIMENSION}
|
||||||
disableKeypad={disableKeypad}
|
|
||||||
options={{
|
options={{
|
||||||
allowNegative: false,
|
allowNegative: false,
|
||||||
allowDecimal: false
|
allowDecimal: false
|
||||||
@ -102,7 +101,6 @@ const OpenSpace = forwardRef(({ disableKeypad }, refs) => {
|
|||||||
ref={refs.heightRef}
|
ref={refs.heightRef}
|
||||||
onChange={(value) => setHeight(value)}
|
onChange={(value) => setHeight(value)}
|
||||||
disabled={selectedType !== INPUT_TYPE.DIMENSION}
|
disabled={selectedType !== INPUT_TYPE.DIMENSION}
|
||||||
disableKeypad={disableKeypad}
|
|
||||||
options={{
|
options={{
|
||||||
allowNegative: false,
|
allowNegative: false,
|
||||||
allowDecimal: false
|
allowDecimal: false
|
||||||
|
|||||||
@ -3,7 +3,7 @@ import { useMessage } from '@/hooks/useMessage'
|
|||||||
import { forwardRef, useState } from 'react'
|
import { forwardRef, useState } from 'react'
|
||||||
import { CalculatorInput } from '@/components/common/input/CalcInput'
|
import { CalculatorInput } from '@/components/common/input/CalcInput'
|
||||||
|
|
||||||
const PentagonDormer = forwardRef(({ disableKeypad }, refs) => {
|
const PentagonDormer = forwardRef((props, refs) => {
|
||||||
const { getMessage } = useMessage()
|
const { getMessage } = useMessage()
|
||||||
const [direction, setDirection] = useState('down')
|
const [direction, setDirection] = useState('down')
|
||||||
refs.directionRef.current = direction
|
refs.directionRef.current = direction
|
||||||
@ -45,7 +45,6 @@ const PentagonDormer = forwardRef(({ disableKeypad }, refs) => {
|
|||||||
value={height}
|
value={height}
|
||||||
ref={refs.heightRef}
|
ref={refs.heightRef}
|
||||||
onChange={(value) => setHeight(value)}
|
onChange={(value) => setHeight(value)}
|
||||||
disableKeypad={disableKeypad}
|
|
||||||
options={{
|
options={{
|
||||||
allowNegative: false,
|
allowNegative: false,
|
||||||
allowDecimal: false
|
allowDecimal: false
|
||||||
@ -70,7 +69,6 @@ const PentagonDormer = forwardRef(({ disableKeypad }, refs) => {
|
|||||||
value={offsetDepth}
|
value={offsetDepth}
|
||||||
ref={refs.offsetRef}
|
ref={refs.offsetRef}
|
||||||
onChange={(value) => setOffsetDepth(value)}
|
onChange={(value) => setOffsetDepth(value)}
|
||||||
disableKeypad={disableKeypad}
|
|
||||||
options={{
|
options={{
|
||||||
allowNegative: false,
|
allowNegative: false,
|
||||||
allowDecimal: false
|
allowDecimal: false
|
||||||
@ -98,7 +96,6 @@ const PentagonDormer = forwardRef(({ disableKeypad }, refs) => {
|
|||||||
value={width}
|
value={width}
|
||||||
ref={refs.widthRef}
|
ref={refs.widthRef}
|
||||||
onChange={(value) => setWidth(value)}
|
onChange={(value) => setWidth(value)}
|
||||||
disableKeypad={disableKeypad}
|
|
||||||
options={{
|
options={{
|
||||||
allowNegative: false,
|
allowNegative: false,
|
||||||
allowDecimal: false
|
allowDecimal: false
|
||||||
@ -123,7 +120,6 @@ const PentagonDormer = forwardRef(({ disableKeypad }, refs) => {
|
|||||||
value={offsetWidth}
|
value={offsetWidth}
|
||||||
ref={refs.offsetWidthRef}
|
ref={refs.offsetWidthRef}
|
||||||
onChange={(value) => setOffsetWidth(value)}
|
onChange={(value) => setOffsetWidth(value)}
|
||||||
disableKeypad={disableKeypad}
|
|
||||||
options={{
|
options={{
|
||||||
allowNegative: false,
|
allowNegative: false,
|
||||||
allowDecimal: false
|
allowDecimal: false
|
||||||
@ -148,7 +144,6 @@ const PentagonDormer = forwardRef(({ disableKeypad }, refs) => {
|
|||||||
ref={refs.pitchRef}
|
ref={refs.pitchRef}
|
||||||
value={pitch}
|
value={pitch}
|
||||||
onChange={(value) => setPitch(value)}
|
onChange={(value) => setPitch(value)}
|
||||||
disableKeypad={disableKeypad}
|
|
||||||
options={{
|
options={{
|
||||||
allowNegative: false,
|
allowNegative: false,
|
||||||
allowDecimal: true //(index !== 0),
|
allowDecimal: true //(index !== 0),
|
||||||
|
|||||||
@ -3,7 +3,7 @@ import { useMessage } from '@/hooks/useMessage'
|
|||||||
import { INPUT_TYPE } from '@/common/common'
|
import { INPUT_TYPE } from '@/common/common'
|
||||||
import { CalculatorInput } from '@/components/common/input/CalcInput'
|
import { CalculatorInput } from '@/components/common/input/CalcInput'
|
||||||
|
|
||||||
const Shadow = forwardRef(({ disableKeypad }, refs) => {
|
const Shadow = forwardRef((props, refs) => {
|
||||||
const { getMessage } = useMessage()
|
const { getMessage } = useMessage()
|
||||||
|
|
||||||
const [selectedType, setSelectedType] = useState(INPUT_TYPE.FREE)
|
const [selectedType, setSelectedType] = useState(INPUT_TYPE.FREE)
|
||||||
@ -70,7 +70,6 @@ const Shadow = forwardRef(({ disableKeypad }, refs) => {
|
|||||||
ref={refs.widthRef}
|
ref={refs.widthRef}
|
||||||
onChange={(value) => setWidth(value)}
|
onChange={(value) => setWidth(value)}
|
||||||
disabled={selectedType !== INPUT_TYPE.DIMENSION}
|
disabled={selectedType !== INPUT_TYPE.DIMENSION}
|
||||||
disableKeypad={disableKeypad}
|
|
||||||
options={{
|
options={{
|
||||||
allowNegative: false,
|
allowNegative: false,
|
||||||
allowDecimal: false
|
allowDecimal: false
|
||||||
@ -102,7 +101,6 @@ const Shadow = forwardRef(({ disableKeypad }, refs) => {
|
|||||||
ref={refs.heightRef}
|
ref={refs.heightRef}
|
||||||
onChange={(value) => setHeight(value)}
|
onChange={(value) => setHeight(value)}
|
||||||
disabled={selectedType !== INPUT_TYPE.DIMENSION}
|
disabled={selectedType !== INPUT_TYPE.DIMENSION}
|
||||||
disableKeypad={disableKeypad}
|
|
||||||
options={{
|
options={{
|
||||||
allowNegative: false,
|
allowNegative: false,
|
||||||
allowDecimal: false
|
allowDecimal: false
|
||||||
|
|||||||
@ -3,7 +3,7 @@ import { useMessage } from '@/hooks/useMessage'
|
|||||||
import { forwardRef, useState } from 'react'
|
import { forwardRef, useState } from 'react'
|
||||||
import { CalculatorInput } from '@/components/common/input/CalcInput'
|
import { CalculatorInput } from '@/components/common/input/CalcInput'
|
||||||
|
|
||||||
const TriangleDormer = forwardRef(({ disableKeypad }, refs) => {
|
const TriangleDormer = forwardRef((props, refs) => {
|
||||||
const { getMessage } = useMessage()
|
const { getMessage } = useMessage()
|
||||||
const [direction, setDirection] = useState('down')
|
const [direction, setDirection] = useState('down')
|
||||||
refs.directionRef.current = direction
|
refs.directionRef.current = direction
|
||||||
@ -43,7 +43,6 @@ const [pitch, setPitch] = useState(4)
|
|||||||
value={height}
|
value={height}
|
||||||
ref={refs.heightRef}
|
ref={refs.heightRef}
|
||||||
onChange={(value) => setHeight(value)}
|
onChange={(value) => setHeight(value)}
|
||||||
disableKeypad={disableKeypad}
|
|
||||||
options={{
|
options={{
|
||||||
allowNegative: false,
|
allowNegative: false,
|
||||||
allowDecimal: false
|
allowDecimal: false
|
||||||
@ -68,7 +67,6 @@ const [pitch, setPitch] = useState(4)
|
|||||||
value={offset}
|
value={offset}
|
||||||
ref={refs.offsetRef}
|
ref={refs.offsetRef}
|
||||||
onChange={(value) => setOffset(value)}
|
onChange={(value) => setOffset(value)}
|
||||||
disableKeypad={disableKeypad}
|
|
||||||
options={{
|
options={{
|
||||||
allowNegative: false,
|
allowNegative: false,
|
||||||
allowDecimal: false
|
allowDecimal: false
|
||||||
@ -93,7 +91,6 @@ const [pitch, setPitch] = useState(4)
|
|||||||
ref={refs.pitchRef}
|
ref={refs.pitchRef}
|
||||||
value={pitch}
|
value={pitch}
|
||||||
onChange={(value) => setPitch(value)}
|
onChange={(value) => setPitch(value)}
|
||||||
disableKeypad={disableKeypad}
|
|
||||||
options={{
|
options={{
|
||||||
allowNegative: false,
|
allowNegative: false,
|
||||||
allowDecimal: true
|
allowDecimal: true
|
||||||
|
|||||||
@ -11,7 +11,6 @@ import DoublePitch from '@/components/floor-plan/modal/lineTypes/DoublePitch'
|
|||||||
import Diagonal from '@/components/floor-plan/modal/lineTypes/Diagonal'
|
import Diagonal from '@/components/floor-plan/modal/lineTypes/Diagonal'
|
||||||
import { usePopup } from '@/hooks/usePopup'
|
import { usePopup } from '@/hooks/usePopup'
|
||||||
import { useState } from 'react'
|
import { useState } from 'react'
|
||||||
import Image from 'next/image'
|
|
||||||
import { v4 as uuidv4 } from 'uuid'
|
import { v4 as uuidv4 } from 'uuid'
|
||||||
|
|
||||||
export default function WallLineSetting(props) {
|
export default function WallLineSetting(props) {
|
||||||
@ -19,7 +18,6 @@ export default function WallLineSetting(props) {
|
|||||||
const { addPopup, closePopup } = usePopup()
|
const { addPopup, closePopup } = usePopup()
|
||||||
const { getMessage } = useMessage()
|
const { getMessage } = useMessage()
|
||||||
const [propertiesId, setPropertiesId] = useState(uuidv4())
|
const [propertiesId, setPropertiesId] = useState(uuidv4())
|
||||||
const [useCalcPad, setUseCalcPad] = useState(false)
|
|
||||||
const {
|
const {
|
||||||
length1,
|
length1,
|
||||||
setLength1,
|
setLength1,
|
||||||
@ -48,15 +46,12 @@ export default function WallLineSetting(props) {
|
|||||||
handleFix,
|
handleFix,
|
||||||
} = useOuterLineWall(id, propertiesId)
|
} = useOuterLineWall(id, propertiesId)
|
||||||
|
|
||||||
const disableKeypad = !useCalcPad
|
|
||||||
|
|
||||||
const outerLineProps = {
|
const outerLineProps = {
|
||||||
length1,
|
length1,
|
||||||
setLength1,
|
setLength1,
|
||||||
length1Ref,
|
length1Ref,
|
||||||
arrow1,
|
arrow1,
|
||||||
setArrow1,
|
setArrow1,
|
||||||
disableKeypad,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const rightAngleProps = {
|
const rightAngleProps = {
|
||||||
@ -70,7 +65,6 @@ export default function WallLineSetting(props) {
|
|||||||
setArrow1,
|
setArrow1,
|
||||||
arrow2,
|
arrow2,
|
||||||
setArrow2,
|
setArrow2,
|
||||||
disableKeypad,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const doublePitchProps = {
|
const doublePitchProps = {
|
||||||
@ -92,7 +86,6 @@ export default function WallLineSetting(props) {
|
|||||||
setArrow2,
|
setArrow2,
|
||||||
arrow1Ref,
|
arrow1Ref,
|
||||||
arrow2Ref,
|
arrow2Ref,
|
||||||
disableKeypad,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const angleProps = {
|
const angleProps = {
|
||||||
@ -102,7 +95,6 @@ export default function WallLineSetting(props) {
|
|||||||
length1,
|
length1,
|
||||||
setLength1,
|
setLength1,
|
||||||
length1Ref,
|
length1Ref,
|
||||||
disableKeypad,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const diagonalLineProps = {
|
const diagonalLineProps = {
|
||||||
@ -119,7 +111,6 @@ export default function WallLineSetting(props) {
|
|||||||
setArrow1,
|
setArrow1,
|
||||||
arrow2,
|
arrow2,
|
||||||
setArrow2,
|
setArrow2,
|
||||||
disableKeypad,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@ -173,9 +164,6 @@ export default function WallLineSetting(props) {
|
|||||||
</div>
|
</div>
|
||||||
<div className="normal-font mt10">{getMessage('outerLine.property.info')}</div>
|
<div className="normal-font mt10">{getMessage('outerLine.property.info')}</div>
|
||||||
<div className="grid-btn-wrap">
|
<div className="grid-btn-wrap">
|
||||||
<button className="mr5" style={{ verticalAlign: 'middle' }} 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>
|
|
||||||
<button className="btn-frame modal mr5" onClick={handleRollback}>
|
<button className="btn-frame modal mr5" onClick={handleRollback}>
|
||||||
{getMessage('modal.cover.outline.rollback')}
|
{getMessage('modal.cover.outline.rollback')}
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@ -9,13 +9,11 @@ import { OUTER_LINE_TYPE } from '@/store/outerLineAtom'
|
|||||||
import OuterLineWall from '@/components/floor-plan/modal/lineTypes/OuterLineWall'
|
import OuterLineWall from '@/components/floor-plan/modal/lineTypes/OuterLineWall'
|
||||||
import { usePlacementShapeDrawing } from '@/hooks/surface/usePlacementShapeDrawing'
|
import { usePlacementShapeDrawing } from '@/hooks/surface/usePlacementShapeDrawing'
|
||||||
import { usePopup } from '@/hooks/usePopup'
|
import { usePopup } from '@/hooks/usePopup'
|
||||||
import Image from 'next/image'
|
|
||||||
|
|
||||||
export default function PlacementShapeDrawing({ id, pos = { x: 50, y: 230 } }) {
|
export default function PlacementShapeDrawing({ id, pos = { x: 50, y: 230 } }) {
|
||||||
const { getMessage } = useMessage()
|
const { getMessage } = useMessage()
|
||||||
const { closePopup } = usePopup()
|
const { closePopup } = usePopup()
|
||||||
const [buttonAct, setButtonAct] = useState(1)
|
const [buttonAct, setButtonAct] = useState(1)
|
||||||
const [useCalcPad, setUseCalcPad] = useState(false)
|
|
||||||
const types = [
|
const types = [
|
||||||
{ id: 1, name: getMessage('straight.line'), type: OUTER_LINE_TYPE.OUTER_LINE },
|
{ id: 1, name: getMessage('straight.line'), type: OUTER_LINE_TYPE.OUTER_LINE },
|
||||||
{ id: 2, name: getMessage('right.angle'), type: OUTER_LINE_TYPE.RIGHT_ANGLE },
|
{ id: 2, name: getMessage('right.angle'), type: OUTER_LINE_TYPE.RIGHT_ANGLE },
|
||||||
@ -51,15 +49,12 @@ export default function PlacementShapeDrawing({ id, pos = { x: 50, y: 230 } }) {
|
|||||||
handleFix,
|
handleFix,
|
||||||
} = usePlacementShapeDrawing(id)
|
} = usePlacementShapeDrawing(id)
|
||||||
|
|
||||||
const disableKeypad = !useCalcPad
|
|
||||||
|
|
||||||
const outerLineProps = {
|
const outerLineProps = {
|
||||||
length1,
|
length1,
|
||||||
setLength1,
|
setLength1,
|
||||||
length1Ref,
|
length1Ref,
|
||||||
arrow1,
|
arrow1,
|
||||||
setArrow1,
|
setArrow1,
|
||||||
disableKeypad,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const rightAngleProps = {
|
const rightAngleProps = {
|
||||||
@ -73,7 +68,6 @@ export default function PlacementShapeDrawing({ id, pos = { x: 50, y: 230 } }) {
|
|||||||
setArrow1,
|
setArrow1,
|
||||||
arrow2,
|
arrow2,
|
||||||
setArrow2,
|
setArrow2,
|
||||||
disableKeypad,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const doublePitchProps = {
|
const doublePitchProps = {
|
||||||
@ -95,7 +89,6 @@ export default function PlacementShapeDrawing({ id, pos = { x: 50, y: 230 } }) {
|
|||||||
setArrow2,
|
setArrow2,
|
||||||
arrow1Ref,
|
arrow1Ref,
|
||||||
arrow2Ref,
|
arrow2Ref,
|
||||||
disableKeypad,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const angleProps = {
|
const angleProps = {
|
||||||
@ -105,7 +98,6 @@ export default function PlacementShapeDrawing({ id, pos = { x: 50, y: 230 } }) {
|
|||||||
length1,
|
length1,
|
||||||
setLength1,
|
setLength1,
|
||||||
length1Ref,
|
length1Ref,
|
||||||
disableKeypad,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const diagonalLineProps = {
|
const diagonalLineProps = {
|
||||||
@ -122,7 +114,6 @@ export default function PlacementShapeDrawing({ id, pos = { x: 50, y: 230 } }) {
|
|||||||
setArrow1,
|
setArrow1,
|
||||||
arrow2,
|
arrow2,
|
||||||
setArrow2,
|
setArrow2,
|
||||||
disableKeypad,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const onClickButton = (button) => {
|
const onClickButton = (button) => {
|
||||||
@ -149,9 +140,6 @@ export default function PlacementShapeDrawing({ id, pos = { x: 50, y: 230 } }) {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="grid-btn-wrap">
|
<div className="grid-btn-wrap">
|
||||||
<button className="mr5" style={{ verticalAlign: 'middle' }} 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>
|
|
||||||
<button className="btn-frame modal mr5" onClick={handleRollback}>
|
<button className="btn-frame modal mr5" onClick={handleRollback}>
|
||||||
{getMessage('modal.cover.outline.rollback')}
|
{getMessage('modal.cover.outline.rollback')}
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { useEffect, useRef, useState } from 'react'
|
import { useEffect, useRef, useState } from 'react'
|
||||||
import Image from 'next/image'
|
|
||||||
import { useMessage } from '@/hooks/useMessage'
|
import { useMessage } from '@/hooks/useMessage'
|
||||||
import { usePopup } from '@/hooks/usePopup'
|
import { usePopup } from '@/hooks/usePopup'
|
||||||
|
|
||||||
@ -35,8 +35,6 @@ export const ROOF_MATERIAL_LAYOUT = {
|
|||||||
export default function PlacementShapeSetting({ id, pos = { x: 50, y: 180 }, planNo, openPoint }) {
|
export default function PlacementShapeSetting({ id, pos = { x: 50, y: 180 }, planNo, openPoint }) {
|
||||||
const [showSizeGuideModal, setShowSizeGuidModal] = useState(false)
|
const [showSizeGuideModal, setShowSizeGuidModal] = useState(false)
|
||||||
const [showMaterialGuideModal, setShowMaterialGuidModal] = useState(false)
|
const [showMaterialGuideModal, setShowMaterialGuidModal] = useState(false)
|
||||||
const [useCalcPad, setUseCalcPad] = useState(false)
|
|
||||||
const disableKeypad = !useCalcPad
|
|
||||||
const { getMessage } = useMessage()
|
const { getMessage } = useMessage()
|
||||||
const roofMaterials = useRecoilValue(roofMaterialsAtom)
|
const roofMaterials = useRecoilValue(roofMaterialsAtom)
|
||||||
|
|
||||||
@ -400,7 +398,6 @@ export default function PlacementShapeSetting({ id, pos = { x: 50, y: 180 }, pla
|
|||||||
}}
|
}}
|
||||||
readOnly={currentRoof?.widAuth === 'R'}
|
readOnly={currentRoof?.widAuth === 'R'}
|
||||||
disabled={currentRoof?.roofSizeSet === '3'}
|
disabled={currentRoof?.roofSizeSet === '3'}
|
||||||
disableKeypad={disableKeypad}
|
|
||||||
options={{
|
options={{
|
||||||
allowNegative: false,
|
allowNegative: false,
|
||||||
allowDecimal: false, //(index !== 0),
|
allowDecimal: false, //(index !== 0),
|
||||||
@ -436,7 +433,6 @@ export default function PlacementShapeSetting({ id, pos = { x: 50, y: 180 }, pla
|
|||||||
}}
|
}}
|
||||||
readOnly={currentRoof?.lenAuth === 'R'}
|
readOnly={currentRoof?.lenAuth === 'R'}
|
||||||
disabled={currentRoof?.roofSizeSet === '3'}
|
disabled={currentRoof?.roofSizeSet === '3'}
|
||||||
disableKeypad={disableKeypad}
|
|
||||||
options={{
|
options={{
|
||||||
allowNegative: false,
|
allowNegative: false,
|
||||||
allowDecimal: false, //(index !== 0),
|
allowDecimal: false, //(index !== 0),
|
||||||
@ -494,7 +490,6 @@ export default function PlacementShapeSetting({ id, pos = { x: 50, y: 180 }, pla
|
|||||||
}}
|
}}
|
||||||
readOnly={currentRoof?.roofPchAuth === 'R'}
|
readOnly={currentRoof?.roofPchAuth === 'R'}
|
||||||
disabled={currentRoof?.roofSizeSet === '3'}
|
disabled={currentRoof?.roofSizeSet === '3'}
|
||||||
disableKeypad={disableKeypad}
|
|
||||||
options={{
|
options={{
|
||||||
allowNegative: false,
|
allowNegative: false,
|
||||||
allowDecimal: false, //(index !== 0),
|
allowDecimal: false, //(index !== 0),
|
||||||
@ -593,7 +588,6 @@ export default function PlacementShapeSetting({ id, pos = { x: 50, y: 180 }, pla
|
|||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
disableKeypad={disableKeypad}
|
|
||||||
options={{
|
options={{
|
||||||
allowNegative: false,
|
allowNegative: false,
|
||||||
allowDecimal: true,
|
allowDecimal: true,
|
||||||
@ -609,10 +603,7 @@ export default function PlacementShapeSetting({ id, pos = { x: 50, y: 180 }, pla
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<div className="grid-btn-wrap" style={{ display: 'flex', alignItems: 'center', justifyContent: 'flex-end', gap: '5px' }}>
|
<div className="grid-btn-wrap">
|
||||||
<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>
|
|
||||||
<button className="btn-frame modal act" onClick={handleSaveBtn}>
|
<button className="btn-frame modal act" onClick={handleSaveBtn}>
|
||||||
{getMessage('modal.common.save')}
|
{getMessage('modal.common.save')}
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@ -5,7 +5,7 @@ import { CalculatorInput } from '@/components/common/input/CalcInput'
|
|||||||
|
|
||||||
const PlacementSurface = forwardRef((props, refs) => {
|
const PlacementSurface = forwardRef((props, refs) => {
|
||||||
const { getMessage } = useMessage()
|
const { getMessage } = useMessage()
|
||||||
const { id, lines, info, rotate, xInversion, yInversion, disableKeypad } = props
|
const { id, lines, info, rotate, xInversion, yInversion } = props
|
||||||
let { length1, length2, length3, length4, length5, lengthetc, azimuth } = refs
|
let { length1, length2, length3, length4, length5, lengthetc, azimuth } = refs
|
||||||
|
|
||||||
const [azimuthDirection, setAzimuthDirection] = useState(azimuth.current)
|
const [azimuthDirection, setAzimuthDirection] = useState(azimuth.current)
|
||||||
@ -114,7 +114,6 @@ const PlacementSurface = forwardRef((props, refs) => {
|
|||||||
? length4
|
? length4
|
||||||
: length5
|
: length5
|
||||||
}
|
}
|
||||||
disableKeypad={disableKeypad}
|
|
||||||
options={{
|
options={{
|
||||||
allowNegative: false,
|
allowNegative: false,
|
||||||
allowDecimal: false
|
allowDecimal: false
|
||||||
|
|||||||
@ -19,7 +19,6 @@ export default function PlacementSurfaceSetting({ id, pos = { x: 50, y: 230 } })
|
|||||||
const canvas = useRecoilValue(canvasState)
|
const canvas = useRecoilValue(canvasState)
|
||||||
const { closePopup } = usePopup()
|
const { closePopup } = usePopup()
|
||||||
const [isHidden, setIsHidden] = useState(false)
|
const [isHidden, setIsHidden] = useState(false)
|
||||||
const [useCalcPad, setUseCalcPad] = useState(false)
|
|
||||||
|
|
||||||
const { applySurfaceShape } = useSurfaceShapeBatch({ isHidden, setIsHidden })
|
const { applySurfaceShape } = useSurfaceShapeBatch({ isHidden, setIsHidden })
|
||||||
|
|
||||||
@ -218,7 +217,6 @@ export default function PlacementSurfaceSetting({ id, pos = { x: 50, y: 230 } })
|
|||||||
rotate,
|
rotate,
|
||||||
xInversion,
|
xInversion,
|
||||||
yInversion,
|
yInversion,
|
||||||
disableKeypad: !useCalcPad,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const getInversionState = () => {
|
const getInversionState = () => {
|
||||||
@ -293,10 +291,7 @@ export default function PlacementSurfaceSetting({ id, pos = { x: 50, y: 230 } })
|
|||||||
</div>
|
</div>
|
||||||
<div className="plane-detail-wrap">
|
<div className="plane-detail-wrap">
|
||||||
<PlacementSurface {...placementSurfaceProps} ref={surfaceRefs} />
|
<PlacementSurface {...placementSurfaceProps} ref={surfaceRefs} />
|
||||||
<div className="plane-shape-btn" style={{ display: 'flex', alignItems: 'center', gap: '5px' }}>
|
<div className="plane-shape-btn">
|
||||||
<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>
|
|
||||||
<button className="btn-frame modal act" onClick={applySurfaces}>
|
<button className="btn-frame modal act" onClick={applySurfaces}>
|
||||||
{getMessage('write')}
|
{getMessage('write')}
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
import { useMessage } from '@/hooks/useMessage'
|
import { useMessage } from '@/hooks/useMessage'
|
||||||
import WithDraggable from '@/components/common/draggable/WithDraggable'
|
import WithDraggable from '@/components/common/draggable/WithDraggable'
|
||||||
import Image from 'next/image'
|
|
||||||
import QSelectBox from '@/components/common/select/QSelectBox'
|
import QSelectBox from '@/components/common/select/QSelectBox'
|
||||||
import { useRoofAllocationSetting } from '@/hooks/roofcover/useRoofAllocationSetting'
|
import { useRoofAllocationSetting } from '@/hooks/roofcover/useRoofAllocationSetting'
|
||||||
import { usePopup } from '@/hooks/usePopup'
|
import { usePopup } from '@/hooks/usePopup'
|
||||||
@ -39,8 +38,6 @@ export default function ContextRoofAllocationSetting(props) {
|
|||||||
handleChangePitch,
|
handleChangePitch,
|
||||||
} = useRoofAllocationSetting(id)
|
} = useRoofAllocationSetting(id)
|
||||||
|
|
||||||
const [useCalcPad, setUseCalcPad] = useState(false)
|
|
||||||
const disableKeypad = !useCalcPad
|
|
||||||
const { findCommonCode } = useCommonCode()
|
const { findCommonCode } = useCommonCode()
|
||||||
const pitchText = useRecoilValue(pitchTextSelector)
|
const pitchText = useRecoilValue(pitchTextSelector)
|
||||||
const globalLocale = useRecoilValue(globalLocaleStore)
|
const globalLocale = useRecoilValue(globalLocaleStore)
|
||||||
@ -226,7 +223,6 @@ export default function ContextRoofAllocationSetting(props) {
|
|||||||
onChange={(value) => {
|
onChange={(value) => {
|
||||||
handleChangePitch(value, index)
|
handleChangePitch(value, index)
|
||||||
}}
|
}}
|
||||||
disableKeypad={disableKeypad}
|
|
||||||
options={{
|
options={{
|
||||||
allowNegative: false,
|
allowNegative: false,
|
||||||
allowDecimal: true //(index !== 0),
|
allowDecimal: true //(index !== 0),
|
||||||
@ -242,10 +238,7 @@ export default function ContextRoofAllocationSetting(props) {
|
|||||||
})}
|
})}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="grid-btn-wrap" style={{ display: 'flex', alignItems: 'center', justifyContent: 'flex-end', gap: '5px' }}>
|
<div className="grid-btn-wrap">
|
||||||
<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>
|
|
||||||
<button className="btn-frame modal act" onClick={handleSaveContext}>
|
<button className="btn-frame modal act" onClick={handleSaveContext}>
|
||||||
{getMessage('modal.roof.alloc.apply')}
|
{getMessage('modal.roof.alloc.apply')}
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
import { useMessage } from '@/hooks/useMessage'
|
import { useMessage } from '@/hooks/useMessage'
|
||||||
import WithDraggable from '@/components/common/draggable/WithDraggable'
|
import WithDraggable from '@/components/common/draggable/WithDraggable'
|
||||||
import Image from 'next/image'
|
|
||||||
import QSelectBox from '@/components/common/select/QSelectBox'
|
import QSelectBox from '@/components/common/select/QSelectBox'
|
||||||
import { useRoofAllocationSetting } from '@/hooks/roofcover/useRoofAllocationSetting'
|
import { useRoofAllocationSetting } from '@/hooks/roofcover/useRoofAllocationSetting'
|
||||||
import { usePopup } from '@/hooks/usePopup'
|
import { usePopup } from '@/hooks/usePopup'
|
||||||
@ -38,8 +37,6 @@ export default function RoofAllocationSetting(props) {
|
|||||||
handleChangeInput,
|
handleChangeInput,
|
||||||
handleChangePitch,
|
handleChangePitch,
|
||||||
} = useRoofAllocationSetting(id)
|
} = useRoofAllocationSetting(id)
|
||||||
const [useCalcPad, setUseCalcPad] = useState(false)
|
|
||||||
const disableKeypad = !useCalcPad
|
|
||||||
const pitchText = useRecoilValue(pitchTextSelector)
|
const pitchText = useRecoilValue(pitchTextSelector)
|
||||||
const { findCommonCode } = useCommonCode()
|
const { findCommonCode } = useCommonCode()
|
||||||
const [raftCodes, setRaftCodes] = useState([])
|
const [raftCodes, setRaftCodes] = useState([])
|
||||||
@ -227,7 +224,6 @@ export default function RoofAllocationSetting(props) {
|
|||||||
onChange={(value) => {
|
onChange={(value) => {
|
||||||
handleChangePitch(value, index)
|
handleChangePitch(value, index)
|
||||||
}}
|
}}
|
||||||
disableKeypad={disableKeypad}
|
|
||||||
options={{
|
options={{
|
||||||
allowNegative: false,
|
allowNegative: false,
|
||||||
allowDecimal: true //(index !== 0),
|
allowDecimal: true //(index !== 0),
|
||||||
@ -264,10 +260,7 @@ export default function RoofAllocationSetting(props) {
|
|||||||
})}
|
})}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="grid-btn-wrap" style={{ display: 'flex', alignItems: 'center', justifyContent: 'flex-end', gap: '5px' }}>
|
<div className="grid-btn-wrap">
|
||||||
<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>
|
|
||||||
<button className="btn-frame modal act" onClick={handleSave}>
|
<button className="btn-frame modal act" onClick={handleSave}>
|
||||||
{getMessage('modal.roof.alloc.apply')}
|
{getMessage('modal.roof.alloc.apply')}
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@ -7,11 +7,9 @@ import Direction from '@/components/floor-plan/modal/roofShape/type/Direction'
|
|||||||
import { useRoofShapeSetting } from '@/hooks/roofcover/useRoofShapeSetting'
|
import { useRoofShapeSetting } from '@/hooks/roofcover/useRoofShapeSetting'
|
||||||
import { useMessage } from '@/hooks/useMessage'
|
import { useMessage } from '@/hooks/useMessage'
|
||||||
import { usePopup } from '@/hooks/usePopup'
|
import { usePopup } from '@/hooks/usePopup'
|
||||||
import { useState } from 'react'
|
|
||||||
|
|
||||||
export default function RoofShapeSetting({ id, pos = { x: 50, y: 230 } }) {
|
export default function RoofShapeSetting({ id, pos = { x: 50, y: 230 } }) {
|
||||||
const { getMessage } = useMessage()
|
const { getMessage } = useMessage()
|
||||||
const [useCalcPad, setUseCalcPad] = useState(false)
|
|
||||||
const {
|
const {
|
||||||
shapeNum,
|
shapeNum,
|
||||||
setShapeNum,
|
setShapeNum,
|
||||||
@ -46,10 +44,8 @@ export default function RoofShapeSetting({ id, pos = { x: 50, y: 230 } }) {
|
|||||||
} = useRoofShapeSetting(id)
|
} = useRoofShapeSetting(id)
|
||||||
const { closePopup } = usePopup()
|
const { closePopup } = usePopup()
|
||||||
|
|
||||||
const disableKeypad = !useCalcPad
|
const ridgeProps = { pitch, setPitch, eavesOffset, setEavesOffset, pitchText }
|
||||||
|
const patternProps = { pitch, setPitch, eavesOffset, setEavesOffset, gableOffset, setGableOffset, pitchText }
|
||||||
const ridgeProps = { pitch, setPitch, eavesOffset, setEavesOffset, pitchText, disableKeypad }
|
|
||||||
const patternProps = { pitch, setPitch, eavesOffset, setEavesOffset, gableOffset, setGableOffset, pitchText, disableKeypad }
|
|
||||||
const sideProps = {
|
const sideProps = {
|
||||||
pitch,
|
pitch,
|
||||||
setPitch,
|
setPitch,
|
||||||
@ -77,7 +73,6 @@ export default function RoofShapeSetting({ id, pos = { x: 50, y: 230 } }) {
|
|||||||
handleConfirm,
|
handleConfirm,
|
||||||
handleRollBack,
|
handleRollBack,
|
||||||
pitchText,
|
pitchText,
|
||||||
disableKeypad,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const directionProps = {
|
const directionProps = {
|
||||||
@ -90,7 +85,6 @@ export default function RoofShapeSetting({ id, pos = { x: 50, y: 230 } }) {
|
|||||||
shedWidth,
|
shedWidth,
|
||||||
setShedWidth,
|
setShedWidth,
|
||||||
pitchText,
|
pitchText,
|
||||||
disableKeypad,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@ -114,9 +108,6 @@ export default function RoofShapeSetting({ id, pos = { x: 50, y: 230 } }) {
|
|||||||
{(shapeNum === 5 || shapeNum === 6 || shapeNum === 7 || shapeNum === 8) && <Direction {...directionProps} />}
|
{(shapeNum === 5 || shapeNum === 6 || shapeNum === 7 || shapeNum === 8) && <Direction {...directionProps} />}
|
||||||
</div>
|
</div>
|
||||||
<div className="grid-btn-wrap">
|
<div className="grid-btn-wrap">
|
||||||
<button className="mr5" style={{ verticalAlign: 'middle' }} 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>
|
|
||||||
<button className="btn-frame modal act" onClick={() => handleSave(id)}>
|
<button className="btn-frame modal act" onClick={() => handleSave(id)}>
|
||||||
{getMessage('common.setting.finish')}
|
{getMessage('common.setting.finish')}
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@ -2,7 +2,7 @@ import { useMessage } from '@/hooks/useMessage'
|
|||||||
import { normalizeDecimalLimit, normalizeDigits } from '@/util/input-utils'
|
import { normalizeDecimalLimit, normalizeDigits } from '@/util/input-utils'
|
||||||
import { CalculatorInput } from '@/components/common/input/CalcInput'
|
import { CalculatorInput } from '@/components/common/input/CalcInput'
|
||||||
|
|
||||||
export default function Direction({ pitch, setPitch, eavesOffset, setEavesOffset, gableOffset, setGableOffset, shedWidth, setShedWidth, pitchText, disableKeypad }) {
|
export default function Direction({ pitch, setPitch, eavesOffset, setEavesOffset, gableOffset, setGableOffset, shedWidth, setShedWidth, pitchText }) {
|
||||||
const { getMessage } = useMessage()
|
const { getMessage } = useMessage()
|
||||||
return (
|
return (
|
||||||
<div className="setting-box">
|
<div className="setting-box">
|
||||||
@ -24,7 +24,6 @@ export default function Direction({ pitch, setPitch, eavesOffset, setEavesOffset
|
|||||||
className="input-origin block"
|
className="input-origin block"
|
||||||
value={pitch}
|
value={pitch}
|
||||||
onChange={(value) => setPitch(value)}
|
onChange={(value) => setPitch(value)}
|
||||||
disableKeypad={disableKeypad}
|
|
||||||
options={{
|
options={{
|
||||||
allowNegative: false,
|
allowNegative: false,
|
||||||
allowDecimal: true //(index !== 0),
|
allowDecimal: true //(index !== 0),
|
||||||
@ -51,7 +50,6 @@ export default function Direction({ pitch, setPitch, eavesOffset, setEavesOffset
|
|||||||
className="input-origin block"
|
className="input-origin block"
|
||||||
value={eavesOffset}
|
value={eavesOffset}
|
||||||
onChange={(value) => setEavesOffset(value)}
|
onChange={(value) => setEavesOffset(value)}
|
||||||
disableKeypad={disableKeypad}
|
|
||||||
options={{
|
options={{
|
||||||
allowNegative: false,
|
allowNegative: false,
|
||||||
allowDecimal: false //(index !== 0),
|
allowDecimal: false //(index !== 0),
|
||||||
@ -78,7 +76,6 @@ export default function Direction({ pitch, setPitch, eavesOffset, setEavesOffset
|
|||||||
className="input-origin block"
|
className="input-origin block"
|
||||||
value={gableOffset}
|
value={gableOffset}
|
||||||
onChange={(value) => setGableOffset(value)}
|
onChange={(value) => setGableOffset(value)}
|
||||||
disableKeypad={disableKeypad}
|
|
||||||
options={{
|
options={{
|
||||||
allowNegative: false,
|
allowNegative: false,
|
||||||
allowDecimal: false //(index !== 0),
|
allowDecimal: false //(index !== 0),
|
||||||
@ -105,7 +102,6 @@ export default function Direction({ pitch, setPitch, eavesOffset, setEavesOffset
|
|||||||
className="input-origin block"
|
className="input-origin block"
|
||||||
value={shedWidth}
|
value={shedWidth}
|
||||||
onChange={(value) => setShedWidth(value)}
|
onChange={(value) => setShedWidth(value)}
|
||||||
disableKeypad={disableKeypad}
|
|
||||||
options={{
|
options={{
|
||||||
allowNegative: false,
|
allowNegative: false,
|
||||||
allowDecimal: false //(index !== 0),
|
allowDecimal: false //(index !== 0),
|
||||||
|
|||||||
@ -4,7 +4,7 @@ import { CalculatorInput } from '@/components/common/input/CalcInput'
|
|||||||
|
|
||||||
export default function Pattern(props) {
|
export default function Pattern(props) {
|
||||||
const { getMessage } = useMessage()
|
const { getMessage } = useMessage()
|
||||||
const { pitch, setPitch, eavesOffset, setEavesOffset, gableOffset, setGableOffset, pitchText, disableKeypad } = props
|
const { pitch, setPitch, eavesOffset, setEavesOffset, gableOffset, setGableOffset, pitchText } = props
|
||||||
return (
|
return (
|
||||||
<div className="setting-box">
|
<div className="setting-box">
|
||||||
<div className="outline-form mb10">
|
<div className="outline-form mb10">
|
||||||
@ -21,7 +21,6 @@ export default function Pattern(props) {
|
|||||||
className="input-origin block"
|
className="input-origin block"
|
||||||
value={pitch}
|
value={pitch}
|
||||||
onChange={(value) => setPitch(value)}
|
onChange={(value) => setPitch(value)}
|
||||||
disableKeypad={disableKeypad}
|
|
||||||
options={{
|
options={{
|
||||||
allowNegative: false,
|
allowNegative: false,
|
||||||
allowDecimal: true //(index !== 0),
|
allowDecimal: true //(index !== 0),
|
||||||
@ -44,7 +43,6 @@ export default function Pattern(props) {
|
|||||||
className="input-origin block"
|
className="input-origin block"
|
||||||
value={eavesOffset}
|
value={eavesOffset}
|
||||||
onChange={(value) => setEavesOffset(value)}
|
onChange={(value) => setEavesOffset(value)}
|
||||||
disableKeypad={disableKeypad}
|
|
||||||
options={{
|
options={{
|
||||||
allowNegative: false,
|
allowNegative: false,
|
||||||
allowDecimal: false //(index !== 0),
|
allowDecimal: false //(index !== 0),
|
||||||
@ -67,7 +65,6 @@ export default function Pattern(props) {
|
|||||||
className="input-origin block"
|
className="input-origin block"
|
||||||
value={gableOffset}
|
value={gableOffset}
|
||||||
onChange={(value) => setGableOffset(value)}
|
onChange={(value) => setGableOffset(value)}
|
||||||
disableKeypad={disableKeypad}
|
|
||||||
options={{
|
options={{
|
||||||
allowNegative: false,
|
allowNegative: false,
|
||||||
allowDecimal: false //(index !== 0),
|
allowDecimal: false //(index !== 0),
|
||||||
|
|||||||
@ -5,7 +5,7 @@ import { CalculatorInput } from '@/components/common/input/CalcInput'
|
|||||||
|
|
||||||
export default function Ridge(props) {
|
export default function Ridge(props) {
|
||||||
const { getMessage } = useMessage()
|
const { getMessage } = useMessage()
|
||||||
const { pitch, setPitch, eavesOffset, setEavesOffset, pitchText, disableKeypad } = props
|
const { pitch, setPitch, eavesOffset, setEavesOffset, pitchText } = props
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="setting-box">
|
<div className="setting-box">
|
||||||
@ -23,7 +23,6 @@ export default function Ridge(props) {
|
|||||||
className="input-origin block"
|
className="input-origin block"
|
||||||
value={pitch}
|
value={pitch}
|
||||||
onChange={(value) => setPitch(value)}
|
onChange={(value) => setPitch(value)}
|
||||||
disableKeypad={disableKeypad}
|
|
||||||
options={{
|
options={{
|
||||||
allowNegative: false,
|
allowNegative: false,
|
||||||
allowDecimal: true //(index !== 0),
|
allowDecimal: true //(index !== 0),
|
||||||
@ -46,7 +45,6 @@ export default function Ridge(props) {
|
|||||||
className="input-origin block"
|
className="input-origin block"
|
||||||
value={eavesOffset}
|
value={eavesOffset}
|
||||||
onChange={(value) => setEavesOffset(value)}
|
onChange={(value) => setEavesOffset(value)}
|
||||||
disableKeypad={disableKeypad}
|
|
||||||
options={{
|
options={{
|
||||||
allowNegative: false,
|
allowNegative: false,
|
||||||
allowDecimal: false //(index !== 0),
|
allowDecimal: false //(index !== 0),
|
||||||
|
|||||||
@ -35,15 +35,14 @@ export default function Side(props) {
|
|||||||
pitchText,
|
pitchText,
|
||||||
shedPitch,
|
shedPitch,
|
||||||
setShedPitch,
|
setShedPitch,
|
||||||
disableKeypad,
|
|
||||||
} = props
|
} = props
|
||||||
|
|
||||||
const eavesProps = { pitch, setPitch, eavesOffset, setEavesOffset, pitchText, disableKeypad }
|
const eavesProps = { pitch, setPitch, eavesOffset, setEavesOffset, pitchText }
|
||||||
const gableProps = { gableOffset, setGableOffset, disableKeypad }
|
const gableProps = { gableOffset, setGableOffset }
|
||||||
const wallProps = { sleeveOffset, setSleeveOffset, hasSleeve, setHasSleeve, disableKeypad }
|
const wallProps = { sleeveOffset, setSleeveOffset, hasSleeve, setHasSleeve }
|
||||||
const hipAndGableProps = { pitch, setPitch, eavesOffset, setEavesOffset, hipAndGableWidth, setHipAndGableWidth, pitchText, disableKeypad }
|
const hipAndGableProps = { pitch, setPitch, eavesOffset, setEavesOffset, hipAndGableWidth, setHipAndGableWidth, pitchText }
|
||||||
const jerkinheadProps = { gableOffset, setGableOffset, jerkinHeadWidth, setJerkinHeadWidth, jerkinHeadPitch, setJerkinHeadPitch, pitchText, disableKeypad }
|
const jerkinheadProps = { gableOffset, setGableOffset, jerkinHeadWidth, setJerkinHeadWidth, jerkinHeadPitch, setJerkinHeadPitch, pitchText }
|
||||||
const shedProps = { shedWidth, setShedWidth, shedPitch, setShedPitch, pitchText, disableKeypad }
|
const shedProps = { shedWidth, setShedWidth, shedPitch, setShedPitch, pitchText }
|
||||||
|
|
||||||
const { getMessage } = useMessage()
|
const { getMessage } = useMessage()
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@ import { useMessage } from '@/hooks/useMessage'
|
|||||||
import { normalizeDecimalLimit, normalizeDigits } from '@/util/input-utils'
|
import { normalizeDecimalLimit, normalizeDigits } from '@/util/input-utils'
|
||||||
import { CalculatorInput } from '@/components/common/input/CalcInput'
|
import { CalculatorInput } from '@/components/common/input/CalcInput'
|
||||||
|
|
||||||
export default function Eaves({ pitch, setPitch, eavesOffset, setEavesOffset, pitchText, disableKeypad }) {
|
export default function Eaves({ pitch, setPitch, eavesOffset, setEavesOffset, pitchText }) {
|
||||||
const { getMessage } = useMessage()
|
const { getMessage } = useMessage()
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
@ -20,7 +20,6 @@ export default function Eaves({ pitch, setPitch, eavesOffset, setEavesOffset, pi
|
|||||||
className="input-origin block"
|
className="input-origin block"
|
||||||
value={pitch}
|
value={pitch}
|
||||||
onChange={(value) => setPitch(value)}
|
onChange={(value) => setPitch(value)}
|
||||||
disableKeypad={disableKeypad}
|
|
||||||
options={{
|
options={{
|
||||||
allowNegative: false,
|
allowNegative: false,
|
||||||
allowDecimal: true //(index !== 0),
|
allowDecimal: true //(index !== 0),
|
||||||
@ -44,7 +43,6 @@ export default function Eaves({ pitch, setPitch, eavesOffset, setEavesOffset, pi
|
|||||||
className="input-origin block"
|
className="input-origin block"
|
||||||
value={eavesOffset}
|
value={eavesOffset}
|
||||||
onChange={(value) => setEavesOffset(value)}
|
onChange={(value) => setEavesOffset(value)}
|
||||||
disableKeypad={disableKeypad}
|
|
||||||
options={{
|
options={{
|
||||||
allowNegative: false,
|
allowNegative: false,
|
||||||
allowDecimal: false //(index !== 0),
|
allowDecimal: false //(index !== 0),
|
||||||
|
|||||||
@ -3,7 +3,7 @@ import { useEffect } from 'react'
|
|||||||
import { normalizeDigits } from '@/util/input-utils'
|
import { normalizeDigits } from '@/util/input-utils'
|
||||||
import { CalculatorInput } from '@/components/common/input/CalcInput'
|
import { CalculatorInput } from '@/components/common/input/CalcInput'
|
||||||
|
|
||||||
export default function Gable({ gableOffset, setGableOffset, disableKeypad }) {
|
export default function Gable({ gableOffset, setGableOffset }) {
|
||||||
const { getMessage } = useMessage()
|
const { getMessage } = useMessage()
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@ -20,7 +20,6 @@ export default function Gable({ gableOffset, setGableOffset, disableKeypad }) {
|
|||||||
className="input-origin block"
|
className="input-origin block"
|
||||||
value={gableOffset}
|
value={gableOffset}
|
||||||
onChange={(value) => setGableOffset(value)}
|
onChange={(value) => setGableOffset(value)}
|
||||||
disableKeypad={disableKeypad}
|
|
||||||
options={{
|
options={{
|
||||||
allowNegative: false,
|
allowNegative: false,
|
||||||
allowDecimal: false //(index !== 0),
|
allowDecimal: false //(index !== 0),
|
||||||
|
|||||||
@ -2,7 +2,7 @@ import { useMessage } from '@/hooks/useMessage'
|
|||||||
import { normalizeDecimalLimit, normalizeDigits } from '@/util/input-utils'
|
import { normalizeDecimalLimit, normalizeDigits } from '@/util/input-utils'
|
||||||
import { CalculatorInput } from '@/components/common/input/CalcInput'
|
import { CalculatorInput } from '@/components/common/input/CalcInput'
|
||||||
|
|
||||||
export default function HipAndGable({ pitch, setPitch, eavesOffset, setEavesOffset, hipAndGableWidth, setHipAndGableWidth, pitchText, disableKeypad }) {
|
export default function HipAndGable({ pitch, setPitch, eavesOffset, setEavesOffset, hipAndGableWidth, setHipAndGableWidth, pitchText }) {
|
||||||
const { getMessage } = useMessage()
|
const { getMessage } = useMessage()
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
@ -20,7 +20,6 @@ export default function HipAndGable({ pitch, setPitch, eavesOffset, setEavesOffs
|
|||||||
className="input-origin block"
|
className="input-origin block"
|
||||||
value={pitch}
|
value={pitch}
|
||||||
onChange={(value) => setPitch(value)}
|
onChange={(value) => setPitch(value)}
|
||||||
disableKeypad={disableKeypad}
|
|
||||||
options={{
|
options={{
|
||||||
allowNegative: false,
|
allowNegative: false,
|
||||||
allowDecimal: true //(index !== 0),
|
allowDecimal: true //(index !== 0),
|
||||||
@ -43,7 +42,6 @@ export default function HipAndGable({ pitch, setPitch, eavesOffset, setEavesOffs
|
|||||||
className="input-origin block"
|
className="input-origin block"
|
||||||
value={eavesOffset}
|
value={eavesOffset}
|
||||||
onChange={(value) => setEavesOffset(value)}
|
onChange={(value) => setEavesOffset(value)}
|
||||||
disableKeypad={disableKeypad}
|
|
||||||
options={{
|
options={{
|
||||||
allowNegative: false,
|
allowNegative: false,
|
||||||
allowDecimal: false //(index !== 0),
|
allowDecimal: false //(index !== 0),
|
||||||
@ -71,7 +69,6 @@ export default function HipAndGable({ pitch, setPitch, eavesOffset, setEavesOffs
|
|||||||
className="input-origin block"
|
className="input-origin block"
|
||||||
value={hipAndGableWidth}
|
value={hipAndGableWidth}
|
||||||
onChange={(value) => setHipAndGableWidth(value)}
|
onChange={(value) => setHipAndGableWidth(value)}
|
||||||
disableKeypad={disableKeypad}
|
|
||||||
options={{
|
options={{
|
||||||
allowNegative: false,
|
allowNegative: false,
|
||||||
allowDecimal: false //(index !== 0),
|
allowDecimal: false //(index !== 0),
|
||||||
|
|||||||
@ -10,7 +10,6 @@ export default function Jerkinhead({
|
|||||||
jerkinHeadPitch,
|
jerkinHeadPitch,
|
||||||
setJerkinHeadPitch,
|
setJerkinHeadPitch,
|
||||||
pitchText,
|
pitchText,
|
||||||
disableKeypad,
|
|
||||||
}) {
|
}) {
|
||||||
const { getMessage } = useMessage()
|
const { getMessage } = useMessage()
|
||||||
return (
|
return (
|
||||||
@ -29,7 +28,6 @@ export default function Jerkinhead({
|
|||||||
className="input-origin block"
|
className="input-origin block"
|
||||||
value={gableOffset}
|
value={gableOffset}
|
||||||
onChange={(value) => setGableOffset(value)}
|
onChange={(value) => setGableOffset(value)}
|
||||||
disableKeypad={disableKeypad}
|
|
||||||
options={{
|
options={{
|
||||||
allowNegative: false,
|
allowNegative: false,
|
||||||
allowDecimal: false //(index !== 0),
|
allowDecimal: false //(index !== 0),
|
||||||
@ -53,7 +51,6 @@ export default function Jerkinhead({
|
|||||||
className="input-origin block"
|
className="input-origin block"
|
||||||
value={jerkinHeadWidth}
|
value={jerkinHeadWidth}
|
||||||
onChange={(value) => setJerkinHeadWidth(value)}
|
onChange={(value) => setJerkinHeadWidth(value)}
|
||||||
disableKeypad={disableKeypad}
|
|
||||||
options={{
|
options={{
|
||||||
allowNegative: false,
|
allowNegative: false,
|
||||||
allowDecimal: false //(index !== 0),
|
allowDecimal: false //(index !== 0),
|
||||||
@ -80,7 +77,6 @@ export default function Jerkinhead({
|
|||||||
className="input-origin block"
|
className="input-origin block"
|
||||||
value={jerkinHeadPitch}
|
value={jerkinHeadPitch}
|
||||||
onChange={(value) => setJerkinHeadPitch(value)}
|
onChange={(value) => setJerkinHeadPitch(value)}
|
||||||
disableKeypad={disableKeypad}
|
|
||||||
options={{
|
options={{
|
||||||
allowNegative: false,
|
allowNegative: false,
|
||||||
allowDecimal: true //(index !== 0),
|
allowDecimal: true //(index !== 0),
|
||||||
|
|||||||
@ -2,7 +2,7 @@ import { useMessage } from '@/hooks/useMessage'
|
|||||||
import { normalizeDecimalLimit, normalizeDigits } from '@/util/input-utils'
|
import { normalizeDecimalLimit, normalizeDigits } from '@/util/input-utils'
|
||||||
import { CalculatorInput } from '@/components/common/input/CalcInput'
|
import { CalculatorInput } from '@/components/common/input/CalcInput'
|
||||||
|
|
||||||
export default function Shed({ shedWidth, setShedWidth, shedPitch, setShedPitch, pitchText, disableKeypad }) {
|
export default function Shed({ shedWidth, setShedWidth, shedPitch, setShedPitch, pitchText }) {
|
||||||
const { getMessage } = useMessage()
|
const { getMessage } = useMessage()
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
@ -18,7 +18,6 @@ export default function Shed({ shedWidth, setShedWidth, shedPitch, setShedPitch,
|
|||||||
className="input-origin block"
|
className="input-origin block"
|
||||||
value={shedPitch}
|
value={shedPitch}
|
||||||
onChange={(value) => setShedPitch(value)}
|
onChange={(value) => setShedPitch(value)}
|
||||||
disableKeypad={disableKeypad}
|
|
||||||
options={{
|
options={{
|
||||||
allowNegative: false,
|
allowNegative: false,
|
||||||
allowDecimal: true //(index !== 0),
|
allowDecimal: true //(index !== 0),
|
||||||
@ -39,7 +38,6 @@ export default function Shed({ shedWidth, setShedWidth, shedPitch, setShedPitch,
|
|||||||
className="input-origin block"
|
className="input-origin block"
|
||||||
value={shedWidth}
|
value={shedWidth}
|
||||||
onChange={(value) => setShedWidth(value)}
|
onChange={(value) => setShedWidth(value)}
|
||||||
disableKeypad={disableKeypad}
|
|
||||||
options={{
|
options={{
|
||||||
allowNegative: false,
|
allowNegative: false,
|
||||||
allowDecimal: false //(index !== 0),
|
allowDecimal: false //(index !== 0),
|
||||||
|
|||||||
@ -3,7 +3,7 @@ import { useMessage } from '@/hooks/useMessage'
|
|||||||
import { normalizeDigits } from '@/util/input-utils'
|
import { normalizeDigits } from '@/util/input-utils'
|
||||||
import { CalculatorInput } from '@/components/common/input/CalcInput'
|
import { CalculatorInput } from '@/components/common/input/CalcInput'
|
||||||
|
|
||||||
export default function Wall({ sleeveOffset, setSleeveOffset, hasSleeve, setHasSleeve, disableKeypad }) {
|
export default function Wall({ sleeveOffset, setSleeveOffset, hasSleeve, setHasSleeve }) {
|
||||||
const { getMessage } = useMessage()
|
const { getMessage } = useMessage()
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
@ -43,7 +43,6 @@ export default function Wall({ sleeveOffset, setSleeveOffset, hasSleeve, setHasS
|
|||||||
value={sleeveOffset}
|
value={sleeveOffset}
|
||||||
onChange={(value) => setSleeveOffset(value)}
|
onChange={(value) => setSleeveOffset(value)}
|
||||||
readOnly={hasSleeve === '0'}
|
readOnly={hasSleeve === '0'}
|
||||||
disableKeypad={disableKeypad}
|
|
||||||
options={{
|
options={{
|
||||||
allowNegative: false,
|
allowNegative: false,
|
||||||
allowDecimal: false //(index !== 0),
|
allowDecimal: false //(index !== 0),
|
||||||
|
|||||||
@ -24,11 +24,8 @@ import { useCanvasMenu } from '@/hooks/common/useCanvasMenu'
|
|||||||
import { useSwal } from '@/hooks/useSwal'
|
import { useSwal } from '@/hooks/useSwal'
|
||||||
import { sanitizeIntegerInputEvent } from '@/util/input-utils'
|
import { sanitizeIntegerInputEvent } from '@/util/input-utils'
|
||||||
import { CalculatorInput } from '@/components/common/input/CalcInput'
|
import { CalculatorInput } from '@/components/common/input/CalcInput'
|
||||||
import Image from 'next/image'
|
|
||||||
|
|
||||||
export default function StuffDetail() {
|
export default function StuffDetail() {
|
||||||
const [useCalcPad, setUseCalcPad] = useState(false)
|
|
||||||
const disableKeypad = !useCalcPad
|
|
||||||
const [stuffSearch, setStuffSearch] = useRecoilState(stuffSearchState)
|
const [stuffSearch, setStuffSearch] = useRecoilState(stuffSearchState)
|
||||||
const { swalFire } = useSwal()
|
const { swalFire } = useSwal()
|
||||||
const { setIsGlobalLoading } = useContext(QcastContext)
|
const { setIsGlobalLoading } = useContext(QcastContext)
|
||||||
@ -1764,9 +1761,6 @@ export default function StuffDetail() {
|
|||||||
>
|
>
|
||||||
{getMessage('stuff.detail.btn.moveList')}
|
{getMessage('stuff.detail.btn.moveList')}
|
||||||
</button>
|
</button>
|
||||||
<button style={{ width: 'auto', marginLeft: '8px' }} type="button" onClick={() => setUseCalcPad((prev) => !prev)}>
|
|
||||||
<Image src={useCalcPad ? '/static/images/common/Icon_ON.png' : '/static/images/common/Icon_OFF.png'} alt="toggle" width={34} height={34} />
|
|
||||||
</button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="infomation-table">
|
<div className="infomation-table">
|
||||||
@ -2167,7 +2161,6 @@ export default function StuffDetail() {
|
|||||||
className="input-light"
|
className="input-light"
|
||||||
value={form.watch('verticalSnowCover') || ''}
|
value={form.watch('verticalSnowCover') || ''}
|
||||||
onChange={(value) => form.setValue('verticalSnowCover', value)}
|
onChange={(value) => form.setValue('verticalSnowCover', value)}
|
||||||
disableKeypad={disableKeypad}
|
|
||||||
options={{
|
options={{
|
||||||
allowNegative: false,
|
allowNegative: false,
|
||||||
allowDecimal: false,
|
allowDecimal: false,
|
||||||
@ -2240,7 +2233,6 @@ export default function StuffDetail() {
|
|||||||
className="input-light"
|
className="input-light"
|
||||||
value={form.watch('installHeight') || ''}
|
value={form.watch('installHeight') || ''}
|
||||||
onChange={(value) => form.setValue('installHeight', value)}
|
onChange={(value) => form.setValue('installHeight', value)}
|
||||||
disableKeypad={disableKeypad}
|
|
||||||
options={{
|
options={{
|
||||||
allowNegative: false,
|
allowNegative: false,
|
||||||
allowDecimal: false,
|
allowDecimal: false,
|
||||||
@ -2294,9 +2286,6 @@ export default function StuffDetail() {
|
|||||||
>
|
>
|
||||||
{getMessage('stuff.detail.btn.moveList')}
|
{getMessage('stuff.detail.btn.moveList')}
|
||||||
</button>
|
</button>
|
||||||
<button style={{ width: 'auto', marginLeft: '8px' }} type="button" onClick={() => setUseCalcPad((prev) => !prev)}>
|
|
||||||
<Image src={useCalcPad ? '/static/images/common/Icon_ON.png' : '/static/images/common/Icon_OFF.png'} alt="toggle" width={34} height={34} />
|
|
||||||
</button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
@ -2321,16 +2310,12 @@ export default function StuffDetail() {
|
|||||||
>
|
>
|
||||||
{getMessage('stuff.detail.btn.moveList')}
|
{getMessage('stuff.detail.btn.moveList')}
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<button type="button" onClick={() => onValid('save')} className="btn-origin navy mr5" style={{ display: showButton }}>
|
<button type="button" onClick={() => onValid('save')} className="btn-origin navy mr5" style={{ display: showButton }}>
|
||||||
{getMessage('stuff.detail.btn.save')}
|
{getMessage('stuff.detail.btn.save')}
|
||||||
</button>
|
</button>
|
||||||
<button type="button" className="btn-origin grey" onClick={onDelete} style={{ display: showButton }}>
|
<button type="button" className="btn-origin grey" onClick={onDelete} style={{ display: showButton }}>
|
||||||
{getMessage('stuff.detail.btn.delete')}
|
{getMessage('stuff.detail.btn.delete')}
|
||||||
</button>
|
</button>
|
||||||
<button style={{ width: 'auto', marginLeft: '8px', marginRight: '8px' }} type="button" onClick={() => setUseCalcPad((prev) => !prev)}>
|
|
||||||
<Image src={useCalcPad ? '/static/images/common/Icon_ON.png' : '/static/images/common/Icon_OFF.png'} alt="toggle" width={34} height={34} />
|
|
||||||
</button>
|
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
) : (
|
) : (
|
||||||
@ -2352,9 +2337,6 @@ export default function StuffDetail() {
|
|||||||
>
|
>
|
||||||
{getMessage('stuff.detail.btn.moveList')}
|
{getMessage('stuff.detail.btn.moveList')}
|
||||||
</button>
|
</button>
|
||||||
<button style={{ width: 'auto', marginLeft: '8px' }} type="button" onClick={() => setUseCalcPad((prev) => !prev)}>
|
|
||||||
<Image src={useCalcPad ? '/static/images/common/Icon_ON.png' : '/static/images/common/Icon_OFF.png'} alt="toggle" width={34} height={34} />
|
|
||||||
</button>
|
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
@ -2775,7 +2757,6 @@ export default function StuffDetail() {
|
|||||||
className="input-light"
|
className="input-light"
|
||||||
value={form.watch('verticalSnowCover') || ''}
|
value={form.watch('verticalSnowCover') || ''}
|
||||||
onChange={(value) => form.setValue('verticalSnowCover', value)}
|
onChange={(value) => form.setValue('verticalSnowCover', value)}
|
||||||
disableKeypad={disableKeypad}
|
|
||||||
options={{
|
options={{
|
||||||
allowNegative: false,
|
allowNegative: false,
|
||||||
allowDecimal: false,
|
allowDecimal: false,
|
||||||
@ -2852,7 +2833,6 @@ export default function StuffDetail() {
|
|||||||
className="input-light"
|
className="input-light"
|
||||||
value={form.watch('installHeight') || ''}
|
value={form.watch('installHeight') || ''}
|
||||||
onChange={(value) => form.setValue('installHeight', value)}
|
onChange={(value) => form.setValue('installHeight', value)}
|
||||||
disableKeypad={disableKeypad}
|
|
||||||
options={{
|
options={{
|
||||||
allowNegative: false,
|
allowNegative: false,
|
||||||
allowDecimal: false,
|
allowDecimal: false,
|
||||||
@ -2937,16 +2917,12 @@ export default function StuffDetail() {
|
|||||||
>
|
>
|
||||||
{getMessage('stuff.detail.btn.moveList')}
|
{getMessage('stuff.detail.btn.moveList')}
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<button type="button" onClick={() => onValid('save')} className="btn-origin navy mr5" style={{ display: showButton }}>
|
<button type="button" onClick={() => onValid('save')} className="btn-origin navy mr5" style={{ display: showButton }}>
|
||||||
{getMessage('stuff.detail.btn.save')}
|
{getMessage('stuff.detail.btn.save')}
|
||||||
</button>
|
</button>
|
||||||
<button type="button" className="btn-origin grey" onClick={onDelete} style={{ display: showButton }}>
|
<button type="button" className="btn-origin grey" onClick={onDelete} style={{ display: showButton }}>
|
||||||
{getMessage('stuff.detail.btn.delete')}
|
{getMessage('stuff.detail.btn.delete')}
|
||||||
</button>
|
</button>
|
||||||
<button style={{ width: 'auto', marginLeft: '8px', marginRight: '8px' }} type="button" onClick={() => setUseCalcPad((prev) => !prev)}>
|
|
||||||
<Image src={useCalcPad ? '/static/images/common/Icon_ON.png' : '/static/images/common/Icon_OFF.png'} alt="toggle" width={34} height={34} />
|
|
||||||
</button>
|
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
) : (
|
) : (
|
||||||
@ -2968,9 +2944,6 @@ export default function StuffDetail() {
|
|||||||
>
|
>
|
||||||
{getMessage('stuff.detail.btn.moveList')}
|
{getMessage('stuff.detail.btn.moveList')}
|
||||||
</button>
|
</button>
|
||||||
<button style={{ width: 'auto', marginLeft: '8px' }} type="button" onClick={() => setUseCalcPad((prev) => !prev)}>
|
|
||||||
<Image src={useCalcPad ? '/static/images/common/Icon_ON.png' : '/static/images/common/Icon_OFF.png'} alt="toggle" width={34} height={34} />
|
|
||||||
</button>
|
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user