From bd9de0102a447bbee6cc62e22804259b0482720e Mon Sep 17 00:00:00 2001 From: Torsten Schulz Date: Fri, 12 Jul 2024 13:04:03 +0200 Subject: [PATCH] Fixed edit worship page --- src/content/admin/WorshipManagement.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/content/admin/WorshipManagement.vue b/src/content/admin/WorshipManagement.vue index 7bbdd3b..9df5d5d 100644 --- a/src/content/admin/WorshipManagement.vue +++ b/src/content/admin/WorshipManagement.vue @@ -94,7 +94,7 @@ export default { async fetchWorships() { try { const response = await axios.get('/worships'); - this.worships = response.data; + this.worships = response.data.reverse(); } catch (error) { console.error('Fehler beim Abrufen der Gottesdienste:', error); } @@ -128,6 +128,9 @@ export default { }, editWorship(worship) { this.worshipData = { ...worship }; + this.worshipData.date = formatDate(worship.date).split(".").reverse().join("-"); + this.worshipData.time = formatTime(worship.time); + console.log(this.worshipData); this.selectedEventPlace = this.eventPlaces.find(ep => ep.id === worship.eventPlaceId); this.editMode = true; this.editId = worship.id;