Merge Q-CAST-III-MR-738: 물건 도면작성 버튼 컨트롤
This commit is contained in:
commit
9e9dc6de2c
@ -23,7 +23,7 @@ export default function StuffSubHeader({ type }) {
|
|||||||
|
|
||||||
const setFloorPlanObjectNo = useSetRecoilState(floorPlanObjectState)
|
const setFloorPlanObjectNo = useSetRecoilState(floorPlanObjectState)
|
||||||
|
|
||||||
const { managementState } = useContext(GlobalDataContext)
|
const { managementState, setManagementState } = useContext(GlobalDataContext)
|
||||||
|
|
||||||
const [buttonStyle, setButtonStyle] = useState('')
|
const [buttonStyle, setButtonStyle] = useState('')
|
||||||
|
|
||||||
@ -31,17 +31,20 @@ export default function StuffSubHeader({ type }) {
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
window.scrollTo(0, 0)
|
window.scrollTo(0, 0)
|
||||||
|
setManagementState({})
|
||||||
}, [])
|
}, [])
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (isObjectNotEmpty(managementState)) {
|
if (type === 'detail') {
|
||||||
if (managementState?.createSaleStoreId === 'T01') {
|
if (isObjectNotEmpty(managementState)) {
|
||||||
if (session?.storeId !== 'T01') {
|
if (managementState?.createSaleStoreId === 'T01') {
|
||||||
setButtonStyle('none')
|
if (session?.storeId !== 'T01') {
|
||||||
|
setButtonStyle('none')
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, [managementState?.createSaleStoreId])
|
}, [type, managementState])
|
||||||
|
|
||||||
const searchParams = useSearchParams()
|
const searchParams = useSearchParams()
|
||||||
const objectNo = searchParams.get('objectNo') //url에서 물건번호 꺼내서 바로 set
|
const objectNo = searchParams.get('objectNo') //url에서 물건번호 꺼내서 바로 set
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user