Skip to content
This repository has been archived by the owner on Jan 7, 2020. It is now read-only.

Commit

Permalink
Merge pull request #1276 from cfpb/email-receipt
Browse files Browse the repository at this point in the history
Add email line to receipt
  • Loading branch information
omnipresent07 authored Dec 2, 2019
2 parents 0923730 + 7d99580 commit a570d13
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 7 deletions.
3 changes: 2 additions & 1 deletion src/actions/receiveSignature.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ export default function receiveSignature(data) {
return {
type: types.RECEIVE_SIGNATURE,
timestamp: data.timestamp,
receipt: data.receipt
receipt: data.receipt,
email: data.email
}
}
3 changes: 2 additions & 1 deletion src/actions/receiveSignaturePost.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ export default function receiveSignaturePost(data) {
return {
type: types.RECEIVE_SIGNATURE_POST,
timestamp: data.timestamp,
receipt: data.receipt
receipt: data.receipt,
email: data.email
}
}
1 change: 1 addition & 0 deletions src/common/Alert.css
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
font-family: SourceSansPro;
margin-bottom: 0;
margin-top: 0;
line-height: 1.4em;
}

.alert-text:only-child {
Expand Down
4 changes: 3 additions & 1 deletion src/reducers/signature.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export default (state = defaultSignature, action) => {
isFetching: false,
timestamp: action.timestamp,
receipt: action.receipt,
email: action.email,
checked: action.timestamp !== 0
}

Expand All @@ -42,7 +43,8 @@ export default (state = defaultSignature, action) => {
...state,
isFetching: false,
timestamp: action.timestamp,
receipt: action.receipt
receipt: action.receipt,
email: action.email
}

case CHECK_SIGNATURE:
Expand Down
3 changes: 3 additions & 0 deletions src/submission/Receipt.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ const Receipt = ({
<strong>{ordinalHour(new Date(timestamp))}</strong>.
<br />
Your receipt number for this submission is <strong>{receipt}</strong>.
<br />
<br />
A copy of this receipt has been sent to <strong>{email}</strong>.
</div>
</Alert>
</section>
Expand Down
7 changes: 3 additions & 4 deletions src/submission/ReceiptContainer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,18 @@ import { connect } from 'react-redux'
import Receipt from './Receipt.jsx'

export function mapStateToProps(state) {
const { timestamp, receipt } = state.app.signature
const { timestamp, receipt, email } = state.app.signature

const { status } = state.app.submission
// const { email } = state.app.user.oidc.profile

const { filingPeriod } = state.app

return {
timestamp,
receipt,
status,
filingPeriod
// email
filingPeriod,
email
}
}

Expand Down

0 comments on commit a570d13

Please sign in to comment.