diff --git a/migrations/app/migrations_manifest.txt b/migrations/app/migrations_manifest.txt index 1a397d886a9..470dc5e1af7 100644 --- a/migrations/app/migrations_manifest.txt +++ b/migrations/app/migrations_manifest.txt @@ -1054,6 +1054,6 @@ 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 -20241217163231_update_duty_locations_bad_zips.up.sql 20241216170325_update_nts_enum_name.up.sql +20241217163231_update_duty_locations_bad_zips.up.sql 20241217180136_add_AK_zips_to_zip3_distances.up.sql diff --git a/pkg/handlers/primeapi/mto_shipment.go b/pkg/handlers/primeapi/mto_shipment.go index 78c7159f2b2..a93967aea89 100644 --- a/pkg/handlers/primeapi/mto_shipment.go +++ b/pkg/handlers/primeapi/mto_shipment.go @@ -67,7 +67,7 @@ type DeleteMTOShipmentHandler struct { services.ShipmentDeleter } -// Handle handler that updates a mto shipment +// Handle handler that deletes a mto shipment func (h DeleteMTOShipmentHandler) Handle(params mtoshipmentops.DeleteMTOShipmentParams) middleware.Responder { return h.AuditableAppContextFromRequestWithErrors(params.HTTPRequest, func(appCtx appcontext.AppContext) (middleware.Responder, error) { diff --git a/pkg/handlers/primeapi/payloads/model_to_payload.go b/pkg/handlers/primeapi/payloads/model_to_payload.go index 1b6d4178d6b..709b1ea451c 100644 --- a/pkg/handlers/primeapi/payloads/model_to_payload.go +++ b/pkg/handlers/primeapi/payloads/model_to_payload.go @@ -289,7 +289,8 @@ func Address(address *models.Address) *primemessages.Address { if address == nil { return nil } - return &primemessages.Address{ + + payloadAddress := &primemessages.Address{ ID: strfmt.UUID(address.ID.String()), StreetAddress1: &address.StreetAddress1, StreetAddress2: address.StreetAddress2, @@ -301,6 +302,12 @@ func Address(address *models.Address) *primemessages.Address { County: address.County, ETag: etag.GenerateEtag(address.UpdatedAt), } + + if address.UsPostRegionCityID != nil { + payloadAddress.UsPostRegionCitiesID = strfmt.UUID(address.UsPostRegionCityID.String()) + } + + return payloadAddress } // StorageFacility payload diff --git a/pkg/handlers/primeapi/payloads/payload_to_model.go b/pkg/handlers/primeapi/payloads/payload_to_model.go index 0a7b5a0c58a..08a64b02b82 100644 --- a/pkg/handlers/primeapi/payloads/payload_to_model.go +++ b/pkg/handlers/primeapi/payloads/payload_to_model.go @@ -40,6 +40,7 @@ func AddressModel(address *primemessages.Address) *models.Address { ID: uuid.FromStringOrNil(address.ID.String()), StreetAddress2: address.StreetAddress2, StreetAddress3: address.StreetAddress3, + County: address.County, } if address.StreetAddress1 != nil { modelAddress.StreetAddress1 = *address.StreetAddress1 @@ -56,6 +57,10 @@ func AddressModel(address *primemessages.Address) *models.Address { if address.Country != nil { modelAddress.Country = CountryModel(address.Country) } + usPostRegionCitiesID := uuid.FromStringOrNil(address.UsPostRegionCitiesID.String()) + if usPostRegionCitiesID != uuid.Nil { + modelAddress.UsPostRegionCityID = &usPostRegionCitiesID + } return modelAddress } diff --git a/pkg/handlers/primeapiv2/payloads/model_to_payload.go b/pkg/handlers/primeapiv2/payloads/model_to_payload.go index 8f463ac72d6..35deee5084a 100644 --- a/pkg/handlers/primeapiv2/payloads/model_to_payload.go +++ b/pkg/handlers/primeapiv2/payloads/model_to_payload.go @@ -220,7 +220,7 @@ func Address(address *models.Address) *primev2messages.Address { if address == nil { return nil } - return &primev2messages.Address{ + payloadAddress := &primev2messages.Address{ ID: strfmt.UUID(address.ID.String()), StreetAddress1: &address.StreetAddress1, StreetAddress2: address.StreetAddress2, @@ -232,6 +232,12 @@ func Address(address *models.Address) *primev2messages.Address { County: address.County, ETag: etag.GenerateEtag(address.UpdatedAt), } + + if address.UsPostRegionCityID != nil { + payloadAddress.UsPostRegionCitiesID = strfmt.UUID(address.UsPostRegionCityID.String()) + } + + return payloadAddress } // StorageFacility payload diff --git a/pkg/handlers/primeapiv2/payloads/payload_to_model.go b/pkg/handlers/primeapiv2/payloads/payload_to_model.go index 8c8b663d123..40c697b3672 100644 --- a/pkg/handlers/primeapiv2/payloads/payload_to_model.go +++ b/pkg/handlers/primeapiv2/payloads/payload_to_model.go @@ -40,6 +40,7 @@ func AddressModel(address *primev2messages.Address) *models.Address { ID: uuid.FromStringOrNil(address.ID.String()), StreetAddress2: address.StreetAddress2, StreetAddress3: address.StreetAddress3, + County: address.County, } if address.StreetAddress1 != nil { modelAddress.StreetAddress1 = *address.StreetAddress1 @@ -56,6 +57,10 @@ func AddressModel(address *primev2messages.Address) *models.Address { if address.Country != nil { modelAddress.Country = CountryModel(address.Country) } + usPostRegionCitiesID := uuid.FromStringOrNil(address.UsPostRegionCitiesID.String()) + if usPostRegionCitiesID != uuid.Nil { + modelAddress.UsPostRegionCityID = &usPostRegionCitiesID + } return modelAddress } diff --git a/pkg/handlers/primeapiv3/payloads/model_to_payload.go b/pkg/handlers/primeapiv3/payloads/model_to_payload.go index aeddd72ef96..d0e77e82ae7 100644 --- a/pkg/handlers/primeapiv3/payloads/model_to_payload.go +++ b/pkg/handlers/primeapiv3/payloads/model_to_payload.go @@ -247,7 +247,7 @@ func Address(address *models.Address) *primev3messages.Address { if address == nil { return nil } - return &primev3messages.Address{ + payloadAddress := &primev3messages.Address{ ID: strfmt.UUID(address.ID.String()), StreetAddress1: &address.StreetAddress1, StreetAddress2: address.StreetAddress2, @@ -259,6 +259,12 @@ func Address(address *models.Address) *primev3messages.Address { ETag: etag.GenerateEtag(address.UpdatedAt), County: address.County, } + + if address.UsPostRegionCityID != nil { + payloadAddress.UsPostRegionCitiesID = strfmt.UUID(address.UsPostRegionCityID.String()) + } + + return payloadAddress } // PPM Destination payload diff --git a/pkg/handlers/primeapiv3/payloads/payload_to_model.go b/pkg/handlers/primeapiv3/payloads/payload_to_model.go index aaa2a1a671e..4149dee0016 100644 --- a/pkg/handlers/primeapiv3/payloads/payload_to_model.go +++ b/pkg/handlers/primeapiv3/payloads/payload_to_model.go @@ -41,6 +41,7 @@ func AddressModel(address *primev3messages.Address) *models.Address { ID: uuid.FromStringOrNil(address.ID.String()), StreetAddress2: address.StreetAddress2, StreetAddress3: address.StreetAddress3, + County: address.County, } if address.StreetAddress1 != nil { modelAddress.StreetAddress1 = *address.StreetAddress1 @@ -57,6 +58,10 @@ func AddressModel(address *primev3messages.Address) *models.Address { if address.Country != nil { modelAddress.Country = CountryModel(address.Country) } + usPostRegionCitiesID := uuid.FromStringOrNil(address.UsPostRegionCitiesID.String()) + if usPostRegionCitiesID != uuid.Nil { + modelAddress.UsPostRegionCityID = &usPostRegionCitiesID + } return modelAddress } diff --git a/src/pages/PrimeUI/Shipment/PrimeUIShipmentUpdate.test.jsx b/src/pages/PrimeUI/Shipment/PrimeUIShipmentUpdate.test.jsx index d6dc8f74b67..376f56b4a29 100644 --- a/src/pages/PrimeUI/Shipment/PrimeUIShipmentUpdate.test.jsx +++ b/src/pages/PrimeUI/Shipment/PrimeUIShipmentUpdate.test.jsx @@ -298,7 +298,7 @@ const approvedMoveTaskOrder = { }, }; -const approvedPPMMoveTaskOrder = { +const approvedMoveTaskOrderWithOneHHG = { moveTaskOrder: { availableToPrimeAt: '2021-10-18T18:24:41.235Z', createdAt: '2021-10-18T18:24:41.362Z', @@ -308,115 +308,77 @@ const approvedPPMMoveTaskOrder = { excessWeightQualifiedAt: null, excessWeightUploadId: null, id: '9c7b255c-2981-4bf8-839f-61c7458e2b4d', - moveCode: 'LR4T8V', + moveCode: 'AR5K8V', mtoShipments: [ { - actualPickupDate: null, - approvedDate: null, - counselorRemarks: 'These are counselor remarks for a PPM.', - createdAt: '2022-07-01T13:41:33.261Z', + actualPickupDate: '2020-03-16', + agents: [ + { + agentType: 'RELEASING_AGENT', + createdAt: '2021-10-18T18:24:41.521Z', + eTag: 'MjAyMS0xMC0xOFQxODoyNDo0MS41MjE4NzNa', + email: 'test@test.email.com', + firstName: 'Test', + id: 'f2619e1b-7729-4b97-845d-6ae1ebe299f2', + lastName: 'Agent', + mtoShipmentID: 'ce01a5b7-9b44-4513-8a8d-edb60f2a4aee', + phone: '202-555-9301', + updatedAt: '2021-10-18T18:24:41.521Z', + }, + ], + approvedDate: '2021-10-18', + createdAt: '2021-10-18T18:24:41.377Z', + customerRemarks: 'Please treat gently', destinationAddress: { - city: null, - postalCode: null, - state: null, - streetAddress1: null, + city: 'Fairfield', + country: 'US', + eTag: 'MjAyMS0xMC0xOFQxODoyNDo0MS4zNzI3NDJa', + id: 'bfe61147-5fd7-426e-b473-54ccf77bde35', + postalCode: '94535', + state: 'CA', + streetAddress1: '987 Any Avenue', + streetAddress2: 'P.O. Box 9876', + streetAddress3: 'c/o Some Person', }, - eTag: 'MjAyMi0wNy0wMVQxNDoyMzoxOS43MzgzODla', + eTag: 'MjAyMS0xMC0xOFQxODoyNDo0MS4zNzc5Nzha', firstAvailableDeliveryDate: null, - id: '1b695b60-c3ed-401b-b2e3-808d095eb8cc', + id: 'ce01a5b8-9b44-4511-8a8d-edb60f2a4aee', moveTaskOrderID: '9c7b255c-2981-4bf8-839f-61c7458e2b4d', pickupAddress: { + city: 'Beverly Hills', + country: 'US', + eTag: 'MjAyMS0xMC0xOFQxODoyNDo0MS4zNjc3Mjda', + id: 'cf159eca-162c-4131-84a0-795e684416a6', + postalCode: '90210', + state: 'CA', + streetAddress1: '123 Any Street', + streetAddress2: 'P.O. Box 12345', + streetAddress3: 'c/o Some Person', + }, + primeActualWeight: null, + primeEstimatedWeight: null, + actualProGearWeight: 1500, + actualSpouseProGearWeight: 250, + primeEstimatedWeightRecordedDate: null, + requestedPickupDate: '2020-03-15', + requiredDeliveryDate: null, + scheduledPickupDate: '2020-03-16', + secondaryDeliveryAddress: { city: null, postalCode: null, state: null, streetAddress1: null, }, - ppmShipment: { - actualDestinationPostalCode: '30814', - actualMoveDate: '2022-07-13', - actualPickupPostalCode: '90212', - advanceAmountReceived: 598600, - advanceAmountRequested: 598700, - approvedAt: '2022-07-03T14:20:21.620Z', - createdAt: '2022-06-30T13:41:33.265Z', - eTag: 'MjAyMi0wNy0wMVQxNDoyMzoxOS43ODA1Mlo=', - estimatedIncentive: 1000000, - estimatedWeight: 4000, - expectedDepartureDate: '2020-03-15', - hasProGear: true, - hasReceivedAdvance: true, - hasRequestedAdvance: true, - id: 'd733fe2f-b08d-434a-ad8d-551f4d597b03', - proGearWeight: 1987, - reviewedAt: '2022-07-02T14:20:14.636Z', - shipmentId: '1b695b60-c3ed-401b-b2e3-808d095eb8cc', - sitEstimatedCost: 123456, - sitEstimatedDepartureDate: '2022-07-13', - sitEstimatedEntryDate: '2022-07-05', - sitEstimatedWeight: 1100, - sitExpected: true, - sitLocation: 'DESTINATION', - spouseProGearWeight: 498, - status: 'SUBMITTED', - submittedAt: '2022-07-01T13:41:33.252Z', - updatedAt: '2022-07-01T14:23:19.780Z', - pickupAddress: { - city: 'Beverly Hills', - county: 'Los Angeles', - country: 'US', - eTag: 'MjAyMS0xMC0xOFQxODoyNDo0MS4zNjc3Mjda', - id: 'cf159eca-162c-4131-84a0-795e684416a6', - postalCode: '90210', - state: 'CA', - streetAddress1: '123 Any Street', - streetAddress2: 'P.O. Box 12345', - streetAddress3: 'c/o Some Person', - }, - destinationAddress: { - city: 'Fairfield', - county: 'Solano', - country: 'US', - eTag: 'MjAyMS0xMC0xOFQxODoyNDo0MS4zNzI3NDJa', - id: 'bfe61147-5fd7-426e-b473-54ccf77bde35', - postalCode: '94535', - state: 'CO', - streetAddress1: '987 Any Avenue', - streetAddress2: 'P.O. Box 9876', - streetAddress3: 'c/o Some Person', - }, - secondaryDeliveryAddress: { - city: null, - postalCode: null, - state: null, - streetAddress1: null, - }, - secondaryPickupAddress: { - city: null, - postalCode: null, - state: null, - streetAddress1: null, - }, - tertiaryDeliveryAddress: { - city: null, - postalCode: null, - state: null, - streetAddress1: null, - }, - tertiaryPickupAddress: { - city: null, - postalCode: null, - state: null, - streetAddress1: null, - }, + secondaryPickupAddress: { + city: null, + postalCode: null, + state: null, + streetAddress1: null, }, - primeEstimatedWeightRecordedDate: null, - requestedPickupDate: null, - requiredDeliveryDate: null, - scheduledPickupDate: null, - shipmentType: 'PPM', + shipmentType: 'HHG', status: 'APPROVED', - updatedAt: '2022-07-01T14:23:19.738Z', - mtoServiceItems: [], + updatedAt: '2021-10-18T18:24:41.377Z', + mtoServiceItems: null, }, ], order: { @@ -514,7 +476,7 @@ const approvedPPMMoveTaskOrder = { id: '8829fb28-69c1-45d7-98bc-c724478d5106', modelType: 'MTOServiceItemBasic', moveTaskOrderID: '9c7b255c-2981-4bf8-839f-61c7458e2b4d', - mtoShipmentID: 'ce01a5b8-9b44-4511-8a8d-edb60f2a4aee', + mtoShipmentID: 'ce01a5b7-9b44-4513-8a8d-edb60f2a4aee', reServiceName: 'Test Service', status: 'APPROVED', }, @@ -522,7 +484,7 @@ const approvedPPMMoveTaskOrder = { }, }; -const approvedMoveTaskOrderWithOneHHG = { +const approvedPPMMoveTaskOrder = { moveTaskOrder: { availableToPrimeAt: '2021-10-18T18:24:41.235Z', createdAt: '2021-10-18T18:24:41.362Z', @@ -532,77 +494,115 @@ const approvedMoveTaskOrderWithOneHHG = { excessWeightQualifiedAt: null, excessWeightUploadId: null, id: '9c7b255c-2981-4bf8-839f-61c7458e2b4d', - moveCode: 'AR5K8V', + moveCode: 'LR4T8V', mtoShipments: [ { - actualPickupDate: '2020-03-16', - agents: [ - { - agentType: 'RELEASING_AGENT', - createdAt: '2021-10-18T18:24:41.521Z', - eTag: 'MjAyMS0xMC0xOFQxODoyNDo0MS41MjE4NzNa', - email: 'test@test.email.com', - firstName: 'Test', - id: 'f2619e1b-7729-4b97-845d-6ae1ebe299f2', - lastName: 'Agent', - mtoShipmentID: 'ce01a5b7-9b44-4513-8a8d-edb60f2a4aee', - phone: '202-555-9301', - updatedAt: '2021-10-18T18:24:41.521Z', - }, - ], - approvedDate: '2021-10-18', - createdAt: '2021-10-18T18:24:41.377Z', - customerRemarks: 'Please treat gently', + actualPickupDate: null, + approvedDate: null, + counselorRemarks: 'These are counselor remarks for a PPM.', + createdAt: '2022-07-01T13:41:33.261Z', destinationAddress: { - city: 'Fairfield', - country: 'US', - eTag: 'MjAyMS0xMC0xOFQxODoyNDo0MS4zNzI3NDJa', - id: 'bfe61147-5fd7-426e-b473-54ccf77bde35', - postalCode: '94535', - state: 'CA', - streetAddress1: '987 Any Avenue', - streetAddress2: 'P.O. Box 9876', - streetAddress3: 'c/o Some Person', - }, - eTag: 'MjAyMS0xMC0xOFQxODoyNDo0MS4zNzc5Nzha', - firstAvailableDeliveryDate: null, - id: 'ce01a5b8-9b44-4511-8a8d-edb60f2a4aee', - moveTaskOrderID: '9c7b255c-2981-4bf8-839f-61c7458e2b4d', - pickupAddress: { - city: 'Beverly Hills', - country: 'US', - eTag: 'MjAyMS0xMC0xOFQxODoyNDo0MS4zNjc3Mjda', - id: 'cf159eca-162c-4131-84a0-795e684416a6', - postalCode: '90210', - state: 'CA', - streetAddress1: '123 Any Street', - streetAddress2: 'P.O. Box 12345', - streetAddress3: 'c/o Some Person', - }, - primeActualWeight: null, - primeEstimatedWeight: null, - actualProGearWeight: 1500, - actualSpouseProGearWeight: 250, - primeEstimatedWeightRecordedDate: null, - requestedPickupDate: '2020-03-15', - requiredDeliveryDate: null, - scheduledPickupDate: '2020-03-16', - secondaryDeliveryAddress: { city: null, postalCode: null, state: null, streetAddress1: null, }, - secondaryPickupAddress: { + eTag: 'MjAyMi0wNy0wMVQxNDoyMzoxOS43MzgzODla', + firstAvailableDeliveryDate: null, + id: '1b695b60-c3ed-401b-b2e3-808d095eb8cc', + moveTaskOrderID: '9c7b255c-2981-4bf8-839f-61c7458e2b4d', + pickupAddress: { city: null, postalCode: null, state: null, streetAddress1: null, }, - shipmentType: 'HHG', + ppmShipment: { + actualDestinationPostalCode: '30814', + actualMoveDate: '2022-07-13', + actualPickupPostalCode: '90212', + advanceAmountReceived: 598600, + advanceAmountRequested: 598700, + approvedAt: '2022-07-03T14:20:21.620Z', + createdAt: '2022-06-30T13:41:33.265Z', + eTag: 'MjAyMi0wNy0wMVQxNDoyMzoxOS43ODA1Mlo=', + estimatedIncentive: 1000000, + estimatedWeight: 4000, + expectedDepartureDate: '2020-03-15', + hasProGear: true, + hasReceivedAdvance: true, + hasRequestedAdvance: true, + id: 'd733fe2f-b08d-434a-ad8d-551f4d597b03', + proGearWeight: 1987, + reviewedAt: '2022-07-02T14:20:14.636Z', + shipmentId: '1b695b60-c3ed-401b-b2e3-808d095eb8cc', + sitEstimatedCost: 123456, + sitEstimatedDepartureDate: '2022-07-13', + sitEstimatedEntryDate: '2022-07-05', + sitEstimatedWeight: 1100, + sitExpected: true, + sitLocation: 'DESTINATION', + spouseProGearWeight: 498, + status: 'SUBMITTED', + submittedAt: '2022-07-01T13:41:33.252Z', + updatedAt: '2022-07-01T14:23:19.780Z', + pickupAddress: { + city: 'Beverly Hills', + county: 'Los Angeles', + country: 'US', + eTag: 'MjAyMS0xMC0xOFQxODoyNDo0MS4zNjc3Mjda', + id: 'cf159eca-162c-4131-84a0-795e684416a6', + postalCode: '90210', + state: 'CA', + streetAddress1: '123 Any Street', + streetAddress2: 'P.O. Box 12345', + streetAddress3: 'c/o Some Person', + }, + destinationAddress: { + city: 'Fairfield', + county: 'Solano', + country: 'US', + eTag: 'MjAyMS0xMC0xOFQxODoyNDo0MS4zNzI3NDJa', + id: 'bfe61147-5fd7-426e-b473-54ccf77bde35', + postalCode: '94535', + state: 'CO', + streetAddress1: '987 Any Avenue', + streetAddress2: 'P.O. Box 9876', + streetAddress3: 'c/o Some Person', + }, + secondaryDeliveryAddress: { + city: null, + postalCode: null, + state: null, + streetAddress1: null, + }, + secondaryPickupAddress: { + city: null, + postalCode: null, + state: null, + streetAddress1: null, + }, + tertiaryDeliveryAddress: { + city: null, + postalCode: null, + state: null, + streetAddress1: null, + }, + tertiaryPickupAddress: { + city: null, + postalCode: null, + state: null, + streetAddress1: null, + }, + }, + primeEstimatedWeightRecordedDate: null, + requestedPickupDate: null, + requiredDeliveryDate: null, + scheduledPickupDate: null, + shipmentType: 'PPM', status: 'APPROVED', - updatedAt: '2021-10-18T18:24:41.377Z', - mtoServiceItems: null, + updatedAt: '2022-07-01T14:23:19.738Z', + mtoServiceItems: [], }, ], order: { @@ -700,7 +700,7 @@ const approvedMoveTaskOrderWithOneHHG = { id: '8829fb28-69c1-45d7-98bc-c724478d5106', modelType: 'MTOServiceItemBasic', moveTaskOrderID: '9c7b255c-2981-4bf8-839f-61c7458e2b4d', - mtoShipmentID: 'ce01a5b7-9b44-4513-8a8d-edb60f2a4aee', + mtoShipmentID: 'ce01a5b8-9b44-4511-8a8d-edb60f2a4aee', reServiceName: 'Test Service', status: 'APPROVED', }, diff --git a/src/pages/PrimeUI/Shipment/PrimeUIShipmentUpdateAddress.jsx b/src/pages/PrimeUI/Shipment/PrimeUIShipmentUpdateAddress.jsx index 0d234eb1136..7c3c186b45e 100644 --- a/src/pages/PrimeUI/Shipment/PrimeUIShipmentUpdateAddress.jsx +++ b/src/pages/PrimeUI/Shipment/PrimeUIShipmentUpdateAddress.jsx @@ -88,7 +88,8 @@ const PrimeUIShipmentUpdateAddress = () => { if (isError) return ; const onSubmit = (values, { setSubmitting }) => { - const { streetAddress1, streetAddress2, streetAddress3, city, state, postalCode } = values.address; + const { streetAddress1, streetAddress2, streetAddress3, city, county, state, postalCode, usPostRegionCitiesID } = + values.address; const body = { id: values.addressID, @@ -96,8 +97,10 @@ const PrimeUIShipmentUpdateAddress = () => { streetAddress2, streetAddress3, city, + county, state, postalCode, + usPostRegionCitiesID, }; // Check if the address payload contains any blank properties and remove diff --git a/src/pages/PrimeUI/Shipment/PrimeUIShipmentUpdateDestinationAddress.jsx b/src/pages/PrimeUI/Shipment/PrimeUIShipmentUpdateDestinationAddress.jsx index fc479853ab8..8bd474dc9d5 100644 --- a/src/pages/PrimeUI/Shipment/PrimeUIShipmentUpdateDestinationAddress.jsx +++ b/src/pages/PrimeUI/Shipment/PrimeUIShipmentUpdateDestinationAddress.jsx @@ -87,8 +87,10 @@ const PrimeUIShipmentUpdateDestinationAddress = () => { streetAddress2: newAddress.address.streetAddress2, streetAddress3: newAddress.address.streetAddress3, city: newAddress.address.city, + county: newAddress.address.county, state: newAddress.address.state, postalCode: newAddress.address.postalCode, + usPostRegionCitiesID: newAddress.address.usPostRegionCitiesID, }, contractorRemarks: values.contractorRemarks, }; diff --git a/src/setupProxy.js b/src/setupProxy.js index 3a6b0f36484..7d92e2f9aea 100644 --- a/src/setupProxy.js +++ b/src/setupProxy.js @@ -1,19 +1,19 @@ const { createProxyMiddleware } = require('http-proxy-middleware'); module.exports = (app) => { - app.use(createProxyMiddleware('/api', { target: 'http://milmovelocal:8080/' })); - app.use(createProxyMiddleware('/internal', { target: 'http://milmovelocal:8080/' })); - app.use(createProxyMiddleware('/admin', { target: 'http://milmovelocal:8080/' })); - app.use(createProxyMiddleware('/ghc', { target: 'http://milmovelocal:8080/' })); - app.use(createProxyMiddleware('/prime', { target: 'http://milmovelocal:8080/' })); - app.use(createProxyMiddleware('/pptas', { target: 'http://milmovelocal:8080/' })); - app.use(createProxyMiddleware('/support', { target: 'http://milmovelocal:8080/' })); - app.use(createProxyMiddleware('/testharness', { target: 'http://milmovelocal:8080/' })); - app.use(createProxyMiddleware('/storage', { target: 'http://milmovelocal:8080/' })); - app.use(createProxyMiddleware('/devlocal-auth', { target: 'http://milmovelocal:8080/' })); - app.use(createProxyMiddleware('/auth/**', { target: 'http://milmovelocal:8080/' })); - app.use(createProxyMiddleware('/logout', { target: 'http://milmovelocal:8080/' })); - app.use(createProxyMiddleware('/downloads', { target: 'http://milmovelocal:8080/' })); - app.use(createProxyMiddleware('/debug/**', { target: 'http://milmovelocal:8080/' })); - app.use(createProxyMiddleware('/client/**', { target: 'http://milmovelocal:8080/' })); + app.use('/api', createProxyMiddleware({ target: 'http://milmovelocal:8080/api' })); + app.use('/internal', createProxyMiddleware({ target: 'http://milmovelocal:8080/internal' })); + app.use('/admin', createProxyMiddleware({ target: 'http://milmovelocal:8080/admin' })); + app.use('/ghc', createProxyMiddleware({ target: 'http://milmovelocal:8080/ghc' })); + app.use('/prime', createProxyMiddleware({ target: 'http://milmovelocal:8080/prime' })); + app.use('/pptas', createProxyMiddleware({ target: 'http://milmovelocal:8080/pptas' })); + app.use('/support', createProxyMiddleware({ target: 'http://milmovelocal:8080/support' })); + app.use('/testharness', createProxyMiddleware({ target: 'http://milmovelocal:8080/testharness' })); + app.use('/storage', createProxyMiddleware({ target: 'http://milmovelocal:8080/storage' })); + app.use('/devlocal-auth', createProxyMiddleware({ target: 'http://milmovelocal:8080/devlocal-auth' })); + app.use('/auth', createProxyMiddleware({ target: 'http://milmovelocal:8080/auth' })); + app.use('/logout', createProxyMiddleware({ target: 'http://milmovelocal:8080/logout' })); + app.use('/downloads', createProxyMiddleware({ target: 'http://milmovelocal:8080/downloads' })); + app.use('/debug', createProxyMiddleware({ target: 'http://milmovelocal:8080/debug' })); + app.use('/client', createProxyMiddleware({ target: 'http://milmovelocal:8080/client' })); }; diff --git a/src/utils/formatters.js b/src/utils/formatters.js index 2b68b2d3b42..60f06a1f6c3 100644 --- a/src/utils/formatters.js +++ b/src/utils/formatters.js @@ -414,6 +414,7 @@ export const formatAddressForPrimeAPI = (address) => { county: address.county, state: address.state, postalCode: address.postalCode, + usPostRegionCitiesID: address.usPostRegionCitiesID, }; }; @@ -428,6 +429,7 @@ export const formatExtraAddressForPrimeAPI = (address) => { county: address.county, state: address.state, postalCode: address.postalCode, + usPostRegionCitiesID: address.usPostRegionCitiesID, }; }; @@ -452,6 +454,7 @@ export function fromPrimeAPIAddressFormat(address) { county: address.county, state: address.state, postalCode: address.postalCode, + usPostRegionCitiesID: address.usPostRegionCitiesID, }; } diff --git a/yarn.lock b/yarn.lock index 886c94b1454..dd46ddf509b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -12854,9 +12854,9 @@ nano-time@1.0.0: big-integer "^1.6.16" nanoid@^3.3.6: - version "3.3.6" - resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.6.tgz#443380c856d6e9f9824267d960b4236ad583ea4c" - integrity sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA== + version "3.3.8" + resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.8.tgz#b1be3030bee36aaff18bacb375e5cce521684baf" + integrity sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w== napi-build-utils@^1.0.1: version "1.0.2"