Skip to content

Commit

Permalink
Merge branch 'main' of github.com:transcom/mymove into MAIN-B-22056_s…
Browse files Browse the repository at this point in the history
…ns_sqs_deps_w_endpoint
  • Loading branch information
ryan-mchugh committed Jan 13, 2025
2 parents 51740dc + 1ae5418 commit c8424e8
Show file tree
Hide file tree
Showing 127 changed files with 1,942 additions and 342 deletions.
1 change: 1 addition & 0 deletions migrations/app/migrations_manifest.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1053,6 +1053,7 @@
20241204155919_update_ordering_proc.up.sql
20241204210208_retroactive_update_of_ppm_max_and_estimated_incentives_prd.up.sql
20241210143143_redefine_mto_shipment_audit_table.up.sql
20241216170325_update_nts_enum_name.up.sql
20241216190428_update_get_zip_code_function_and_update_pricing_proc.up.sql
20241217163231_update_duty_locations_bad_zips.up.sql
20241217180136_add_AK_zips_to_zip3_distances.up.sql
Expand Down
25 changes: 25 additions & 0 deletions migrations/app/schema/20241216170325_update_nts_enum_name.up.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
-- Rename the existing enum value 'HHG_INTO_NTS_DOMESTIC' to 'HHG_INTO_NTS'
DO $$
BEGIN
IF EXISTS (
SELECT 1
FROM pg_type t
JOIN pg_enum e ON t.oid = e.enumtypid
WHERE t.typname = 'mto_shipment_type'
AND e.enumlabel = 'HHG_INTO_NTS_DOMESTIC'
) THEN
ALTER TYPE mto_shipment_type
RENAME VALUE 'HHG_INTO_NTS_DOMESTIC' TO 'HHG_INTO_NTS';
END IF;
END $$;

