계산기 토글 버튼 추가 #725
@ -24,8 +24,11 @@ import { useCanvasMenu } from '@/hooks/common/useCanvasMenu'
|
||||
import { useSwal } from '@/hooks/useSwal'
|
||||
import { sanitizeIntegerInputEvent } from '@/util/input-utils'
|
||||
import { CalculatorInput } from '@/components/common/input/CalcInput'
|
||||
import Image from 'next/image'
|
||||
|
||||
export default function StuffDetail() {
|
||||
const [useCalcPad, setUseCalcPad] = useState(false)
|
||||
const disableKeypad = !useCalcPad
|
||||
const [stuffSearch, setStuffSearch] = useRecoilState(stuffSearchState)
|
||||
const { swalFire } = useSwal()
|
||||
const { setIsGlobalLoading } = useContext(QcastContext)
|
||||
@ -1761,6 +1764,9 @@ export default function StuffDetail() {
|
||||
>
|
||||
{getMessage('stuff.detail.btn.moveList')}
|
||||
</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 className="infomation-table">
|
||||
@ -2161,6 +2167,7 @@ export default function StuffDetail() {
|
||||
className="input-light"
|
||||
value={form.watch('verticalSnowCover') || ''}
|
||||
onChange={(value) => form.setValue('verticalSnowCover', value)}
|
||||
disableKeypad={disableKeypad}
|
||||
options={{
|
||||
allowNegative: false,
|
||||
allowDecimal: false,
|
||||
@ -2233,6 +2240,7 @@ export default function StuffDetail() {
|
||||
className="input-light"
|
||||
value={form.watch('installHeight') || ''}
|
||||
onChange={(value) => form.setValue('installHeight', value)}
|
||||
disableKeypad={disableKeypad}
|
||||
options={{
|
||||
allowNegative: false,
|
||||
allowDecimal: false,
|
||||
@ -2286,6 +2294,9 @@ export default function StuffDetail() {
|
||||
>
|
||||
{getMessage('stuff.detail.btn.moveList')}
|
||||
</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>
|
||||
</form>
|
||||
@ -2310,6 +2321,7 @@ export default function StuffDetail() {
|
||||
>
|
||||
{getMessage('stuff.detail.btn.moveList')}
|
||||
</button>
|
||||
|
||||
<button type="button" onClick={() => onValid('save')} className="btn-origin navy mr5" style={{ display: showButton }}>
|
||||
{getMessage('stuff.detail.btn.save')}
|
||||
</button>
|
||||
@ -2337,6 +2349,9 @@ export default function StuffDetail() {
|
||||
>
|
||||
{getMessage('stuff.detail.btn.moveList')}
|
||||
</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>
|
||||
</>
|
||||
)}
|
||||
@ -2757,6 +2772,7 @@ export default function StuffDetail() {
|
||||
className="input-light"
|
||||
value={form.watch('verticalSnowCover') || ''}
|
||||
onChange={(value) => form.setValue('verticalSnowCover', value)}
|
||||
disableKeypad={disableKeypad}
|
||||
options={{
|
||||
allowNegative: false,
|
||||
allowDecimal: false,
|
||||
@ -2833,6 +2849,7 @@ export default function StuffDetail() {
|
||||
className="input-light"
|
||||
value={form.watch('installHeight') || ''}
|
||||
onChange={(value) => form.setValue('installHeight', value)}
|
||||
disableKeypad={disableKeypad}
|
||||
options={{
|
||||
allowNegative: false,
|
||||
allowDecimal: false,
|
||||
@ -2917,6 +2934,7 @@ export default function StuffDetail() {
|
||||
>
|
||||
{getMessage('stuff.detail.btn.moveList')}
|
||||
</button>
|
||||
|
||||
<button type="button" onClick={() => onValid('save')} className="btn-origin navy mr5" style={{ display: showButton }}>
|
||||
{getMessage('stuff.detail.btn.save')}
|
||||
</button>
|
||||
@ -2944,6 +2962,9 @@ export default function StuffDetail() {
|
||||
>
|
||||
{getMessage('stuff.detail.btn.moveList')}
|
||||
</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>
|
||||
</>
|
||||
)}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user