[1165] 도면을 열고 있을 때, 상부 메뉴를 눌렀을 때의 거동 #174
@ -25,6 +25,7 @@ import { isObjectNotEmpty } from '@/util/common-utils'
|
|||||||
import { roofMaterialsAtom } from '@/store/settingAtom'
|
import { roofMaterialsAtom } from '@/store/settingAtom'
|
||||||
import { useMasterController } from '@/hooks/common/useMasterController'
|
import { useMasterController } from '@/hooks/common/useMasterController'
|
||||||
import { ROOF_MATERIAL_LAYOUT } from '@/components/floor-plan/modal/placementShape/PlacementShapeSetting'
|
import { ROOF_MATERIAL_LAYOUT } from '@/components/floor-plan/modal/placementShape/PlacementShapeSetting'
|
||||||
|
import { useSwal } from '@/hooks/useSwal'
|
||||||
|
|
||||||
export const ToggleonMouse = (e, act, target) => {
|
export const ToggleonMouse = (e, act, target) => {
|
||||||
const listWrap = e.target.closest(target)
|
const listWrap = e.target.closest(target)
|
||||||
@ -75,6 +76,8 @@ export default function Header(props) {
|
|||||||
const [commonCode, setCommonCode] = useRecoilState(commonCodeState)
|
const [commonCode, setCommonCode] = useRecoilState(commonCodeState)
|
||||||
const { promiseGet } = useAxios()
|
const { promiseGet } = useAxios()
|
||||||
|
|
||||||
|
const { swalFire } = useSwal()
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 지붕재 목록 Header에서 조회
|
* 지붕재 목록 Header에서 조회
|
||||||
*/
|
*/
|
||||||
@ -232,11 +235,32 @@ export default function Header(props) {
|
|||||||
key={`${menu.id}`}
|
key={`${menu.id}`}
|
||||||
href={menu.url}
|
href={menu.url}
|
||||||
replace={true}
|
replace={true}
|
||||||
onClick={() => {
|
onClick={(e) => {
|
||||||
// moveHome()
|
|
||||||
removeStuffRecoil(menu)
|
if(pathName === '/floor-plan') {
|
||||||
if (pathName === '/' && menu.id !== 8) {
|
e.preventDefault() // 기본 네비게이션 방지
|
||||||
window.location.reload()
|
e.stopPropagation() // 이벤트 전파 방지
|
||||||
|
swalFire({
|
||||||
|
text : getMessage(common.link.confirm), // 적절한 확인 메시지
|
||||||
|
type : 'confirm',
|
||||||
|
confirmFn: () => {
|
||||||
|
// 확인 버튼 클릭 시 실행
|
||||||
|
removeStuffRecoil(menu)
|
||||||
|
if (pathName === '/' && menu.id !== 8) {
|
||||||
|
window.location.reload()
|
||||||
|
} else {
|
||||||
|
router.push(menu.url)
|
||||||
|
}
|
||||||
|
router.push(menu.url)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
removeStuffRecoil(menu)
|
||||||
|
if (pathName === '/' && menu.id !== 8) {
|
||||||
|
window.location.reload()
|
||||||
|
} else {
|
||||||
|
router.push(menu.url)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
@ -258,9 +282,24 @@ export default function Header(props) {
|
|||||||
scroll={false}
|
scroll={false}
|
||||||
href={m.url}
|
href={m.url}
|
||||||
replace={true}
|
replace={true}
|
||||||
onClick={() => {
|
onClick={(e) => {
|
||||||
removeStuffRecoil(m)
|
if(pathName === '/floor-plan') {
|
||||||
}}
|
e.preventDefault() // 기본 네비게이션 방지
|
||||||
|
e.stopPropagation() // 이벤트 전파 방지
|
||||||
|
swalFire({
|
||||||
|
text: getMessage('common.link.confirm'), // 적절한 확인 메시지
|
||||||
|
type: 'confirm',
|
||||||
|
confirmFn: () => {
|
||||||
|
// 확인 버튼 클릭 시 기존 로직 실행
|
||||||
|
removeStuffRecoil(m)
|
||||||
|
router.push(m.url)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
removeStuffRecoil(m)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
>
|
>
|
||||||
{getMessage(m.name)}
|
{getMessage(m.name)}
|
||||||
</Link>
|
</Link>
|
||||||
|
|||||||
@ -565,6 +565,7 @@
|
|||||||
"commons.north": "北",
|
"commons.north": "北",
|
||||||
"commons.none": "選択しない",
|
"commons.none": "選択しない",
|
||||||
"common.type": "分類",
|
"common.type": "分類",
|
||||||
|
"common.link.confirm": "移動しますか?",
|
||||||
"font.style.normal": "通常",
|
"font.style.normal": "通常",
|
||||||
"font.style.italic": "イタリック体",
|
"font.style.italic": "イタリック体",
|
||||||
"font.style.bold": "太字",
|
"font.style.bold": "太字",
|
||||||
|
|||||||
@ -565,6 +565,7 @@
|
|||||||
"commons.north": "북",
|
"commons.north": "북",
|
||||||
"commons.none": "선택안함",
|
"commons.none": "선택안함",
|
||||||
"common.type": "분류",
|
"common.type": "분류",
|
||||||
|
"common.link.confirm": "이동 하시겠습니까?",
|
||||||
"font.style.normal": "보통",
|
"font.style.normal": "보통",
|
||||||
"font.style.italic": "기울임꼴",
|
"font.style.italic": "기울임꼴",
|
||||||
"font.style.bold": "굵게",
|
"font.style.bold": "굵게",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user