Skip to content

Commit

Permalink
Merge pull request #2135 from SFDigitalServices/release-04-10-2024
Browse files Browse the repository at this point in the history
Release 04 10 2024
  • Loading branch information
tallulahkay authored Apr 11, 2024
2 parents d489fe3 + f87881a commit 0ac2db2
Show file tree
Hide file tree
Showing 24 changed files with 2,269 additions and 93 deletions.
2 changes: 0 additions & 2 deletions .env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ S3_ACCESS_KEY_ID=''
ADVERTISE_DALP=false
DALP_PROGRAM_INFO='The 2021 Downpayment Assistance Loan Program (DALP) will begin accepting applications on February 26, 2021.'
COVID_UPDATE=false
SRO_PLURAL_LISTINGS={ 'a0W0P00000F7t4uUAB': 'Merry Go Round Shared Housing', 'a0W0P00000FIuv3UAD': '1335 Folsom Street', 'a0W4U00000HlubxUAB': '1335 Folsom Street', 'a0W4U00000KGFDWUA5': '1335 Folsom Street', 'a0W4U00000KKtXyUAL': '750 Harrison', 'a0W4U00000IXVL8UAP': '750 Harrison' }

SALESFORCE_USERNAME=''
SALESFORCE_PASSWORD=''
SALESFORCE_SECURITY_TOKEN=''
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
.app-card_nav
ol.progress-nav
li.progress-nav_item ng-repeat="section in sections track by $index" ng-class="{active: isActiveSection(section), disabled: sectionDisabled(section, $index)}" ng-disabled="sectionDisabled(section, $index)"
a ng-href="{{ngHref(section)}}"
a ng-href="{{ngHref(section)}}" tabindex="{{sectionDisabled(section, $index) ? '-1' : '0' }}"
| {{section.translatedLabel | translate}}
1 change: 1 addition & 0 deletions app/assets/json/translations/react/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -881,6 +881,7 @@
"listings.customListingType.educator.preferences.part1": "If you qualify for a preference, you have a better chance in the lottery. After the lottery, all applicants are ranked and ordered by preference category. If you do not qualify for a preference, you will be ranked below those who do. ",
"listings.customListingType.educator.preferences.part2": "<b>Priority for certain groups - San Francisco Unified School District employees</b> ",
"listings.customListingType.educator.preferences.part3": "Only San Francisco Unified School District (SFUSD) employees will be included in the lottery for this listing. ",
"listings.customListingType.educator.preferences.part3.scv2": "San Francisco Unified School District employees rank highest in the lottery for this listing.",
"listings.customListingType.educator.preferences.part4a": "<a target='_blank' href='%{chisholmLotteryLink}'>Check if you qualify and see how preferences are ranked for this listing</a>",
"listings.customListingType.educator.preferences.part4b": "<a target='_blank' href='%{preferencesLink}'>Learn more about housing lottery preference programs</a>",
"listings.customListingType.educator.priorityUnits": "San Francisco Unified School District employees",
Expand Down
316 changes: 316 additions & 0 deletions app/javascript/__tests__/data/RailsRentalListing/listing-rental-sro.ts
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,322 @@ export const sroRentalListing: RailsRentalListing = {
],
}

