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

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