feat: allow Visit Team Lead to Edit Visitor List#1637
Conversation
yoganandaness
left a comment
There was a problem hiding this comment.
@shivoomiess Requesting an e2e and unit(if possible).
zacharyjhankin
left a comment
There was a problem hiding this comment.
Diamond is happy with this change
added E2E tests for both Team Lead (who should be able to view) and Regular Visitor (who should NOT be able to view the button) |
| let stateReason: string | null = null; | ||
|
|
||
| if (isPiOrCoProposer(user, event)) { | ||
| if (isPiOrCoProposer(user, event) || isTeamlead(user, event)) { |
There was a problem hiding this comment.
suggestion: If you are TL and assign someone else to be TL you will loose the ability to change back, I wonder if we should warn the user that the aciton is irreversable by him?
There was a problem hiding this comment.
that's true. shall we send a notification popup or ...?
There was a problem hiding this comment.
I think you can use withConfirm HOC in the apps/frontend/src/components/proposalBooking/CreateUpdateVisit.tsx and then call confirm if the user is teamlead and not PI or Coproposer.
--- Details: PI / Team Lead can read / write the visitor list. Team Lead gets a confirmation if they assign someone else as teamlead. Visitors can view the list but not edit. Co-PI can neither view nor edit the list.
Description
This PR allows the Visit Team Lead to edit the Visitor List.
Motivation and Context
Previously, only the Proposal Investigator (PI) or Co-Proposer had the ability to edit the Visitor List. This change was required to enhance collaboration and efficiency by enabling the Visit Team Lead to also make necessary changes to the Visitor List.
Changes
VisitAuthorization.tsto also allow Visit Team Leads to make changes to the Visitor List.useActionButtons.tsxto include Visit Team Leads in the list of roles that are allowed to edit the Visitor List.How Has This Been Tested?
Screen.Recording.2026-07-08.at.17.11.28.mov
Fixes Jira Issue
https://jira.ess.eu//browse/SWAP-5660
Depends On
Tests included/Docs Updated?