Skip to content
Merged
Show file tree
Hide file tree
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
Expand Up @@ -38,9 +38,10 @@ function InPersonLocationPostOfficeSearchStep({ onChange, toPreviousStep, regist
const handleLocationSelect = useCallback(
async (e: any, id: number) => {
const selectedLocation = locationResults![id]!;
const { name: selectedLocationName } = selectedLocation;
setSubmitEventMetadata({ selected_location: selectedLocationName });
onChange({ selectedLocationName });
const { streetAddress, formattedCityStateZip } = selectedLocation;
const selectedLocationAddress = `${streetAddress}, ${formattedCityStateZip}`;
setSubmitEventMetadata({ selected_location: selectedLocationAddress });
onChange({ selectedLocationAddress });
if (autoSubmit) {
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ function InPersonPrepareStep({ toPreviousStep, value }) {
const { flowPath } = useContext(UploadContext);
const { trackEvent } = useContext(AnalyticsContext);
const { securityAndPrivacyHowItWorksURL } = useContext(MarketingSiteContext);
const { selectedLocationName } = value;
/* Remove selectedLocationName when request_pilot_facilities removed */
const { selectedLocationName, selectedLocationAddress } = value;

const onContinue: MouseEventHandler = async (event) => {
event.preventDefault();
Expand All @@ -35,13 +36,21 @@ function InPersonPrepareStep({ toPreviousStep, value }) {

return (
<>
{/* Remove selectedLocationName version of alert when request_pilot_facilities removed */}
{selectedLocationName && (
<Alert type="success" className="margin-bottom-4">
{t('in_person_proofing.body.prepare.alert_selected_post_office', {
{t('in_person_proofing.body.prepare.alert_selected_po_name', {
name: selectedLocationName,
})}
</Alert>
)}
{selectedLocationAddress && (
<Alert type="success" className="margin-bottom-4">
{t('in_person_proofing.body.prepare.alert_selected_post_office', {
full_address: selectedLocationAddress,
})}
</Alert>
)}
<PageHeading>{t('in_person_proofing.headings.prepare')}</PageHeading>

<p>{t('in_person_proofing.body.prepare.verify_step_about')}</p>
Expand Down
3 changes: 2 additions & 1 deletion config/locales/in_person_proofing/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ en:
retail_hours_sun: 'Sun:'
retail_hours_weekday: 'Monday to Friday:'
prepare:
alert_selected_post_office: You’ve selected the %{name} Post Office.
alert_selected_po_name: You’ve selected the %{name} Post Office.
alert_selected_post_office: You’ve selected the Post Office at %{full_address}.
privacy_disclaimer: '%{app_name} is a secure, government website. We and the
U.S. Postal Service use your data to verify your identity.'
privacy_disclaimer_link: Learn more about privacy and security.
Expand Down
3 changes: 2 additions & 1 deletion config/locales/in_person_proofing/es.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ es:
retail_hours_sun: 'Dom:'
retail_hours_weekday: 'De Lunes a Viernes:'
prepare:
alert_selected_post_office: Ha seleccionado la oficina de correos %{name}.
alert_selected_po_name: Ha seleccionado la oficina de correos %{name}.
alert_selected_post_office: Ha seleccionado la oficina de correos a %{full_address}.
privacy_disclaimer: '%{app_name} es un sitio web seguro del gobierno. Nosotros y
el Servicio Postal de los Estados Unidos utilizamos sus datos para
verificar su identidad.'
Expand Down
3 changes: 2 additions & 1 deletion config/locales/in_person_proofing/fr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ fr:
retail_hours_sun: 'Dim:'
retail_hours_weekday: 'Lundi à Vendredi:'
prepare:
alert_selected_post_office: Vous avez sélectionné le bureau de poste de %{name}.
alert_selected_po_name: Vous avez sélectionné le bureau de poste de %{name}.
alert_selected_post_office: Vous avez sélectionné le bureau de poste à %{full_address}.
privacy_disclaimer: '%{app_name} est un site gouvernemental sécurisé. Nous et le
service postal américain utilisons vos données pour vérifier votre
identité.'
Expand Down