물건 버튼 노출 & 저장시 헤더 관련 수정
This commit is contained in:
parent
679d9f8a32
commit
12e615717a
@ -283,17 +283,21 @@ export default function StuffDetail() {
|
|||||||
cellStyle: { justifyContent: 'center' },
|
cellStyle: { justifyContent: 'center' },
|
||||||
cellRenderer: (params) => {
|
cellRenderer: (params) => {
|
||||||
let buttonStyle
|
let buttonStyle
|
||||||
|
let buttonStyle2
|
||||||
if (params.value == null) {
|
if (params.value == null) {
|
||||||
buttonStyle = {
|
buttonStyle = {
|
||||||
display: 'none',
|
display: 'none',
|
||||||
}
|
}
|
||||||
|
buttonStyle2 = {
|
||||||
|
display: 'none',
|
||||||
}
|
}
|
||||||
if (managementState?.createUser === 'T01') {
|
} else {
|
||||||
if (session.userId !== 'T01') {
|
if (managementState?.createSaleStoreId === 'T01') {
|
||||||
// #474
|
if (session?.storeId !== 'T01') {
|
||||||
buttonStyle = { display: 'none' }
|
buttonStyle = { display: 'none' }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div className="grid-cell-btn">
|
<div className="grid-cell-btn">
|
||||||
@ -312,7 +316,7 @@ export default function StuffDetail() {
|
|||||||
{getMessage('stuff.detail.planGrid.btn1')}
|
{getMessage('stuff.detail.planGrid.btn1')}
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
style={buttonStyle}
|
style={buttonStyle2}
|
||||||
type="button"
|
type="button"
|
||||||
className="grid-btn"
|
className="grid-btn"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
@ -347,16 +351,11 @@ export default function StuffDetail() {
|
|||||||
}
|
}
|
||||||
promiseGet({ url: `/api/object/${objectNo}/detail` }).then((res) => {
|
promiseGet({ url: `/api/object/${objectNo}/detail` }).then((res) => {
|
||||||
if (res.status === 200) {
|
if (res.status === 200) {
|
||||||
// if (res?.data?.createSaleStoreId === 'T01' && session?.storeId !== 'T01') {
|
if (res?.data?.createSaleStoreId === 'T01') {
|
||||||
// setShowButton('none')
|
if (session?.storeId !== 'T01') {
|
||||||
// } else {
|
|
||||||
// if (session.storeId !== res?.data?.createSaleStoreId) {
|
|
||||||
// setShowButton('none')
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
if (res?.data?.createSaleStoreId !== session?.storeId) {
|
|
||||||
setShowButton('none')
|
setShowButton('none')
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (isObjectNotEmpty(res.data)) {
|
if (isObjectNotEmpty(res.data)) {
|
||||||
let surfaceTypeValue
|
let surfaceTypeValue
|
||||||
if (res.data.surfaceType === 'Ⅲ・Ⅳ') {
|
if (res.data.surfaceType === 'Ⅲ・Ⅳ') {
|
||||||
@ -1416,6 +1415,7 @@ export default function StuffDetail() {
|
|||||||
setIsGlobalLoading(true)
|
setIsGlobalLoading(true)
|
||||||
|
|
||||||
if (res.status === 201) {
|
if (res.status === 201) {
|
||||||
|
console.log('res::', res.data)
|
||||||
setIsGlobalLoading(false)
|
setIsGlobalLoading(false)
|
||||||
setFloorPlanObjectNo({ floorPlanObjectNo: res.data.objectNo })
|
setFloorPlanObjectNo({ floorPlanObjectNo: res.data.objectNo })
|
||||||
swalFire({
|
swalFire({
|
||||||
@ -1423,6 +1423,7 @@ export default function StuffDetail() {
|
|||||||
type: 'alert',
|
type: 'alert',
|
||||||
confirmFn: () => {
|
confirmFn: () => {
|
||||||
setManagementState(res?.data)
|
setManagementState(res?.data)
|
||||||
|
router.push(`/management/stuff/detail?objectNo=${res.data.objectNo.toString()}`, { scroll: false })
|
||||||
// callDetailApi(objectNo)
|
// callDetailApi(objectNo)
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
@ -1435,30 +1436,6 @@ export default function StuffDetail() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const callDetailApi = async (objectNo) => {
|
|
||||||
await promiseGet({ url: `/api/object/${objectNo}/detail` }).then((res) => {
|
|
||||||
// if (res?.data?.createSaleStoreId === 'T01' && session?.storeId !== 'T01') {
|
|
||||||
// setShowButton('none')
|
|
||||||
// } else {
|
|
||||||
// if (session.storeId !== res?.data?.createSaleStoreId) {
|
|
||||||
// setShowButton('none')
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
if (res?.data?.createSaleStoreId !== session?.storeId) {
|
|
||||||
setShowButton('none')
|
|
||||||
}
|
|
||||||
|
|
||||||
let surfaceTypeValue
|
|
||||||
if (res.data.surfaceType === 'Ⅲ・Ⅳ') {
|
|
||||||
surfaceTypeValue = '3'
|
|
||||||
} else {
|
|
||||||
surfaceTypeValue = '2'
|
|
||||||
}
|
|
||||||
setManagementState({ ...res.data, surfaceTypeValue: surfaceTypeValue })
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 임시저장
|
// 임시저장
|
||||||
const onTempSave = async () => {
|
const onTempSave = async () => {
|
||||||
const formData = form.getValues()
|
const formData = form.getValues()
|
||||||
@ -1645,16 +1622,11 @@ export default function StuffDetail() {
|
|||||||
|
|
||||||
// 그리드 더블 클릭 해당플랜의 도면작성 화면으로 이동
|
// 그리드 더블 클릭 해당플랜의 도면작성 화면으로 이동
|
||||||
const getCellDoubleClicked = (params) => {
|
const getCellDoubleClicked = (params) => {
|
||||||
//#474정책
|
if (managementState?.createSaleStoreId === 'T01') {
|
||||||
// if (managementState.createUser === 'T01') {
|
if (session?.storeId !== 'T01') {
|
||||||
// if (session.userId !== 'T01') {
|
|
||||||
// return false
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
if (managementState?.createSaleStoreId !== session?.storeId) {
|
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (params?.column?.colId !== 'estimateDate') {
|
if (params?.column?.colId !== 'estimateDate') {
|
||||||
if (params?.data?.planNo && params?.data?.objectNo) {
|
if (params?.data?.planNo && params?.data?.objectNo) {
|
||||||
|
|||||||
@ -68,7 +68,7 @@ export default function StuffHeader() {
|
|||||||
<div className="sub-table-box">
|
<div className="sub-table-box">
|
||||||
<div className="info-title">{getMessage('stuff.detail.header.specificationConfirmDate')}</div>
|
<div className="info-title">{getMessage('stuff.detail.header.specificationConfirmDate')}</div>
|
||||||
<div className="info-inner">
|
<div className="info-inner">
|
||||||
{managementState?.specificationConfirmDate ? `${dayjs(managementState.specificationConfirmDate).format('YYYY.MM.DD HH:mm:ss')}` : ''}
|
{managementState?.specificationConfirmDate ? `${dayjs(managementState.specificationConfirmDate).format('YYYY.MM.DD')}` : ''}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="sub-table-box">
|
<div className="sub-table-box">
|
||||||
|
|||||||
@ -38,16 +38,12 @@ export default function StuffSubHeader({ type }) {
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (isObjectNotEmpty(managementState)) {
|
if (isObjectNotEmpty(managementState)) {
|
||||||
// if (managementState.createUser === 'T01') {
|
if (managementState?.createSaleStoreId === 'T01') {
|
||||||
// if (session.userId !== 'T01') {
|
if (session?.storeId !== 'T01') {
|
||||||
// //도면 작성은 이동 할 수 있도록 변경 #457 다시 못하도록 변경#474
|
|
||||||
// setButtonStyle('none')
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
if (managementState.createSaleStoreId !== session?.storeId) {
|
|
||||||
setButtonStyle('none')
|
setButtonStyle('none')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}, [managementState])
|
}, [managementState])
|
||||||
|
|
||||||
const searchParams = useSearchParams()
|
const searchParams = useSearchParams()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user