Skip to content

Commit

Permalink
Merge branch 'MAIN-B-22039-remove_lat_lon' into INT-B-22039-remove_la…
Browse files Browse the repository at this point in the history
…t_lon
  • Loading branch information
ryan-mchugh committed Feb 21, 2025
2 parents 262fc97 + 6e533cf commit e44b4ba
Show file tree
Hide file tree
Showing 13 changed files with 111 additions and 53 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM harbor.csde.caci.com/docker.io/debian:stable AS build-env
FROM harbor.csde.caci.com/docker.io/library/debian:stable AS build-env

COPY config/tls/dod-wcf-root-ca-1.pem /usr/local/share/ca-certificates/dod-wcf-root-ca-1.pem.crt
COPY config/tls/dod-wcf-intermediate-ca-1.pem /usr/local/share/ca-certificates/dod-wcf-intermediate-ca-1.pem.crt
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.dp3
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM harbor.csde.caci.com/docker.io/debian:stable AS build-env
FROM harbor.csde.caci.com/docker.io/library/debian:stable AS build-env

# hadolint ignore=DL3007
FROM gcr.io/distroless/base-debian12@sha256:74ddbf52d93fafbdd21b399271b0b4aac1babf8fa98cab59e5692e01169a1348
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.migrations
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM harbor.csde.caci.com/docker.io/debian:stable AS build-env
FROM harbor.csde.caci.com/docker.io/library/debian:stable AS build-env

COPY config/tls/dod-wcf-root-ca-1.pem /usr/local/share/ca-certificates/dod-wcf-root-ca-1.pem.crt
COPY config/tls/dod-wcf-intermediate-ca-1.pem /usr/local/share/ca-certificates/dod-wcf-intermediate-ca-1.pem.crt
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.tasks
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM harbor.csde.caci.com/docker.io/debian:stable AS build-env
FROM harbor.csde.caci.com/docker.io/library/debian:stable AS build-env

COPY config/tls/dod-wcf-root-ca-1.pem /usr/local/share/ca-certificates/dod-wcf-root-ca-1.pem.crt
COPY config/tls/dod-wcf-intermediate-ca-1.pem /usr/local/share/ca-certificates/dod-wcf-intermediate-ca-1.pem.crt
Expand Down
20 changes: 0 additions & 20 deletions pkg/gen/adminapi/embedded_spec.go

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

8 changes: 0 additions & 8 deletions pkg/gen/adminmessages/transportation_office.go

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

2 changes: 0 additions & 2 deletions pkg/handlers/adminapi/offices.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ func payloadForOfficeModel(o models.TransportationOffice) *adminmessages.Transpo
Address: payloadForAddressModel(&o.Address),
Gbloc: o.Gbloc,
PhoneLines: payloadForPhoneLines(o.PhoneLines),
Latitude: o.Latitude,
Longitude: o.Longitude,
}
}

Expand Down
84 changes: 84 additions & 0 deletions pkg/services/move/move_fetcher_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -519,6 +519,90 @@ func (suite *MoveServiceSuite) TestMoveFetcherBulkAssignmentSC() {
suite.Equal(1, len(moves))
suite.NotEqual(marinePPM.ID, moves[0].ID)
})

