Skip to content

Commit

Permalink
Merge pull request #331 from USEPA/develop
Browse files Browse the repository at this point in the history
Sync staging with develop
  • Loading branch information
courtneymyers authored Jun 21, 2023
2 parents 7b2224d + d4a2671 commit 280b921
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 13 deletions.
24 changes: 13 additions & 11 deletions app/client/src/components/tooltip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,23 @@ export function TextWithTooltip(props: {
const { text, tooltip, iconName, iconClassNames } = props;

const svgClassNames = iconClassNames
? `usa-icon margin-right-05 text-base ${iconClassNames}`
: `usa-icon margin-right-05 text-base`;
? `usa-icon text-base ${iconClassNames}`
: `usa-icon text-base`;

return (
<span className="display-inline-flex flex-align-center text-no-wrap">
<Root delayDuration={0}>
<Trigger asChild>
<svg
className={svgClassNames}
aria-hidden="true"
focusable="false"
role="img"
>
<use href={`${icons}#${iconName ? iconName : "info"}`} />
</svg>
<button className="tw-m-0 tw-flex tw-rounded-full tw-border-0 tw-bg-transparent tw-p-0">
<svg
className={svgClassNames}
aria-hidden="true"
focusable="false"
role="img"
>
<use href={`${icons}#${iconName ? iconName : "info"}`} />
</svg>
</button>
</Trigger>

<Portal>
Expand All @@ -43,7 +45,7 @@ export function TextWithTooltip(props: {
</Portal>
</Root>

{text}
<span className="margin-left-05">{text}</span>
</span>
);
}
17 changes: 15 additions & 2 deletions app/client/src/components/userDashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ export function UserDashboard(props: { email: string }) {
const onHelpdeskPage = pathname === "/helpdesk";
const onApplicationFormPage = pathname.startsWith("/rebate");
const onPaymentRequestFormPage = pathname.startsWith("/payment-request");
const onCloseOutFormPage = pathname.startsWith("/close-out");

const applicationFormOpen = csbData
? csbData.submissionPeriodOpen.application
Expand Down Expand Up @@ -123,6 +124,7 @@ export function UserDashboard(props: { email: string }) {
</nav>

<nav>
{/* --- Your Rebate Forms --- */}
{onAllRebatesPage ? (
<button
className="margin-bottom-1 usa-button font-sans-2xs"
Expand All @@ -139,7 +141,11 @@ export function UserDashboard(props: { email: string }) {
to="/"
className="margin-bottom-1 usa-button font-sans-2xs"
onClick={(ev) => {
if (onApplicationFormPage || onPaymentRequestFormPage) {
if (
onApplicationFormPage ||
onPaymentRequestFormPage ||
onCloseOutFormPage
) {
ev.preventDefault();
displayDialog({
dismissable: true,
Expand All @@ -166,8 +172,10 @@ export function UserDashboard(props: { email: string }) {
</Link>
)}

{/* --- New Application --- */}
{onApplicationFormPage ||
onPaymentRequestFormPage ||
onCloseOutFormPage ||
!applicationFormOpen ? (
<button
className="margin-bottom-1 usa-button font-sans-2xs"
Expand All @@ -192,6 +200,7 @@ export function UserDashboard(props: { email: string }) {
</Link>
)}

{/* --- Helpdesk --- */}
{helpdeskAccess === "success" && (
<>
{onHelpdeskPage ? (
Expand All @@ -206,7 +215,11 @@ export function UserDashboard(props: { email: string }) {
to="/helpdesk"
className="margin-bottom-1 usa-button font-sans-2xs"
onClick={(ev) => {
if (onApplicationFormPage || onPaymentRequestFormPage) {
if (
onApplicationFormPage ||
onPaymentRequestFormPage ||
onCloseOutFormPage
) {
ev.preventDefault();
displayDialog({
dismissable: true,
Expand Down

0 comments on commit 280b921

Please sign in to comment.