Skip to content

LIMS-303: Show visits from other villages on user calendar#725

Merged
ndg63276 merged 1 commit intoprereleasefrom
improvement/LIMS-303/show-all-visits-on-calendar
Feb 13, 2024
Merged

LIMS-303: Show visits from other villages on user calendar#725
ndg63276 merged 1 commit intoprereleasefrom
improvement/LIMS-303/show-all-visits-on-calendar

Conversation

@ndg63276
Copy link
Collaborator

@ndg63276 ndg63276 commented Feb 9, 2024

JIRA ticket: LIMS-303

Summary:

The Calendar view currently only shows visits from the same beamline 'type' as the active proposal. Users would like to be able to see their visits from all villages. Don't apply to staff as the visit list becomes unwieldy.

Also, the visit list is requested 3 times when the page is first loaded.

Changes:

  • Only specify the beamline type if a staff member is logged in
  • Dont fetch the new visit list when the current year/month is first set, there is an explicit fetch in the mounted() function

To test:

  • Log in as a staff member, check the calendar page displays as before, but there is only one request to /api/proposal/visits
  • Log in as a user who has visits in different villages (eg ygr68196), check the calendar page now shows all visits from different beamline types (eg i04, m02)

@gfrn
Copy link
Collaborator

gfrn commented Feb 13, 2024

Although the PR itself works, I have noticed that the calendar button in the navbar does not appear for anyone that isn't staff, as there is a isStaff check in the header.vue component. Should we remove that and make the calendar visible for everyone?

@gfrn gfrn assigned gfrn and unassigned gfrn Feb 13, 2024
@gfrn gfrn self-requested a review February 13, 2024 09:10
@ndg63276
Copy link
Collaborator Author

Yeah, was going to do that as part of LIMS-1207. Non-stafff can get to the calendar at the moment from the menu.

@ndg63276 ndg63276 merged commit 5ffd611 into prerelease Feb 13, 2024
@ndg63276 ndg63276 deleted the improvement/LIMS-303/show-all-visits-on-calendar branch February 13, 2024 09:42
gfrn pushed a commit that referenced this pull request Mar 5, 2024
Co-authored-by: Mark Williams <mark.williams@diamond.ac.uk>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants