Skip to content

Commit

Permalink
Merge branch 'main' into MAIN-B-21671-DB-create-re_fsc_multipliers
Browse files Browse the repository at this point in the history
  • Loading branch information
msaki-caci authored Dec 10, 2024
2 parents b891797 + 0f4999b commit 6b5aab4
Show file tree
Hide file tree
Showing 97 changed files with 6,374 additions and 455 deletions.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,8 @@ endif
./scripts/openapi bundle -o swagger/ ## Bundles the API definition files into a complete specification
touch .swagger_build.stamp

server_generate: .server_generate.stamp
.PHONY: server_generate
server_generate: .server_generate.stamp ## generate the server code from swagger files

.server_generate.stamp: .check_go_version.stamp .check_gopath.stamp .swagger_build.stamp bin/swagger $(wildcard swagger/*.yaml) ## Generate golang server code from Swagger files
scripts/gen-server
Expand Down
3 changes: 3 additions & 0 deletions migrations/app/migrations_manifest.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1024,15 +1024,18 @@
20241009210749_create_view_v_locations.up.sql
20241011201326_changes_for_actual_expense_reimbursement_field.up.sql
20241017183144_add_AK_HI_duty_locations.up.sql
20241018091722_oconus-entitlements-enhancement.up.sql
20241023130404_create_re_service_items.up.sql
20241024114748_create_gbloc_aors.up.sql
20241029125015_add_orders_type_enum.up.sql
20241029144404_hdt-614-adjust-accomack-county.up.sql
20241031163018_create_ub_allowances_table.up.sql
20241107180705_add_alternative_AK_HI_duty_location_names.up.sql
20241109002854_add_gsr_table_to_move_history.up.sql
20241111203514_add_external_crate_and_remove_icrtsa.up.sql
20241111223224_change_international_sit_services_to_accessorials.up.sql
20241115214553_create_re_fsc_multipliers_table.up.sql
20241126222026_add_sort_column_to_re_service_items.up.sql
20241127133504_add_indexes_speed_up_counseling_offices.up.sql
20241202163059_create_test_sequence_dev_env.up.sql
20241203024453_add_ppm_max_incentive_column.up.sql
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@

ALTER TABLE entitlements
ADD COLUMN IF NOT EXISTS accompanied_tour BOOLEAN NULL,
ADD COLUMN IF NOT EXISTS dependents_under_twelve INTEGER NULL,
ADD COLUMN IF NOT EXISTS dependents_twelve_and_over INTEGER NULL,
ADD COLUMN IF NOT EXISTS ub_allowance INTEGER NULL;

COMMENT ON COLUMN entitlements.accompanied_tour IS 'Indicates if the move entitlement allows dependents to travel to the new Permanent Duty Station (PDS). This is only present on OCONUS moves.';
COMMENT ON COLUMN entitlements.dependents_under_twelve IS 'Indicates the number of dependents under the age of twelve for a move. This is only present on OCONUS moves.';
COMMENT ON COLUMN entitlements.dependents_twelve_and_over IS 'Indicates the number of dependents of the age twelve or older for a move. This is only present on OCONUS moves.';
COMMENT ON COLUMN entitlements.ub_allowance IS 'The amount of weight in pounds that the move is entitled for shipment types of Unaccompanied Baggage.';
500 changes: 500 additions & 0 deletions migrations/app/schema/20241031163018_create_ub_allowances_table.up.sql

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
ALTER TABLE re_service_items ADD COLUMN IF NOT EXISTS sort int;

COMMENT ON COLUMN re_service_items.sort IS 'Sort order for service items to be displayed for a given shipment type.';

update re_service_items set sort = 1 where service_id in (select id from re_services where code in ('ISLH','UBP'));
--A shipment will only have either POEFSC or PODFSC, so we set them to the same sort value
update re_service_items set sort = 2 where service_id in (select id from re_services where code = 'POEFSC');
update re_service_items set sort = 2 where service_id in (select id from re_services where code = 'PODFSC');
update re_service_items set sort = 3 where service_id in (select id from re_services where code in ('IHPK','IUBPK'));
update re_service_items set sort = 4 where service_id in (select id from re_services where code in ('IHUPK','IUBUPK'));
2 changes: 2 additions & 0 deletions pkg/factory/shared.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ var CustomerSupportRemark CustomType = "CustomerSupportRemark"
var Document CustomType = "Document"
var DutyLocation CustomType = "DutyLocation"
var Entitlement CustomType = "Entitlement"
var UBAllowance CustomType = "UBAllowances"
var EvaluationReport CustomType = "EvaluationReport"
var LineOfAccounting CustomType = "LineOfAccounting"
var MobileHome CustomType = "MobileHome"
Expand Down Expand Up @@ -115,6 +116,7 @@ var defaultTypesMap = map[string]CustomType{
"models.Document": Document,
"models.DutyLocation": DutyLocation,
"models.Entitlement": Entitlement,
"models.UBAllowances": UBAllowance,
"models.EvaluationReport": EvaluationReport,
"models.LineOfAccounting": LineOfAccounting,
"models.MobileHome": MobileHome,
Expand Down
6 changes: 6 additions & 0 deletions pkg/gen/ghcapi/configure_mymove.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import (
"github.com/transcom/mymove/pkg/gen/ghcapi/ghcoperations/ppm"
"github.com/transcom/mymove/pkg/gen/ghcapi/ghcoperations/pws_violations"
"github.com/transcom/mymove/pkg/gen/ghcapi/ghcoperations/queues"
"github.com/transcom/mymove/pkg/gen/ghcapi/ghcoperations/re_service_items"
"github.com/transcom/mymove/pkg/gen/ghcapi/ghcoperations/report_violations"
"github.com/transcom/mymove/pkg/gen/ghcapi/ghcoperations/shipment"
"github.com/transcom/mymove/pkg/gen/ghcapi/ghcoperations/tac"
Expand Down Expand Up @@ -215,6 +216,11 @@ func configureAPI(api *ghcoperations.MymoveAPI) http.Handler {
return middleware.NotImplemented("operation ppm.FinishDocumentReview has not yet been implemented")
})
}
if api.ReServiceItemsGetAllReServiceItemsHandler == nil {
api.ReServiceItemsGetAllReServiceItemsHandler = re_service_items.GetAllReServiceItemsHandlerFunc(func(params re_service_items.GetAllReServiceItemsParams) middleware.Responder {
return middleware.NotImplemented("operation re_service_items.GetAllReServiceItems has not yet been implemented")
})
}
if api.CustomerGetCustomerHandler == nil {
api.CustomerGetCustomerHandler = customer.GetCustomerHandlerFunc(func(params customer.GetCustomerParams) middleware.Responder {
return middleware.NotImplemented("operation customer.GetCustomer has not yet been implemented")
Expand Down
Loading

0 comments on commit 6b5aab4

Please sign in to comment.