Update dependencies in package.json and package-lock.json; add testing scripts for Vitest, and include new packages such as supertest and vitest. Refactor Navigation component to improve event handling and cleanup, ensuring better performance and user experience. Enhance error handling in various API endpoints for PDF uploads and CSV saves, ensuring robust error propagation. Update nodemailer transport configuration for consistency across API handlers.
This commit is contained in:
@@ -485,7 +485,7 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, onMounted, computed, watch } from 'vue'
|
||||
import { ref, onMounted, onUnmounted, computed } from 'vue'
|
||||
import { useRoute } from 'vue-router'
|
||||
import { Menu, X, ChevronDown } from 'lucide-vue-next'
|
||||
|
||||
@@ -520,9 +520,6 @@ const currentSubmenu = computed(() => {
|
||||
return null
|
||||
})
|
||||
|
||||
// Manuelles Toggle für Click-Events
|
||||
const manualSubmenu = ref(null)
|
||||
|
||||
const toggleMobileSubmenu = (menu) => {
|
||||
mobileSubmenu.value = mobileSubmenu.value === menu ? null : menu
|
||||
}
|
||||
@@ -557,7 +554,7 @@ const loadMannschaften = async () => {
|
||||
}
|
||||
values.push(current.trim())
|
||||
|
||||
if (values.length < 10) return null
|
||||
if (!values[0]) return null
|
||||
|
||||
return {
|
||||
mannschaft: values[0].trim(),
|
||||
@@ -583,17 +580,23 @@ const toggleCmsDropdown = () => {
|
||||
showCmsDropdown.value = !showCmsDropdown.value
|
||||
}
|
||||
|
||||
const handleDocumentClick = (e) => {
|
||||
if (!e.target.closest('.relative.inline-block')) {
|
||||
showCmsDropdown.value = false
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
loadMannschaften()
|
||||
checkGalleryImages()
|
||||
authStore.checkAuth()
|
||||
|
||||
// Close CMS dropdown when clicking outside
|
||||
document.addEventListener('click', (e) => {
|
||||
if (!e.target.closest('.relative.inline-block')) {
|
||||
showCmsDropdown.value = false
|
||||
}
|
||||
})
|
||||
document.addEventListener('click', handleDocumentClick)
|
||||
})
|
||||
|
||||
onUnmounted(() => {
|
||||
document.removeEventListener('click', handleDocumentClick)
|
||||
})
|
||||
|
||||
const toggleSubmenu = (menu) => {
|
||||
|
||||
Reference in New Issue
Block a user