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-22132 fix amend orders link #14441

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft
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 src/components/Customer/Home/Helper/Helper.stories.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export const SubmittedMove = () => <HelperSubmittedMove />;
export const AmendedOrders = () => <HelperAmendedOrders />;
export const ApprovedMove = () => (
<MemoryRouter>
<HelperApprovedMove />
<HelperApprovedMove orderId="12345-12345-12345-12345-12345" />
</MemoryRouter>
);
export const PPMCloseoutSubmitted = () => <HelperPPMCloseoutSubmitted />;
66 changes: 36 additions & 30 deletions src/pages/MyMove/Home/HomeHelpers.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { Link } from 'react-router-dom';
import { generatePath, Link } from 'react-router-dom';
import { Link as ExternalLink } from '@trussworks/react-uswds';

import styles from './Home.module.scss';
Expand Down Expand Up @@ -96,35 +96,41 @@ export const HelperSubmittedMove = () => (
</Helper>
);

export const HelperApprovedMove = () => (
<Helper title="Your move is in progress." className={styles['helper-approved-section']}>
<div>
<p>Talk to your counselor or to your movers to make any changes to your move.</p>
</div>
<div>
<p>
<strong>For PPM shipments</strong>
</p>
<p className={styles['top-gap']}>
When you are done moving your things, select <strong>Upload PPM Documents</strong> to document your PPM,
calculate your final incentive, and create a payment request packet. You will upload weight tickets, receipts,
and other documentation that a counselor will review.
</p>
</div>
<div>
<p>
<strong>If you receive new orders while your move is underway</strong>
</p>
<ul className={styles['top-gap']}>
<li>Talk to your counselor</li>
<li>Talk to your movers</li>
<li>
<Link to={customerRoutes.ORDERS_AMEND_PATH}>Upload a copy of your new orders</Link>
</li>
</ul>
</div>
</Helper>
);
export const HelperApprovedMove = ({ orderId }) => {
const path = generatePath(customerRoutes.ORDERS_AMEND_PATH, {
orderId,
});

return (
<Helper title="Your move is in progress." className={styles['helper-approved-section']}>
<div>
<p>Talk to your counselor or to your movers to make any changes to your move.</p>
</div>
<div>
<p>
<strong>For PPM shipments</strong>
</p>
<p className={styles['top-gap']}>
When you are done moving your things, select <strong>Upload PPM Documents</strong> to document your PPM,
calculate your final incentive, and create a payment request packet. You will upload weight tickets, receipts,
and other documentation that a counselor will review.
</p>
</div>
<div>
<p>
<strong>If you receive new orders while your move is underway</strong>
</p>
<ul className={styles['top-gap']}>
<li>Talk to your counselor</li>
<li>Talk to your movers</li>
<li>
<Link to={path}>Upload a copy of your new orders</Link>
</li>
</ul>
</div>
</Helper>
);
};

export const HelperAmendedOrders = () => (
<Helper title="Next step: Contact your movers (if you have them)" className={styles['helper-paragraph-only']}>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/MyMove/Home/MoveHome.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ const MoveHome = ({ serviceMemberMoves, isProfileComplete, serviceMember, signed
if (!hasSubmittedMove()) return <HelperNeedsSubmitMove />;
if (hasSubmittedPPMCloseout()) return <HelperPPMCloseoutSubmitted />;
if (hasUnapprovedAmendedOrders()) return <HelperAmendedOrders />;
if (isMoveApproved()) return <HelperApprovedMove />;
if (isMoveApproved()) return <HelperApprovedMove orderId={orders.id} />;
return <HelperSubmittedMove />;
};

Expand Down
4 changes: 3 additions & 1 deletion src/pages/MyMove/Home/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -241,12 +241,14 @@ export class Home extends Component {
};

renderHelper = () => {
const { orders } = this.props;
if (!this.hasOrders) return <HelperNeedsOrders />;
if (!this.hasAnyShipments) return <HelperNeedsShipment />;
if (!this.hasSubmittedMove) return <HelperNeedsSubmitMove />;
if (this.hasSubmittedPPMCloseout) return <HelperPPMCloseoutSubmitted />;
if (this.hasUnapprovedAmendedOrders) return <HelperAmendedOrders />;
if (this.isMoveApproved) return <HelperApprovedMove />;
if (this.isMoveApproved) return <HelperApprovedMove orderId={orders.id} />;

return <HelperSubmittedMove />;
};

Expand Down
Loading