Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/current team project validation #1456

Merged

Conversation

jarvisraymond-uchicago
Copy link
Contributor

@jarvisraymond-uchicago jarvisraymond-uchicago commented Nov 21, 2023

Jira Ticket: VADC-780

Updates the TeamProjectHeader to query for the current valid team projects and then validate the user's current stored team project. If the stored team project is not valid, the stored value is removed and they are redirected to the analysis app to select a new team project.

This can be tested locally by setting an invalid project name in the browser console:
localStorage.setItem('teamProject', '/bad_name');
and then reloading the page when on the OHDSI, GWAS or Results app.

output

Storybooks and unit tests are update accordingly.
output

New Features

  • Implements redirect functionality for users with expired team project names stored locally

@jarvisraymond-uchicago jarvisraymond-uchicago marked this pull request as ready for review November 21, 2023 20:18
Copy link
Contributor

@pieterlukasse pieterlukasse left a comment

Choose a reason for hiding this comment

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

looks good and works great 👍

@jarvisraymond-uchicago jarvisraymond-uchicago merged commit cdd74d2 into feat/vadc_sprint23 Nov 21, 2023
3 of 4 checks passed
@jarvisraymond-uchicago jarvisraymond-uchicago deleted the feat/currentTeamProjectValidation branch November 21, 2023 21:12
jarvisraymond-uchicago added a commit that referenced this pull request Nov 27, 2023
* feat(currentTeamProjectValidation): Initial commit

* feat(currentTeamProjectValidation): Moved logic outside of separate component into TeamProjectHeader, should decrease total requests needed

* feat(currentTeamProjectValidation): refactored code so when in edit mode with an invalid teamProject application does not display the expired name

* feat(currentTeamProjectValidation): began refactoring failed test

* feat(currentTeamProjectValidation): Updated TeamProjectModel.test.jsx to pass all unit tests

* feat(dataDownloadListActions): Removed dead code: InvalidTeamProjectMessage

* feat(dataDownloadListActions): fixed lint issues

* feat(currentTeamProjectValidation): updated unit tests to pass

* feat(currentTeamProjectValidation): Updated story book stories

* feat(currentTeamProjectValidation): removed duplicate function call

* feat(currentTeamProjectValidation): Wrote unit test for IsCurrentTeamProjectValid

* feat(currentTeamProjectValidation): updated function name for clarity

* feat(currentTeamProjectValidation): removed console log and linted code

* feat(currentTeamProjectValidation): Formatted code for clarity

* feat(currentTeamProjectValidation): ran linter

* feat(currentTeamProjectValidation): refactored IsCurrentTeamProjectValid.test.js to use existing test data

* feat(currentTeamProjectValidation): removed unneeded localStorage set call

* feat(currentTeamProjectValidation): ran linter

* feat(currentTeamProjectValidation): cleaned up code for clarity
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.

2 participants