Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1331/hide eligibility header if no sections present #1457

Merged
merged 2 commits into from
Jul 7, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ All notable changes to this project will be documented in this file. The format
- Fix units availability ([#1397](https://github.com/bloom-housing/bloom/issues/1397))

- Added:

- Added "closed" to ListingStatus enum
- Added Transform to ListingStatus field to return closed if applicationDueDate is in the past
- Added "ohaFormat" to CSV exporter (includes OHA and HOPWA preferences) ([#1292](https://github.com/bloom-housing/bloom/pull/1292)) (Michał Plebański)
Expand Down Expand Up @@ -79,6 +80,7 @@ All notable changes to this project will be documented in this file. The format
- Fix broken application search in Partners ([#1301](https://github.com/bloom-housing/bloom/pull/1301)) (Dominik Barcikowski)
- Fix multiple unit rows in summaries, sorting issues ([#1306](https://github.com/bloom-housing/bloom/pull/1306)) (Emily Jablonski)
- Fix partners application submission ([#1340](https://github.com/bloom-housing/bloom/pull/1340)) (Dominik Barcikowski)
- Hide Additional Eligibility header if no sections present ([#1457](https://github.com/bloom-housing/bloom/pull/1457)) (Emily Jablonski)

- Changed:

Expand Down
63 changes: 34 additions & 29 deletions sites/public/src/ListingView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -251,35 +251,40 @@ export const ListingView = (props: ListingProps) => {

{preferencesSection}

<ListSection
title={t("listings.sections.additionalEligibilityTitle")}
subtitle={t("listings.sections.additionalEligibilitySubtitle")}
>
<>
{listing.creditHistory && (
<InfoCard title={t("listings.creditHistory")}>
<ExpandableText className="text-sm text-gray-700">
{listing.creditHistory}
</ExpandableText>
</InfoCard>
)}
{listing.rentalHistory && (
<InfoCard title={t("listings.rentalHistory")}>
<ExpandableText className="text-sm text-gray-700">
{listing.rentalHistory}
</ExpandableText>
</InfoCard>
)}
{listing.criminalBackground && (
<InfoCard title={t("listings.criminalBackground")}>
<ExpandableText className="text-sm text-gray-700">
{listing.criminalBackground}
</ExpandableText>
</InfoCard>
)}
{buildingSelectionCriteria}
</>
</ListSection>
{(listing.creditHistory ||
listing.rentalHistory ||
listing.criminalBackground ||
buildingSelectionCriteria) && (
<ListSection
title={t("listings.sections.additionalEligibilityTitle")}
subtitle={t("listings.sections.additionalEligibilitySubtitle")}
>
<>
{listing.creditHistory && (
<InfoCard title={t("listings.creditHistory")}>
<ExpandableText className="text-sm text-gray-700">
{listing.creditHistory}
</ExpandableText>
</InfoCard>
)}
{listing.rentalHistory && (
<InfoCard title={t("listings.rentalHistory")}>
<ExpandableText className="text-sm text-gray-700">
{listing.rentalHistory}
</ExpandableText>
</InfoCard>
)}
{listing.criminalBackground && (
<InfoCard title={t("listings.criminalBackground")}>
<ExpandableText className="text-sm text-gray-700">
{listing.criminalBackground}
</ExpandableText>
</InfoCard>
)}
{buildingSelectionCriteria}
</>
</ListSection>
)}
</ul>
</ListingDetailItem>

Expand Down