diff --git a/pkg/gen/ghcapi/embedded_spec.go b/pkg/gen/ghcapi/embedded_spec.go index 111597a6ea9..5f49076d209 100644 --- a/pkg/gen/ghcapi/embedded_spec.go +++ b/pkg/gen/ghcapi/embedded_spec.go @@ -8072,7 +8072,7 @@ func init() { "x-formatting": "weight", "example": 500 }, - "ubAllowance": { + "unaccompaniedBaggageAllowance": { "description": "The amount of weight in pounds that the move is entitled for shipment types of Unaccompanied Baggage.", "type": "integer", "x-nullable": true, @@ -24555,7 +24555,7 @@ func init() { "x-formatting": "weight", "example": 500 }, - "ubAllowance": { + "unaccompaniedBaggageAllowance": { "description": "The amount of weight in pounds that the move is entitled for shipment types of Unaccompanied Baggage.", "type": "integer", "x-nullable": true, diff --git a/pkg/gen/ghcmessages/entitlements.go b/pkg/gen/ghcmessages/entitlements.go index 9cd42e9b246..2ee15f3d03a 100644 --- a/pkg/gen/ghcmessages/entitlements.go +++ b/pkg/gen/ghcmessages/entitlements.go @@ -89,7 +89,7 @@ type Entitlements struct { // The amount of weight in pounds that the move is entitled for shipment types of Unaccompanied Baggage. // Example: 3 - UbAllowance *int64 `json:"ubAllowance,omitempty"` + UnaccompaniedBaggageAllowance *int64 `json:"unaccompaniedBaggageAllowance,omitempty"` } // Validate validates this entitlements diff --git a/pkg/gen/primeapi/embedded_spec.go b/pkg/gen/primeapi/embedded_spec.go index eafb712633b..4968eb31f2f 100644 --- a/pkg/gen/primeapi/embedded_spec.go +++ b/pkg/gen/primeapi/embedded_spec.go @@ -1791,7 +1791,7 @@ func init() { "x-formatting": "weight", "example": 500 }, - "ubAllowance": { + "unaccompaniedBaggageAllowance": { "description": "The amount of weight in pounds that the move is entitled for shipment types of Unaccompanied Baggage.", "type": "integer", "x-nullable": true, @@ -6621,7 +6621,7 @@ func init() { "x-formatting": "weight", "example": 500 }, - "ubAllowance": { + "unaccompaniedBaggageAllowance": { "description": "The amount of weight in pounds that the move is entitled for shipment types of Unaccompanied Baggage.", "type": "integer", "x-nullable": true, diff --git a/pkg/gen/primemessages/entitlements.go b/pkg/gen/primemessages/entitlements.go index f1aaf7e957f..c51ada24273 100644 --- a/pkg/gen/primemessages/entitlements.go +++ b/pkg/gen/primemessages/entitlements.go @@ -78,7 +78,7 @@ type Entitlements struct { // The amount of weight in pounds that the move is entitled for shipment types of Unaccompanied Baggage. // Example: 3 - UbAllowance *int64 `json:"ubAllowance,omitempty"` + UnaccompaniedBaggageAllowance *int64 `json:"unaccompaniedBaggageAllowance,omitempty"` } // Validate validates this entitlements diff --git a/pkg/gen/primev2api/embedded_spec.go b/pkg/gen/primev2api/embedded_spec.go index 712745eb1d9..b8386d10e79 100644 --- a/pkg/gen/primev2api/embedded_spec.go +++ b/pkg/gen/primev2api/embedded_spec.go @@ -1027,7 +1027,7 @@ func init() { "x-formatting": "weight", "example": 500 }, - "ubAllowance": { + "unaccompaniedBaggageAllowance": { "description": "The amount of weight in pounds that the move is entitled for shipment types of Unaccompanied Baggage.", "type": "integer", "x-nullable": true, @@ -4624,7 +4624,7 @@ func init() { "x-formatting": "weight", "example": 500 }, - "ubAllowance": { + "unaccompaniedBaggageAllowance": { "description": "The amount of weight in pounds that the move is entitled for shipment types of Unaccompanied Baggage.", "type": "integer", "x-nullable": true, diff --git a/pkg/gen/primev2messages/entitlements.go b/pkg/gen/primev2messages/entitlements.go index 14f77a0d3e2..e29d3f733e3 100644 --- a/pkg/gen/primev2messages/entitlements.go +++ b/pkg/gen/primev2messages/entitlements.go @@ -78,7 +78,7 @@ type Entitlements struct { // The amount of weight in pounds that the move is entitled for shipment types of Unaccompanied Baggage. // Example: 3 - UbAllowance *int64 `json:"ubAllowance,omitempty"` + UnaccompaniedBaggageAllowance *int64 `json:"unaccompaniedBaggageAllowance,omitempty"` } // Validate validates this entitlements diff --git a/pkg/gen/primev3api/embedded_spec.go b/pkg/gen/primev3api/embedded_spec.go index 5c74db9c476..12fc6d6316a 100644 --- a/pkg/gen/primev3api/embedded_spec.go +++ b/pkg/gen/primev3api/embedded_spec.go @@ -1189,7 +1189,7 @@ func init() { "x-formatting": "weight", "example": 500 }, - "ubAllowance": { + "unaccompaniedBaggageAllowance": { "description": "The amount of weight in pounds that the move is entitled for shipment types of Unaccompanied Baggage.", "type": "integer", "x-nullable": true, @@ -5307,7 +5307,7 @@ func init() { "x-formatting": "weight", "example": 500 }, - "ubAllowance": { + "unaccompaniedBaggageAllowance": { "description": "The amount of weight in pounds that the move is entitled for shipment types of Unaccompanied Baggage.", "type": "integer", "x-nullable": true, diff --git a/pkg/gen/primev3messages/entitlements.go b/pkg/gen/primev3messages/entitlements.go index 3941d353caf..1e228c6350f 100644 --- a/pkg/gen/primev3messages/entitlements.go +++ b/pkg/gen/primev3messages/entitlements.go @@ -78,7 +78,7 @@ type Entitlements struct { // The amount of weight in pounds that the move is entitled for shipment types of Unaccompanied Baggage. // Example: 3 - UbAllowance *int64 `json:"ubAllowance,omitempty"` + UnaccompaniedBaggageAllowance *int64 `json:"unaccompaniedBaggageAllowance,omitempty"` } // Validate validates this entitlements diff --git a/pkg/gen/supportapi/embedded_spec.go b/pkg/gen/supportapi/embedded_spec.go index 73ec4c2a19f..11683bc1e34 100644 --- a/pkg/gen/supportapi/embedded_spec.go +++ b/pkg/gen/supportapi/embedded_spec.go @@ -1177,6 +1177,12 @@ func init() { "type": "integer", "x-formatting": "weight", "example": 500 + }, + "unaccompaniedBaggageAllowance": { + "description": "The amount of weight in pounds that the move is entitled for shipment types of Unaccompanied Baggage.", + "type": "integer", + "x-nullable": true, + "example": 3 } } }, @@ -4034,6 +4040,12 @@ func init() { "type": "integer", "x-formatting": "weight", "example": 500 + }, + "unaccompaniedBaggageAllowance": { + "description": "The amount of weight in pounds that the move is entitled for shipment types of Unaccompanied Baggage.", + "type": "integer", + "x-nullable": true, + "example": 3 } } }, diff --git a/pkg/gen/supportmessages/entitlement.go b/pkg/gen/supportmessages/entitlement.go index ead88e4d83f..434ad8aeed3 100644 --- a/pkg/gen/supportmessages/entitlement.go +++ b/pkg/gen/supportmessages/entitlement.go @@ -77,6 +77,10 @@ type Entitlement struct { // total weight // Example: 500 TotalWeight int64 `json:"totalWeight,omitempty"` + + // The amount of weight in pounds that the move is entitled for shipment types of Unaccompanied Baggage. + // Example: 3 + UnaccompaniedBaggageAllowance *int64 `json:"unaccompaniedBaggageAllowance,omitempty"` } // Validate validates this entitlement diff --git a/pkg/handlers/ghcapi/internal/payloads/model_to_payload.go b/pkg/handlers/ghcapi/internal/payloads/model_to_payload.go index c6157c0377e..ebfbf27c303 100644 --- a/pkg/handlers/ghcapi/internal/payloads/model_to_payload.go +++ b/pkg/handlers/ghcapi/internal/payloads/model_to_payload.go @@ -748,7 +748,7 @@ func Entitlement(entitlement *models.Entitlement) *ghcmessages.Entitlements { DependentsUnderTwelve: dependentsUnderTwelve, DependentsTwelveAndOver: dependentsTwelveAndOver, AccompaniedTour: accompaniedTour, - UbAllowance: ubAllowance, + UnaccompaniedBaggageAllowance: ubAllowance, OrganizationalClothingAndIndividualEquipment: entitlement.OrganizationalClothingAndIndividualEquipment, GunSafe: gunSafe, ETag: etag.GenerateEtag(entitlement.UpdatedAt), diff --git a/pkg/handlers/ghcapi/internal/payloads/model_to_payload_test.go b/pkg/handlers/ghcapi/internal/payloads/model_to_payload_test.go index c86e3d7d24b..b46c271c85b 100644 --- a/pkg/handlers/ghcapi/internal/payloads/model_to_payload_test.go +++ b/pkg/handlers/ghcapi/internal/payloads/model_to_payload_test.go @@ -476,7 +476,7 @@ func (suite *PayloadsSuite) TestEntitlement() { suite.Equal(entitlement.DependentsAuthorized, returnedEntitlement.DependentsAuthorized) suite.Equal(entitlement.NonTemporaryStorage, returnedEntitlement.NonTemporaryStorage) suite.Equal(entitlement.PrivatelyOwnedVehicle, returnedEntitlement.PrivatelyOwnedVehicle) - suite.Equal(int(*returnedUBAllowance), int(*returnedEntitlement.UbAllowance)) + suite.Equal(int(*returnedUBAllowance), int(*returnedEntitlement.UnaccompaniedBaggageAllowance)) suite.Equal(int64(proGearWeight), returnedEntitlement.ProGearWeight) suite.Equal(int64(proGearWeightSpouse), returnedEntitlement.ProGearWeightSpouse) suite.Equal(storageInTransit, int(*returnedEntitlement.StorageInTransit)) diff --git a/pkg/handlers/primeapi/payloads/model_to_payload.go b/pkg/handlers/primeapi/payloads/model_to_payload.go index 32fbcde6cec..eaa673ae460 100644 --- a/pkg/handlers/primeapi/payloads/model_to_payload.go +++ b/pkg/handlers/primeapi/payloads/model_to_payload.go @@ -207,9 +207,14 @@ func Entitlement(entitlement *models.Entitlement) *primemessages.Entitlements { if entitlement.TotalDependents != nil { totalDependents = int64(*entitlement.TotalDependents) } + var ubAllowance int64 + if entitlement.UBAllowance != nil { + ubAllowance = int64(*entitlement.UBAllowance) + } return &primemessages.Entitlements{ ID: strfmt.UUID(entitlement.ID.String()), AuthorizedWeight: authorizedWeight, + UnaccompaniedBaggageAllowance: &ubAllowance, DependentsAuthorized: entitlement.DependentsAuthorized, GunSafe: entitlement.GunSafe, NonTemporaryStorage: entitlement.NonTemporaryStorage, diff --git a/pkg/handlers/primeapi/payloads/model_to_payload_test.go b/pkg/handlers/primeapi/payloads/model_to_payload_test.go index 74e90a5ee3c..5782c851928 100644 --- a/pkg/handlers/primeapi/payloads/model_to_payload_test.go +++ b/pkg/handlers/primeapi/payloads/model_to_payload_test.go @@ -278,6 +278,7 @@ func (suite *PayloadsSuite) TestEntitlement() { NonTemporaryStorage: nil, PrivatelyOwnedVehicle: nil, DBAuthorizedWeight: nil, + UBAllowance: nil, StorageInTransit: nil, RequiredMedicalEquipmentWeight: 0, OrganizationalClothingAndIndividualEquipment: false, @@ -306,6 +307,7 @@ func (suite *PayloadsSuite) TestEntitlement() { suite.Equal(int64(0), payload.StorageInTransit) suite.Equal(int64(0), payload.TotalDependents) suite.Equal(int64(0), payload.TotalWeight) + suite.Equal(int64(0), *payload.UnaccompaniedBaggageAllowance) }) suite.Run("Success - Returns the entitlement payload with all optional fields populated", func() { @@ -316,6 +318,7 @@ func (suite *PayloadsSuite) TestEntitlement() { NonTemporaryStorage: handlers.FmtBool(true), PrivatelyOwnedVehicle: handlers.FmtBool(true), DBAuthorizedWeight: handlers.FmtInt(10000), + UBAllowance: handlers.FmtInt(400), StorageInTransit: handlers.FmtInt(45), RequiredMedicalEquipmentWeight: 500, OrganizationalClothingAndIndividualEquipment: true, @@ -337,6 +340,7 @@ func (suite *PayloadsSuite) TestEntitlement() { suite.True(*payload.NonTemporaryStorage) suite.True(*payload.PrivatelyOwnedVehicle) suite.Equal(int64(10000), *payload.AuthorizedWeight) + suite.Equal(int64(400), *payload.UnaccompaniedBaggageAllowance) suite.Equal(int64(9000), payload.TotalWeight) suite.Equal(int64(45), payload.StorageInTransit) suite.Equal(int64(500), payload.RequiredMedicalEquipmentWeight) @@ -355,6 +359,7 @@ func (suite *PayloadsSuite) TestEntitlement() { NonTemporaryStorage: handlers.FmtBool(true), PrivatelyOwnedVehicle: handlers.FmtBool(true), DBAuthorizedWeight: handlers.FmtInt(10000), + UBAllowance: handlers.FmtInt(400), StorageInTransit: handlers.FmtInt(45), RequiredMedicalEquipmentWeight: 500, OrganizationalClothingAndIndividualEquipment: true, @@ -376,6 +381,7 @@ func (suite *PayloadsSuite) TestEntitlement() { suite.True(*payload.NonTemporaryStorage) suite.True(*payload.PrivatelyOwnedVehicle) suite.Equal(int64(10000), *payload.AuthorizedWeight) + suite.Equal(int64(400), *payload.UnaccompaniedBaggageAllowance) suite.Equal(int64(7000), payload.TotalWeight) suite.Equal(int64(45), payload.StorageInTransit) suite.Equal(int64(500), payload.RequiredMedicalEquipmentWeight) diff --git a/pkg/handlers/primeapiv2/payloads/model_to_payload.go b/pkg/handlers/primeapiv2/payloads/model_to_payload.go index e7350548dd9..43225630d05 100644 --- a/pkg/handlers/primeapiv2/payloads/model_to_payload.go +++ b/pkg/handlers/primeapiv2/payloads/model_to_payload.go @@ -152,9 +152,14 @@ func Entitlement(entitlement *models.Entitlement) *primev2messages.Entitlements if entitlement.TotalDependents != nil { totalDependents = int64(*entitlement.TotalDependents) } + var ubAllowance int64 + if entitlement.UBAllowance != nil { + ubAllowance = int64(*entitlement.UBAllowance) + } return &primev2messages.Entitlements{ ID: strfmt.UUID(entitlement.ID.String()), AuthorizedWeight: authorizedWeight, + UnaccompaniedBaggageAllowance: &ubAllowance, DependentsAuthorized: entitlement.DependentsAuthorized, GunSafe: entitlement.GunSafe, NonTemporaryStorage: entitlement.NonTemporaryStorage, diff --git a/pkg/handlers/primeapiv2/payloads/model_to_payload_test.go b/pkg/handlers/primeapiv2/payloads/model_to_payload_test.go index ba3a804b267..36365746b9a 100644 --- a/pkg/handlers/primeapiv2/payloads/model_to_payload_test.go +++ b/pkg/handlers/primeapiv2/payloads/model_to_payload_test.go @@ -224,6 +224,7 @@ func (suite *PayloadsSuite) TestEntitlement() { NonTemporaryStorage: nil, PrivatelyOwnedVehicle: nil, DBAuthorizedWeight: nil, + UBAllowance: nil, StorageInTransit: nil, RequiredMedicalEquipmentWeight: 0, OrganizationalClothingAndIndividualEquipment: false, @@ -252,6 +253,7 @@ func (suite *PayloadsSuite) TestEntitlement() { suite.Equal(int64(0), payload.StorageInTransit) suite.Equal(int64(0), payload.TotalDependents) suite.Equal(int64(0), payload.TotalWeight) + suite.Equal(int64(0), *payload.UnaccompaniedBaggageAllowance) }) suite.Run("Success - Returns the entitlement payload with all optional fields populated", func() { @@ -262,6 +264,7 @@ func (suite *PayloadsSuite) TestEntitlement() { NonTemporaryStorage: handlers.FmtBool(true), PrivatelyOwnedVehicle: handlers.FmtBool(true), DBAuthorizedWeight: handlers.FmtInt(10000), + UBAllowance: handlers.FmtInt(400), StorageInTransit: handlers.FmtInt(45), RequiredMedicalEquipmentWeight: 500, OrganizationalClothingAndIndividualEquipment: true, @@ -283,6 +286,7 @@ func (suite *PayloadsSuite) TestEntitlement() { suite.True(*payload.NonTemporaryStorage) suite.True(*payload.PrivatelyOwnedVehicle) suite.Equal(int64(10000), *payload.AuthorizedWeight) + suite.Equal(int64(400), *payload.UnaccompaniedBaggageAllowance) suite.Equal(int64(9000), payload.TotalWeight) suite.Equal(int64(45), payload.StorageInTransit) suite.Equal(int64(500), payload.RequiredMedicalEquipmentWeight) @@ -301,6 +305,7 @@ func (suite *PayloadsSuite) TestEntitlement() { NonTemporaryStorage: handlers.FmtBool(true), PrivatelyOwnedVehicle: handlers.FmtBool(true), DBAuthorizedWeight: handlers.FmtInt(10000), + UBAllowance: handlers.FmtInt(400), StorageInTransit: handlers.FmtInt(45), RequiredMedicalEquipmentWeight: 500, OrganizationalClothingAndIndividualEquipment: true, @@ -322,6 +327,7 @@ func (suite *PayloadsSuite) TestEntitlement() { suite.True(*payload.NonTemporaryStorage) suite.True(*payload.PrivatelyOwnedVehicle) suite.Equal(int64(10000), *payload.AuthorizedWeight) + suite.Equal(int64(400), *payload.UnaccompaniedBaggageAllowance) suite.Equal(int64(7000), payload.TotalWeight) suite.Equal(int64(45), payload.StorageInTransit) suite.Equal(int64(500), payload.RequiredMedicalEquipmentWeight) diff --git a/pkg/handlers/primeapiv3/payloads/model_to_payload.go b/pkg/handlers/primeapiv3/payloads/model_to_payload.go index ab2655b1bd8..d6835dd3856 100644 --- a/pkg/handlers/primeapiv3/payloads/model_to_payload.go +++ b/pkg/handlers/primeapiv3/payloads/model_to_payload.go @@ -152,9 +152,14 @@ func Entitlement(entitlement *models.Entitlement) *primev3messages.Entitlements if entitlement.TotalDependents != nil { totalDependents = int64(*entitlement.TotalDependents) } + var ubAllowance int64 + if entitlement.UBAllowance != nil { + ubAllowance = int64(*entitlement.UBAllowance) + } return &primev3messages.Entitlements{ ID: strfmt.UUID(entitlement.ID.String()), AuthorizedWeight: authorizedWeight, + UnaccompaniedBaggageAllowance: &ubAllowance, DependentsAuthorized: entitlement.DependentsAuthorized, NonTemporaryStorage: entitlement.NonTemporaryStorage, PrivatelyOwnedVehicle: entitlement.PrivatelyOwnedVehicle, diff --git a/pkg/handlers/primeapiv3/payloads/model_to_payload_test.go b/pkg/handlers/primeapiv3/payloads/model_to_payload_test.go index c22dea1582d..b70750d9069 100644 --- a/pkg/handlers/primeapiv3/payloads/model_to_payload_test.go +++ b/pkg/handlers/primeapiv3/payloads/model_to_payload_test.go @@ -240,6 +240,7 @@ func (suite *PayloadsSuite) TestEntitlement() { NonTemporaryStorage: nil, PrivatelyOwnedVehicle: nil, DBAuthorizedWeight: nil, + UBAllowance: nil, StorageInTransit: nil, RequiredMedicalEquipmentWeight: 0, OrganizationalClothingAndIndividualEquipment: false, @@ -268,6 +269,7 @@ func (suite *PayloadsSuite) TestEntitlement() { suite.Equal(int64(0), payload.StorageInTransit) suite.Equal(int64(0), payload.TotalDependents) suite.Equal(int64(0), payload.TotalWeight) + suite.Equal(int64(0), *payload.UnaccompaniedBaggageAllowance) }) suite.Run("Success - Returns the entitlement payload with all optional fields populated", func() { @@ -278,6 +280,7 @@ func (suite *PayloadsSuite) TestEntitlement() { NonTemporaryStorage: handlers.FmtBool(true), PrivatelyOwnedVehicle: handlers.FmtBool(true), DBAuthorizedWeight: handlers.FmtInt(10000), + UBAllowance: handlers.FmtInt(400), StorageInTransit: handlers.FmtInt(45), RequiredMedicalEquipmentWeight: 500, OrganizationalClothingAndIndividualEquipment: true, @@ -299,6 +302,8 @@ func (suite *PayloadsSuite) TestEntitlement() { suite.True(*payload.NonTemporaryStorage) suite.True(*payload.PrivatelyOwnedVehicle) suite.Equal(int64(10000), *payload.AuthorizedWeight) + suite.Equal(int64(400), *payload.UnaccompaniedBaggageAllowance) + suite.Equal(int64(9000), payload.TotalWeight) suite.Equal(int64(45), payload.StorageInTransit) suite.Equal(int64(500), payload.RequiredMedicalEquipmentWeight) @@ -317,6 +322,7 @@ func (suite *PayloadsSuite) TestEntitlement() { NonTemporaryStorage: handlers.FmtBool(true), PrivatelyOwnedVehicle: handlers.FmtBool(true), DBAuthorizedWeight: handlers.FmtInt(10000), + UBAllowance: handlers.FmtInt(400), StorageInTransit: handlers.FmtInt(45), RequiredMedicalEquipmentWeight: 500, OrganizationalClothingAndIndividualEquipment: true, @@ -338,6 +344,7 @@ func (suite *PayloadsSuite) TestEntitlement() { suite.True(*payload.NonTemporaryStorage) suite.True(*payload.PrivatelyOwnedVehicle) suite.Equal(int64(10000), *payload.AuthorizedWeight) + suite.Equal(int64(400), *payload.UnaccompaniedBaggageAllowance) suite.Equal(int64(7000), payload.TotalWeight) suite.Equal(int64(45), payload.StorageInTransit) suite.Equal(int64(500), payload.RequiredMedicalEquipmentWeight) diff --git a/pkg/handlers/supportapi/internal/payloads/model_to_payload.go b/pkg/handlers/supportapi/internal/payloads/model_to_payload.go index 6f234e1321b..c760d556825 100644 --- a/pkg/handlers/supportapi/internal/payloads/model_to_payload.go +++ b/pkg/handlers/supportapi/internal/payloads/model_to_payload.go @@ -147,9 +147,14 @@ func Entitlement(entitlement *models.Entitlement) *supportmessages.Entitlement { if entitlement.TotalDependents != nil { totalDependents = int64(*entitlement.TotalDependents) } + var ubAllowance int64 + if entitlement.UBAllowance != nil { + ubAllowance = int64(*entitlement.UBAllowance) + } return &supportmessages.Entitlement{ ID: strfmt.UUID(entitlement.ID.String()), AuthorizedWeight: authorizedWeight, + UnaccompaniedBaggageAllowance: &ubAllowance, DependentsAuthorized: entitlement.DependentsAuthorized, NonTemporaryStorage: entitlement.NonTemporaryStorage, PrivatelyOwnedVehicle: entitlement.PrivatelyOwnedVehicle, diff --git a/pkg/handlers/supportapi/internal/payloads/model_to_payload_test.go b/pkg/handlers/supportapi/internal/payloads/model_to_payload_test.go index 21ab990bce2..c518eeedc70 100644 --- a/pkg/handlers/supportapi/internal/payloads/model_to_payload_test.go +++ b/pkg/handlers/supportapi/internal/payloads/model_to_payload_test.go @@ -28,6 +28,7 @@ func TestEntitlement(t *testing.T) { NonTemporaryStorage: nil, PrivatelyOwnedVehicle: nil, DBAuthorizedWeight: nil, + UBAllowance: nil, StorageInTransit: nil, RequiredMedicalEquipmentWeight: 0, OrganizationalClothingAndIndividualEquipment: false, @@ -56,6 +57,7 @@ func TestEntitlement(t *testing.T) { assert.Equal(t, int64(0), payload.StorageInTransit) assert.Equal(t, int64(0), payload.TotalDependents) assert.Equal(t, int64(0), payload.TotalWeight) + assert.Equal(t, int64(0), *payload.UnaccompaniedBaggageAllowance) }) t.Run("Success - Returns the entitlement payload with all optional fields populated", func(t *testing.T) { @@ -66,6 +68,7 @@ func TestEntitlement(t *testing.T) { NonTemporaryStorage: handlers.FmtBool(true), PrivatelyOwnedVehicle: handlers.FmtBool(true), DBAuthorizedWeight: handlers.FmtInt(10000), + UBAllowance: handlers.FmtInt(400), StorageInTransit: handlers.FmtInt(45), RequiredMedicalEquipmentWeight: 500, OrganizationalClothingAndIndividualEquipment: true, @@ -87,6 +90,7 @@ func TestEntitlement(t *testing.T) { assert.True(t, *payload.NonTemporaryStorage) assert.True(t, *payload.PrivatelyOwnedVehicle) assert.Equal(t, int64(10000), *payload.AuthorizedWeight) + assert.Equal(t, int64(400), *payload.UnaccompaniedBaggageAllowance) assert.Equal(t, int64(9000), payload.TotalWeight) assert.Equal(t, int64(45), payload.StorageInTransit) assert.Equal(t, int64(500), payload.RequiredMedicalEquipmentWeight) @@ -105,6 +109,7 @@ func TestEntitlement(t *testing.T) { NonTemporaryStorage: handlers.FmtBool(true), PrivatelyOwnedVehicle: handlers.FmtBool(true), DBAuthorizedWeight: handlers.FmtInt(10000), + UBAllowance: handlers.FmtInt(400), StorageInTransit: handlers.FmtInt(45), RequiredMedicalEquipmentWeight: 500, OrganizationalClothingAndIndividualEquipment: true, @@ -126,6 +131,7 @@ func TestEntitlement(t *testing.T) { assert.True(t, *payload.NonTemporaryStorage) assert.True(t, *payload.PrivatelyOwnedVehicle) assert.Equal(t, int64(10000), *payload.AuthorizedWeight) + assert.Equal(t, int64(400), *payload.UnaccompaniedBaggageAllowance) assert.Equal(t, int64(7000), payload.TotalWeight) assert.Equal(t, int64(45), payload.StorageInTransit) assert.Equal(t, int64(500), payload.RequiredMedicalEquipmentWeight) diff --git a/src/components/Office/DefinitionLists/AllowancesList.jsx b/src/components/Office/DefinitionLists/AllowancesList.jsx index 2785f3e0540..3d5c1e850cc 100644 --- a/src/components/Office/DefinitionLists/AllowancesList.jsx +++ b/src/components/Office/DefinitionLists/AllowancesList.jsx @@ -13,7 +13,6 @@ import { ORDERS_BRANCH_OPTIONS } from 'constants/orders'; const AllowancesList = ({ info, showVisualCues }) => { const [enableUB, setEnableUB] = useState(false); - const visualCuesStyle = classNames(descriptionListStyles.row, { [`${descriptionListStyles.rowWithVisualCue}`]: showVisualCues, }); @@ -51,27 +50,36 @@ const AllowancesList = ({ info, showVisualCues }) => { {/* As these fields are grouped together and only apply to OCONUS orders They will all be NULL for CONUS orders. If one of these fields are present, it will be safe to assume it is an OCONUS order. With this, if one field is present - we show all three. Otherwise, we show none */} + we show all four. Otherwise, we show none */} {/* Wrap in FF */} - {enableUB && (info?.accompaniedTour || info?.dependentsTwelveAndOver || info?.dependentsUnderTwelve) && ( - <> -
- Weight allowance: - {formatWeight(serviceMember.weightAllotment.totalWeightSelf)} -
+ {isUB ? ( ++ UB Weight allowance: + {formatWeight(serviceMember.weightAllotment.unaccompaniedBaggageAllowance)} +
+ ) : ( ++ Weight allowance: + {formatWeight(serviceMember.weightAllotment.totalWeightSelf)} +
+ )}