Skip to content

feat: use invite dialogue to invite visitors - #1094

Merged
yoganandaness merged 104 commits into
developfrom
SWAP-4726-new-user-selection-dialogue-not-working-with-visit
Oct 16, 2025
Merged

feat: use invite dialogue to invite visitors#1094
yoganandaness merged 104 commits into
developfrom
SWAP-4726-new-user-selection-dialogue-not-working-with-visit

Conversation

@jekabs-karklins

@jekabs-karklins jekabs-karklins commented Jun 16, 2025

Copy link
Copy Markdown
Contributor

Description

This PR implements the feature to invite visitors using an invite dialogue.

image

Motivation and Context

This feature was required to allow invite users to an experiment visit even if user is not presently on the system.

Changes

  1. A new table visit_registration_claims has been added to the Postgres database to store visit registration claims. This table references the invites and visits tables and will store each invite sent out to a potential visitor.
  2. The VisitAuthorization and VisitRegistrationClaimDataSource classes have been added to handle the authorization and data source for the new invite feature.

How Has This Been Tested?

With tests and manually

Fixes Jira Issue

https://jira.esss.lu.se/browse/SWAP-4726

Depends On

Tests included/Docs Updated?

  • I have added tests to cover my changes.

jekabs-karklins and others added 23 commits June 2, 2025 17:39
…invit' into SWAP-4726-new-user-selection-dialogue-not-working-with-visit
Base automatically changed from refactor-obtain-email-template-name to develop June 23, 2025 09:21
@jekabs-karklins
jekabs-karklins marked this pull request as ready for review September 18, 2025 06:29
@jekabs-karklins
jekabs-karklins requested a review from a team as a code owner September 18, 2025 06:29
@jekabs-karklins
jekabs-karklins requested review from Scott-James-Hurley and removed request for a team September 18, 2025 06:29

@Scott-James-Hurley Scott-James-Hurley left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great. STFC doesn't use the invite functionality so I've just looked at the code.

Comment thread apps/backend/src/datasources/mockups/InviteDataSource.ts
Comment thread apps/backend/src/mutations/InviteMutations.ts Outdated
@gnyiri

gnyiri commented Sep 19, 2025

Copy link
Copy Markdown
Collaborator

A generic question: is there a way to embed the proposal title, id, etc into the invite email? Not sure if the proposal reference is part of the associated Event. This would be necessary for the invited user to be able to decide if she/he wants to join the proposal or not.

@jekabs-karklins

Copy link
Copy Markdown
Contributor Author

A generic question: is there a way to embed the proposal title, id, etc into the invite email? Not sure if the proposal reference is part of the associated Event. This would be necessary for the invited user to be able to decide if she/he wants to join the proposal or not.

Thanks, this is a good point, I will add it as our User Officer would definitely complain not having it :)

@gnyiri

gnyiri commented Sep 22, 2025

Copy link
Copy Markdown
Collaborator

A generic question: is there a way to embed the proposal title, id, etc into the invite email? Not sure if the proposal reference is part of the associated Event. This would be necessary for the invited user to be able to decide if she/he wants to join the proposal or not.

Thanks, this is a good point, I will add it as our User Officer would definitely complain not having it :)

thanks. Another question: I made some tests and found thet the invited co-proposer will never turn automaticallly a co-proposer even if he logs in with the email address the invite was sent to. That is, the invite code is always required to join a proposal. Is that correct?

@jekabs-karklins

Copy link
Copy Markdown
Contributor Author

A generic question: is there a way to embed the proposal title, id, etc into the invite email? Not sure if the proposal reference is part of the associated Event. This would be necessary for the invited user to be able to decide if she/he wants to join the proposal or not.

Thanks, this is a good point, I will add it as our User Officer would definitely complain not having it :)

thanks. Another question: I made some tests and found thet the invited co-proposer will never turn automaticallly a co-proposer even if he logs in with the email address the invite was sent to. That is, the invite code is always required to join a proposal. Is that correct?

Thank you for bringing it up today. Just posting some visuals for how the notifications might look. I tried keeping it consistant with other web apps so it's intuitive for the user
image

@yoganandaness
yoganandaness self-requested a review October 7, 2025 13:57
@yoganandaness
yoganandaness enabled auto-merge (squash) October 15, 2025 11:08
@yoganandaness
yoganandaness merged commit 76e68f5 into develop Oct 16, 2025
22 checks passed
@yoganandaness
yoganandaness deleted the SWAP-4726-new-user-selection-dialogue-not-working-with-visit branch October 16, 2025 13:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants