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

MAIN-B-21505 #14459

Open
wants to merge 36 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
716a5b7
Merge remote-tracking branch 'origin/MAIN-B-21509-DB-Add-POE-and-POD'…
brianmanley-caci Nov 19, 2024
470bda3
B-21505 add ports to updateMTOShipment
brianmanley-caci Nov 20, 2024
9b41736
Merge remote-tracking branch 'origin/main' into MAIN-B-21505
brianmanley-caci Nov 20, 2024
f854d7b
Merge remote-tracking branch 'origin/MAIN-B-21509-DB-Add-POE-and-POD'…
brianmanley-caci Nov 20, 2024
435e5c4
Merge remote-tracking branch 'origin/main' into MAIN-B-21505
brianmanley-caci Nov 22, 2024
d7186ff
B-21505 prime update port functionality
brianmanley-caci Nov 25, 2024
c057cee
Merge main into MAIN-B-21505
brianmanley-caci Nov 25, 2024
21399ea
B-21505 return port information on getMoveTaskOrder
brianmanley-caci Nov 26, 2024
f0ec2eb
B-21505 service level tests for port locations
brianmanley-caci Nov 27, 2024
34b4a2a
B-21505 model to payload tests
brianmanley-caci Nov 27, 2024
bd2e294
B-21505 payload to model tests
brianmanley-caci Nov 27, 2024
9f57872
Merge remote-tracking branch 'origin/main' into MAIN-B-21505
brianmanley-caci Dec 2, 2024
a4f687b
B-21505 add port_locations to db-truncate
brianmanley-caci Dec 2, 2024
5f272bc
B-21505 add prime documentation
brianmanley-caci Dec 2, 2024
d616f5c
B-21505 generate api files
brianmanley-caci Dec 2, 2024
3fd80ae
B-21505 peer review improvements
brianmanley-caci Dec 2, 2024
45887c9
B-21505 server_generate
brianmanley-caci Dec 2, 2024
66c8d9c
B-21505 factories and more factories
brianmanley-caci Dec 3, 2024
c2e02e6
Merge main into B-21505
brianmanley-caci Dec 4, 2024
f633478
B-21505 peer review fixes
brianmanley-caci Dec 4, 2024
01fffbf
Merge main into B-21505
brianmanley-caci Dec 4, 2024
bda892d
Merge main into B-21505
brianmanley-caci Dec 10, 2024
02c8109
B-21505 improve if else logic
brianmanley-caci Dec 10, 2024
cb22643
Merge main into B-21505
brianmanley-caci Dec 11, 2024
d1fe817
B-21505 clean up copy/paste errors
brianmanley-caci Dec 11, 2024
14dad4c
B-21505 test coverage improvement
brianmanley-caci Dec 11, 2024
a209ed6
B-21505 improve port update api
brianmanley-caci Dec 12, 2024
6f3c0bc
Merge remote-tracking branch 'origin/main' into MAIN-B-21505
brianmanley-caci Dec 13, 2024
59ae5b7
Merge main into B-21505
brianmanley-caci Dec 16, 2024
548583f
B-21505 B instead of P
brianmanley-caci Dec 16, 2024
a585c9f
B-21505 another port type P to B
brianmanley-caci Dec 18, 2024
40251b2
Merge remote-tracking branch 'origin/main' into MAIN-B-21505
brianmanley-caci Dec 23, 2024
8da9bed
Merge branch 'main' into MAIN-B-21505
brianmanley-caci Dec 23, 2024
f88c10c
Merge branch 'main' into MAIN-B-21505
danieljordan-caci Dec 26, 2024
e3543b6
Merge branch 'main' into MAIN-B-21505
brianmanley-caci Dec 27, 2024
8624ada
Merge branch 'main' into MAIN-B-21505
brianmanley-caci Dec 27, 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
Prev Previous commit
Next Next commit
B-21505 prime update port functionality
  • Loading branch information
