Skip to content
This repository has been archived by the owner on Sep 19, 2021. It is now read-only.

Update addresses to display only APO/FPO when required #908

Merged
merged 2 commits into from
Oct 2, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 1 addition & 1 deletion src/components/Form/Location/Address.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -697,7 +697,7 @@ Address.defaultProps = {
onError: (value, arr) => {
return arr
},
showPostOffice: true,
showPostOffice: false,
streetLabel: i18n.t('address.us.street.label'),
postOfficeStreetPlaceholder: i18n.t('address.apoFpo.street.placeholder'),
postOfficeStateLabel: i18n.t('address.apoFpo.apoFpo.label'),
Expand Down
1 change: 1 addition & 0 deletions src/components/Form/Location/Address.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ describe('The Address component', () => {
it('Performs address type update', () => {
let updates = 0
const props = {
showPostOffice: true,
onUpdate: () => {
updates++
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -671,6 +671,7 @@ export default class ForeignNational extends ValidationElement {
geocode={true}
addressBooks={this.props.addressBooks}
addressBook="ForeignNational"
showPostOffice={true}
dispatch={this.props.dispatch}
onUpdate={this.updateAddress}
onError={this.props.onError}
Expand Down
2 changes: 2 additions & 0 deletions src/components/Section/History/Employment/EmploymentItem.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,7 @@ export default class EmploymentItem extends ValidationElement {
geocode={true}
addressBooks={this.props.addressBooks}
addressBook="Employment"
showPostOffice={true}
dispatch={this.props.dispatch}
onUpdate={this.updateAddress}
onError={this.props.onError}
Expand Down Expand Up @@ -515,6 +516,7 @@ export default class EmploymentItem extends ValidationElement {
geocode={true}
addressBooks={this.props.addressBooks}
addressBook="Reference"
showPostOffice={true}
dispatch={this.props.dispatch}
onUpdate={this.updateReferenceAddress}
onError={this.props.onError}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ export default class PhysicalAddress extends ValidationElement {
geocode={true}
addressBooks={this.props.addressBooks}
addressBook={this.props.addressBook}
showPostOffice={true}
dispatch={this.props.dispatch}
onUpdate={this.updateAddress}
onError={this.props.onError}
Expand Down
1 change: 1 addition & 0 deletions src/components/Section/History/Employment/Supervisor.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ export default class Supervisor extends ValidationElement {
geocode={true}
addressBooks={this.props.addressBooks}
addressBook={this.props.addressBook}
showPostOffice={true}
dispatch={this.props.dispatch}
onUpdate={this.updateAddress}
onError={this.props.onError}
Expand Down
1 change: 1 addition & 0 deletions src/components/Section/History/Federal/FederalItem.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ export default class FederalItem extends ValidationElement {
geocode={true}
addressBooks={this.props.addressBooks}
addressBook="Agency"
showPostOffice={true}
dispatch={this.props.dispatch}
required={this.props.required}
/>
Expand Down
2 changes: 2 additions & 0 deletions src/components/Section/History/Residence/ResidenceItem.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,7 @@ export default class ResidenceItem extends ValidationElement {
geocode={true}
addressBook="Residence"
addressBooks={this.props.addressBooks}
showPostOffice={true}
dispatch={this.props.dispatch}
onUpdate={this.updateAddress}
onError={this.props.onError}
Expand Down Expand Up @@ -581,6 +582,7 @@ export default class ResidenceItem extends ValidationElement {
geocode={true}
addressBooks={this.props.addressBooks}
addressBook="Reference"
showPostOffice={true}
dispatch={this.props.dispatch}
onUpdate={this.updateReferenceAddress}
onError={this.props.onError}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,7 @@ export default class CivilUnion extends ValidationElement {
geocode={true}
addressBooks={this.props.addressBooks}
addressBook="Relative"
showPostOffice={true}
dispatch={this.props.dispatch}
onUpdate={this.updateAddress}
onError={this.props.onError}
Expand All @@ -420,6 +421,7 @@ export default class CivilUnion extends ValidationElement {
geocode={true}
addressBooks={this.props.addressBooks}
addressBook="Relative"
showPostOffice={true}
dispatch={this.props.dispatch}
onUpdate={this.updateAddress}
onError={this.props.onError}
Expand Down Expand Up @@ -504,6 +506,7 @@ export default class CivilUnion extends ValidationElement {
'relationships.civilUnion.label.addressSeparated'
)}
layout={Location.US_CITY_STATE_ZIP_INTERNATIONAL_CITY}
showPostOffice={true}
onUpdate={this.updateAddressSeparated}
onError={this.props.onError}
required={this.props.required}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -680,6 +680,7 @@ export default class Relative extends ValidationElement {
dispatch={this.props.dispatch}
layout={Location.ADDRESS}
geocode={true}
showPostOffice={true}
onUpdate={this.updateAddress}
onError={this.props.onError}
required={this.props.required}
Expand Down Expand Up @@ -1258,7 +1259,6 @@ export default class Relative extends ValidationElement {
<Location
name="EmployerAddress"
{...this.props.EmployerAddress}
showPostOffice={false}
layout={Location.ADDRESS}
geocode={true}
className="relative-employer-address"
Expand Down