Fixed edit worship page

This commit is contained in:
Torsten Schulz
2024-07-12 13:04:03 +02:00
parent 2719bd3a3b
commit bd9de0102a

View File

@@ -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;