From 1388196d0fd361d1197d7726f343c626a0067e6c Mon Sep 17 00:00:00 2001 From: Mark Williams Date: Fri, 9 Feb 2024 10:55:40 +0000 Subject: [PATCH] LIMS-303: Show visits from other villages on user calendar --- client/src/js/modules/calendar/views/calendar-view.vue | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/client/src/js/modules/calendar/views/calendar-view.vue b/client/src/js/modules/calendar/views/calendar-view.vue index 5e9eacaa6..e215bd1a8 100644 --- a/client/src/js/modules/calendar/views/calendar-view.vue +++ b/client/src/js/modules/calendar/views/calendar-view.vue @@ -244,7 +244,7 @@ export default { all: 1, } - queryParams.ty = this.proposalType + if (app.staff) queryParams.ty = this.proposalType if (this.selectedBeamline !== 'all') queryParams.bl = this.selectedBeamline const visitsCollection = new Visits(null, { @@ -477,10 +477,14 @@ export default { }, watch: { currentYear: { - handler: 'fetchVisitsCalendar' + handler: function(newVal, oldVal) { + if (oldVal != null) this.fetchVisitsCalendar() + } }, currentMonth: { - handler: 'fetchVisitsCalendar' + handler: function(newVal, oldVal) { + if (oldVal != null) this.fetchVisitsCalendar() + } } } }