Compare commits
No commits in common. "b6bfa8fd2ed9295d937311ecdbb9b84f728f805a" and "252782f2756f46115420f99b2f172d04ecc7a3e0" have entirely different histories.
b6bfa8fd2e
...
252782f275
@ -23,7 +23,6 @@ import { QcastContext } from '@/app/QcastProvider'
|
|||||||
import { useCanvasMenu } from '@/hooks/common/useCanvasMenu'
|
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'
|
|
||||||
|
|
||||||
export default function StuffDetail() {
|
export default function StuffDetail() {
|
||||||
const [stuffSearch, setStuffSearch] = useRecoilState(stuffSearchState)
|
const [stuffSearch, setStuffSearch] = useRecoilState(stuffSearchState)
|
||||||
@ -1205,10 +1204,8 @@ export default function StuffDetail() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 저장
|
// 저장
|
||||||
const onValid = async (actionType) => {
|
const onValid = async () => {
|
||||||
const formData = form.getValues();
|
const formData = form.getValues()
|
||||||
if(actionType !== 'save') return false
|
|
||||||
console.log('Action type:', actionType); // 'save' 또는 'tempSave'
|
|
||||||
let errors = {}
|
let errors = {}
|
||||||
let fieldNm
|
let fieldNm
|
||||||
|
|
||||||
@ -1718,7 +1715,7 @@ export default function StuffDetail() {
|
|||||||
<button type="button" className="btn-origin grey mr5" onClick={onTempSave} style={{ display: showButton }}>
|
<button type="button" className="btn-origin grey mr5" onClick={onTempSave} style={{ display: showButton }}>
|
||||||
{getMessage('stuff.detail.btn.tempSave')}
|
{getMessage('stuff.detail.btn.tempSave')}
|
||||||
</button>
|
</button>
|
||||||
<button type="button" onClick={() => onValid('save')} className="btn-origin navy mr5" style={{ display: showButton }}>
|
<button type="submit" className="btn-origin navy mr5" style={{ display: showButton }}>
|
||||||
{getMessage('stuff.detail.btn.save')}
|
{getMessage('stuff.detail.btn.save')}
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
@ -2116,25 +2113,13 @@ export default function StuffDetail() {
|
|||||||
<td>
|
<td>
|
||||||
<div className="flx-box">
|
<div className="flx-box">
|
||||||
<div className="input-wrap mr10" style={{ width: '200px' }}>
|
<div className="input-wrap mr10" style={{ width: '200px' }}>
|
||||||
{/*<input*/}
|
<input
|
||||||
{/* type="text"*/}
|
type="text"
|
||||||
{/* className="input-light"*/}
|
|
||||||
{/* onInput={handleKeyUp}*/}
|
|
||||||
{/* onBlur={handleBlur}*/}
|
|
||||||
{/* value={form.watch('verticalSnowCover') || ''}*/}
|
|
||||||
{/* {...register('verticalSnowCover')}*/}
|
|
||||||
{/*/>*/}
|
|
||||||
<CalculatorInput
|
|
||||||
id=""
|
|
||||||
name=""
|
|
||||||
label=""
|
|
||||||
className="input-light"
|
className="input-light"
|
||||||
|
onInput={handleKeyUp}
|
||||||
|
onBlur={handleBlur}
|
||||||
value={form.watch('verticalSnowCover') || ''}
|
value={form.watch('verticalSnowCover') || ''}
|
||||||
onChange={()=>{}}
|
{...register('verticalSnowCover')}
|
||||||
options={{
|
|
||||||
allowNegative: false,
|
|
||||||
allowDecimal: false
|
|
||||||
}}
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<span className="mr10">cm</span>
|
<span className="mr10">cm</span>
|
||||||
@ -2188,25 +2173,13 @@ export default function StuffDetail() {
|
|||||||
<td>
|
<td>
|
||||||
<div className="flx-box">
|
<div className="flx-box">
|
||||||
<div className="input-wrap mr10" style={{ width: '200px' }}>
|
<div className="input-wrap mr10" style={{ width: '200px' }}>
|
||||||
{/*<input*/}
|
<input
|
||||||
{/* type="text"*/}
|
type="text"
|
||||||
{/* className="input-light"*/}
|
|
||||||
{/* onInput={handleKeyUp}*/}
|
|
||||||
{/* onBlur={handleBlur}*/}
|
|
||||||
{/* value={form.watch('installHeight') || ''}*/}
|
|
||||||
{/* {...register('installHeight')}*/}
|
|
||||||
{/*/>*/}
|
|
||||||
<CalculatorInput
|
|
||||||
id=""
|
|
||||||
name=""
|
|
||||||
label=""
|
|
||||||
className="input-light"
|
className="input-light"
|
||||||
|
onInput={handleKeyUp}
|
||||||
|
onBlur={handleBlur}
|
||||||
value={form.watch('installHeight') || ''}
|
value={form.watch('installHeight') || ''}
|
||||||
onChange={()=>{}}
|
{...register('installHeight')}
|
||||||
options={{
|
|
||||||
allowNegative: false,
|
|
||||||
allowDecimal: false
|
|
||||||
}}
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<span>m</span>
|
<span>m</span>
|
||||||
@ -2243,7 +2216,7 @@ export default function StuffDetail() {
|
|||||||
<button type="button" className="btn-origin grey mr5" onClick={onTempSave} style={{ display: showButton }}>
|
<button type="button" className="btn-origin grey mr5" onClick={onTempSave} style={{ display: showButton }}>
|
||||||
{getMessage('stuff.detail.btn.tempSave')}
|
{getMessage('stuff.detail.btn.tempSave')}
|
||||||
</button>
|
</button>
|
||||||
<button type="button" onClick={() => onValid('save')} className="btn-origin navy mr5" style={{ display: showButton }}>
|
<button type="submit" className="btn-origin navy mr5" style={{ display: showButton }}>
|
||||||
{getMessage('stuff.detail.btn.save')}
|
{getMessage('stuff.detail.btn.save')}
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
@ -2280,7 +2253,7 @@ 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="submit" 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 }}>
|
||||||
@ -2294,7 +2267,7 @@ export default function StuffDetail() {
|
|||||||
<button type="button" className="btn-origin grey mr5" onClick={onTempSave} style={{ display: showButton }}>
|
<button type="button" className="btn-origin grey mr5" onClick={onTempSave} style={{ display: showButton }}>
|
||||||
{getMessage('stuff.detail.btn.tempSave')}
|
{getMessage('stuff.detail.btn.tempSave')}
|
||||||
</button>
|
</button>
|
||||||
<button type="button" onClick={() => onValid('save')} className="btn-origin navy mr5" style={{ display: showButton }}>
|
<button type="submit" className="btn-origin navy mr5" style={{ display: showButton }}>
|
||||||
{getMessage('stuff.detail.btn.save')}
|
{getMessage('stuff.detail.btn.save')}
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
@ -2712,25 +2685,13 @@ export default function StuffDetail() {
|
|||||||
<td>
|
<td>
|
||||||
<div className="flx-box">
|
<div className="flx-box">
|
||||||
<div className="input-wrap mr10" style={{ width: '200px' }}>
|
<div className="input-wrap mr10" style={{ width: '200px' }}>
|
||||||
{/*<input*/}
|
<input
|
||||||
{/* type="text"*/}
|
type="text"
|
||||||
{/* className="input-light"*/}
|
|
||||||
{/* onInput={handleKeyUp}*/}
|
|
||||||
{/* onBlur={handleBlur}*/}
|
|
||||||
{/* value={form.watch('verticalSnowCover') || ''}*/}
|
|
||||||
{/* {...register('verticalSnowCover')}*/}
|
|
||||||
{/*/>*/}
|
|
||||||
<CalculatorInput
|
|
||||||
id=""
|
|
||||||
name=""
|
|
||||||
label=""
|
|
||||||
className="input-light"
|
className="input-light"
|
||||||
|
onInput={handleKeyUp}
|
||||||
|
onBlur={handleBlur}
|
||||||
value={form.watch('verticalSnowCover') || ''}
|
value={form.watch('verticalSnowCover') || ''}
|
||||||
onChange={()=>{}}
|
{...register('verticalSnowCover')}
|
||||||
options={{
|
|
||||||
allowNegative: false,
|
|
||||||
allowDecimal: false
|
|
||||||
}}
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<span className="mr10">cm</span>
|
<span className="mr10">cm</span>
|
||||||
@ -2787,26 +2748,13 @@ export default function StuffDetail() {
|
|||||||
<td>
|
<td>
|
||||||
<div className="flx-box">
|
<div className="flx-box">
|
||||||
<div className="input-wrap mr10" style={{ width: '200px' }}>
|
<div className="input-wrap mr10" style={{ width: '200px' }}>
|
||||||
{/*<input*/}
|
<input
|
||||||
{/* type="text"*/}
|
type="text"
|
||||||
{/* className="input-light"*/}
|
|
||||||
{/* onInput={handleKeyUp}*/}
|
|
||||||
{/* onBlur={handleBlur}*/}
|
|
||||||
{/* value={form.watch('installHeight') || ''}*/}
|
|
||||||
{/* {...register('installHeight')}*/}
|
|
||||||
{/*/>*/}
|
|
||||||
|
|
||||||
<CalculatorInput
|
|
||||||
id=""
|
|
||||||
name=""
|
|
||||||
label=""
|
|
||||||
className="input-light"
|
className="input-light"
|
||||||
|
onInput={handleKeyUp}
|
||||||
|
onBlur={handleBlur}
|
||||||
value={form.watch('installHeight') || ''}
|
value={form.watch('installHeight') || ''}
|
||||||
onChange={()=>{}}
|
{...register('installHeight')}
|
||||||
options={{
|
|
||||||
allowNegative: false,
|
|
||||||
allowDecimal: false
|
|
||||||
}}
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<span>m</span>
|
<span>m</span>
|
||||||
@ -2887,7 +2835,7 @@ 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="submit" 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 }}>
|
||||||
@ -2901,7 +2849,7 @@ export default function StuffDetail() {
|
|||||||
<button type="button" className="btn-origin grey mr5" onClick={onTempSave} style={{ display: showButton }}>
|
<button type="button" className="btn-origin grey mr5" onClick={onTempSave} style={{ display: showButton }}>
|
||||||
{getMessage('stuff.detail.btn.tempSave')}
|
{getMessage('stuff.detail.btn.tempSave')}
|
||||||
</button>
|
</button>
|
||||||
<button type="button" onClick={() => onValid('save')} className="btn-origin navy mr5" style={{ display: showButton }}>
|
<button type="submit" className="btn-origin navy mr5" style={{ display: showButton }}>
|
||||||
{getMessage('stuff.detail.btn.save')}
|
{getMessage('stuff.detail.btn.save')}
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user