Skip to content

Commit

Permalink
Merge branch 'main' into B-21348-Bulk-Assignment-Save
Browse files Browse the repository at this point in the history
  • Loading branch information
pambecker authored Mar 6, 2025
2 parents 3866cf8 + eb4ef72 commit f3a76a3
Show file tree
Hide file tree
Showing 40 changed files with 2,798 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
--B-21966 Konstance Haffaney Add column to office_users

ALTER TABLE public.office_users
ADD COLUMN IF NOT EXISTS rejected_on timestamptz;

COMMENT on COLUMN office_users.rejected_on IS 'Date requested office users were rejected.';
1 change: 1 addition & 0 deletions migrations/app/ddl_tables_manifest.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# This is the tables migrations manifest.
# If a migration is not recorded here, then it will error.
# Naming convention: tbl_some_table.up.sql running <generate-ddl-migration some_table tables> will create this file.
20250221195633_tbl_alter_office_users_B-21966.up.sql
20250221195354_tbl_alter_entitlements_B-22651.up.sql
20250224162949_B-22706_tbl_update_moves.up.sql
20250224200700_tbl_ppm_shipments.up.sql
Expand Down
1 change: 1 addition & 0 deletions migrations/app/dml_migrations_manifest.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# This is the migrations manifest.
# If a migration is not recorded here, then it will error.
# Naming convention: 202502201325_B-123456_update_some_table.up.sql running <milmove gen migration -n B-123456_update_some_table> will create this file.
20250227160358_B-21966_add_data_to_office_users.up.sql
20250227211521_update_re_countries.up.sql
20250227211534_update_re_country_prn_divisions.up.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
-- Adds rejectedOn date to pre-existing rejected office users.
UPDATE office_users
SET rejected_on = updated_at
WHERE
status ='REJECTED'::public."office_user_status" AND rejected_on is null;
15 changes: 15 additions & 0 deletions pkg/factory/office_user_factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package factory
import (
"fmt"
"strings"
"time"

"github.com/gobuffalo/pop/v6"
"github.com/gofrs/uuid"
Expand Down Expand Up @@ -340,3 +341,17 @@ func GetTraitRequestedOfficeUser() []Customization {
},
}
}

// GetTraitRejectedOfficeUser sets the OfficeUser in an REJECTED status
func GetTraitRejectedOfficeUser() []Customization {
rejectedStatus := models.OfficeUserStatusREJECTED
rejectedOn := time.Now()
return []Customization{
{
Model: models.OfficeUser{
Status: &rejectedStatus,
RejectedOn: &rejectedOn,
},
},
}
}
25 changes: 25 additions & 0 deletions pkg/gen/adminapi/adminoperations/mymove_api.go

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

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

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

Loading

0 comments on commit f3a76a3

Please sign in to comment.