Skip to content

Commit

Permalink
Merge branch 'main' into B-21049
Browse files Browse the repository at this point in the history
  • Loading branch information
stevengleason-caci authored Nov 18, 2024
2 parents e1ef108 + 261af63 commit f15e487
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 52 deletions.
3 changes: 2 additions & 1 deletion pkg/notifications/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ const MyMoveLink = "https://my.move.mil/"
const WashingtonHQServicesLink = "https://www.esd.whs.mil"
const SmartVoucherLink = "https://smartvoucher.dfas.mil/"

const DtodErrorMessage = "We are unable to calculate your distance. It may be that you have entered an invalid ZIP Code, or the system that calculates distance (DTOD) may be down. Please check your ZIP Code to ensure it was entered correctly and is not a PO Box."
const DTODFailureErrorMessage = "We are unable to calculate your distance. It may be that you have entered an invalid ZIP Code, or the system that calculates distance (DTOD) may be down. Please check your ZIP Code to ensure it was entered correctly and is not a PO Box."
const DTODDownErrorMessage = "We are having an issue with the system we use to calculate mileage (DTOD) and cannot proceed."

var affiliationDisplayValue = map[models.ServiceMemberAffiliation]string{
models.AffiliationARMY: "Army",
Expand Down
10 changes: 7 additions & 3 deletions pkg/route/dtod_zip5_distance.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,15 @@ func (d *dtodZip5DistanceInfo) DTODZip5Distance(appCtx appcontext.AppContext, pi

if distanceFloat <= 0 {
dtodAvailable, _ := validateDTODServiceAvailable(*d)
if !dtodAvailable && appCtx.Session().IsServiceMember() {
return distance, nil
if !dtodAvailable {
if appCtx.Session().IsServiceMember() {
return distance, nil
} else {
return distance, apperror.NewEventError(notifications.DTODDownErrorMessage, nil)
}
}

return distance, apperror.NewEventError(notifications.DtodErrorMessage, nil)
return distance, apperror.NewEventError(notifications.DTODFailureErrorMessage, nil)
}

// TODO: DTOD gives us a float back. Should we round, floor, or ceiling? Just going to round for now.
Expand Down
2 changes: 1 addition & 1 deletion pkg/route/dtod_zip5_distance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ func (suite *GHCTestSuite) TestDTODZip5DistanceFake() {
suite.Error(err)
switch err.(type) {
case apperror.EventError:
suite.Equal(err.Error(), notifications.DtodErrorMessage)
suite.Equal(err.Error(), notifications.DTODDownErrorMessage)
}
} else {
suite.NoError(err)
Expand Down
2 changes: 1 addition & 1 deletion src/components/Office/ShipmentForm/ShipmentForm.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -820,7 +820,7 @@ const ShipmentForm = (props) => {
<Alert data-testid="errorMessage" type="error" headingLevel="h4" heading="An error occurred">
{errorCode === 400 ? (
<p>
{errorMessage} If the error persists, please try again later, or contact the&nbsp;
{errorMessage} Please try again later, or contact the&nbsp;
<Link to={technicalHelpDeskURL} target="_blank" rel="noreferrer">
Technical Help Desk
</Link>
Expand Down
14 changes: 0 additions & 14 deletions src/scenes/Moves/WizardHeader.css

This file was deleted.

32 changes: 0 additions & 32 deletions src/scenes/Moves/WizardHeader.jsx

This file was deleted.

0 comments on commit f15e487

Please sign in to comment.