diff --git a/src/components/common/input/CalcInput.jsx b/src/components/common/input/CalcInput.jsx index 3da3a7c5..32323560 100644 --- a/src/components/common/input/CalcInput.jsx +++ b/src/components/common/input/CalcInput.jsx @@ -3,7 +3,7 @@ import { createCalculator } from '@/util/calc-utils' import '@/styles/calc.scss' export const CalculatorInput = forwardRef( - ({ value, onChange, label, options = {}, id, className = 'calculator-input', readOnly = false, placeholder }, ref) => { + ({ value, onChange, label, options = {}, id, className = 'calculator-input', readOnly = false, placeholder, name='', disabled = false }, ref) => { const [showKeypad, setShowKeypad] = useState(false) const [displayValue, setDisplayValue] = useState(value || '0') const [hasOperation, setHasOperation] = useState(false) @@ -353,6 +353,7 @@ export const CalculatorInput = forwardRef( ref={inputRef} type="text" id={id} + name={name} value={displayValue} readOnly={readOnly} className={className} @@ -363,6 +364,7 @@ export const CalculatorInput = forwardRef( tabIndex={readOnly ? -1 : 0} placeholder={placeholder} autoComplete={'off'} + disabled={disabled} /> {showKeypad && !readOnly && ( diff --git a/src/components/floor-plan/modal/placementShape/PlacementShapeSetting.jsx b/src/components/floor-plan/modal/placementShape/PlacementShapeSetting.jsx index a8ee7102..8b1f7dc8 100644 --- a/src/components/floor-plan/modal/placementShape/PlacementShapeSetting.jsx +++ b/src/components/floor-plan/modal/placementShape/PlacementShapeSetting.jsx @@ -346,6 +346,7 @@ export default function PlacementShapeSetting({ id, pos = { x: 50, y: 180 }, pla /> */} W
- changeInput(normalizeDigits(e.target.value), e)}*/} + {/* readOnly={currentRoof?.widAuth === 'R'}*/} + {/* disabled={currentRoof?.roofSizeSet === '3'}*/} + {/*/>*/} + + changeInput(normalizeDigits(e.target.value), e)} + value={currentRoof?.width||0} + onChange={(value) => { + setCurrentRoof({ ...currentRoof, value }) + }} readOnly={currentRoof?.widAuth === 'R'} disabled={currentRoof?.roofSizeSet === '3'} + options={{ + allowNegative: false, + allowDecimal: false //(index !== 0), + }} />
@@ -429,15 +448,33 @@ export default function PlacementShapeSetting({ id, pos = { x: 50, y: 180 }, pla
L
- changeInput(normalizeDigits(e.target.value), e)}*/} + {/* readOnly={currentRoof?.lenAuth === 'R'}*/} + {/* disabled={currentRoof?.roofSizeSet === '3'}*/} + {/*/>*/} + + changeInput(normalizeDigits(e.target.value), e)} + value={currentRoof?.length||0} + onChange={(value) => { + setCurrentRoof({ ...currentRoof, value }) + }} readOnly={currentRoof?.lenAuth === 'R'} disabled={currentRoof?.roofSizeSet === '3'} + options={{ + allowNegative: false, + allowDecimal: false //(index !== 0), + }} />
@@ -465,16 +502,34 @@ export default function PlacementShapeSetting({ id, pos = { x: 50, y: 180 }, pla
{getMessage('hajebichi')}
- changeInput(normalizeDigits(e.target.value), e)}*/} + {/* readOnly={currentRoof?.roofPchAuth === 'R'}*/} + {/* disabled={currentRoof?.roofSizeSet === '3'}*/} + {/*/>*/} + changeInput(normalizeDigits(e.target.value), e)} + value={currentRoof?.hajebichi||0} + onChange={(value) => { + setCurrentRoof({ ...currentRoof, value }) + }} readOnly={currentRoof?.roofPchAuth === 'R'} disabled={currentRoof?.roofSizeSet === '3'} + options={{ + allowNegative: false, + allowDecimal: false //(index !== 0), + }} /> +
)}