brianmanley-caci committed Nov 25, 2024
commit d7186ffa2353459656453f92109942599f305b73
1 change: 1 addition & 0 deletions migrations/app/migrations_manifest.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1035,3 +1035,4 @@
20241109002854_add_gsr_table_to_move_history.up.sql
20241111223224_change_international_sit_services_to_accessorials.up.sql
20241120221040_change_port_location_fk_to_correct_table.up.sql
20241122220314_create_port_and_port_location_test_data.up.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
--Blow away existing port data as it is not valid
DELETE FROM ports;
DELETE FROM port_locations;

INSERT INTO ports (id,port_code,port_type,port_name,created_at,updated_at) VALUES
('b393e767-0703-43c6-b1e9-12541dc3f15b'::uuid,'PDX','A','PORTLAND INTL','2024-11-22 14:52:24.739738','2024-11-22 14:52:24.739738'),
('48569958-2889-41e5-8101-82c56ec48430'::uuid,'SEA','A','SEATTLE TACOMA INTL','2024-11-22 14:52:24.739738','2024-11-22 14:52:24.739738'),
('aa33487c-0637-4c1a-b260-d12ed1dbcc39'::uuid,'TCM','A','MCCHORD FLD','2024-11-22 14:52:24.739738','2024-11-22 14:52:24.739738'),
('5269b1ec-3478-414c-bdb1-c8db12ccd0b5'::uuid,'4G1','S','ASTORIA, OREGON','2024-11-22 15:09:55.189787','2024-11-22 15:09:55.189787'),
('30dc0c1f-c2e2-4bf1-b9fd-5c24e21034d8'::uuid,'4H6','S','PORTLAND, OREGON','2024-11-22 15:09:55.189787','2024-11-22 15:09:55.189787'),
('54a32fc7-c2a9-4ba6-b8dd-99a710730fda'::uuid,'4K1','S','COOS BAY, OREGON','2024-11-22 15:09:55.189787','2024-11-22 15:09:55.189787'),
('581da305-3a67-4311-b7d5-1fec19b221f9'::uuid,'4B2','S','ANACORTES, NORTH WEST WASHINGTON','2024-11-22 15:09:55.189787','2024-11-22 15:09:55.189787'),
('b8dc9c80-bd6d-4a2d-8bd3-f025ddef95fc'::uuid,'4C1','S','PORT ANGELES, WHIDBEY ISLAND','2024-11-22 15:09:55.189787','2024-11-22 15:09:55.189787'),
('5355255c-3c9c-4d86-af2a-4b63004dee24'::uuid,'4DL','S','SEATTLE SDDC TERMINAL, PUGET SOUND','2024-11-22 15:09:55.189787','2024-11-22 15:09:55.189787'),
('a9c24841-64e0-4e12-a872-ee7fb73a6300'::uuid,'4EA','S','TACOMA NAVAL STATION, WASHINGTON, PUGET SOUND','2024-11-22 15:09:55.189787','2024-11-22 15:09:55.189787'),
('e4ba8867-bf70-43c7-b143-0f719ed0121f'::uuid,'2902','B','NEWPORT, OR','2024-10-17 13:50:08.046274','2024-10-17 13:50:08.046274'),
('ae0667e0-b497-4dd3-bfb4-a20f457104d1'::uuid,'2904','B','PORTLAND, OR','2024-10-17 13:50:08.046274','2024-10-17 13:50:08.046274'),
('e21ce23a-c261-4b54-a711-6dee965bcfe9'::uuid,'3001','B','SEATTLE, WA','2024-10-17 13:50:08.046274','2024-10-17 13:50:08.046274'),
('27ce681f-6dd6-45fd-b3ab-9a5b459b814b'::uuid,'3002','B','TACOMA, WA','2024-10-17 13:50:08.046274','2024-10-17 13:50:08.046274');

