물건상세&견적서 문서다운로드 팝업 버튼 노출조건 변경
This commit is contained in:
parent
7fa532cf2b
commit
0f56016daa
@ -435,21 +435,16 @@ export default function CanvasMenu(props) {
|
||||
|
||||
useEffect(() => {
|
||||
if (isObjectNotEmpty(estimateContextState)) {
|
||||
const { createUser, tempFlg, lockFlg } = estimateContextState
|
||||
|
||||
const { createUser, tempFlg, lockFlg, docNo } = estimateContextState
|
||||
if (createUser && tempFlg && lockFlg) {
|
||||
if (createUser === 'T01') {
|
||||
if (sessionState.storeId !== 'T01') {
|
||||
setAllButtonStyles('none')
|
||||
} else {
|
||||
handleButtonStyles(tempFlg, lockFlg)
|
||||
}
|
||||
if (createUser === 'T01' && sessionState.storeId !== 'T01') {
|
||||
setAllButtonStyles('none')
|
||||
} else {
|
||||
handleButtonStyles(tempFlg, lockFlg)
|
||||
handleButtonStyles(tempFlg, lockFlg, docNo)
|
||||
}
|
||||
}
|
||||
}
|
||||
}, [estimateContextState?.createUser, estimateContextState?.tempFlg, estimateContextState?.lockFlg])
|
||||
}, [estimateContextState?.createUser, estimateContextState?.tempFlg, estimateContextState?.lockFlg, estimateContextState.docNo])
|
||||
|
||||
const setAllButtonStyles = (style) => {
|
||||
setButtonStyle1(style)
|
||||
@ -459,7 +454,7 @@ export default function CanvasMenu(props) {
|
||||
setButtonStyle5(style)
|
||||
}
|
||||
|
||||
const handleButtonStyles = (tempFlg, lockFlg) => {
|
||||
const handleButtonStyles = (tempFlg, lockFlg, docNo) => {
|
||||
if (tempFlg === '1') {
|
||||
setAllButtonStyles('none')
|
||||
setButtonStyle2('')
|
||||
@ -472,6 +467,9 @@ export default function CanvasMenu(props) {
|
||||
setButtonStyle4('')
|
||||
setButtonStyle5('')
|
||||
}
|
||||
if (!docNo) {
|
||||
setButtonStyle1('none')
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -291,15 +291,14 @@ export default function StuffDetail() {
|
||||
buttonStyle = 'none'
|
||||
buttonStyle2 = 'none'
|
||||
} else {
|
||||
if (params?.data?.createSaleStoreId === 'T01') {
|
||||
if (session?.storeId !== 'T01') {
|
||||
buttonStyle = 'none'
|
||||
}
|
||||
if (params?.data?.createSaleStoreId === 'T01' && session?.storeId !== 'T01') {
|
||||
buttonStyle = 'none'
|
||||
}
|
||||
if (params?.data?.tempFlg === '1') {
|
||||
if (params?.data?.tempFlg === '1' || !params?.data?.docNo) {
|
||||
buttonStyle2 = 'none'
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className="grid-cell-btn">
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user