물건 저장시 페이지이동 확인

This commit is contained in:
basssy 2025-02-04 09:45:51 +09:00
parent 2c185c3723
commit 6e5223a683

View File

@ -365,6 +365,7 @@ export default function StuffDetail() {
}
setManagementState({ ...res.data, surfaceTypeValue: surfaceTypeValue })
} else {
setIsGlobalLoading(false)
setManagementState({})
swalFire({
text: getMessage('stuff.detail.header.notExistObjectNo'),
@ -380,9 +381,9 @@ export default function StuffDetail() {
setPlanGridProps({ ...planGridProps, planGridData: [] })
}
} else {
setIsGlobalLoading(false)
setManagementState({})
setPlanGridProps({ ...planGridProps, planGridData: [] })
swalFire({
text: getMessage('stuff.detail.header.notExistObjectNo'),
type: 'alert',
@ -1394,7 +1395,7 @@ export default function StuffDetail() {
//
if (res.status === 201) {
setIsGlobalLoading(false)
setFloorPlanObjectNo({ floorPlanObjectNo: objectNo })
setFloorPlanObjectNo({ floorPlanObjectNo: res?.data?.objectNo })
swalFire({
text: getMessage('stuff.detail.save'),
type: 'alert',
@ -1415,7 +1416,6 @@ export default function StuffDetail() {
setIsGlobalLoading(true)
if (res.status === 201) {
console.log('res::', res.data)
setIsGlobalLoading(false)
setFloorPlanObjectNo({ floorPlanObjectNo: res.data.objectNo })
swalFire({
@ -1424,7 +1424,6 @@ export default function StuffDetail() {
confirmFn: () => {
setManagementState(res?.data)
router.push(`/management/stuff/detail?objectNo=${res.data.objectNo.toString()}`, { scroll: false })
// callDetailApi(objectNo)
},
})
}
@ -1547,6 +1546,7 @@ export default function StuffDetail() {
setFloorPlanObjectNo({ floorPlanObjectNo: '' })
del({ url: `/api/object/${objectNo}?${queryStringFormatter(delParams)}` })
.then(() => {
console.log('트루555')
setIsGlobalLoading(true)
setFloorPlanObjectNo({ floorPlanObjectNo: '' })
if (session.storeId === 'T01') {