sonar qube; ternary if

This commit is contained in:
Cindy Chang
2024-07-16 15:42:30 +08:00
parent 6a689e419c
commit 07d6e75a6a
4 changed files with 13 additions and 69 deletions

View File

@@ -33,12 +33,10 @@ export default {
const allMapDataStore = AllMapDataStore();
const conformanceStore = ConformanceStore();
const pageAdminStore = PageAdminStore();
const loginStore = LoginStore();
const { tempFilterId, createFilterId, temporaryData, postRuleData, ruleData } = storeToRefs(allMapDataStore);
const { conformanceLogTempCheckId, conformanceFilterTempCheckId } = storeToRefs(conformanceStore);
const router = useRouter();
const { isLoggedIn, auth } = storeToRefs(loginStore);
``
const setHighlightedNavItemOnLanding = () => {
const currentPath = router.currentRoute.value.path;
const pathSegments: string[] = currentPath.split('/').filter(segment => segment !== '');
@@ -129,7 +127,6 @@ export default {
},
// Remember, Swal modal handling is called before beforeRouteUpdate
beforeRouteUpdate(to, from, next) {
// console.log("beforeRouteUpdate", from.name, "to:", to.name);
this.setPrevioiusPage(from.name);
// 離開 Map 頁時判斷是否有無資料和需要存檔