Fixed edit worship page
This commit is contained in:
@@ -94,7 +94,7 @@ export default {
|
|||||||
async fetchWorships() {
|
async fetchWorships() {
|
||||||
try {
|
try {
|
||||||
const response = await axios.get('/worships');
|
const response = await axios.get('/worships');
|
||||||
this.worships = response.data;
|
this.worships = response.data.reverse();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Fehler beim Abrufen der Gottesdienste:', error);
|
console.error('Fehler beim Abrufen der Gottesdienste:', error);
|
||||||
}
|
}
|
||||||
@@ -128,6 +128,9 @@ export default {
|
|||||||
},
|
},
|
||||||
editWorship(worship) {
|
editWorship(worship) {
|
||||||
this.worshipData = { ...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.selectedEventPlace = this.eventPlaces.find(ep => ep.id === worship.eventPlaceId);
|
||||||
this.editMode = true;
|
this.editMode = true;
|
||||||
this.editId = worship.id;
|
this.editId = worship.id;
|
||||||
|
|||||||
Reference in New Issue
Block a user