export const pluralSroRentalListing: RailsRentalListing = {
unitSummaries: {
reserved: null,
general: [
{
unitType: "SRO",
totalUnits: 1,
minSquareFt: null,
minRentalMinIncome: 5255,
minPriceWithParking: null,
minPriceWithoutParking: null,
minPercentIncome: null,
minOccupancy: 1,
minMonthlyRent: 2102,
minHoaDuesWithParking: null,
minHoaDuesWithoutParking: null,
maxSquareFt: null,
maxRentalMinIncome: 5255,
maxPriceWithParking: null,
maxPriceWithoutParking: null,
maxPercentIncome: null,
maxOccupancy: 2,
maxMonthlyRent: 2102,
maxHoaDuesWithParking: null,
maxHoaDuesWithoutParking: null,
listingID: "a0W4U00000HnVLJUA3",
availability: 1,
absoluteMinIncome: 5255,
absoluteMaxIncome: 8079,
},
],
},
reservedDescriptor: null,
prioritiesDescriptor: null,
listingID: "a0W4U00000HnVLJUA3",
chartTypes: [
{
year: "2016",
percent: 100,
numOfHousehold: null,
chartType: "HUD Unadjusted",
amount: null,
},
],
attributes: {
type: "Listing",
url: "/services/data/v35.0/sobjects/Listing/a0W4U00000HnVLJUA3",
},
Name: "TEST Automated Listing (do not modify)",
Allows_Realtor_Commission: false,
Tenure: "Re-rental",
First_Come_First_Served: false,
Building: {
attributes: {
type: "Building",
url: "/services/data/v35.0/sobjects/Building/a0a0P00000GbJmbQAF",
},
Id: "a0a0P00000GbJmbQAF",
Number_of_Parking_Spaces: 0,
},
In_Lottery: 3125,
Program_Type: "IH-RENTAL",
Units_Available: 1,
SASE_Required_for_Lottery_Ticket: true,
nGeneral_Application_Total: 2041,
Lottery_Status: "Not Yet Run",
Building_Name: "Automated Test Building",
Project_ID: "Test 001",
Building_City: "San Francisco",
Building_State: "CA",
Developer: "King LLC",
Neighborhood: "Hayes Valley",
Year_Built: 2009,
LastModifiedDate: "2022-04-01T00:20:30.000+0000",
Marketing_URL: "TEST-Automated--Feb18",
Application_Due_Date: "2000-01-01T01:00:00.000+0000",
Building_URL:
"https://sfmohcd.org/sites/default/files/Documents/MOH/Housing%20Listing%20Photos/test-apologies.png",
Legal_Disclaimers:
'<span style="font-size: 10pt;"><span style="font-family: arial,sans-serif;">All BMR renters must review and acknowledge the </span></span><a href="http://sf-moh.org/index.aspx?page=295" target="_blank"><span style="font-size: 10pt;"><span style="font-family: arial,sans-serif;"><span style="color: rgb(0, 0, 255);">Inclusionary Affordable Housing Program Monitoring and Procedures Manual 2013</span></span></span></a><span style="font-size: 10pt;"><span style="font-family: arial,sans-serif;"> that governs this property upon the signing of a lease for a BMR unit. </span></span><br> <br><span style="font-size: 10pt;"><span style="font-family: arial,sans-serif;">Applicants should be informed that BMR rental units in some buildings may convert to ownership units in the future.  In the case of conversion, BMR renters will be afforded certain rights as explained in the </span></span><a href="http://sf-moh.org/index.aspx?page=295" target="_blank"><span style="font-size: 10pt;"><span style="font-family: arial,sans-serif;"><span style="color: rgb(0, 0, 255);">Inclusionary Affordable Housing Program Monitoring and Procedures Manual 2013</span></span></span></a><span style="font-size: 10pt;"><span style="font-family: arial,sans-serif;">. Applicants should inquire with the building contact person listed above to determine if the building has a minimum number of years that it must remain a rental building.  (Some buildings may have such restrictions based on government sources of financing for their building.) Most buildings may have no restrictions on conversion at all. </span></span><br> <br><span style="font-size: 10pt;"><span style="font-family: arial,sans-serif;">It is also important to note that units governed by the Inclusionary Housing Program are NOT governed by the San Francisco Rent Ordinance (also known as “rent control”). Among other rules, rents may increase beyond increases allowed under “rent control.”  Please see the </span></span><span style="font-size: 12pt;"><span style="font-family: times new roman,serif;"><a href="http://sf-moh.org/index.aspx?page=295" target="_blank"><span style="font-size: 10pt;"><span style="font-family: arial,sans-serif;"><span style="color: rgb(0, 0, 255);">Inclusionary Affordable Housing Program Monitoring and Procedures Manual 2013</span></span></span></a></span></span><span style="font-size: 10pt;"><span style="font-family: arial,sans-serif;"> for more information. </span></span>',
Application_Organization: "280 Fell-BMR",
Application_Street_Address: "P.O. Box 420847",
Application_City: "San Francisco",
Application_State: "CA",
Application_Postal_Code: "94142",
Application_Phone: "(415) 227-2256",
Lottery_Results_Date: "2023-03-23",
Lottery_Venue:
'<p><span style="font-size: 10pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent;">The lottery will not be in person, but instead will be a virtual lottery.</span></p><p><span style="font-size: 12pt; color: rgb(0, 0, 0); background-color: transparent;"> </span></p><p><span style="font-size: 10pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent;">Come back to this page on the day of the lottery for a link you can click on to watch the lottery live.</span></p><p><br></p><p><br></p>',
Lottery_Date: "2023-03-22T18:00:00.000+0000",
Publish_Lottery_Results: false,
Publish_Lottery_Results_on_DAHLIA: "Not published",
Accepting_Online_Applications: true,
Lottery_Winners: 0,
Credit_Rating:
"Provide a credit report with score from Equifax, Experian, or TransUnion dated within thirty (30) days of the application. \r\n\r\nAccounts that are not current or that are derogatory will negatively affect the overall scoring, which could result in the denial of the application or an additional deposit may be required. \r\n\r\nCollection accounts exceeding a combined amount of $1,000.00 (excluding student loans and medical debt) will negatively affect the overall scoring, which could result in the denial of the application or an additional deposit may be required. \r\n\r\nBankruptcy if not cleared will be an automatic denial of the rental application. \r\n\r\nNo Guarantors permitted.\r\n\r\nMitigating circumstances may be considered.",
Eviction_History:
"Provide minimum of 4 years rental history with at least two prior rentals in which you were responsible for paying the rent. Applicants without rental history will still be considered. No Guarantors permitted. \r\n\r\nPrevious rental history will be reviewed and must exhibit no derogatory references. \r\n\r\nLandlord references will only check for evictions, payment history, and documented lease violations. No-fault evictions (Ellis Act, Owner Move-in evictions) will not be held against a household. \r\n\r\nAll debt owed to an apartment community must be satisfied. \r\n\r\nMitigating circumstances may be considered.",
Accepting_applications_at_leasing_agent: false,
Accepting_applications_by_PO_Box: true,
Blank_paper_application_can_be_picked_up: false,
Deposit_Min: 2102,
Deposit_Max: 2355,
Costs_Not_Included:
"Tenants pay for gas, electricity.\r\n\r\nFor pet fees: Cat is allowed with a $500 refundable deposit, $250 non-refundable cleaning fee and a pet addendum. \r\n\r\nDogs are not allowed in the building. \r\n\r\nOne parking space per unit available for $175 a month.",
Amenities: "Laundry room, underground parking, courtyard, bike room",
Accessibility: "Elevator to all floors",
Building_Selection_Criteria: "https://us.awp.autotask.net/1/filelink/113bd-37ed41a1-53a7f01459-2",
Required_Documents:
"Lottery winners will be required to fill out a building application and provide a copy of your current credit report, 3 most recent paystubs, current tax returns and W-2, and 3 most recent bank statements.",
Smoking_Policy: "Non-smoking building",
Pet_Policy: "Dogs are not allowed in the building.",
Reserved_community_maximum_age: 0,
Reserved_community_minimum_age: 0,
hasWaitlist: true,
Number_of_people_currently_on_waitlist: 10,
Maximum_waitlist_size: 888,
Total_waitlist_openings: 878,
Total_number_of_building_units: 1,
RecordTypeId: "0120P000000kPUSQA2",
Id: "a0W4U00000HnVLJUA3",
Information_Sessions: [
{
attributes: {
type: "Information_Session",
url: "/services/data/v35.0/sobjects/Information_Session/a0V4U00000CcMRvUAN",
},
Listing: "a0W0P00000F8YG4UAN",
Id: "a0V4U00000CcMRvUAN",
Date: "2021-07-29",
Start_Time: "5:00pm",
Venue: "<p>test info session</p>",
},
],
Listing_Lottery_Preferences: [
{
attributes: {
type: "Listing_Lottery_Preference",
url: "/services/data/v35.0/sobjects/Listing_Lottery_Preference/a0l0P00001Lx8XKQAZ",
},
Listing: "a0W0P00000F8YG4UAN",
Id: "a0l0P00001Lx8XKQAZ",
Total_Submitted_Apps: 374,
Order: 1,
Available_Units: 1,
Current_Units_Available: 1,
Lottery_Preference: {
attributes: {
type: "Lottery_Preference",
url: "/services/data/v35.0/sobjects/Lottery_Preference/a0m0P00000wwi3IQAQ",
},
Id: "a0m0P00000wwi3IQAQ",
Name: "Certificate of Preference (COP)",
},
},
{
attributes: {
type: "Listing_Lottery_Preference",
url: "/services/data/v35.0/sobjects/Listing_Lottery_Preference/a0l0P00001Lx8XPQAZ",
},
Listing: "a0W0P00000F8YG4UAN",
Id: "a0l0P00001Lx8XPQAZ",
Total_Submitted_Apps: 374,
Order: 3,
Available_Units: 3,
Current_Units_Available: 3,
Lottery_Preference: {
attributes: {
type: "Lottery_Preference",
url: "/services/data/v35.0/sobjects/Lottery_Preference/a0m0P00000www1mQAA",
},
Id: "a0m0P00000www1mQAA",
Name: "Displaced Tenant Housing Preference (DTHP)",
},
},
{
attributes: {
type: "Listing_Lottery_Preference",
url: "/services/data/v35.0/sobjects/Listing_Lottery_Preference/a0l0P00001Lx8XUQAZ",
},
Listing: "a0W0P00000F8YG4UAN",
Id: "a0l0P00001Lx8XUQAZ",
Total_Submitted_Apps: 369,
Order: 4,
Available_Units: 4,
Current_Units_Available: 4,
Lottery_Preference: {
attributes: {
type: "Lottery_Preference",
url: "/services/data/v35.0/sobjects/Lottery_Preference/a0m0P00000www1rQAA",
},
Id: "a0m0P00000www1rQAA",
Name: "Neighborhood Resident Housing Preference (NRHP)",
},
},
{
attributes: {
type: "Listing_Lottery_Preference",
url: "/services/data/v35.0/sobjects/Listing_Lottery_Preference/a0l0P00001Lx8XZQAZ",
},
Listing: "a0W0P00000F8YG4UAN",
Id: "a0l0P00001Lx8XZQAZ",
Total_Submitted_Apps: 892,
Order: 2,
Available_Units: 2,
Current_Units_Available: 2,
Lottery_Preference: {
attributes: {
type: "Lottery_Preference",
url: "/services/data/v35.0/sobjects/Lottery_Preference/a0m0P00000xTqDtQAK",
},
Id: "a0m0P00000xTqDtQAK",
Name: "Rent Burdened / Assisted Housing Preference",
},
},
{
attributes: {
type: "Listing_Lottery_Preference",
url: "/services/data/v35.0/sobjects/Listing_Lottery_Preference/a0l0P00001Lx8XeQAJ",
},
Listing: "a0W0P00000F8YG4UAN",
Id: "a0l0P00001Lx8XeQAJ",
Total_Submitted_Apps: 549,
Order: 5,
Available_Units: 5,
Current_Units_Available: 5,
Lottery_Preference: {
attributes: {
type: "Lottery_Preference",
url: "/services/data/v35.0/sobjects/Lottery_Preference/a0m0P00000wwi3NQAQ",
},
Id: "a0m0P00000wwi3NQAQ",
Name: "Live or Work in San Francisco Preference",
},
},
{
attributes: {
type: "Listing_Lottery_Preference",
url: "/services/data/v35.0/sobjects/Listing_Lottery_Preference/a0l0P00001PsqDoQAJ",
},
Listing: "a0W0P00000F8YG4UAN",
Id: "a0l0P00001PsqDoQAJ",
Total_Submitted_Apps: 356,
Order: 6,
Current_Units_Available: 0,
Lottery_Preference: {
attributes: {
type: "Lottery_Preference",
url: "/services/data/v35.0/sobjects/Lottery_Preference/a0m0P00000yuzO0QAI",
},
Id: "a0m0P00000yuzO0QAI",
Name: "Alice Griffith Housing Development Resident",
},
},
],
Open_Houses: [
{
attributes: {
type: "Open_Houses",
url: "/services/data/v35.0/sobjects/Open_Houses/a0Y0P00000EyLvJUAV",
},
Listing: "a0W0P00000F8YG4UAN",
Id: "a0Y0P00000EyLvJUAV",
Date: "2018-02-23",
Start_Time: "9:00AM",
End_Time: "12:00PM",
Street_Address: "123 Van ness",
City: "San Francisco",
Venue: "Library",
},
],
Units: [
{
attributes: {
type: "Unit",
url: "/services/data/v35.0/sobjects/Unit/a0b0P00001Fb3yNQAR",
},
Listing: "a0W0P00000F8YG4UAN",
Id: "a0b0P00001Fb3yNQAR",
Unit_Type: "1 BR",
BMR_Rent_Monthly: 2102,
BMR_Rental_Minimum_Monthly_Income_Needed: 5255,
Status: "Available",
isReservedCommunity: false,
AMI_chart_type: "HUD Unadjusted",
AMI_chart_year: 2016,
Max_AMI_for_Qualifying_Unit: 100,
},
],
RecordType: {
attributes: {
type: "RecordType",
url: "/services/data/v35.0/sobjects/RecordType/0120P000000kPUSQA2",
},
Id: "0120P000000kPUSQA2",
Name: "Rental",
},
Listing_Images: [
{
displayImageURL:
"https://sfmohcd.org/sites/default/files/Documents/MOH/Housing%20Listing%20Photos/test-apologies.png",
Image_Description: "This is a listing image",
},
{
displayImageURL:
"https://sfmohcd.org/sites/default/files/Documents/MOH/Housing%20Listing%20Photos/test-apologies.png",
Image_Description: "This is a second listing image",
},
{
displayImageURL:
"https://sfmohcd.org/sites/default/files/Documents/MOH/Housing%20Listing%20Photos/test-apologies.png",
Image_Description: "This is a third listing image",
},
],
}

