From 64d6c3e6b4df5cbb1abf236ed89b660bdc7452c4 Mon Sep 17 00:00:00 2001 From: "Torsten Schulz (local)" Date: Tue, 14 Apr 2026 11:54:16 +0200 Subject: [PATCH] Enhance worship filtering logic: Modify fetchWorships method to conditionally include neighborInvitation parameter for neighborhood pages, ensuring location filters do not interfere with neighborhood-specific worship retrieval. --- src/components/WorshipRender.vue | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/components/WorshipRender.vue b/src/components/WorshipRender.vue index 7a1f0d0..c8774f0 100644 --- a/src/components/WorshipRender.vue +++ b/src/components/WorshipRender.vue @@ -92,8 +92,17 @@ export default { formatDate, async fetchWorships() { try { + const params = { ...(this.config || {}) }; + const currentPath = String(this.$route?.path || '').toLowerCase(); + const isNeighborhoodPage = currentPath.includes('/worship/neighborhood') || currentPath.includes('/worship/neighbor'); + if (isNeighborhoodPage) { + // Für die Nachbarschaftsseite ist das Flag maßgeblich; + // ein evtl. gesetzter Ortsfilter darf hier nicht blockieren. + params.neighborInvitation = true; + delete params.location; + } const response = await axios.get('/worships/filtered', { - params: this.config + params }); this.worships = response.data; } catch (error) {