Skip to content
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

[SIMPLE-FORMS] feat: update 4138 confirmation page to use new page design #34610

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,43 +1,24 @@
import React from 'react';
import PropTypes from 'prop-types';
import { connect, useSelector } from 'react-redux';
import FormTitle from 'platform/forms-system/src/js/components/FormTitle';
import { ConfirmationPageView } from '../../shared/components/ConfirmationPageView';
import { TITLE, SUBTITLE } from '../config/constants';
import { ConfirmationView } from 'platform/forms-system/src/js/components/ConfirmationView';

const content = {
headlineText: "You've submitted your statement to support your claim",
nextStepsText: (
<>
<p>
We’ll review your statement. If we have any questions or need additional
information from you, we’ll contact you.
</p>
</>
),
};
const childContent = <div />;

export const ConfirmationPage = () => {
export const ConfirmationPage = props => {
const form = useSelector(state => state.form || {});
const { submission } = form;
const submitDate = submission.timestamp;
const confirmationNumber = submission.response?.confirmationNumber;
const submitterFullName = form.data.fullName;

return (
<>
<FormTitle title={TITLE} subTitle={SUBTITLE} />
<ConfirmationPageView
formType="submission"
submitterHeader="Who submitted this form"
submitterName={submitterFullName}
submitDate={submitDate}
confirmationNumber={confirmationNumber}
content={content}
childContent={childContent}
/>
</>
<ConfirmationView
formConfig={props.route?.formConfig}
submitDate={submitDate}
confirmationNumber={confirmationNumber}
pdfUrl={submission.response?.pdfUrl}
devOnly={{
showButtons: true,
}}
/>
);
};

Expand All @@ -48,6 +29,7 @@ ConfirmationPage.propTypes = {
first: PropTypes.string.isRequired,
middle: PropTypes.string,
last: PropTypes.string.isRequired,
suffix: PropTypes.string,
},
}),
formId: PropTypes.string,
Expand All @@ -61,6 +43,9 @@ ConfirmationPage.propTypes = {
}),
}),
name: PropTypes.string,
route: PropTypes.shape({
formConfig: PropTypes.object,
}),
};

function mapStateToProps(state) {
Expand Down
Loading