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:
Torsten Schulz (local)
2025-11-10 13:08:50 +01:00
parent 95d7a3dfe8
commit bde1d32b14
15 changed files with 2055 additions and 15 deletions

View File

@@ -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) => {