Skip to content

Commit

Permalink
ORV2-2578 - Restore edit button for permitReview component (#1634)
Browse files Browse the repository at this point in the history
Co-authored-by: praju-aot <[email protected]>
Co-authored-by: Praveen Raju <[email protected]>
Co-authored-by: GlenAOT <[email protected]>
Co-authored-by: zgong-gov <[email protected]>
  • Loading branch information
5 people authored Oct 10, 2024
1 parent 68d4471 commit 0d6a1c3
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ export const PermitReview = (props: PermitReviewProps) => {
rejectApplicationMutationPending={
props.rejectApplicationMutationPending
}
reviewContext={props.reviewContext}
/>
</Box>
</Box>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
/* eslint-disable @typescript-eslint/no-unused-vars */
import { Box, Button } from "@mui/material";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { faPencil } from "@fortawesome/free-solid-svg-icons";
import "./ReviewActions.scss";
import {
PERMIT_REVIEW_CONTEXTS,
PermitReviewContext,
} from "../../../../types/PermitReviewContext";

export const ReviewActions = ({
onEdit,
Expand All @@ -14,6 +17,7 @@ export const ReviewActions = ({
approveApplicationMutationPending,
onReject,
rejectApplicationMutationPending,
reviewContext,
}: {
onEdit: () => void;
continueBtnText?: string;
Expand All @@ -24,24 +28,29 @@ export const ReviewActions = ({
approveApplicationMutationPending?: boolean;
onReject?: () => Promise<void>;
rejectApplicationMutationPending?: boolean;
reviewContext: PermitReviewContext;
}) => {
return (
<Box className="review-actions">
{/* TODO restore Edit button once edit application step is complete
<Button
className="review-actions__btn review-actions__btn--edit"
key="edit-application-button"
aria-label="Edit"
variant="contained"
color="tertiary"
onClick={onEdit}
>
<FontAwesomeIcon
className="button-icon button-icon--edit"
icon={faPencil}
/>
Edit
</Button> */}
{
// hide edit button until edit application in queue feature is complete
reviewContext !== PERMIT_REVIEW_CONTEXTS.QUEUE && (
<Button
className="review-actions__btn review-actions__btn--edit"
key="edit-application-button"
aria-label="Edit"
variant="contained"
color="tertiary"
onClick={onEdit}
>
<FontAwesomeIcon
className="button-icon button-icon--edit"
icon={faPencil}
/>
Edit
</Button>
)
}

{hasToCartButton ? (
<Button
Expand Down

0 comments on commit 0d6a1c3

Please sign in to comment.