물건상세 소스정리
This commit is contained in:
parent
d58646efd4
commit
ec0f63de78
@ -3,7 +3,7 @@
|
||||
import { useState, useEffect, useRef, useContext } from 'react'
|
||||
import { useRouter, useSearchParams } from 'next/navigation'
|
||||
import { Button } from '@nextui-org/react'
|
||||
import Select, { components } from 'react-select'
|
||||
import Select from 'react-select'
|
||||
import { useAxios } from '@/hooks/useAxios'
|
||||
import { globalLocaleStore } from '@/store/localeAtom'
|
||||
import { isEmptyArray, isNotEmptyArray, isObjectNotEmpty, queryStringFormatter } from '@/util/common-utils'
|
||||
@ -1404,6 +1404,11 @@ export default function StuffDetail() {
|
||||
})
|
||||
.catch((error) => {
|
||||
setIsGlobalLoading(false)
|
||||
swalFire({
|
||||
text: error?.response?.data?.message,
|
||||
type: 'alert',
|
||||
icon: 'error',
|
||||
})
|
||||
console.log('error::::::', error)
|
||||
})
|
||||
} else {
|
||||
@ -1432,6 +1437,11 @@ export default function StuffDetail() {
|
||||
})
|
||||
.catch((error) => {
|
||||
setIsGlobalLoading(false)
|
||||
swalFire({
|
||||
text: error?.response?.data?.message,
|
||||
type: 'alert',
|
||||
icon: 'error',
|
||||
})
|
||||
console.log('error::::::', error)
|
||||
})
|
||||
}
|
||||
@ -1523,6 +1533,11 @@ export default function StuffDetail() {
|
||||
})
|
||||
.catch((error) => {
|
||||
setIsGlobalLoading(false)
|
||||
swalFire({
|
||||
text: error?.response?.data?.message,
|
||||
type: 'alert',
|
||||
icon: 'error',
|
||||
})
|
||||
console.log('error::::::', error)
|
||||
})
|
||||
} else {
|
||||
@ -1542,6 +1557,11 @@ export default function StuffDetail() {
|
||||
})
|
||||
.catch((error) => {
|
||||
setIsGlobalLoading(false)
|
||||
swalFire({
|
||||
text: error?.response?.data?.message,
|
||||
type: 'alert',
|
||||
icon: 'error',
|
||||
})
|
||||
console.log('error::::::', error)
|
||||
})
|
||||
}
|
||||
@ -1606,8 +1626,13 @@ export default function StuffDetail() {
|
||||
router.push('/management/stuff', { scroll: false })
|
||||
})
|
||||
.catch((error) => {
|
||||
console.log('error::::::', error)
|
||||
setIsGlobalLoading(false)
|
||||
swalFire({
|
||||
text: error?.response?.data?.message,
|
||||
type: 'alert',
|
||||
icon: 'error',
|
||||
})
|
||||
console.log('error::::::', error)
|
||||
})
|
||||
},
|
||||
})
|
||||
@ -1691,15 +1716,12 @@ export default function StuffDetail() {
|
||||
{getMessage('stuff.detail.required')}
|
||||
</div>
|
||||
<div className="left-unit-box">
|
||||
{/* {!isFormValid ? ( */}
|
||||
<Button className="btn-origin grey mr5" onPress={onTempSave} style={{ display: showButton }}>
|
||||
{getMessage('stuff.detail.btn.tempSave')}
|
||||
</Button>
|
||||
{/* ) : ( */}
|
||||
<Button type="submit" className="btn-origin navy mr5" style={{ display: showButton }}>
|
||||
{getMessage('stuff.detail.btn.save')}
|
||||
</Button>
|
||||
{/* )} */}
|
||||
<button
|
||||
type="button"
|
||||
className="btn-origin grey"
|
||||
@ -2190,15 +2212,12 @@ export default function StuffDetail() {
|
||||
</table>
|
||||
</div>
|
||||
<div className="sub-right-footer">
|
||||
{/* {!isFormValid ? ( */}
|
||||
<Button className="btn-origin grey mr5" onPress={onTempSave} style={{ display: showButton }}>
|
||||
{getMessage('stuff.detail.btn.tempSave')}
|
||||
</Button>
|
||||
{/* ) : ( */}
|
||||
<Button type="submit" className="btn-origin navy mr5" style={{ display: showButton }}>
|
||||
{getMessage('stuff.detail.btn.save')}
|
||||
</Button>
|
||||
{/* )} */}
|
||||
<button
|
||||
type="button"
|
||||
className="btn-origin grey"
|
||||
@ -2244,15 +2263,12 @@ export default function StuffDetail() {
|
||||
) : (
|
||||
<>
|
||||
<div className="left-unit-box">
|
||||
{/* {!isFormValid ? ( */}
|
||||
<Button className="btn-origin grey mr5" onPress={onTempSave} style={{ display: showButton }}>
|
||||
{getMessage('stuff.detail.btn.tempSave')}
|
||||
</Button>
|
||||
{/* ) : ( */}
|
||||
<Button type="submit" className="btn-origin navy mr5" style={{ display: showButton }}>
|
||||
{getMessage('stuff.detail.btn.save')}
|
||||
</Button>
|
||||
{/* )} */}
|
||||
<button
|
||||
type="button"
|
||||
className="btn-origin grey"
|
||||
@ -2387,7 +2403,6 @@ export default function StuffDetail() {
|
||||
<>
|
||||
<div className="select-wrap mr5" style={{ width: '567px' }}>
|
||||
<Select
|
||||
// menuPlacement={'auto'}
|
||||
id="long-value-select1"
|
||||
instanceId="long-value-select1"
|
||||
className="react-select-custom"
|
||||
@ -2444,7 +2459,6 @@ export default function StuffDetail() {
|
||||
value={showSaleStoreList.filter(function (option) {
|
||||
return option.saleStoreId === selOptions
|
||||
})}
|
||||
// components={{ Option: CustomOption }}
|
||||
/>
|
||||
</div>
|
||||
<div className="input-wrap" style={{ width: '216px' }}>
|
||||
@ -2479,7 +2493,6 @@ export default function StuffDetail() {
|
||||
return option.saleStoreId
|
||||
}
|
||||
})}
|
||||
// components={{ Option: CustomOption }}
|
||||
/>
|
||||
</div>
|
||||
<div className="input-wrap" style={{ width: '216px' }}>
|
||||
@ -2534,7 +2547,6 @@ export default function StuffDetail() {
|
||||
value={otherSaleStoreList.filter(function (option) {
|
||||
return option.saleStoreId === otherSelOptions
|
||||
})}
|
||||
// components={{ Option: CustomOption2 }}
|
||||
/>
|
||||
</div>
|
||||
<div className="input-wrap" style={{ width: '216px' }}>
|
||||
@ -2829,15 +2841,12 @@ export default function StuffDetail() {
|
||||
) : (
|
||||
<>
|
||||
<div className="sub-right-footer">
|
||||
{/* {!isFormValid ? ( */}
|
||||
<Button className="btn-origin grey mr5" onPress={onTempSave} style={{ display: showButton }}>
|
||||
{getMessage('stuff.detail.btn.tempSave')}
|
||||
</Button>
|
||||
{/* ) : ( */}
|
||||
<Button type="submit" className="btn-origin navy mr5" style={{ display: showButton }}>
|
||||
{getMessage('stuff.detail.btn.save')}
|
||||
</Button>
|
||||
{/* )} */}
|
||||
<button
|
||||
type="button"
|
||||
className="btn-origin grey"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user