Skip to content

Commit

Permalink
Merge branch 'main' into B-18645-Move-grade-to-Orders-From-Allowances…
Browse files Browse the repository at this point in the history
…-MAIN
  • Loading branch information
traskowskycaci authored Feb 22, 2024
2 parents c83d3b6 + 70ed208 commit bdab0a0
Show file tree
Hide file tree
Showing 74 changed files with 3,594 additions and 1,352 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/stale-issues-pull-requests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: 'Close stale issues and PRs'
on:
schedule:
- cron: '30 1 * * *'

jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v9
with:
stale-issue-message: 'This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.'
stale-pr-message: 'This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days.'
close-issue-message: 'This issue was closed because it has been stalled for 5 days with no activity.'
close-pr-message: 'This PR was closed because it has been stalled for 10 days with no activity.'
days-before-issue-stale: 30
days-before-pr-stale: 45
days-before-issue-close: 5
days-before-pr-close: 10
22 changes: 10 additions & 12 deletions cmd/generate-shipment-summary/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,17 @@ import (
"github.com/transcom/mymove/pkg/auth"
"github.com/transcom/mymove/pkg/cli"
"github.com/transcom/mymove/pkg/logging"
"github.com/transcom/mymove/pkg/models"
"github.com/transcom/mymove/pkg/paperwork"
"github.com/transcom/mymove/pkg/rateengine"
"github.com/transcom/mymove/pkg/route"
shipmentsummaryworksheet "github.com/transcom/mymove/pkg/services/shipment_summary_worksheet"
)

// hereRequestTimeout is how long to wait on HERE request before timing out (15 seconds).
const hereRequestTimeout = time.Duration(15) * time.Second

const (
moveIDFlag string = "move"
debugFlag string = "debug"
PPMShipmentIDFlag string = "ppmshipment"
debugFlag string = "debug"
)

