From 0d6a1c3ca2ae808129061101a719a7b2763705f7 Mon Sep 17 00:00:00 2001 From: glen-aot <160973940+glen-aot@users.noreply.github.com> Date: Thu, 10 Oct 2024 14:28:37 -0700 Subject: [PATCH] ORV2-2578 - Restore edit button for permitReview component (#1634) Co-authored-by: praju-aot Co-authored-by: Praveen Raju <80779423+praju-aot@users.noreply.github.com> Co-authored-by: GlenAOT <160973940+GlenAOT@users.noreply.github.com> Co-authored-by: zgong-gov --- .../components/review/PermitReview.tsx | 1 + .../components/review/ReviewActions.tsx | 41 +++++++++++-------- 2 files changed, 26 insertions(+), 16 deletions(-) diff --git a/frontend/src/features/permits/pages/Application/components/review/PermitReview.tsx b/frontend/src/features/permits/pages/Application/components/review/PermitReview.tsx index 774fcca6e..c4c9fbfc8 100644 --- a/frontend/src/features/permits/pages/Application/components/review/PermitReview.tsx +++ b/frontend/src/features/permits/pages/Application/components/review/PermitReview.tsx @@ -127,6 +127,7 @@ export const PermitReview = (props: PermitReviewProps) => { rejectApplicationMutationPending={ props.rejectApplicationMutationPending } + reviewContext={props.reviewContext} /> diff --git a/frontend/src/features/permits/pages/Application/components/review/ReviewActions.tsx b/frontend/src/features/permits/pages/Application/components/review/ReviewActions.tsx index 3f705003f..203e2f137 100644 --- a/frontend/src/features/permits/pages/Application/components/review/ReviewActions.tsx +++ b/frontend/src/features/permits/pages/Application/components/review/ReviewActions.tsx @@ -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, @@ -14,6 +17,7 @@ export const ReviewActions = ({ approveApplicationMutationPending, onReject, rejectApplicationMutationPending, + reviewContext, }: { onEdit: () => void; continueBtnText?: string; @@ -24,24 +28,29 @@ export const ReviewActions = ({ approveApplicationMutationPending?: boolean; onReject?: () => Promise; rejectApplicationMutationPending?: boolean; + reviewContext: PermitReviewContext; }) => { return ( - {/* TODO restore Edit button once edit application step is complete - */} + { + // hide edit button until edit application in queue feature is complete + reviewContext !== PERMIT_REVIEW_CONTEXTS.QUEUE && ( + + ) + } {hasToCartButton ? (