Skip to content

Commit ea029f5

Browse files
ndg63276Mark Williams
authored andcommitted
LIMS-303: Show visits from other villages on user calendar (#725)
Co-authored-by: Mark Williams <mark.williams@diamond.ac.uk>
1 parent 019b44c commit ea029f5

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

client/src/js/modules/calendar/views/calendar-view.vue

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ export default {
244244
all: 1,
245245
}
246246
247-
queryParams.ty = this.proposalType
247+
if (app.staff) queryParams.ty = this.proposalType
248248
if (this.selectedBeamline !== 'all') queryParams.bl = this.selectedBeamline
249249
250250
const visitsCollection = new Visits(null, {
@@ -477,10 +477,14 @@ export default {
477477
},
478478
watch: {
479479
currentYear: {
480-
handler: 'fetchVisitsCalendar'
480+
handler: function(newVal, oldVal) {
481+
if (oldVal != null) this.fetchVisitsCalendar()
482+
}
481483
},
482484
currentMonth: {
483-
handler: 'fetchVisitsCalendar'
485+
handler: function(newVal, oldVal) {
486+
if (oldVal != null) this.fetchVisitsCalendar()
487+
}
484488
}
485489
}
486490
}

0 commit comments

Comments
 (0)