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

B-21365 Customer UB Shipment Card MAIN #13986

Merged
merged 18 commits into from
Oct 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -877,8 +877,8 @@ commands:
export FEATURE_FLAG_MANAGE_SUPPORTING_DOCS=false
export FEATURE_FLAG_THIRD_ADDRESS_AVAILABLE=false
export FEATURE_FLAG_QUEUE_MANAGEMENT=false
export FEATURE_FLAG_ENABLE_ALASKA=false
export FEATURE_FLAG_UNACCOMPANIED_BAGGAGE=false
export FEATURE_FLAG_ENABLE_ALASKA=false
danieljordan-caci marked this conversation as resolved.
Show resolved Hide resolved

# disable for speed, playwright tests can fail otherwise
export DB_DEBUG=false
Expand Down
24 changes: 12 additions & 12 deletions pkg/handlers/primeapiv3/payloads/payload_to_model_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -782,18 +782,18 @@ func (suite *PayloadsSuite) TestBoatShipmentModelFromCreate() {
BoatShipment: boatShipment,
}

returnedBoatHaulAway, _ := BoatShipmentModelFromCreate(&mtoShipment)

suite.IsType(&models.BoatShipment{}, returnedBoatHaulAway)

suite.Equal(expectedBoatTowAway.Make, returnedBoatHaulAway.Make)
suite.Equal(expectedBoatTowAway.Model, returnedBoatHaulAway.Model)
suite.Equal(expectedBoatTowAway.Year, returnedBoatHaulAway.Year)
suite.Equal(expectedBoatTowAway.LengthInInches, returnedBoatHaulAway.LengthInInches)
suite.Equal(expectedBoatTowAway.HeightInInches, returnedBoatHaulAway.HeightInInches)
suite.Equal(expectedBoatTowAway.WidthInInches, returnedBoatHaulAway.WidthInInches)
suite.Equal(expectedBoatTowAway.HasTrailer, returnedBoatHaulAway.HasTrailer)
suite.Equal(expectedBoatTowAway.IsRoadworthy, returnedBoatHaulAway.IsRoadworthy)
returnedBoatTowAway, _ := BoatShipmentModelFromCreate(&mtoShipment)

suite.IsType(&models.BoatShipment{}, returnedBoatTowAway)

suite.Equal(expectedBoatTowAway.Make, returnedBoatTowAway.Make)
suite.Equal(expectedBoatTowAway.Model, returnedBoatTowAway.Model)
suite.Equal(expectedBoatTowAway.Year, returnedBoatTowAway.Year)
suite.Equal(expectedBoatTowAway.LengthInInches, returnedBoatTowAway.LengthInInches)
suite.Equal(expectedBoatTowAway.HeightInInches, returnedBoatTowAway.HeightInInches)
suite.Equal(expectedBoatTowAway.WidthInInches, returnedBoatTowAway.WidthInInches)
suite.Equal(expectedBoatTowAway.HasTrailer, returnedBoatTowAway.HasTrailer)
suite.Equal(expectedBoatTowAway.IsRoadworthy, returnedBoatTowAway.IsRoadworthy)
})
}

Expand Down
1 change: 1 addition & 0 deletions src/components/Customer/Home/Step/Step.stories.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ Shipments.args = {
weightTickets: [],
},
},
{ id: '0004', shipmentType: SHIPMENT_OPTIONS.UNACCOMPANIED_BAGGAGE },
]}
onShipmentClick={action('shipment edit icon clicked')}
moveSubmitted={false}
Expand Down
13 changes: 7 additions & 6 deletions src/components/Customer/MtoShipmentForm/MtoShipmentForm.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,9 @@ class MtoShipmentForm extends Component {
const isNTSR = shipmentType === SHIPMENT_OPTIONS.NTSR;
const isBoat = shipmentType === SHIPMENT_TYPES.BOAT_HAUL_AWAY || shipmentType === SHIPMENT_TYPES.BOAT_TOW_AWAY;
const isMobileHome = shipmentType === SHIPMENT_TYPES.MOBILE_HOME;
const isUB = shipmentType === SHIPMENT_OPTIONS.UNACCOMPANIED_BAGGAGE;
const shipmentNumber =
shipmentType === SHIPMENT_OPTIONS.HHG || isBoat || isMobileHome ? this.getShipmentNumber() : null;
shipmentType === SHIPMENT_OPTIONS.HHG || isBoat || isMobileHome || isUB ? this.getShipmentNumber() : null;
const isRetireeSeparatee =
orders.orders_type === ORDERS_TYPE.RETIREMENT || orders.orders_type === ORDERS_TYPE.SEPARATION;

Expand Down Expand Up @@ -311,14 +312,14 @@ class MtoShipmentForm extends Component {

<div className={styles.MTOShipmentForm}>
<ShipmentTag shipmentType={shipmentType} shipmentNumber={shipmentNumber} />

<h1>{shipmentForm.header[`${shipmentType}`]}</h1>

<Alert headingLevel="h4" type="info" noIcon>
Remember: You can move {formatWeight(orders.authorizedWeight)} total. You’ll be billed for any
excess weight you move.
Remember: You can move
{isUB
? ` up to your UB allowance for this move`
: ` ${formatWeight(orders.authorizedWeight)} total`}
. You’ll be billed for any excess weight you move.
</Alert>

<Form className={formStyles.form}>
{showPickupFields && (
<SectionWrapper className={formStyles.formSection}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ export const HHGShipmentRetiree = () =>
renderStory({ shipmentType: SHIPMENT_OPTIONS.HHG, orders: { orders_type: 'RETIREMENT', authorizedWeight: 5000 } });
export const NTSReleaseShipment = () => renderStory({ shipmentType: SHIPMENT_OPTIONS.NTSR });
export const NTSShipment = () => renderStory({ shipmentType: SHIPMENT_OPTIONS.NTS });
export const UBShipment = () => renderStory({ shipmentType: SHIPMENT_OPTIONS.UNACCOMPANIED_BAGGAGE });

// edit shipment stories (form should prefill)
export const EditHHGShipment = () =>
Expand All @@ -115,6 +116,12 @@ export const EditNTSShipment = () =>
isCreatePage: false,
mtoShipment: mockMtoShipment,
});
export const EditUBShipment = () =>
renderStory({
shipmentType: SHIPMENT_OPTIONS.UNACCOMPANIED_BAGGAGE,
isCreatePage: false,
mtoShipment: mockMtoShipment,
});

export const EditShipmentAsSeparatee = () =>
renderStory({
Expand Down
Loading
Loading