-
Notifications
You must be signed in to change notification settings - Fork 1
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
Conditional Task List for Report Sign-Off and Submit #2673
Conversation
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.
🥇 work! Just a couple of things about the attachments
export const getSignOffAndSubmitSteps: ( | ||
versionId: number, | ||
activeIndex?: ActivePage | number, | ||
) => TaskListElement[] = (versionId, activeIndex = undefined) => { | ||
) => Promise<TaskListElement[]> = async ( |
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'd be up for making these steps as static as possible, and let the various components figure out how to fetch the dynamic data.
This way we're not constrained to which API endpoint to use, nor to using these tasklist elements on the server side
export const getSignOffAndSubmitSteps: (
versionId: number,
activeIndex?: ActivePage | number,
needsVerification?: boolean
) => TaskListElement[] = ...
and in the SignOffPage server component:
needsVerif = await getReportNeedsVerification(versionId)
taskList = getSignOffAndSubmitSteps(version_id, ActivePage.SignOff, needsVerif)
...
const filteredElements: TaskListElement[] = elements.filter((element) => { | ||
if (!needsVerification) { | ||
return ( | ||
element.title !== "Verification" && element.title !== "Attachments" |
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 Attachments page contains more than just the verification statement (confidentiality request, extra WCI info, etc.) so we need to keep it there no matter what
1850327
to
43be149
Compare
chore: cleanup chore: cleanup
bbe7d93
to
842097a
Compare
Addresses 493
🚀 Impact:
🔬 Local Testing:
Test for needs verification links
Operation 3
, click buttonContinue
Continue
Expected Results
Signoff & Submit
task list displays including: "Verification";Expected Results
Test for does not need verification links
Operation 14
, click buttonStart
Continue
Expected Results
Signoff & Submit
task list displays NOT including: "Verification";Expected Results