-
Notifications
You must be signed in to change notification settings - Fork 1
Update Download Workflow for DAC Approval #149
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
Conversation
Update the download workflow to handle requests requiring approval from the data access committee (DAC): * Make login the first step in the workflow * Ask whether the user is requesting data for diabetes research * If the user answered that they are doing non-diabetes research, gather further information on the research purpose page * Persist all new fields * Automatically move requests related to diabetes research to APPROVED status, while non-diabetes requests move to AWAITING_APPROVAL
|
@kirenotneb, sorry this took so long, but I had more trouble stashing state across routes and validating the new form inputs than I expected. Hopefully things are in a good state for any refinements that need to be made while I'm out. |
|
Azure Static Web Apps: Your stage site is ready! Visit it here: https://lemon-island-0734b751e-149.westus2.5.azurestaticapps.net |
| const allValid = Object.keys(nonDiabetesRules) | ||
| .map((key) => { | ||
| const value = agreementFormState.value[key]; | ||
| if (value === undefined || value === null) { | ||
| return false; | ||
| } | ||
| const min = nonDiabetesRules[key].min; | ||
| const max = nonDiabetesRules[key].max; | ||
| if (min || max) { | ||
| const tooLong = max ? value.trim().length > max : false; | ||
| const tooShort = min ? value.trim().length < min : false; | ||
| if (tooLong || tooShort) { | ||
| return false; | ||
| } | ||
| } | ||
| return true; | ||
| }) | ||
| .every((validity) => validity); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not really happy with this solution, but there doesn't seem to be a way to reactively get the validation state of the <n-form> component.
kirenotneb
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe it covers all the requested changes. We'll hold off merrging until we have concensus from Shannon and others.
One odd behavior that I'll want to think about is how to handle those who have an existing agreement, but now want to request a non-diabetes dataset. Currently, we don't update or create a new agreement if the purpose has changed and we lose the other details.
Update the download workflow to handle requests requiring approval from the data access committee (DAC):
Screenshots
Updated overview page
Login before new question
New diabetes research question
New form fields for requests that require DAC approval
...