func noErr(err error) {
Expand Down Expand Up @@ -60,7 +59,7 @@ func checkConfig(v *viper.Viper, logger *zap.Logger) error {
func initFlags(flag *pflag.FlagSet) {

// Scenario config
flag.String(moveIDFlag, "", "The move ID to generate a shipment summary worksheet for")
flag.String(PPMShipmentIDFlag, "", "The move ID to generate a shipment summary worksheet for")
flag.Bool(debugFlag, false, "show field debug output")

// DB Config
Expand Down Expand Up @@ -119,7 +118,7 @@ func main() {

appCtx := appcontext.NewAppContext(dbConnection, logger, nil)

moveID := v.GetString(moveIDFlag)
moveID := v.GetString(PPMShipmentIDFlag)
if moveID == "" {
log.Fatalf("Usage: %s --move <29cb984e-c70d-46f0-926d-cd89e07a6ec3>", os.Args[0])
}
Expand All @@ -137,9 +136,8 @@ func main() {
formFiller.Debug()
}

move, err := models.FetchMoveByMoveID(dbConnection, parsedID)
if err != nil {
log.Fatalf("error fetching move: %s", moveIDFlag)
log.Fatalf("error fetching ppmshipment: %s", PPMShipmentIDFlag)
}

geocodeEndpoint := os.Getenv("HERE_MAPS_GEOCODE_ENDPOINT")
Expand All @@ -150,18 +148,18 @@ func main() {

// TODO: Future cleanup will need to remap to a different planner, or this command should be removed if it is consider deprecated
planner := route.NewHEREPlanner(hereClient, geocodeEndpoint, routingEndpoint, testAppID, testAppCode)
ppmComputer := paperwork.NewSSWPPMComputer(rateengine.NewRateEngine(move))
ppmComputer := shipmentsummaryworksheet.NewSSWPPMComputer()

ssfd, err := models.FetchDataShipmentSummaryWorksheetFormData(dbConnection, &auth.Session{}, parsedID)
ssfd, err := ppmComputer.FetchDataShipmentSummaryWorksheetFormData(appCtx, &auth.Session{}, parsedID)
if err != nil {
log.Fatalf("%s", errors.Wrap(err, "Error fetching shipment summary worksheet data "))
}
ssfd.Obligations, err = ppmComputer.ComputeObligations(appCtx, ssfd, planner)
ssfd.Obligations, err = ppmComputer.ComputeObligations(appCtx, *ssfd, planner)
if err != nil {
log.Fatalf("%s", errors.Wrap(err, "Error calculating obligations "))
}

page1Data, page2Data, page3Data, err := models.FormatValuesShipmentSummaryWorksheet(ssfd)
page1Data, page2Data, page3Data := ppmComputer.FormatValuesShipmentSummaryWorksheet(*ssfd)
noErr(err)

// page 1
Expand Down
2 changes: 2 additions & 0 deletions migrations/app/migrations_manifest.txt
Original file line number Diff line number Diff line change
Expand Up @@ -896,4 +896,6 @@
20240201174442_20240201_homesafe_prd_cert.up.sql
20240201201343_update_duty_location_names.up.sql
20240206173201_update_shipment_address_update_table_sit_and_distance_columns.up.sql
20240207173709_updateTransportationOffices.up.sql
20240212150834_20240212_disable_homesafe_stg_cert.up.sql
20240214213247_updateTransportationOfficesGbloc.up.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
update postal_code_to_gblocs set gbloc = 'BGAC' where gbloc = 'BKAS';


INSERT INTO addresses
(id, street_address_1, city, state, postal_code, created_at, updated_at, country)
VALUES ('f933c50f-6625-4991-8c81-705a222840c6', '3376 Albacore Alley', 'San Diego', 'CA', '92136', now(), now(), 'United States');

insert into transportation_offices
(id, name, gbloc, address_id, latitude, longitude, created_at, updated_at, provides_ppm_closeout)
values
('e4a02d40-2ad9-44c5-a357-202d4ff0b51d', 'PPPO NAVSUP FLC San Diego - USN', 'LKNQ', 'f933c50f-6625-4991-8c81-705a222840c6','32.67540','-117.12142', now(), now(), TRUE);

insert into office_phone_lines
(id, transportation_office_id, number, created_at, updated_at)
values
('3e692f01-182d-4a7d-958d-6418e7335dd9', 'e4a02d40-2ad9-44c5-a357-202d4ff0b51d', '855-444-6683', now(), now());

insert into office_emails
(id, transportation_office_id, email, created_at, updated_at)
values
('3e692f01-182d-4a7d-958d-6418e7335dd9', 'e4a02d40-2ad9-44c5-a357-202d4ff0b51d', 'jppso_SW_counseling@us.navy.mil', now(), now());



INSERT INTO addresses
(id, street_address_1, city, state, postal_code, created_at, updated_at, country)
VALUES ('6aa77b74-41a7-4a4c-ab29-986f3263495a', '626 Swift Road', 'West Point', 'NY', '10996', now(), now(), 'United States');

insert into transportation_offices
(id, name, gbloc, address_id, latitude, longitude, created_at, updated_at, provides_ppm_closeout)
values
('dd043073-4f1b-460f-8f8c-74403619dbaa', 'PPPO West Point/ USMA - USA', 'BGAC', '6aa77b74-41a7-4a4c-ab29-986f3263495a','41.39400','-73.97232', now(), now(), TRUE);
insert into office_phone_lines
(id, transportation_office_id, number, created_at, updated_at)
values
('1adffbea-01d7-462f-bbfd-ba155e8a0844', 'dd043073-4f1b-460f-8f8c-74403619dbaa', '845-938-5911', now(), now());

insert into office_emails
(id, transportation_office_id, email, created_at, updated_at)
values
('8276c5e4-461f-4ef6-a72f-0d76f7e10194', 'dd043073-4f1b-460f-8f8c-74403619dbaa', 'usarmy.jblm.404-afsb-lrc.list.west-point-transportation-ppo@army.mil', now(), now());


INSERT INTO addresses
(id, street_address_1, city, state, postal_code, created_at, updated_at, country)
VALUES ('09058d36-2966-496a-aaf5-55c024404396', '15610 SW 117TH AVE', 'Miami', 'FL', '33177-1630', now(), now(), 'United States');

insert into transportation_offices
(id, name, gbloc, address_id, latitude, longitude, created_at, updated_at, provides_ppm_closeout)
values
('4f10d0f5-6017-4de2-8cfb-ee9252e492d5', 'PPPO USAG Miami - USA', 'CLPK', '09058d36-2966-496a-aaf5-55c024404396','25.59788','-80.40353', now(), now(), TRUE);

insert into office_phone_lines
(id, transportation_office_id, number, created_at, updated_at)
values
('bfae8dd6-3ce4-4310-a315-eeda8420f4a4', '4f10d0f5-6017-4de2-8cfb-ee9252e492d5', '1-305-216-8037', now(), now());

insert into office_emails
(id, transportation_office_id, email, created_at, updated_at)
values
('afb6648e-da9d-4e6a-9322-e0aa3b99caf3', '4f10d0f5-6017-4de2-8cfb-ee9252e492d5', 'D07-SMB-BASEMIAMIBEACH-PPSO@uscg.mil', now(), now());



delete from transportation_offices where name = 'PPPO Base San Pedro - USCG';
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
update
transportation_offices
set
gbloc = 'BGAC'
where
gbloc = 'BKAS';

insert
into
duty_locations(id,
name,
address_id,
created_at,
updated_at,
transportation_office_id,
provides_services_counseling )
values(
'9f7a1c83-26ad-4ba3-b30f-1a2e62f250f6',
'PPPO West Point/ USMA - USA',
'6aa77b74-41a7-4a4c-ab29-986f3263495a',
now(),
now(),
'dd043073-4f1b-460f-8f8c-74403619dbaa',
true);

insert
into duty_location_names(id,
name,
duty_location_id,
created_at,
updated_at)
values (
'47cfbfa1-4633-440e-928e-92a6f462826e',
'PPPO West Point/ USMA - USA',
'9f7a1c83-26ad-4ba3-b30f-1a2e62f250f6',
now(),
now()
);

insert
into
duty_locations(id,
name,
address_id,
created_at,
updated_at,
transportation_office_id,
provides_services_counseling )
values(
'0f420f7b-72ac-43cf-bc93-f24d44ba8f93',
'PPPO USAG Miami - USA',
'09058d36-2966-496a-aaf5-55c024404396',
now(),
now(),
'4f10d0f5-6017-4de2-8cfb-ee9252e492d5',
true);

insert
into duty_location_names(id,
name,
duty_location_id,
created_at,
updated_at)
values (
'fbe7677f-e1ec-47d2-bf33-57e83eded778',
'PPPO USAG Miami - USA',
'0f420f7b-72ac-43cf-bc93-f24d44ba8f93',
now(),
now()
);
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@

{{if .OriginDutyLocation}}<p>If you have any questions, call the {{.OriginDutyLocation}} PPPO at {{.OriginDutyLocationPhoneLine}} and reference your move locator code: {{.Locator}}</p>{{end}}

<p>You can <a href="https://my.move.mil">check the status of your move</a> anytime at https://my.move.mil"</p>
<p>You can <a href="{{.MyMoveLink}}">check the status of your move</a> anytime at {{.MyMoveLink}}"</p>
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ Be sure to save your weight tickets and any receipts associated with your move.

{{if .OriginDutyLocation}}If you have any questions, call the {{.OriginDutyLocation}} PPPO at {{.OriginDutyLocationPhoneLine}} and reference move locator code: {{.Locator}}.{{end}}

You can check the status of your move anytime at https://my.move.mil"
You can check the status of your move anytime at {{.MyMoveLink}}"
24 changes: 24 additions & 0 deletions pkg/assets/notifications/templates/move_counseled_template.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<p>*** DO NOT REPLY directly to this email ***</p>

<p>This is a confirmation that your counselor has approved move details for the <strong>assigned move code{{if or (not .Locator) (not .OriginDutyLocation) (not .DestinationDutyLocation)}}</strong>{{end}}{{if and .Locator .OriginDutyLocation .DestinationDutyLocation}} {{.Locator}}</strong> from {{.OriginDutyLocation}} to {{.DestinationDutyLocation}} in the MilMove system{{end}}.</p>

<p>What this means to you:</br>
If you are doing a Personally Procured Move (PPM), you can start moving your personal property.</p>

<p><strong>Next steps for a PPM:</strong>
<ul>
<li>Remember to get legible certified weight tickets for both the empty and full weights for every trip you perform. If you do not upload legible certified weight tickets, your PPM incentive could be affected.</li>
<li>If your counselor approved an Advance Operating Allowance (AOA, or cash advance) for a PPM, log into <a href="{{.MyMoveLink}}">MilMove</a> to download your AOA Packet, and submit it to finance according to the instructions provided by your counselor. If you have been directed to use your government travel charge card (GTCC) for expenses no further action is required.</li>
<li>Once you complete your PPM, log into <a href="{{.MyMoveLink}}">MilMove</a>, upload your receipts and weight tickets, and submit your PPM for review.</li>
</ul>

<p><strong>Next steps for government arranged shipments:</strong></br>
<ul>
<li>Your move request will be reviewed by the responsible personal property shipping office and a move task order for services will be placed with HomeSafe Alliance.</li>
<li>Once this order is placed, you will receive an e-mail invitation to create an account in HomeSafe Connect (check your spam or junk folder). This is the system you will use to schedule your pre-move survey.</li>
<li>HomeSafe is required to contact you within 24 hours of receiving your move task order. Once contact has been established, HomeSafe is your primary point of contact. If any information about your move changes at any point during the move, immediately notify your HomeSafe Customer Care Representative of the changes. Remember to keep your contact information updated in MilMove.</li>
</ul>
<p>Thank you,<br>
USTRANSCOM MilMove Team</p>

<p>The information contained in this email may contain Privacy Act information and is therefore protected under the Privacy Act of 1974. Failure to protect Privacy Act information could result in a $5,000 fine.</p>
21 changes: 21 additions & 0 deletions pkg/assets/notifications/templates/move_counseled_template.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
*** DO NOT REPLY directly to this email ***

This is a confirmation that your counselor has approved move details for the assigned move code{{if and .Locator .OriginDutyLocation .DestinationDutyLocation}} {{.Locator}} from {{.OriginDutyLocation}} to {{.DestinationDutyLocation}} in the MilMove system{{end}}.

What this means to you:
If you are doing a Personally Procured Move (PPM), you can start moving your personal property.

Next steps for a PPM:
* Remember to get legible certified weight tickets for both the empty and full weights for every trip you perform. If you do not upload legible certified weight tickets, your PPM incentive could be affected.
* If your counselor approved an Advance Operating Allowance (AOA, or cash advance) for a PPM, log into MilMove <{{.MyMoveLink}}/> to download your AOA Packet, and submit it to finance according to the instructions provided by your counselor. If you have been directed to use your government travel charge card (GTCC) for expenses no further action is required.
* Once you complete your PPM, log into MilMove <{{.MyMoveLink}}/>, upload your receipts and weight tickets, and submit your PPM for review.

Next steps for government arranged shipments:
* Your move request will be reviewed by the responsible personal property shipping office and a move task order for services will be placed with HomeSafe Alliance.
* Once this order is placed, you will receive an e-mail invitation to create an account in HomeSafe Connect (check your spam or junk folder). This is the system you will use to schedule your pre-move survey.
* HomeSafe is required to contact you within 24 hours of receiving your move task order. Once contact has been established, HomeSafe is your primary point of contact. If any information about your move changes at any point during the move, immediately notify your HomeSafe Customer Care Representative of the changes. Remember to keep your contact information updated in MilMove.

Thank you,
USTRANSCOM MilMove Team

The information contained in this email may contain Privacy Act information and is therefore protected under the Privacy Act of 1974. Failure to protect Privacy Act information could result in a $5,000 fine.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<p>To do that</p>

<ul>
<li><a href="https://my.move.mil">Log in to MilMove</a></li>
<li><a href="{{.MyMoveLink}}">Log in to MilMove</a></li>
<li>Click Request Payment</li>
<li>Follow the instructions.</li>
</ul>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@

<p>
{{- if .OriginDutyLocationPhoneLine }}
To change any information about your move, or to add or cancel shipments, you should contact {{.OriginDutyLocationPhoneLine}} or visit your <a href="{{.MilitaryOneSourceLink}}">local transportation office</a>.
To change any information about your move, or to add or cancel shipments, you should contact {{.OriginDutyLocationPhoneLine}} or visit your <a href="{{.OneSourceTransportationOfficeLink}}">local transportation office</a>.
{{- end }}
{{- if not .OriginDutyLocationPhoneLine }}
To change any information about your move, or to add or cancel shipments, you should contact your nearest transportation office. You can find the contact information using the <a href="{{.MilitaryOneSourceLink}}">directory of PCS-related contacts</a>.
To change any information about your move, or to add or cancel shipments, you should contact your nearest transportation office. You can find the contact information using the <a href="{{.OneSourceTransportationOfficeLink}}">directory of PCS-related contacts</a>.
{{- end }}
</p>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This is a confirmation that you have submitted the details for your move {{if .O

We have assigned you a move code: {{.Locator}}. You can use this code when talking to any representative about your move.

{{ if .OriginDutyLocationPhoneLine -}} To change any information about your move, or to add or cancel shipments, you should contact {{.OriginDutyLocationPhoneLine}} or visit your local transportation office ({{.MilitaryOneSourceLink}}) . {{- end }} {{- if not .OriginDutyLocationPhoneLine }} To change any information about your move, or to add or cancel shipments, you should contact your nearest transportation office. You can find the contact information using the directory of PCS-related contacts ({{.MilitaryOneSourceLink}}) . {{- end }}
{{ if .OriginDutyLocationPhoneLine -}} To change any information about your move, or to add or cancel shipments, you should contact {{.OriginDutyLocationPhoneLine}} or visit your local transportation office ({{.OneSourceTransportationOfficeLink}}) . {{- end }} {{- if not .OriginDutyLocationPhoneLine }} To change any information about your move, or to add or cancel shipments, you should contact your nearest transportation office. You can find the contact information using the directory of PCS-related contacts ({{.OneSourceTransportationOfficeLink}}) . {{- end }}

Your weight allowance: {{.WeightAllowance}} pounds. That is how much combined weight the government will pay for all movements between authorized locations under your orders.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
<h4>Next steps:</h4>
{{if eq .ServiceBranch "Marine Corps, Navy, and Coast Guard"}}
<p>For Marine Corps, Navy, and Coast Guard personnel:</p>
<p>You can now log into MilMove <a href="https://my.move.mil/">https://my.move.mil/</a> and view your payment packet; however, you do not need to forward your packet to finance as your closeout location is associated with your finance office and they will handle this step for you.</p>
<p>You can now log into MilMove <a href="{{.MyMoveLink}}/">{{.MyMoveLink}}/</a> and view your payment packet; however, you do not need to forward your packet to finance as your closeout location is associated with your finance office and they will handle this step for you.</p>
<p>Note: Not all claimed expenses may have been accepted during PPM closeout if they did not meet the definition of a valid expense.</p>
{{else}}
<p>For {{.ServiceBranch}} personnel (FURTHER ACTION REQUIRED):</p>
<p>You can now log into MilMove <a href="https://my.move.mil/">https://my.move.mil/</a> and download your payment packet to submit to {{.SubmitLocation}}. <strong>You must complete this step to receive final settlement of your PPM.</strong></p>
<p>You can now log into MilMove <a href="{{.MyMoveLink}}/">{{.MyMoveLink}}/</a> and download your payment packet to submit to {{.SubmitLocation}}. <strong>You must complete this step to receive final settlement of your PPM.</strong></p>
<p>{{if eq .ServiceBranch "Air Force and Space Force"}}Note: The Transportation Office does not determine claimable expenses. Claimable expenses will be determined by finance{{else if eq .ServiceBranch "Army"}}Note: Not all claimed expenses may have been accepted during PPM closeout if they did not meet the definition of a valid expense{{end}}.</p>
{{end}}
<p>If you have any questions, contact a government transportation office. You can see a listing of transportation offices on Military One Source here: <a href="https://installations.militaryonesource.mil/search?program-service=2/view-by=ALL">https://installations.militaryonesource.mil/search?program-service=2/view-by=ALL</a></p>
<p>If you have any questions, contact a government transportation office. You can see a listing of transportation offices on Military One Source here: <a href="{{.OneSourceTransportationOfficeLink}}">{{.OneSourceTransportationOfficeLink}}</a></p>

<p>Thank you,</p>

Expand Down
Loading

0 comments on commit bdab0a0

Please sign in to comment.