[1165] 도면을 열고 있을 때, 상부 메뉴를 눌렀을 때의 거동 #174

Merged
ysCha merged 1 commits from feature/ysCha into dev 2025-07-04 11:11:17 +09:00
3 changed files with 49 additions and 8 deletions

View File

@ -25,6 +25,7 @@ import { isObjectNotEmpty } from '@/util/common-utils'
import { roofMaterialsAtom } from '@/store/settingAtom'
import { useMasterController } from '@/hooks/common/useMasterController'
import { ROOF_MATERIAL_LAYOUT } from '@/components/floor-plan/modal/placementShape/PlacementShapeSetting'
import { useSwal } from '@/hooks/useSwal'
export const ToggleonMouse = (e, act, target) => {
const listWrap = e.target.closest(target)
@ -75,6 +76,8 @@ export default function Header(props) {
const [commonCode, setCommonCode] = useRecoilState(commonCodeState)
const { promiseGet } = useAxios()
const { swalFire } = useSwal()
/**
* 지붕재 목록 Header에서 조회
*/
@ -232,11 +235,32 @@ export default function Header(props) {
key={`${menu.id}`}
href={menu.url}
replace={true}
onClick={() => {
// moveHome()
removeStuffRecoil(menu)
if (pathName === '/' && menu.id !== 8) {
window.location.reload()
onClick={(e) => {
if(pathName === '/floor-plan') {
e.preventDefault() //
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}
href={m.url}
replace={true}
onClick={() => {
removeStuffRecoil(m)
}}
onClick={(e) => {
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)}
</Link>

View File

@ -565,6 +565,7 @@
"commons.north": "北",
"commons.none": "選択しない",
"common.type": "分類",
"common.link.confirm": "移動しますか?",
"font.style.normal": "通常",
"font.style.italic": "イタリック体",
"font.style.bold": "太字",

View File

@ -565,6 +565,7 @@
"commons.north": "북",
"commons.none": "선택안함",
"common.type": "분류",
"common.link.confirm": "이동 하시겠습니까?",
"font.style.normal": "보통",
"font.style.italic": "기울임꼴",
"font.style.bold": "굵게",