-
Notifications
You must be signed in to change notification settings - Fork 3
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
Created confirm dialog to check for empty variants by role #1463
Conversation
I would like to remove the "any" type in the following function, |
I think you may want this: import { PromptResponseListFragment } from '../../../../../common/fragments/promptResponse.graphql';
…
const getEmptyResponsesForRole = (
list: PromptResponseListFragment,
roles: Set<Role>
) => {``` |
Hi Adam, I'm having a lint error issue that I can't seem to figure out. It's showing up [here]. |
a54f3a1
to
5f9125a
Compare
@adam-soltech It's ready for your review now. Thank you. |
src/scenes/ProgressReports/EditForm/Steps/SubmitReportStep/ConfirmVariantDialog.tsx
Outdated
Show resolved
Hide resolved
src/scenes/ProgressReports/EditForm/Steps/SubmitReportStep/ConfirmVariantDialog.tsx
Outdated
Show resolved
Hide resolved
src/scenes/ProgressReports/EditForm/Steps/SubmitReportStep/ConfirmVariantDialog.tsx
Outdated
Show resolved
Hide resolved
src/scenes/ProgressReports/EditForm/Steps/SubmitReportStep/ConfirmVariantDialog.tsx
Outdated
Show resolved
Hide resolved
src/scenes/ProgressReports/EditForm/Steps/SubmitReportStep/ConfirmVariantDialog.tsx
Outdated
Show resolved
Hide resolved
src/scenes/ProgressReports/EditForm/Steps/SubmitReportStep/ConfirmVariantDialog.tsx
Outdated
Show resolved
Hide resolved
src/scenes/ProgressReports/EditForm/Steps/SubmitReportStep/ConfirmVariantDialog.tsx
Outdated
Show resolved
Hide resolved
src/scenes/ProgressReports/EditForm/Steps/SubmitReportStep/ConfirmVariantDialog.tsx
Outdated
Show resolved
Hide resolved
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.
Hey Andre, thanks for asking for my review. Overall looks good. I added some comments when you have time.
8cad678
to
a0133fa
Compare
Updated per your feedback, thank you @adam-soltech |
src/scenes/ProgressReports/EditForm/Steps/SubmitReportStep/ConfirmVariantDialog.tsx
Outdated
Show resolved
Hide resolved
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.
One last nit - otherwise lgtm. Good job! Thanks!
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.
LGTM - thanks for the opportunity to review
Thank you Adam. Hi @CarsonF, Please take a look when you get a chance and let me know if there are any other changes you want me to make? |
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.
Sorry for the huge delay in reviewing this 😞
We have a dynamic way to register steps already.
https://github.com/SeedCompany/cord-field/blob/master/src/scenes/ProgressReports/EditForm/Steps/index.ts#L9-L20
It would be better to re-use this to dynamically create your list here.
This could be iterated through just like ProgressReportStepper does.
Each step component could be updated to declare an isMissing
function.
https://github.com/SeedCompany/cord-field/blob/master/src/scenes/ProgressReports/EditForm/Steps/step.types.ts#L4-L6
isMissing?: (report: ReportProp & { currentUserRoles: ReadonlySet<Role> }) => boolean;
Perhaps this could be called right after confirming the step is enabled, here
src/scenes/ProgressReports/EditForm/Steps/SubmitReportStep/SubmitReportStep.tsx
Outdated
Show resolved
Hide resolved
src/scenes/ProgressReports/EditForm/Steps/SubmitReportStep/ConfirmVariantDialog.tsx
Outdated
Show resolved
Hide resolved
src/scenes/ProgressReports/EditForm/Steps/SubmitReportStep/ConfirmVariantDialog.tsx
Outdated
Show resolved
Hide resolved
src/scenes/ProgressReports/EditForm/Steps/SubmitReportStep/ConfirmVariantDialog.tsx
Outdated
Show resolved
Hide resolved
src/scenes/ProgressReports/EditForm/Steps/SubmitReportStep/ConfirmVariantDialog.tsx
Outdated
Show resolved
Hide resolved
f52076a
to
e13b74c
Compare
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.
Thank you @CarsonF
93f31ca
to
faee9fc
Compare
@atGit2021 I renamed "missing" to "incomplete" - I think this is a better representation. I also tweaked the dialog: renamed the component to make sense, renamed the filename to match, tweaked the styling to not have duplicate |
Andrew, I started a draft PR now that I have some functionality up and running, but it uses some "dummy" buttons which are not tied into the workflow. I'm also not sure of some of the other design changes that might be needed to incorporate/integrate this into the front end design standards. Let me know if you have any bandwidth to review/huddle or if you want me to reach out to Brent or Adam. Thank you sir.
Monday Ticket