INSERT INTO port_locations (id,port_id,cities_id,us_post_region_cities_id,country_id,is_active,created_at,updated_at) VALUES
('b6e94f5b-33c0-43f3-b960-7c7b2a4ee5fc'::uuid,'b393e767-0703-43c6-b1e9-12541dc3f15b'::uuid,'026f9d81-7715-424e-b368-bfc7a673aaa2'::uuid,'40bf95e4-72f1-4d75-8bc5-5842f7f26c94'::uuid,'791899e6-cd77-46f2-981b-176ecb8d7098'::uuid,true,'2024-11-22 15:04:41.941865','2024-11-22 15:04:41.941865'),
('43efe04d-0ca0-4571-9aa1-747193285d9e'::uuid,'48569958-2889-41e5-8101-82c56ec48430'::uuid,'836b9729-08b8-4d2c-b089-c4ea57425a23'::uuid,'aac7788f-0a0f-4397-9742-95394ce02346'::uuid,'791899e6-cd77-46f2-981b-176ecb8d7098'::uuid,true,'2024-11-22 15:04:41.941865','2024-11-22 15:04:41.941865'),
('13b2f85a-7370-468b-b3f8-e6689e2bcdf6'::uuid,'aa33487c-0637-4c1a-b260-d12ed1dbcc39'::uuid,'baaf6ab1-6142-4fb7-b753-d0a142c75baf'::uuid,'a70a6356-a318-4426-af02-dbff793fbbb0'::uuid,'791899e6-cd77-46f2-981b-176ecb8d7098'::uuid,true,'2024-11-22 15:04:41.941865','2024-11-22 15:04:41.941865'),
('a8f4471f-add6-4f5d-bbe0-48264ba24fda'::uuid,'5269b1ec-3478-414c-bdb1-c8db12ccd0b5'::uuid,'5065f129-c3fe-4533-a24c-408db08d0e28'::uuid,'5fd8306f-af71-4967-950a-4d415c18f415'::uuid,'791899e6-cd77-46f2-981b-176ecb8d7098'::uuid,true,'2024-11-22 15:17:22.131362','2024-11-22 15:17:22.131362'),
('be6cb946-4033-43dd-a356-3213b3ba7b53'::uuid,'30dc0c1f-c2e2-4bf1-b9fd-5c24e21034d8'::uuid,'026f9d81-7715-424e-b368-bfc7a673aaa2'::uuid,'40bf95e4-72f1-4d75-8bc5-5842f7f26c94'::uuid,'791899e6-cd77-46f2-981b-176ecb8d7098'::uuid,true,'2024-11-22 15:17:22.131362','2024-11-22 15:17:22.131362'),
('c5deb9d6-478b-46b4-ab61-da32fa575731'::uuid,'54a32fc7-c2a9-4ba6-b8dd-99a710730fda'::uuid,'9c7377d9-b175-4896-8acd-5a3fb9ecb48c'::uuid,'3b3d4a99-b6c2-4e01-8a10-7e4e780ecd92'::uuid,'791899e6-cd77-46f2-981b-176ecb8d7098'::uuid,true,'2024-11-22 15:17:22.131362','2024-11-22 15:17:22.131362'),
('25e2f255-fd9b-4c21-a513-63332b5c30b9'::uuid,'581da305-3a67-4311-b7d5-1fec19b221f9'::uuid,'9fa66dfd-73b0-4d5f-b637-cac6e0d24676'::uuid,'7f3d3fdb-1d0f-4061-af3c-d2f401737d06'::uuid,'791899e6-cd77-46f2-981b-176ecb8d7098'::uuid,true,'2024-11-22 15:17:22.131362','2024-11-22 15:17:22.131362'),
('adfe22d0-70ff-45c3-9b9e-08341f662377'::uuid,'b8dc9c80-bd6d-4a2d-8bd3-f025ddef95fc'::uuid,'999bcb30-edae-4b4d-8027-5e71cb8b015c'::uuid,'c4c4e9bf-631c-4ea0-9d03-bced40ab9189'::uuid,'791899e6-cd77-46f2-981b-176ecb8d7098'::uuid,true,'2024-11-22 15:17:22.131362','2024-11-22 15:17:22.131362'),
('8d74a7c2-addd-49d2-a945-697befa686a2'::uuid,'5355255c-3c9c-4d86-af2a-4b63004dee24'::uuid,'836b9729-08b8-4d2c-b089-c4ea57425a23'::uuid,'aac7788f-0a0f-4397-9742-95394ce02346'::uuid,'791899e6-cd77-46f2-981b-176ecb8d7098'::uuid,true,'2024-11-22 15:17:22.131362','2024-11-22 15:17:22.131362'),
('9e76c27d-fd4b-434e-9ffc-ef70abc88973'::uuid,'a9c24841-64e0-4e12-a872-ee7fb73a6300'::uuid,'baaf6ab1-6142-4fb7-b753-d0a142c75baf'::uuid,'a70a6356-a318-4426-af02-dbff793fbbb0'::uuid,'791899e6-cd77-46f2-981b-176ecb8d7098'::uuid,true,'2024-11-22 15:17:22.131362','2024-11-22 15:17:22.131362'),
('75038c6c-cd38-453d-a0c3-74e39908bb81'::uuid,'e4ba8867-bf70-43c7-b143-0f719ed0121f'::uuid,'fc264968-eaff-404a-8efe-24c35e965e2f'::uuid,'9dcbb419-f0c9-4c06-82f4-c43381a55b89'::uuid,'791899e6-cd77-46f2-981b-176ecb8d7098'::uuid,true,'2024-11-22 15:26:06.764703','2024-11-22 15:26:06.764703'),
('2a6b7d44-0b06-4c20-bad9-0bbe147c8e23'::uuid,'ae0667e0-b497-4dd3-bfb4-a20f457104d1'::uuid,'026f9d81-7715-424e-b368-bfc7a673aaa2'::uuid,'40bf95e4-72f1-4d75-8bc5-5842f7f26c94'::uuid,'791899e6-cd77-46f2-981b-176ecb8d7098'::uuid,true,'2024-11-22 15:26:06.764703','2024-11-22 15:26:06.764703'),
('10625607-6785-49f0-8a26-36039612743b'::uuid,'e21ce23a-c261-4b54-a711-6dee965bcfe9'::uuid,'836b9729-08b8-4d2c-b089-c4ea57425a23'::uuid,'aac7788f-0a0f-4397-9742-95394ce02346'::uuid,'791899e6-cd77-46f2-981b-176ecb8d7098'::uuid,true,'2024-11-22 15:26:06.764703','2024-11-22 15:26:06.764703'),
('a1a7ce07-94f2-45b3-b70a-59f1824778af'::uuid,'27ce681f-6dd6-45fd-b3ab-9a5b459b814b'::uuid,'baaf6ab1-6142-4fb7-b753-d0a142c75baf'::uuid,'a70a6356-a318-4426-af02-dbff793fbbb0'::uuid,'791899e6-cd77-46f2-981b-176ecb8d7098'::uuid,true,'2024-11-22 15:26:06.764703','2024-11-22 15:26:06.764703');
24 changes: 24 additions & 0 deletions pkg/apperror/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,30 @@ func (e *UnsupportedPostalCodeError) Error() string {
return fmt.Sprintf("Unsupported postal code (%s): %s", e.postalCode, e.reason)
}

// UnsupportedPortCode happens when we don't have the data to support a given postal code.
const UnsupportedPortCode ErrorCode = "UNSUPPORTED_PORT_CODE"

// UnsupportedPortCodeError is the custom error type (exported for type checking)
type UnsupportedPortCodeError struct {
baseError
portCode string
reason string
}

// NewUnsupportedPostalCodeError creates an error for when we don't have the data to support a given
// postal code.
func NewUnsupportedPortCodeError(portCode string, reason string) *UnsupportedPortCodeError {
return &UnsupportedPortCodeError{
baseError{UnsupportedPortCode},
portCode,
reason,
}
}

func (e *UnsupportedPortCodeError) Error() string {
return fmt.Sprintf("Unsupported port code (%s): %s", e.portCode, e.reason)
}

// InvalidInputError is returned when an update fails a validation rule
type InvalidInputError struct {
id uuid.UUID
Expand Down
62 changes: 60 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.

6 changes: 6 additions & 0 deletions pkg/gen/primemessages/update_m_t_o_service_item.go

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

Loading