Skip to content

Commit

Permalink
Merge pull request #13951 from transcom/B-21367-B-Block-third-address…
Browse files Browse the repository at this point in the history
…-if-no-second-address-is-present

B-21367 Added validation rules for adding third address without a second address
  • Loading branch information
pambecker authored Dec 4, 2024
2 parents 56fe5ab + 9d19547 commit ccc0cb2
Show file tree
Hide file tree
Showing 24 changed files with 1,074 additions and 67 deletions.
2 changes: 1 addition & 1 deletion pkg/factory/move_factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ func BuildMoveWithShipment(db *pop.Connection, customs []Customization, traits [
func BuildMoveWithPPMShipment(db *pop.Connection, customs []Customization, traits []Trait) models.Move {
move := BuildMove(db, customs, traits)

mtoShipment := buildMTOShipmentWithBuildType(db, customs, traits, mtoShipmentBuildBasic)
mtoShipment := buildMTOShipmentWithBuildType(db, customs, traits, mtoShipmentPPM)
mtoShipment.MoveTaskOrder = move
mtoShipment.MoveTaskOrderID = move.ID

Expand Down
4 changes: 4 additions & 0 deletions pkg/factory/mto_shipment_factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ const (
mtoShipmentBuildBasic mtoShipmentBuildType = iota
mtoShipmentBuild
mtoShipmentNTS
mtoShipmentPPM
mtoShipmentNTSR
)

Expand Down Expand Up @@ -66,6 +67,9 @@ func buildMTOShipmentWithBuildType(db *pop.Connection, customs []Customization,
shipmentHasDeliveryDetails = true
case mtoShipmentBuildBasic:
setupPickupAndDelivery = false
case mtoShipmentPPM:
defaultShipmentType = models.MTOShipmentTypePPM
setupPickupAndDelivery = false
default:
defaultShipmentType = models.MTOShipmentTypeHHG
setupPickupAndDelivery = true
Expand Down
16 changes: 8 additions & 8 deletions pkg/gen/primev3api/embedded_spec.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions pkg/gen/primev3messages/create_m_t_o_shipment.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit ccc0cb2

Please sign in to comment.