Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

B-21667 & B-21487 MAIN #14288

Merged
merged 28 commits into from
Dec 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
6c8bb88
Merge remote-tracking branch 'origin/MAIN-B-21376' into B-21667-MAIN
traskowskycaci Nov 12, 2024
74e8804
updates for shipment form
traskowskycaci Nov 12, 2024
1fc0ff1
allowances list, move details for TOO, services counseling move detai…
traskowskycaci Nov 13, 2024
b1dbe13
make 0 value for UB allowance a dash instead of 0 lbs
traskowskycaci Nov 13, 2024
9f5fcbd
Merge branch 'B-21375-MAIN' into B-21487-MAIN
traskowskycaci Nov 13, 2024
533ed5f
add unaccompaniedBaggageAllowance to prime api getMoveTaskOrder respo…
traskowskycaci Nov 13, 2024
6b23371
Merge branch 'main' into B-21667-MAIN
traskowskycaci Nov 14, 2024
05aae46
separate UB allowance from dependents field
traskowskycaci Nov 14, 2024
acf6666
turn off UB flag
traskowskycaci Nov 14, 2024
c6b6f25
Merge branch 'main' into B-21667-MAIN
traskowskycaci Nov 20, 2024
4a4fcee
handle 0 dependent value
traskowskycaci Nov 20, 2024
3d23dba
Merge branch 'B-21487-MAIN' into B-21667-I-13550-MAIN
traskowskycaci Nov 20, 2024
2c5110e
update shipment section labels
traskowskycaci Nov 21, 2024
5947990
Merge branch 'B-21667-MAIN' into B-21667-I-13574-MAIN
traskowskycaci Nov 25, 2024
d65910f
Merge branch 'B-21487-MAIN' into B-21667-I-13574-MAIN
traskowskycaci Nov 25, 2024
42e2d04
Merge branch 'B-21667-I-13550-MAIN' into B-21667-I-13574-MAIN
traskowskycaci Nov 25, 2024
c203bf8
fix varibale name on edit shipment details
traskowskycaci Nov 25, 2024
bfb2656
Merge branch 'main' into B-21667-MAIN
traskowskycaci Nov 26, 2024
b8a8076
Merge branch 'main' into B-21487-MAIN
traskowskycaci Nov 26, 2024
fdbc5f9
Merge branch 'B-21487-MAIN' into B-21667-MAIN
traskowskycaci Nov 26, 2024
17d270b
Merge branch 'B-21667-I-13550-MAIN' into B-21667-MAIN
traskowskycaci Nov 26, 2024
a4a8d9e
Merge branch 'B-21667-I-13567-MAIN' into B-21667-MAIN
traskowskycaci Nov 26, 2024
f68af5a
Merge branch 'B-21667-I-13574-MAIN' into B-21667-MAIN
traskowskycaci Nov 26, 2024
b2e2a9b
Merge branch 'main' into B-21667-MAIN
traskowskycaci Dec 5, 2024
5526ef2
Merge remote-tracking branch 'origin/b-21374-ub-fields-main' into B-2…
traskowskycaci Dec 5, 2024
83def2c
Merge branch 'b-21374-ub-fields-main' into B-21667-MAIN
traskowskycaci Dec 6, 2024
6c60c32
Merge branch 'main' into B-21667-MAIN
traskowskycaci Dec 11, 2024
207c24f
Merge branch 'main' into B-21667-MAIN
traskowskycaci Dec 11, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pkg/gen/ghcapi/embedded_spec.go

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

2 changes: 1 addition & 1 deletion pkg/gen/ghcmessages/entitlements.go

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

4 changes: 2 additions & 2 deletions pkg/gen/primeapi/embedded_spec.go

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

2 changes: 1 addition & 1 deletion pkg/gen/primemessages/entitlements.go

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

4 changes: 2 additions & 2 deletions pkg/gen/primev2api/embedded_spec.go

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

2 changes: 1 addition & 1 deletion pkg/gen/primev2messages/entitlements.go

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

4 changes: 2 additions & 2 deletions pkg/gen/primev3api/embedded_spec.go

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

2 changes: 1 addition & 1 deletion pkg/gen/primev3messages/entitlements.go

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

12 changes: 12 additions & 0 deletions pkg/gen/supportapi/embedded_spec.go

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

4 changes: 4 additions & 0 deletions pkg/gen/supportmessages/entitlement.go

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

Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
5 changes: 5 additions & 0 deletions pkg/handlers/primeapi/payloads/model_to_payload.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
6 changes: 6 additions & 0 deletions pkg/handlers/primeapi/payloads/model_to_payload_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,7 @@ func (suite *PayloadsSuite) TestEntitlement() {
NonTemporaryStorage: nil,
PrivatelyOwnedVehicle: nil,
DBAuthorizedWeight: nil,
UBAllowance: nil,
StorageInTransit: nil,
RequiredMedicalEquipmentWeight: 0,
OrganizationalClothingAndIndividualEquipment: false,
Expand Down Expand Up @@ -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() {
Expand All @@ -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,
Expand All @@ -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)
Expand All @@ -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,
Expand All @@ -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)
Expand Down
5 changes: 5 additions & 0 deletions pkg/handlers/primeapiv2/payloads/model_to_payload.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
6 changes: 6 additions & 0 deletions pkg/handlers/primeapiv2/payloads/model_to_payload_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ func (suite *PayloadsSuite) TestEntitlement() {
NonTemporaryStorage: nil,
PrivatelyOwnedVehicle: nil,
DBAuthorizedWeight: nil,
UBAllowance: nil,
StorageInTransit: nil,
RequiredMedicalEquipmentWeight: 0,
OrganizationalClothingAndIndividualEquipment: false,
Expand Down Expand Up @@ -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() {
Expand All @@ -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,
Expand All @@ -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)
Expand All @@ -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,
Expand All @@ -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)
Expand Down
5 changes: 5 additions & 0 deletions pkg/handlers/primeapiv3/payloads/model_to_payload.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
7 changes: 7 additions & 0 deletions pkg/handlers/primeapiv3/payloads/model_to_payload_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ func (suite *PayloadsSuite) TestEntitlement() {
NonTemporaryStorage: nil,
PrivatelyOwnedVehicle: nil,
DBAuthorizedWeight: nil,
UBAllowance: nil,
StorageInTransit: nil,
RequiredMedicalEquipmentWeight: 0,
OrganizationalClothingAndIndividualEquipment: false,
Expand Down Expand Up @@ -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() {
Expand All @@ -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,
Expand All @@ -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)
Expand All @@ -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,
Expand All @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Loading
Loading