-
Notifications
You must be signed in to change notification settings - Fork 4
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
[DUOS-1755][risk=no] Step 2 DAR Form #1842
Conversation
@@ -1,22 +1,21 @@ | |||
import { Component } from 'react'; |
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.
there's still a lot of cleanup to do to get the new DAR form functional + well designed, but I did my best to incorporate the new step 2 section into the old code.
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 will do the cleanup needed to get this to properly submit & look good (code wise) as part of finishing up #1805
|
||
const [datasets, setDatasets] = useState([]); | ||
const today = new Date(); | ||
const irbProtocolExpiration = formData.irbProtocolExpiration || `${today.getFullYear().toString().padStart(4, '0')}-${today.getMonth().toString().padStart(2, '0')}-${today.getDate().toString().padStart(2, '0')}`; |
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.
is the irb expiration always one year from the time of upload?
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.
Good question. @solideoglori, any insights?
useEffect(() => { | ||
fetchAllDatasets(formData.datasetIds).then((datasets) => { | ||
setDatasets(datasets); | ||
}); | ||
}, [formData.datasetIds]); |
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.
this is techincally inefficient, since it's refetching the datasets every time the user searches something new in the dataset search box. however, in practice, this seems to be robust/fast enough in my testing.
Good catch! Simple fix pushed up. |
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.
Great work! This step's the most complicated out of the group due to the DULs and file processing, but it looks like the core logic is working as expected. Once the rest of the components are up you can check to see if saving and submission works as intended.
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.
The new step 2 panel looks good and is functioning properly for me when running locally. The logic for the new components looks good to me.
Addresses
https://broadworkbench.atlassian.net/browse/DUOS-1755
Have you read Terra's Contributing Guide lately? If not, do that first.