export const sroMixedRentalListing: RailsRentalListing = {
...sroRentalListing,
unitSummaries: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import React from "react"
import { render } from "@testing-library/react"
import { ListingDetailsSROInfo } from "../../../modules/listingDetails/ListingDetailsSROInfo"
import { sroRentalListing } from "../../data/RailsRentalListing/listing-rental-sro"
import {
sroRentalListing,
pluralSroRentalListing,
} from "../../data/RailsRentalListing/listing-rental-sro"

describe("ListingDetailsLotteryInfo", () => {
const OLD_ENV = process.env
Expand Down Expand Up @@ -36,8 +39,7 @@ describe("ListingDetailsLotteryInfo", () => {
})

it("displays the Merry Go Round Housing description for its listing", () => {
process.env.SRO_PLURAL_LISTINGS = JSON.parse(process.env.SRO_PLURAL_LISTINGS)
const listing = { ...sroRentalListing, Id: "a0W0P00000F7t4uUAB" }
const listing = { ...pluralSroRentalListing, Id: "a0W0P00000F7t4uUAB" }
// This component pulls in react-media, which needs this custom mock
window.matchMedia = jest.fn().mockImplementation((query) => {
return {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1749,7 +1749,7 @@ exports[`ListingDetailsEligibility displays custom listing details check if you'
Priority for certain groups - San Francisco Unified School District employees
</b>
<br />
Only San Francisco Unified School District (SFUSD) employees will be included in the lottery for this listing.
San Francisco Unified School District employees rank highest in the lottery for this listing.
</p>
<ul
class="list-disc ml-7"
Expand Down
Loading

0 comments on commit 0ac2db2

Please sign in to comment.