suite.Run("Closeout returns non Navy/USCG/USMC ppms in needs closeout status", func() {
moveFetcher := NewMoveFetcherBulkAssignment()
transportationOffice := factory.BuildTransportationOffice(suite.DB(), nil, nil)
officeUser := factory.BuildOfficeUserWithRoles(suite.DB(), []factory.Customization{
{
Model: transportationOffice,
LinkOnly: true,
Type: &factory.TransportationOffices.CloseoutOffice,
},
}, []roles.RoleType{roles.RoleTypeServicesCounselor})

submittedAt := time.Now()

// create non USMC/USCG/NAVY ppm in need closeout status
factory.BuildMoveWithPPMShipment(suite.DB(), []factory.Customization{
{
Model: transportationOffice,
LinkOnly: true,
Type: &factory.TransportationOffices.CloseoutOffice,
},
{
Model: models.PPMShipment{
Status: models.PPMShipmentStatusNeedsCloseout,
SubmittedAt: &submittedAt,
},
},
{
Model: models.Move{
Status: models.MoveStatusAPPROVED,
},
},
}, nil)

// create non closeout needed ppm
factory.BuildMoveWithPPMShipment(suite.DB(), []factory.Customization{
{
Model: transportationOffice,
LinkOnly: true,
Type: &factory.TransportationOffices.CloseoutOffice,
},
{
Model: models.PPMShipment{
Status: models.PPMShipmentStatusWaitingOnCustomer,
SubmittedAt: &submittedAt,
},
},
{
Model: models.Move{
Status: models.MoveStatusAPPROVED,
},
},
}, nil)

marine := models.AffiliationMARINES
marinePPM := factory.BuildPPMShipment(suite.DB(), []factory.Customization{
{
Model: models.Move{
Status: models.MoveStatusAPPROVED,
},
},
{
Model: models.MTOShipment{
ShipmentType: models.MTOShipmentTypePPM,
},
},
{
Model: models.PPMShipment{
Status: models.PPMShipmentStatusNeedsCloseout,
SubmittedAt: &submittedAt,
},
},
{
Model: models.ServiceMember{
Affiliation: &marine,
},
},
}, nil)

moves, err := moveFetcher.FetchMovesForBulkAssignmentCloseout(suite.AppContextForTest(), "KKFA", officeUser.TransportationOffice.ID)
suite.FatalNoError(err)
suite.Equal(1, len(moves))
suite.NotEqual(marinePPM.ID, moves[0].ID)
})
}

func (suite *MoveServiceSuite) TestMoveFetcherBulkAssignmentTOO() {
Expand Down
2 changes: 1 addition & 1 deletion playwright/tests/admin/offices.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ test.describe('Offices Page', () => {
await expect(page.locator('header')).toContainText('Offices');
await expect(page.getByLabel('Search by Office Name')).toBeEditable();

const columnLabels = ['Id', 'Name', 'Latitude', 'Longitude', 'Gbloc'];
const columnLabels = ['Id', 'Name', 'Gbloc'];
await adminPage.expectRoleLabelsByText('columnheader', columnLabels);
});
});
22 changes: 22 additions & 0 deletions src/components/BulkAssignment/BulkAssignmentModal.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -86,3 +86,25 @@
align-items: center;
}
}

.areYouSureSection {
display: flex;
justify-content: space-evenly;
align-items: center;
padding-top: 20px;

.confirmButtons {
display: flex;
align-items: center;
gap: 10px;
padding: 10px;
max-height: 42px;
}

.cancelYesButton {
font-size: 12px;
max-width: 100px;
height: 42px;
align-items: center;
}
}
2 changes: 0 additions & 2 deletions src/pages/Admin/Offices/OfficeList.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ const OfficeList = () => (
<Datagrid bulkActionButtons={false}>
<TextField source="id" />
<TextField source="name" />
<TextField source="latitude" />
<TextField source="longitude" />
<TextField source="gbloc" />
</Datagrid>
</List>
Expand Down
8 changes: 0 additions & 8 deletions swagger-def/admin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1047,14 +1047,6 @@ definitions:
type: string
pattern: "^[A-Z]{4}$"
example: JENQ
latitude:
type: number
format: float
example: 29.382973
longitude:
type: number
format: float
example: -98.62759
createdAt:
type: string
format: date-time
Expand Down
8 changes: 0 additions & 8 deletions swagger/admin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1054,14 +1054,6 @@ definitions:
type: string
pattern: ^[A-Z]{4}$
example: JENQ
latitude:
type: number
format: float
example: 29.382973
longitude:
type: number
format: float
example: -98.62759
createdAt:
type: string
format: date-time
Expand Down

0 comments on commit e44b4ba

Please sign in to comment.