-
Notifications
You must be signed in to change notification settings - Fork 93
feat: Ensure "Go to review" is always displayed for forms #10314
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
base: develop
Are you sure you want to change the base?
Changes from all commits
38fefc5
4a2a3e2
b8ee3c9
b5ca50d
136ce05
44a6d61
8f3893f
55684f8
cc7c836
5ad3386
0507adf
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -22,10 +22,10 @@ export const messages = defineMessages({ | |
| description: 'Back button text', | ||
| id: 'buttons.back' | ||
| }, | ||
| backToReview: { | ||
| defaultMessage: 'Back to review', | ||
| description: 'Back to review button text', | ||
| id: 'buttons.backToReview' | ||
| goToReview: { | ||
| defaultMessage: 'Go to review', | ||
| description: 'Go to review button text', | ||
| id: 'buttons.goToReview' | ||
| } | ||
| }) | ||
|
|
||
|
|
@@ -38,7 +38,6 @@ export type FormWizardProps = PropsWithChildren<{ | |
| /** Callback when the user submits the form wizard */ | ||
| onSubmit: () => void | ||
| pageTitle: string | ||
|
|
||
| showReviewButton?: boolean | ||
| }> | ||
|
|
||
|
|
@@ -49,8 +48,8 @@ export const FormWizard = ({ | |
| pageTitle, | ||
| onNextPage, | ||
| onPreviousPage, | ||
| continueButtonText = 'Continue', | ||
| showReviewButton | ||
| showReviewButton, | ||
| continueButtonText = 'Continue' | ||
| }: FormWizardProps & { | ||
| continueButtonText?: string | ||
| }) => { | ||
|
|
@@ -79,10 +78,9 @@ export const FormWizard = ({ | |
| > | ||
| {continueButtonText} | ||
| </Button> | ||
|
|
||
| {showReviewButton && ( | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is the |
||
| <Button size="large" type="secondary" onClick={onSubmit}> | ||
| {intl.formatMessage(messages.backToReview)} | ||
| {intl.formatMessage(messages.goToReview)} | ||
| </Button> | ||
| )} | ||
| </Stack> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -795,9 +795,10 @@ class ReviewSectionComp extends React.Component<FullProps, State> { | |
| groupId: string, | ||
| fieldName?: string | ||
| ) => { | ||
| const { draft, pageRoute } = this.props | ||
| const { draft, pageRoute, writeDeclaration } = this.props | ||
| const declaration = draft | ||
| declaration.review = true | ||
| writeDeclaration(declaration) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is this intended?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes it is, otherwise the tests fail for some reason the in-memory storage was not working well in testing environment since we re-routing
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's a bit weird as we aren't really making any changes on the v1 side 🤔 |
||
|
|
||
| this.props.router.navigate( | ||
| generateGoToPageGroupUrl({ | ||
|
|
||
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.
similarly for this one, during print certificate action we do not even have a review page so wouldn't make sense to show the button