This commit is contained in:
2026-02-05 18:44:32 +01:00
parent c43d3225e3
commit 19be1f0d03

View File

@@ -1,4 +1,5 @@
<script setup lang="ts">
import { ref, computed } from "vue"
import dayjs from "dayjs"
// --- Helper für Schnellauswahl ---
@@ -39,6 +40,15 @@ const setMonthPreset = (type: 'current' | 'last') => {
const exports = ref([])
// Filtert die Exporte: Nur Einträge, deren valid_until nach dem jetzigen Zeitpunkt liegt
const filteredExports = computed(() => {
const now = dayjs()
return exports.value.filter(row => {
if (!row.valid_until) return true // Falls kein Ablaufdatum gesetzt ist, anzeigen
return dayjs(row.valid_until).isAfter(now)
})
})
const auth = useAuthStore()
const toast = useToast()
const router = useRouter()
@@ -100,7 +110,7 @@ const createExport = async () => {
</UDashboardNavbar>
<UTable
:rows="exports"
:rows="filteredExports"
:columns="[
{ key: 'created_at', label: 'Erstellt am' },
{ key: 'start_date', label: 'Start' },