-- Update column comments to include all current shipment types
COMMENT ON COLUMN mto_shipments.shipment_type IS 'The type of shipment. The list includes:
1. Personally procured move (PPM)
2. Household goods move (HHG)
3. Non-temporary storage (HHG_INTO_NTS)
4. Non-temporary storage-release (HHG_OUTOF_NTS_DOMESTIC)
5. Mobile home (MOBILE_HOME)
6. Boat haul away (BOAT_HAUL_AWAY)
7. Boat tow away (BOAT_TOW_AWAY)
8. Unaccompanied baggage (UNACCOMPANIED_BAGGAGE)';
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
"reselect": "^4.1.8",
"sass": "^1.77.6",
"swagger-client": "^3.18.5",
"swagger-ui-dist": "^5.2.0",
"swagger-ui-dist": "^5.18.2",
"uswds": "2.13.3",
"uuid": "^9.0.0",
"webpack": "5",
Expand Down
6 changes: 3 additions & 3 deletions pkg/factory/mto_shipment_factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,13 @@ func buildMTOShipmentWithBuildType(db *pop.Connection, customs []Customization,
hasStorageFacilityCustom := findValidCustomization(customs, StorageFacility) != nil
buildStorageFacility :=
cMtoShipment.ShipmentType == models.MTOShipmentTypeHHGOutOfNTSDom ||
cMtoShipment.ShipmentType == models.MTOShipmentTypeHHGIntoNTSDom
cMtoShipment.ShipmentType == models.MTOShipmentTypeHHGIntoNTS
shipmentHasPickupDetails := cMtoShipment.ShipmentType != models.MTOShipmentTypeHHGOutOfNTSDom && cMtoShipment.ShipmentType != models.MTOShipmentTypePPM
shipmentHasDeliveryDetails := cMtoShipment.ShipmentType != models.MTOShipmentTypeHHGIntoNTSDom && cMtoShipment.ShipmentType != models.MTOShipmentTypePPM
shipmentHasDeliveryDetails := cMtoShipment.ShipmentType != models.MTOShipmentTypeHHGIntoNTS && cMtoShipment.ShipmentType != models.MTOShipmentTypePPM
addPrimeActualWeight := true
switch buildType {
case mtoShipmentNTS:
defaultShipmentType = models.MTOShipmentTypeHHGIntoNTSDom
defaultShipmentType = models.MTOShipmentTypeHHGIntoNTS
defaultStatus = models.MTOShipmentStatusDraft
buildStorageFacility = hasStorageFacilityCustom
shipmentHasPickupDetails = true
Expand Down
4 changes: 2 additions & 2 deletions pkg/factory/mto_shipment_factory_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ func (suite *FactorySuite) TestBuildMTOShipment() {
ID: uuid.FromStringOrNil("acf7b357-5cad-40e2-baa7-dedc1d4cf04c"),
PrimeEstimatedWeight: &estimatedWeight,
PrimeActualWeight: &actualWeight,
ShipmentType: models.MTOShipmentTypeHHGIntoNTSDom,
ShipmentType: models.MTOShipmentTypeHHGIntoNTS,
ApprovedDate: models.TimePointer(time.Now()),
Status: models.MTOShipmentStatusApproved,
}
Expand Down Expand Up @@ -421,7 +421,7 @@ func (suite *FactorySuite) TestBuildMTOShipment() {
suite.Run("Successful creation of NTSShipment", func() {
ntsShipment := BuildNTSShipment(suite.DB(), nil, nil)

suite.Equal(models.MTOShipmentTypeHHGIntoNTSDom, ntsShipment.ShipmentType)
suite.Equal(models.MTOShipmentTypeHHGIntoNTS, ntsShipment.ShipmentType)
suite.False(ntsShipment.MoveTaskOrderID.IsNil())
suite.False(ntsShipment.MoveTaskOrder.ID.IsNil())

Expand Down
8 changes: 4 additions & 4 deletions pkg/factory/order_factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,8 @@ func buildOrderWithBuildType(db *pop.Connection, customs []Customization, traits
defaultSpouseHasProGear := false
defaultOrdersType := internalmessages.OrdersTypePERMANENTCHANGEOFSTATION
defaultOrdersTypeDetail := internalmessages.OrdersTypeDetail("HHG_PERMITTED")
defaultDestinationDutyLocationGbloc := "AGFM"
destinationDutyLocationGbloc := &defaultDestinationDutyLocationGbloc
defaultDestinationGbloc := "AGFM"
destinationGbloc := &defaultDestinationGbloc
testYear := 2018
defaultIssueDate := time.Date(testYear, time.March, 15, 0, 0, 0, 0, time.UTC)
defaultReportByDate := time.Date(testYear, time.August, 1, 0, 0, 0, 0, time.UTC)
Expand Down Expand Up @@ -248,7 +248,7 @@ func buildOrderWithBuildType(db *pop.Connection, customs []Customization, traits
log.Panicf("Error loading duty location by id %s: %s\n", newDutyLocation.ID.String(), err)
}
destinationPostalCodeToGBLOC := FetchOrBuildPostalCodeToGBLOC(db, newDutyLocation.Address.PostalCode, "AGFM")
destinationDutyLocationGbloc = &destinationPostalCodeToGBLOC.GBLOC
destinationGbloc = &destinationPostalCodeToGBLOC.GBLOC
}
}

Expand All @@ -257,7 +257,7 @@ func buildOrderWithBuildType(db *pop.Connection, customs []Customization, traits
ServiceMemberID: serviceMember.ID,
NewDutyLocation: newDutyLocation,
NewDutyLocationID: newDutyLocation.ID,
DestinationGBLOC: destinationDutyLocationGbloc,
DestinationGBLOC: destinationGbloc,
UploadedOrders: uploadedOrders,
UploadedOrdersID: uploadedOrders.ID,
IssueDate: defaultIssueDate,
Expand Down
44 changes: 30 additions & 14 deletions pkg/gen/ghcapi/embedded_spec.go

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

8 changes: 8 additions & 0 deletions pkg/gen/ghcmessages/list_prime_move.go

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

6 changes: 3 additions & 3 deletions pkg/gen/ghcmessages/m_t_o_shipment_type.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/ghcmessages/re_service_item.go

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

34 changes: 17 additions & 17 deletions pkg/gen/ghcmessages/search_move.go

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

Loading

0 comments on commit c8424e8

Please sign in to comment.