-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
After a user has added an export win they will be redirected to a success page. This page guides them on what will happen next.
- Loading branch information
Showing
7 changed files
with
81 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
import React from 'react' | ||
import { H4 } from '@govuk-react/heading' | ||
|
||
import ExportWin from '../../../components/Resource/ExportWin' | ||
import { ExportWinsLink, VerticalSpacer } from '../Details' | ||
import { DefaultLayout } from '../../../components' | ||
import urls from '../../../../lib/urls' | ||
|
||
const ExportWinSuccess = ({ winId }) => ( | ||
<ExportWin.Inline id={winId}> | ||
{(exportWin) => | ||
exportWin && | ||
`The export win ${exportWin.nameOfExport} to ${exportWin.country.name} has been` + | ||
` sent to ${exportWin.companyContacts[0].email} for review and confirmation.` | ||
} | ||
</ExportWin.Inline> | ||
) | ||
|
||
const Success = ({ match }) => ( | ||
<DefaultLayout | ||
pageTitle="Success" | ||
breadcrumbs={[ | ||
{ | ||
link: urls.dashboard.index(), | ||
text: 'Home', | ||
}, | ||
{ | ||
link: urls.companies.exportWins.index(), | ||
text: 'Export wins', | ||
}, | ||
{ | ||
text: 'Success', | ||
}, | ||
]} | ||
flashMessages={{ | ||
success: [<ExportWinSuccess winId={match.params.winId} />], | ||
}} | ||
> | ||
<H4 data-test="heading" as="h2"> | ||
What happens next? | ||
</H4> | ||
<p data-test="review"> | ||
The customer will review the export win and have the option to provide | ||
feedback. | ||
</p> | ||
<p data-test="email"> | ||
You will be sent an email once the customer has responded. | ||
</p> | ||
<VerticalSpacer> | ||
<ExportWinsLink /> | ||
</VerticalSpacer> | ||
</DefaultLayout> | ||
) | ||
|
||
export default Success |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters