Fix #102
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
import { ref, computed } from "vue"
|
||||||
import dayjs from "dayjs"
|
import dayjs from "dayjs"
|
||||||
|
|
||||||
// --- Helper für Schnellauswahl ---
|
// --- Helper für Schnellauswahl ---
|
||||||
@@ -39,6 +40,15 @@ const setMonthPreset = (type: 'current' | 'last') => {
|
|||||||
|
|
||||||
const exports = ref([])
|
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 auth = useAuthStore()
|
||||||
const toast = useToast()
|
const toast = useToast()
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
@@ -100,7 +110,7 @@ const createExport = async () => {
|
|||||||
</UDashboardNavbar>
|
</UDashboardNavbar>
|
||||||
|
|
||||||
<UTable
|
<UTable
|
||||||
:rows="exports"
|
:rows="filteredExports"
|
||||||
:columns="[
|
:columns="[
|
||||||
{ key: 'created_at', label: 'Erstellt am' },
|
{ key: 'created_at', label: 'Erstellt am' },
|
||||||
{ key: 'start_date', label: 'Start' },
|
{ key: 'start_date', label: 'Start' },
|
||||||
|
|||||||
Reference in New Issue
Block a user