Skip to content

Commit

Permalink
update from PR review
Browse files Browse the repository at this point in the history
  • Loading branch information
britt-mo committed Nov 19, 2024
1 parent cb0b921 commit b890f0e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
11 changes: 6 additions & 5 deletions services/ui-src/src/components/reports/ReportPageFooter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { CustomHtmlElement, FormJson, ReportStatus } from "types";
// assets
import nextIcon from "assets/icons/icon_next_white.png";
import previousIcon from "assets/icons/icon_previous_blue.png";
import { ROUTES } from "../../constants";

export const ReportPageFooter = ({
submitting,
Expand All @@ -23,7 +24,7 @@ export const ReportPageFooter = ({

const { userIsAdmin, userIsReadOnly, userIsEndUser } = useStore().user ?? {};
const isAdminUserType = userIsAdmin || userIsReadOnly;
const hidePrevious = previousRoute === "/mcpar" || previousRoute === "/mlr";
const hidePrevious = ROUTES.includes(previousRoute);
const reportWithSubmittedStatus = report?.status === ReportStatus.SUBMITTED;
const formIsDisabled =
(isAdminUserType && !form?.editableByAdmins) ||
Expand All @@ -34,7 +35,7 @@ export const ReportPageFooter = ({
<Button
onClick={() => navigate(previousRoute)}
variant="outline"
leftIcon={<Image src={previousIcon} alt="" sx={sx.arrowIcon} />}
leftIcon={<Image src={previousIcon} alt="Previous" sx={sx.arrowIcon} />}
>
Previous
</Button>
Expand All @@ -44,7 +45,7 @@ export const ReportPageFooter = ({
<Button
onClick={() => navigate(nextRoute)}
sx={sx.nextButton}
rightIcon={<Image src={nextIcon} alt="" sx={sx.arrowIcon} />}
rightIcon={<Image src={nextIcon} alt="Next" sx={sx.arrowIcon} />}
>
Continue
</Button>
Expand All @@ -57,7 +58,7 @@ export const ReportPageFooter = ({
sx={sx.nextButton}
rightIcon={
!submitting ? (
<Image src={nextIcon} alt="" sx={sx.arrowIcon} />
<Image src={nextIcon} alt="Next" sx={sx.arrowIcon} />
) : undefined
}
>
Expand Down Expand Up @@ -102,6 +103,6 @@ const sx = {
},
praStatement: {
fontSize: "0.875rem",
marginTop: "1rem",
marginTop: "2rem",
},
};
3 changes: 3 additions & 0 deletions services/ui-src/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,6 @@ export enum States {
// TIMEOUT PARAMS
export const IDLE_WINDOW = 30 * 60 * 1000; // ms
export const PROMPT_AT = 29 * 60 * 1000; //ms

// routes
export const ROUTES = ["/mcpar", "/mlr", "/naaar"];

0 comments on commit b890f0e

Please sign in to comment.