Skip to content

Commit

Permalink
[Issue #3387] remove opportunity listing contact telephone number (#3386
Browse files Browse the repository at this point in the history
)
  • Loading branch information
doug-s-nava authored Jan 3, 2025
1 parent 8e5d182 commit 8929058
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 27 deletions.
13 changes: 0 additions & 13 deletions frontend/src/components/opportunity/OpportunityDescription.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,6 @@ const SummaryDescriptionDisplay = ({

const OpportunityDescription = ({ summary, nofoPath }: Props) => {
const t = useTranslations("OpportunityListing.description");
const agency_phone_number_stripped = summary?.agency_phone_number
? summary.agency_phone_number.replace(/-/g, "")
: "";

const additionalInformationOnEligibility =
summary.applicant_eligibility_description ?? "--";
Expand All @@ -121,14 +118,6 @@ const OpportunityDescription = ({ summary, nofoPath }: Props) => {
"--"
);

const telephoneLink = summary?.agency_phone_number ? (
<a href={`tel:${agency_phone_number_stripped}`}>
{summary.agency_phone_number}
</a>
) : (
"--"
);

return (
<>
<div className="usa-prose">
Expand Down Expand Up @@ -161,8 +150,6 @@ const OpportunityDescription = ({ summary, nofoPath }: Props) => {
<p>{summary.agency_email_address_description}</p>
)}
<p>{agencyEmailLink}</p>
<h4>{t("telephone")}</h4>
<p>{telephoneLink}</p>
</div>
</>
);
Expand Down
1 change: 0 additions & 1 deletion frontend/src/i18n/messages/en/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ export const messages = {
contact_info: "Grantor contact information",
description: "Description",
email: "Email",
telephone: "Phone",
show_summary: "Show full summary",
show_description: "Show full description",
hide_summary_description: "Hide full description",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ const mockSummaryData: Summary = {
agency_contact_description: "<p>Contact Description</p>",
agency_email_address: "[email protected]",
agency_email_address_description: "Contact Email Description",
agency_phone_number: "123-456-7890",
} as Summary;

describe("OpportunityDescription", () => {
Expand Down Expand Up @@ -140,19 +139,12 @@ describe("OpportunityDescription", () => {

expect(screen.getByText("[email protected]")).toBeInTheDocument();
expect(screen.getByText("Contact Email Description")).toBeInTheDocument();
expect(screen.getByText("123-456-7890")).toBeInTheDocument();

const mailtoLink = screen.getByRole("link", {
name: "[email protected]",
});
const agency_email = "[email protected]";
expect(mailtoLink).toHaveAttribute("href", `mailto:${agency_email}`);

const telLink = screen.getByRole("link", {
name: "123-456-7890",
});
const number = "1234567890";
expect(telLink).toHaveAttribute("href", `tel:${number}`);
});

it("renders information correctly when null values are present", () => {
Expand All @@ -165,7 +157,6 @@ describe("OpportunityDescription", () => {
agency_contact_description: null,
agency_email_address: null,
agency_email_address_description: null,
agency_phone_number: null,
summary_description: null,
}}
nofoPath=""
Expand All @@ -187,9 +178,5 @@ describe("OpportunityDescription", () => {
const emailHeading = screen.getByText("email");
expect(emailHeading).toBeInTheDocument();
expect(emailHeading.nextElementSibling).toHaveTextContent("--");

const telephoneHeading = screen.getByText("telephone");
expect(telephoneHeading).toBeInTheDocument();
expect(telephoneHeading.nextElementSibling).toHaveTextContent("--");
});
});

0 comments on commit 8929058

Please sign in to comment.