From bf0bebe446b0d5ae736a9ba5bc16970d6b265e7a Mon Sep 17 00:00:00 2001
From: Anders Schneider
Date: Wed, 11 Aug 2021 16:59:45 -0400
Subject: [PATCH 01/16] Add management company and website to UI
---
ui-components/src/locales/ar.json | 2 +-
ui-components/src/locales/bn.json | 2 +-
ui-components/src/locales/es.json | 2 +-
ui-components/src/locales/general.json | 38 +++++++++----------
ui-components/src/locales/general_OLD.json | 2 +-
ui-components/src/locales/vi.json | 2 +-
ui-components/src/locales/zh.json | 2 +-
.../listing/listing_sidebar/LeasingAgent.tsx | 16 +++++++-
8 files changed, 40 insertions(+), 26 deletions(-)
diff --git a/ui-components/src/locales/ar.json b/ui-components/src/locales/ar.json
index 4a88de1ffa..887e2bf9bf 100644
--- a/ui-components/src/locales/ar.json
+++ b/ui-components/src/locales/ar.json
@@ -704,7 +704,7 @@
"bn": "বাংলা"
},
"leasingAgent": {
- "contact": "اتصل بوكيل التأجير",
+ "contact": "شركة إدارة",
"dueToHighCallVolume": "نظرًا لارتفاع حجم المكالمات ، قد تسمع رسالة.",
"name": "اسم وكيل التأجير",
"namePlaceholder": "الاسم بالكامل",
diff --git a/ui-components/src/locales/bn.json b/ui-components/src/locales/bn.json
index e697321c64..dfe3752c63 100644
--- a/ui-components/src/locales/bn.json
+++ b/ui-components/src/locales/bn.json
@@ -704,7 +704,7 @@
"bn": "বাংলা"
},
"leasingAgent": {
- "contact": "লিজিং এজেন্টের সাথে যোগাযোগ করুন",
+ "contact": "ব্যবস্থাপনা কোম্পানি",
"dueToHighCallVolume": "উচ্চ কল ভলিউমের কারণে আপনি একটি বার্তা শুনতে পারেন।",
"name": "লিজিং এজেন্টের নাম",
"namePlaceholder": "পুরো নাম",
diff --git a/ui-components/src/locales/es.json b/ui-components/src/locales/es.json
index 8037a573de..8508295b92 100644
--- a/ui-components/src/locales/es.json
+++ b/ui-components/src/locales/es.json
@@ -704,7 +704,7 @@
"bn": "বাংলা"
},
"leasingAgent": {
- "contact": "Comuníquese con el agente de arrendamiento",
+ "contact": "Empresa de gestión",
"dueToHighCallVolume": "Debido al alto volumen de llamadas, es posible que escuche un mensaje.",
"name": "Nombre del agente de arrendamiento",
"namePlaceholder": "Nombre completo",
diff --git a/ui-components/src/locales/general.json b/ui-components/src/locales/general.json
index 20d9d38a39..4a5c645127 100644
--- a/ui-components/src/locales/general.json
+++ b/ui-components/src/locales/general.json
@@ -705,7 +705,7 @@
"bn": "বাংলা"
},
"leasingAgent": {
- "contact": "Contact Leasing Agent",
+ "contact": "Management Company",
"dueToHighCallVolume": "Due to high call volume you may hear a message.",
"name": "Leasing Agent Name",
"namePlaceholder": "Full Name",
@@ -1260,20 +1260,20 @@
"allInfoWillBeVerified": "All of the information that you have provided will be verified and your eligibility confirmed. Your application will be removed from the waitlist if you have made any fraudulent statements. If we cannot verify a housing preference that you have claimed, you will not receive the preference but will not be otherwise penalized.",
"bePreparedIfChosen": "Should your application be chosen, be prepared to fill out a more detailed application and provide required supporting documents."
},
- "listingFilters":{
- "modalTitle":"Filter Results",
- "modalHeader":"Use these options to refine your list of properties.",
- "neighborhood":"Neighborhood:"
+ "listingFilters": {
+ "modalTitle": "Filter Results",
+ "modalHeader": "Use these options to refine your list of properties.",
+ "neighborhood": "Neighborhood:"
},
"eligibility": {
"progress": {
- "header" : "Let's find your next home",
+ "header": "Let's find your next home",
"sections": {
- "welcome" : "Welcome",
- "bedrooms" : "Bedrooms",
- "age" : "Age",
- "disability" : "Disability",
- "income" : "Income",
+ "welcome": "Welcome",
+ "bedrooms": "Bedrooms",
+ "age": "Age",
+ "disability": "Disability",
+ "income": "Income",
"section8": "Section 8"
}
},
@@ -1286,22 +1286,22 @@
"studio": "Studio",
"srCountLabel": "Bedroom count"
},
- "age" : {
+ "age": {
"prompt": "How old are you?",
"description": "Some properties only accept individuals over 62 years of age.",
"label": "years old",
"error": "Please enter a valid age."
},
- "disability" : {
- "prompt" : "Do you have a disability?",
- "description" : "Some properties are meant for residents with disabilities. Some homes might request proof of disability with your application.",
+ "disability": {
+ "prompt": "Do you have a disability?",
+ "description": "Some properties are meant for residents with disabilities. Some homes might request proof of disability with your application.",
"preferNotToSay": "Prefer not to say"
},
- "income" : {
+ "income": {
"prompt": "What is your total household annual income?",
"description": "Include income for everyone who will be living in your household including yourself. Income includes social security, retirement accounts and wages.",
- "label" : "Income range",
- "ranges" : {
+ "label": "Income range",
+ "ranges": {
"below10k": "Below $10,000",
"10kTo20k": "$10,000 - $20,000",
"30kTo40k": "$30,000 - $40,000",
@@ -1309,7 +1309,7 @@
"over50k": "Over $50,000"
}
},
- "section8" : {
+ "section8": {
"prompt": "Do you have a Section 8 voucher?"
}
}
diff --git a/ui-components/src/locales/general_OLD.json b/ui-components/src/locales/general_OLD.json
index 0bf171370a..aed47bea08 100644
--- a/ui-components/src/locales/general_OLD.json
+++ b/ui-components/src/locales/general_OLD.json
@@ -591,7 +591,7 @@
"viewMap": "View Map"
},
"leasingAgent": {
- "contact": "Contact Leasing Agent",
+ "contact": "Management Company",
"dueToHighCallVolume": "Due to high call volume you may hear a message.",
"officeHours": "Office Hours"
},
diff --git a/ui-components/src/locales/vi.json b/ui-components/src/locales/vi.json
index d406df6786..112bd6cf47 100644
--- a/ui-components/src/locales/vi.json
+++ b/ui-components/src/locales/vi.json
@@ -413,7 +413,7 @@
"visitWebsite": "Truy cập %{name}"
},
"leasingAgent": {
- "contact": "Liên lạc với Nhân viên Đại diện cho Thuê nhà",
+ "contact": "Công ty quản lý",
"dueToHighCallVolume": "Do có nhiều cuộc gọi đến, quý vị có thể nghe thấy một lời nhắn.",
"officeHours": "Giờ Làm việc"
},
diff --git a/ui-components/src/locales/zh.json b/ui-components/src/locales/zh.json
index 2e04ae4ebb..f56b51b87c 100644
--- a/ui-components/src/locales/zh.json
+++ b/ui-components/src/locales/zh.json
@@ -413,7 +413,7 @@
"visitWebsite": "請瀏覽 %{name}"
},
"leasingAgent": {
- "contact": "聯絡租賃代理",
+ "contact": "管理公司",
"dueToHighCallVolume": "由於來電人數眾多,您可能會聽到訊息留言。",
"officeHours": "辦公時間"
},
diff --git a/ui-components/src/page_components/listing/listing_sidebar/LeasingAgent.tsx b/ui-components/src/page_components/listing/listing_sidebar/LeasingAgent.tsx
index af1fc729dc..1fa40703c7 100644
--- a/ui-components/src/page_components/listing/listing_sidebar/LeasingAgent.tsx
+++ b/ui-components/src/page_components/listing/listing_sidebar/LeasingAgent.tsx
@@ -20,6 +20,8 @@ const LeasingAgent = (props: LeasingAgentProps) => {
? `tel:${listing.leasingAgentPhone.replace(/[-()]/g, "")}`
: ""
+ const managementWebsite = listing.managementWebsite ? `http://${listing.managementWebsite}` : ""
+
return (
{t("leasingAgent.contact")}
@@ -35,7 +37,6 @@ const LeasingAgent = (props: LeasingAgentProps) => {
{listing.leasingAgentPhone}
- {t("leasingAgent.dueToHighCallVolume")}
>
)}
@@ -53,6 +54,19 @@ const LeasingAgent = (props: LeasingAgentProps) => {
officeHours={listing.leasingAgentOfficeHours}
/>
)}
+
+ {listing.managementCompany && (
+ <>
+
+
{listing.managementCompany}
+ {listing.managementWebsite && (
+
+ {listing.managementWebsite}
+
+ )}
+
+ >
+ )}
)
}
From af06f4ae5e01161d8f9938e30ab98de199e9f953 Mon Sep 17 00:00:00 2001
From: Anders Schneider
Date: Thu, 12 Aug 2021 10:14:36 -0400
Subject: [PATCH 02/16] Change to "website" text and globe icon
---
ui-components/src/locales/ar.json | 1 +
ui-components/src/locales/bn.json | 1 +
ui-components/src/locales/es.json | 1 +
ui-components/src/locales/general.json | 1 +
ui-components/src/locales/general_OLD.json | 1 +
ui-components/src/locales/vi.json | 1 +
ui-components/src/locales/zh.json | 1 +
.../page_components/listing/listing_sidebar/LeasingAgent.tsx | 2 +-
8 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/ui-components/src/locales/ar.json b/ui-components/src/locales/ar.json
index 887e2bf9bf..be6cd78d93 100644
--- a/ui-components/src/locales/ar.json
+++ b/ui-components/src/locales/ar.json
@@ -1194,6 +1194,7 @@
"view": "رأي",
"viewMap": "إعرض الخريطة",
"viewOnMap": "عرض على الخريطة",
+ "website": "موقع الكتروني",
"year": "عام",
"yes": "نعم",
"you": "أنت"
diff --git a/ui-components/src/locales/bn.json b/ui-components/src/locales/bn.json
index dfe3752c63..fb498b2f7a 100644
--- a/ui-components/src/locales/bn.json
+++ b/ui-components/src/locales/bn.json
@@ -1194,6 +1194,7 @@
"view": "দেখুন",
"viewMap": "মানচিত্র দেখুন",
"viewOnMap": "মানচিত্রে দেখুন",
+ "website": "ওয়েবসাইট",
"year": "বছর",
"yes": "হ্যাঁ",
"you": "আপনি"
diff --git a/ui-components/src/locales/es.json b/ui-components/src/locales/es.json
index 8508295b92..53559505fa 100644
--- a/ui-components/src/locales/es.json
+++ b/ui-components/src/locales/es.json
@@ -1194,6 +1194,7 @@
"view": "Vista",
"viewMap": "Ver el mapa",
"viewOnMap": "Ver en el mapa",
+ "website": "Sitio web",
"year": "Año",
"yes": "sí",
"you": "Tú"
diff --git a/ui-components/src/locales/general.json b/ui-components/src/locales/general.json
index 4a5c645127..8bdd486d41 100644
--- a/ui-components/src/locales/general.json
+++ b/ui-components/src/locales/general.json
@@ -1241,6 +1241,7 @@
"view": "View",
"viewMap": "View Map",
"viewOnMap": "View on Map",
+ "website": "Website",
"year": "Year",
"yes": "Yes",
"you": "You"
diff --git a/ui-components/src/locales/general_OLD.json b/ui-components/src/locales/general_OLD.json
index aed47bea08..e814379c3c 100644
--- a/ui-components/src/locales/general_OLD.json
+++ b/ui-components/src/locales/general_OLD.json
@@ -846,6 +846,7 @@
"unitFeatures": "Unit Features",
"unitType": "Unit Type",
"viewOnMap": "View on Map",
+ "website": "Website",
"year": "Year",
"yes": "Yes",
"you": "You"
diff --git a/ui-components/src/locales/vi.json b/ui-components/src/locales/vi.json
index 112bd6cf47..fe71a7a29f 100644
--- a/ui-components/src/locales/vi.json
+++ b/ui-components/src/locales/vi.json
@@ -729,6 +729,7 @@
"unitType": "Loại Căn nhà",
"viewMap": "Xem Bản đồ",
"viewOnMap": "Xem trên Bản đồ",
+ "website": "Trang mạng",
"year": "Năm",
"yes": "Có",
"you": "Quý vị"
diff --git a/ui-components/src/locales/zh.json b/ui-components/src/locales/zh.json
index f56b51b87c..283303806e 100644
--- a/ui-components/src/locales/zh.json
+++ b/ui-components/src/locales/zh.json
@@ -729,6 +729,7 @@
"unitType": "單位類型",
"viewMap": "檢視地圖",
"viewOnMap": "在地圖上檢視",
+ "website": "网站",
"year": "年",
"yes": "是",
"you": "您"
diff --git a/ui-components/src/page_components/listing/listing_sidebar/LeasingAgent.tsx b/ui-components/src/page_components/listing/listing_sidebar/LeasingAgent.tsx
index 1fa40703c7..35ff762d89 100644
--- a/ui-components/src/page_components/listing/listing_sidebar/LeasingAgent.tsx
+++ b/ui-components/src/page_components/listing/listing_sidebar/LeasingAgent.tsx
@@ -61,7 +61,7 @@ const LeasingAgent = (props: LeasingAgentProps) => {
{listing.managementCompany}
{listing.managementWebsite && (
- {listing.managementWebsite}
+ {t("t.website")}
)}
From b86a5a5d87798d42be559b11af6b1d493abcadf8 Mon Sep 17 00:00:00 2001
From: Anders Schneider
Date: Thu, 12 Aug 2021 10:50:50 -0400
Subject: [PATCH 03/16] Revert changes to locales/xx.json (except "website")
---
ui-components/src/locales/ar.json | 12 ++++----
ui-components/src/locales/bn.json | 12 ++++----
ui-components/src/locales/es.json | 12 ++++----
ui-components/src/locales/general.json | 32 +++++++++++-----------
ui-components/src/locales/general_OLD.json | 2 +-
ui-components/src/locales/vi.json | 2 +-
ui-components/src/locales/zh.json | 2 +-
7 files changed, 37 insertions(+), 37 deletions(-)
diff --git a/ui-components/src/locales/ar.json b/ui-components/src/locales/ar.json
index d77ea1bb7b..6c1fdcd50f 100644
--- a/ui-components/src/locales/ar.json
+++ b/ui-components/src/locales/ar.json
@@ -704,7 +704,7 @@
"bn": "বাংলা"
},
"leasingAgent": {
- "contact": "شركة إدارة",
+ "contact": "اتصل بوكيل التأجير",
"dueToHighCallVolume": "نظرًا لارتفاع حجم المكالمات ، قد تسمع رسالة.",
"name": "اسم وكيل التأجير",
"namePlaceholder": "الاسم بالكامل",
@@ -1219,11 +1219,11 @@
"neighborhood": "حي",
"bedrooms": "حجم الوحدة",
"bedroomsOptions": {
- "studioPlus": "0 أو أكثر من غرف النوم (استوديو)",
- "onePlus": "غرفة نوم واحدة أو أكثر",
- "twoPlus": "2 غرف نوم أو أكثر",
- "threePlus": "3 غرف نوم أو أكثر",
- "fourPlus": "4 غرف نوم أو أكثر"
+ "studioPlus": "0 أو أكثر من غرف النوم (استوديو)",
+ "onePlus": "غرفة نوم واحدة أو أكثر",
+ "twoPlus": "2 غرف نوم أو أكثر",
+ "threePlus": "3 غرف نوم أو أكثر",
+ "fourPlus": "4 غرف نوم أو أكثر"
}
},
"eligibility": {
diff --git a/ui-components/src/locales/bn.json b/ui-components/src/locales/bn.json
index 0208824016..ef3133fc71 100644
--- a/ui-components/src/locales/bn.json
+++ b/ui-components/src/locales/bn.json
@@ -704,7 +704,7 @@
"bn": "বাংলা"
},
"leasingAgent": {
- "contact": "ব্যবস্থাপনা কোম্পানি",
+ "contact": "লিজিং এজেন্টের সাথে যোগাযোগ করুন",
"dueToHighCallVolume": "উচ্চ কল ভলিউমের কারণে আপনি একটি বার্তা শুনতে পারেন।",
"name": "লিজিং এজেন্টের নাম",
"namePlaceholder": "পুরো নাম",
@@ -1219,11 +1219,11 @@
"neighborhood": "প্রতিবেশী",
"bedrooms": "একক পরিমান",
"bedroomsOptions": {
- "studioPlus": "0 বা তার বেশি শয়নকক্ষ (স্টুডিও)",
- "onePlus": "1 বা ততোধিক বেডরুম",
- "twoPlus": "2 বা ততোধিক বেডরুম",
- "threePlus": "3 বা ততোধিক বেডরুম",
- "fourPlus": "4 বা ততোধিক বেডরুম"
+ "studioPlus": "0 বা তার বেশি শয়নকক্ষ (স্টুডিও)",
+ "onePlus": "1 বা ততোধিক বেডরুম",
+ "twoPlus": "2 বা ততোধিক বেডরুম",
+ "threePlus": "3 বা ততোধিক বেডরুম",
+ "fourPlus": "4 বা ততোধিক বেডরুম"
}
},
"eligibility": {
diff --git a/ui-components/src/locales/es.json b/ui-components/src/locales/es.json
index 5ca17a67f3..f09e82fc78 100644
--- a/ui-components/src/locales/es.json
+++ b/ui-components/src/locales/es.json
@@ -704,7 +704,7 @@
"bn": "বাংলা"
},
"leasingAgent": {
- "contact": "Empresa de gestión",
+ "contact": "Comuníquese con el agente de arrendamiento",
"dueToHighCallVolume": "Debido al alto volumen de llamadas, es posible que escuche un mensaje.",
"name": "Nombre del agente de arrendamiento",
"namePlaceholder": "Nombre completo",
@@ -1219,11 +1219,11 @@
"neighborhood": "Vecindario",
"bedrooms": "Tamaño de la unidad",
"bedroomsOptions": {
- "studioPlus": "0 o más habitaciones (estudio)",
- "onePlus": "1 o más dormitorios",
- "twoPlus": "2 o más recámaras",
- "threePlus": "3 o más recámaras",
- "fourPlus": "4 o más recámaras"
+ "studioPlus": "0 o más habitaciones (estudio)",
+ "onePlus": "1 o más dormitorios",
+ "twoPlus": "2 o más recámaras",
+ "threePlus": "3 o más recámaras",
+ "fourPlus": "4 o más recámaras"
}
},
"eligibility": {
diff --git a/ui-components/src/locales/general.json b/ui-components/src/locales/general.json
index 0c90b6e034..6e7fc60ea4 100644
--- a/ui-components/src/locales/general.json
+++ b/ui-components/src/locales/general.json
@@ -705,7 +705,7 @@
"bn": "বাংলা"
},
"leasingAgent": {
- "contact": "Management Company",
+ "contact": "Contact Leasing Agent",
"dueToHighCallVolume": "Due to high call volume you may hear a message.",
"name": "Leasing Agent Name",
"namePlaceholder": "Full Name",
@@ -1261,7 +1261,7 @@
"allInfoWillBeVerified": "All of the information that you have provided will be verified and your eligibility confirmed. Your application will be removed from the waitlist if you have made any fraudulent statements. If we cannot verify a housing preference that you have claimed, you will not receive the preference but will not be otherwise penalized.",
"bePreparedIfChosen": "Should your application be chosen, be prepared to fill out a more detailed application and provide required supporting documents."
},
- "listingFilters": {
+ "listingFilters":{
"modalTitle": "Filter Results",
"modalHeader": "Use these options to refine your list of properties.",
"neighborhood": "Neighborhood",
@@ -1276,13 +1276,13 @@
},
"eligibility": {
"progress": {
- "header": "Let's find your next home",
+ "header" : "Let's find your next home",
"sections": {
- "welcome": "Welcome",
- "bedrooms": "Bedrooms",
- "age": "Age",
- "disability": "Disability",
- "income": "Income",
+ "welcome" : "Welcome",
+ "bedrooms" : "Bedrooms",
+ "age" : "Age",
+ "disability" : "Disability",
+ "income" : "Income",
"section8": "Section 8"
}
},
@@ -1295,22 +1295,22 @@
"studio": "Studio",
"srCountLabel": "Bedroom count"
},
- "age": {
+ "age" : {
"prompt": "How old are you?",
"description": "Some properties only accept individuals over 62 years of age.",
"label": "years old",
"error": "Please enter a valid age."
},
- "disability": {
- "prompt": "Do you have a disability?",
- "description": "Some properties are meant for residents with disabilities. Some homes might request proof of disability with your application.",
+ "disability" : {
+ "prompt" : "Do you have a disability?",
+ "description" : "Some properties are meant for residents with disabilities. Some homes might request proof of disability with your application.",
"preferNotToSay": "Prefer not to say"
},
- "income": {
+ "income" : {
"prompt": "What is your total household annual income?",
"description": "Include income for everyone who will be living in your household including yourself. Income includes social security, retirement accounts and wages.",
- "label": "Income range",
- "ranges": {
+ "label" : "Income range",
+ "ranges" : {
"below10k": "Below $10,000",
"10kTo20k": "$10,000 - $20,000",
"30kTo40k": "$30,000 - $40,000",
@@ -1318,7 +1318,7 @@
"over50k": "Over $50,000"
}
},
- "section8": {
+ "section8" : {
"prompt": "Do you have a Section 8 voucher?"
}
}
diff --git a/ui-components/src/locales/general_OLD.json b/ui-components/src/locales/general_OLD.json
index e814379c3c..90a5bf8214 100644
--- a/ui-components/src/locales/general_OLD.json
+++ b/ui-components/src/locales/general_OLD.json
@@ -591,7 +591,7 @@
"viewMap": "View Map"
},
"leasingAgent": {
- "contact": "Management Company",
+ "contact": "Contact Leasing Agent",
"dueToHighCallVolume": "Due to high call volume you may hear a message.",
"officeHours": "Office Hours"
},
diff --git a/ui-components/src/locales/vi.json b/ui-components/src/locales/vi.json
index fe71a7a29f..5a725e9e1e 100644
--- a/ui-components/src/locales/vi.json
+++ b/ui-components/src/locales/vi.json
@@ -413,7 +413,7 @@
"visitWebsite": "Truy cập %{name}"
},
"leasingAgent": {
- "contact": "Công ty quản lý",
+ "contact": "Liên lạc với Nhân viên Đại diện cho Thuê nhà",
"dueToHighCallVolume": "Do có nhiều cuộc gọi đến, quý vị có thể nghe thấy một lời nhắn.",
"officeHours": "Giờ Làm việc"
},
diff --git a/ui-components/src/locales/zh.json b/ui-components/src/locales/zh.json
index 283303806e..8a465b5bd9 100644
--- a/ui-components/src/locales/zh.json
+++ b/ui-components/src/locales/zh.json
@@ -413,7 +413,7 @@
"visitWebsite": "請瀏覽 %{name}"
},
"leasingAgent": {
- "contact": "管理公司",
+ "contact": "聯絡租賃代理",
"dueToHighCallVolume": "由於來電人數眾多,您可能會聽到訊息留言。",
"officeHours": "辦公時間"
},
From 85e0d385989857aa0740937a3f55ed8fc340ab62 Mon Sep 17 00:00:00 2001
From: Anders Schneider
Date: Thu, 12 Aug 2021 10:57:27 -0400
Subject: [PATCH 04/16] Formatting fixes
---
ui-components/src/locales/ar.json | 10 +++++-----
ui-components/src/locales/bn.json | 10 +++++-----
ui-components/src/locales/es.json | 10 +++++-----
3 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/ui-components/src/locales/ar.json b/ui-components/src/locales/ar.json
index 6c1fdcd50f..f6156d08e6 100644
--- a/ui-components/src/locales/ar.json
+++ b/ui-components/src/locales/ar.json
@@ -1219,11 +1219,11 @@
"neighborhood": "حي",
"bedrooms": "حجم الوحدة",
"bedroomsOptions": {
- "studioPlus": "0 أو أكثر من غرف النوم (استوديو)",
- "onePlus": "غرفة نوم واحدة أو أكثر",
- "twoPlus": "2 غرف نوم أو أكثر",
- "threePlus": "3 غرف نوم أو أكثر",
- "fourPlus": "4 غرف نوم أو أكثر"
+ "studioPlus": "0 أو أكثر من غرف النوم (استوديو)",
+ "onePlus": "غرفة نوم واحدة أو أكثر",
+ "twoPlus": "2 غرف نوم أو أكثر",
+ "threePlus": "3 غرف نوم أو أكثر",
+ "fourPlus": "4 غرف نوم أو أكثر"
}
},
"eligibility": {
diff --git a/ui-components/src/locales/bn.json b/ui-components/src/locales/bn.json
index ef3133fc71..3134893fd6 100644
--- a/ui-components/src/locales/bn.json
+++ b/ui-components/src/locales/bn.json
@@ -1219,11 +1219,11 @@
"neighborhood": "প্রতিবেশী",
"bedrooms": "একক পরিমান",
"bedroomsOptions": {
- "studioPlus": "0 বা তার বেশি শয়নকক্ষ (স্টুডিও)",
- "onePlus": "1 বা ততোধিক বেডরুম",
- "twoPlus": "2 বা ততোধিক বেডরুম",
- "threePlus": "3 বা ততোধিক বেডরুম",
- "fourPlus": "4 বা ততোধিক বেডরুম"
+ "studioPlus": "0 বা তার বেশি শয়নকক্ষ (স্টুডিও)",
+ "onePlus": "1 বা ততোধিক বেডরুম",
+ "twoPlus": "2 বা ততোধিক বেডরুম",
+ "threePlus": "3 বা ততোধিক বেডরুম",
+ "fourPlus": "4 বা ততোধিক বেডরুম"
}
},
"eligibility": {
diff --git a/ui-components/src/locales/es.json b/ui-components/src/locales/es.json
index f09e82fc78..b5343518cb 100644
--- a/ui-components/src/locales/es.json
+++ b/ui-components/src/locales/es.json
@@ -1219,11 +1219,11 @@
"neighborhood": "Vecindario",
"bedrooms": "Tamaño de la unidad",
"bedroomsOptions": {
- "studioPlus": "0 o más habitaciones (estudio)",
- "onePlus": "1 o más dormitorios",
- "twoPlus": "2 o más recámaras",
- "threePlus": "3 o más recámaras",
- "fourPlus": "4 o más recámaras"
+ "studioPlus": "0 o más habitaciones (estudio)",
+ "onePlus": "1 o más dormitorios",
+ "twoPlus": "2 o más recámaras",
+ "threePlus": "3 o más recámaras",
+ "fourPlus": "4 o más recámaras"
}
},
"eligibility": {
From 88cce2ae7a6a8ee78a273468a35ef5f0748c4332 Mon Sep 17 00:00:00 2001
From: Anders Schneider
Date: Thu, 12 Aug 2021 11:03:04 -0400
Subject: [PATCH 05/16] Override leasingAgent.contact
---
sites/public/page_content/locale_overrides/ar.json | 3 +++
sites/public/page_content/locale_overrides/bn.json | 3 +++
sites/public/page_content/locale_overrides/es.json | 3 +++
sites/public/page_content/locale_overrides/general.json | 3 +++
4 files changed, 12 insertions(+)
diff --git a/sites/public/page_content/locale_overrides/ar.json b/sites/public/page_content/locale_overrides/ar.json
index 347d6afad8..09565e7a94 100644
--- a/sites/public/page_content/locale_overrides/ar.json
+++ b/sites/public/page_content/locale_overrides/ar.json
@@ -15,5 +15,8 @@
"headerLink": "مدينة ديترويت - قسم الإسكان والتنشيط",
"forGeneralInquiries": "للاستفسارات العامة عن البرنامج ، يمكنك الاتصال بمدينة ديترويت HRD على (313) 224-6380.",
"forListingQuestions": "للأسئلة المتعلقة بالإدراج والتطبيق ، يرجى الاتصال بوكيل العقارات المعروض في كل قائمة."
+ },
+ "leasingAgent": {
+ "contact": "شركة إدارة"
}
}
diff --git a/sites/public/page_content/locale_overrides/bn.json b/sites/public/page_content/locale_overrides/bn.json
index 6fc6ee19de..6de87ef2f7 100644
--- a/sites/public/page_content/locale_overrides/bn.json
+++ b/sites/public/page_content/locale_overrides/bn.json
@@ -15,5 +15,8 @@
"headerLink": "ডেট্রয়েট শহর - আবাসন ও পুনরুজ্জীবন বিভাগ",
"forGeneralInquiries": "সাধারণ প্রোগ্রামের অনুসন্ধানের জন্য, আপনি ডেট্রয়েট এইচআরডি শহরকে (313) 224-6380 এ কল করতে পারেন।",
"forListingQuestions": "তালিকা এবং আবেদনের প্রশ্নের জন্য, দয়া করে প্রতিটি তালিকায় প্রদর্শিত সম্পত্তি এজেন্টের সাথে যোগাযোগ করুন।"
+ },
+ "leasingAgent": {
+ "contact": "ব্যবস্থাপনা কোম্পানি"
}
}
diff --git a/sites/public/page_content/locale_overrides/es.json b/sites/public/page_content/locale_overrides/es.json
index c58fa3d0ad..91ec1d8a63 100644
--- a/sites/public/page_content/locale_overrides/es.json
+++ b/sites/public/page_content/locale_overrides/es.json
@@ -15,5 +15,8 @@
"headerLink": "Ciudad de Detroit - Departamento de Vivienda y Revitalización",
"forGeneralInquiries": "Para consultas generales sobre el programa, puede llamar al Departamento de Recursos Humanos de la Ciudad de Detroit al (313) 224-6380.",
"forListingQuestions": "Si tiene preguntas sobre el listado y la solicitud, comuníquese con el agente inmobiliario que se muestra en cada listado."
+ },
+ "leasingAgent": {
+ "contact": "Empresa de gestión"
}
}
diff --git a/sites/public/page_content/locale_overrides/general.json b/sites/public/page_content/locale_overrides/general.json
index 5b6d7f2d7b..3b865ef45e 100644
--- a/sites/public/page_content/locale_overrides/general.json
+++ b/sites/public/page_content/locale_overrides/general.json
@@ -15,5 +15,8 @@
"headerLink": "City of Detroit - Housing and Revitalization Department",
"forGeneralInquiries": "For general program inquiries, you may call the City of Detroit HRD at (313) 224-6380.",
"forListingQuestions": "For listing and application questions, please contact the Property Agent displayed on each listing."
+ },
+ "leasingAgent": {
+ "contact": "Management Company"
}
}
From c671aa34475d02f352f17c55e08563cf06668df0 Mon Sep 17 00:00:00 2001
From: Anders Schneider
Date: Thu, 12 Aug 2021 11:06:04 -0400
Subject: [PATCH 06/16] Switch to overriding dueToHighCallVolume
---
sites/public/page_content/locale_overrides/ar.json | 3 ++-
sites/public/page_content/locale_overrides/bn.json | 3 ++-
sites/public/page_content/locale_overrides/es.json | 3 ++-
sites/public/page_content/locale_overrides/general.json | 3 ++-
.../page_components/listing/listing_sidebar/LeasingAgent.tsx | 1 +
5 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/sites/public/page_content/locale_overrides/ar.json b/sites/public/page_content/locale_overrides/ar.json
index 09565e7a94..dab4324535 100644
--- a/sites/public/page_content/locale_overrides/ar.json
+++ b/sites/public/page_content/locale_overrides/ar.json
@@ -17,6 +17,7 @@
"forListingQuestions": "للأسئلة المتعلقة بالإدراج والتطبيق ، يرجى الاتصال بوكيل العقارات المعروض في كل قائمة."
},
"leasingAgent": {
- "contact": "شركة إدارة"
+ "contact": "شركة إدارة",
+ "dueToHighCallVolume": ""
}
}
diff --git a/sites/public/page_content/locale_overrides/bn.json b/sites/public/page_content/locale_overrides/bn.json
index 6de87ef2f7..5328d807a1 100644
--- a/sites/public/page_content/locale_overrides/bn.json
+++ b/sites/public/page_content/locale_overrides/bn.json
@@ -17,6 +17,7 @@
"forListingQuestions": "তালিকা এবং আবেদনের প্রশ্নের জন্য, দয়া করে প্রতিটি তালিকায় প্রদর্শিত সম্পত্তি এজেন্টের সাথে যোগাযোগ করুন।"
},
"leasingAgent": {
- "contact": "ব্যবস্থাপনা কোম্পানি"
+ "contact": "ব্যবস্থাপনা কোম্পানি",
+ "dueToHighCallVolume": ""
}
}
diff --git a/sites/public/page_content/locale_overrides/es.json b/sites/public/page_content/locale_overrides/es.json
index 91ec1d8a63..329f9e184d 100644
--- a/sites/public/page_content/locale_overrides/es.json
+++ b/sites/public/page_content/locale_overrides/es.json
@@ -17,6 +17,7 @@
"forListingQuestions": "Si tiene preguntas sobre el listado y la solicitud, comuníquese con el agente inmobiliario que se muestra en cada listado."
},
"leasingAgent": {
- "contact": "Empresa de gestión"
+ "contact": "Empresa de gestión",
+ "dueToHighCallVolume": ""
}
}
diff --git a/sites/public/page_content/locale_overrides/general.json b/sites/public/page_content/locale_overrides/general.json
index 3b865ef45e..6a203c2ae1 100644
--- a/sites/public/page_content/locale_overrides/general.json
+++ b/sites/public/page_content/locale_overrides/general.json
@@ -17,6 +17,7 @@
"forListingQuestions": "For listing and application questions, please contact the Property Agent displayed on each listing."
},
"leasingAgent": {
- "contact": "Management Company"
+ "contact": "Management Company",
+ "dueToHighCallVolume": ""
}
}
diff --git a/ui-components/src/page_components/listing/listing_sidebar/LeasingAgent.tsx b/ui-components/src/page_components/listing/listing_sidebar/LeasingAgent.tsx
index 35ff762d89..5f621de3fb 100644
--- a/ui-components/src/page_components/listing/listing_sidebar/LeasingAgent.tsx
+++ b/ui-components/src/page_components/listing/listing_sidebar/LeasingAgent.tsx
@@ -37,6 +37,7 @@ const LeasingAgent = (props: LeasingAgentProps) => {
{listing.leasingAgentPhone}
+ {t("leasingAgent.dueToHighCallVolume")}
>
)}
From c801f5dedd1077b9ffb1bc0c0eff206d4c24df1f Mon Sep 17 00:00:00 2001
From: Anders Schneider
Date: Thu, 12 Aug 2021 11:17:15 -0400
Subject: [PATCH 07/16] Guard showing management company by a prop
---
sites/public/src/ListingView.tsx | 2 +-
ui-components/__tests__/page_components/LeasingAgent.test.tsx | 4 ++--
.../page_components/listing/listing_sidebar/LeasingAgent.tsx | 3 ++-
3 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/sites/public/src/ListingView.tsx b/sites/public/src/ListingView.tsx
index 483490e087..3e15d83c0b 100644
--- a/sites/public/src/ListingView.tsx
+++ b/sites/public/src/ListingView.tsx
@@ -299,7 +299,7 @@ export const ListingView = (props: ListingProps) => {
)}
-
+
diff --git a/ui-components/__tests__/page_components/LeasingAgent.test.tsx b/ui-components/__tests__/page_components/LeasingAgent.test.tsx
index 5fc5d29b12..58defdc38f 100644
--- a/ui-components/__tests__/page_components/LeasingAgent.test.tsx
+++ b/ui-components/__tests__/page_components/LeasingAgent.test.tsx
@@ -10,7 +10,7 @@ afterEach(cleanup)
describe("", () => {
it("renders data if application is open", () => {
const listing = Object.assign({}, ArcherListing) as Listing
- const { getByText } = render()
+ const { getByText } = render()
expect(listing.leasingAgentName && getByText(listing.leasingAgentName)).toBeTruthy()
expect(
listing.leasingAgentPhone && getByText(listing.leasingAgentPhone, { exact: false })
@@ -22,7 +22,7 @@ describe("", () => {
it("renders nothing if application is not open", () => {
const listing = Object.assign({}, ArcherListing) as Listing
listing.applicationOpenDate = new Date(moment().add(10, "days").format())
- const { queryByText } = render()
+ const { queryByText } = render()
expect(listing.leasingAgentName && queryByText(listing.leasingAgentName)).toBeNull()
expect(
listing.leasingAgentPhone && queryByText(listing.leasingAgentPhone, { exact: false })
diff --git a/ui-components/src/page_components/listing/listing_sidebar/LeasingAgent.tsx b/ui-components/src/page_components/listing/listing_sidebar/LeasingAgent.tsx
index 5f621de3fb..a9802d4eb2 100644
--- a/ui-components/src/page_components/listing/listing_sidebar/LeasingAgent.tsx
+++ b/ui-components/src/page_components/listing/listing_sidebar/LeasingAgent.tsx
@@ -7,6 +7,7 @@ import { openDateState } from "../../../helpers/state"
interface LeasingAgentProps {
listing: Listing
+ showManagementCompany: boolean
}
const LeasingAgent = (props: LeasingAgentProps) => {
@@ -56,7 +57,7 @@ const LeasingAgent = (props: LeasingAgentProps) => {
/>
)}
- {listing.managementCompany && (
+ {props.showManagementCompany && listing.managementCompany && (
<>
{listing.managementCompany}
From c02ef2777f86287759e714f9eff028ab66146a5d Mon Sep 17 00:00:00 2001
From: Anders Schneider
Date: Thu, 12 Aug 2021 12:26:28 -0400
Subject: [PATCH 08/16] Add a test
---
.../page_components/LeasingAgent.test.tsx | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
diff --git a/ui-components/__tests__/page_components/LeasingAgent.test.tsx b/ui-components/__tests__/page_components/LeasingAgent.test.tsx
index 58defdc38f..1e519582bb 100644
--- a/ui-components/__tests__/page_components/LeasingAgent.test.tsx
+++ b/ui-components/__tests__/page_components/LeasingAgent.test.tsx
@@ -1,5 +1,5 @@
import React from "react"
-import { render, cleanup } from "@testing-library/react"
+import { render, cleanup, queryByText } from "@testing-library/react"
import { LeasingAgent } from "../../src/page_components/listing/listing_sidebar/LeasingAgent"
import { ArcherListing } from "@bloom-housing/backend-core/types/src/archer-listing"
import { Listing } from "@bloom-housing/backend-core/types"
@@ -31,4 +31,19 @@ describe("", () => {
listing.leasingAgentOfficeHours && queryByText(listing.leasingAgentOfficeHours)
).toBeNull()
})
+ it("shows management company details if showManagementCompany is set", () => {
+ const listing = Object.assign({}, ArcherListing) as Listing
+ listing.managementCompany = "Some Management Company"
+ listing.managementWebsite = "a fake management website url"
+ {
+ const { queryByText } = render()
+ expect(queryByText(listing.managementCompany)).toBeNull()
+ expect(queryByText("Website")).toBeNull()
+ }
+ {
+ const { getByText } = render()
+ expect(getByText(listing.managementCompany)).toBeTruthy()
+ expect(getByText("Website")).toBeTruthy()
+ }
+ })
})
From afd2aeefbd7e25487cce6325700f24ef77964295 Mon Sep 17 00:00:00 2001
From: Lint Action
Date: Thu, 12 Aug 2021 16:30:16 +0000
Subject: [PATCH 09/16] Fix code style issues with Prettier
---
ui-components/__tests__/page_components/LeasingAgent.test.tsx | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/ui-components/__tests__/page_components/LeasingAgent.test.tsx b/ui-components/__tests__/page_components/LeasingAgent.test.tsx
index 1e519582bb..4d5b20897d 100644
--- a/ui-components/__tests__/page_components/LeasingAgent.test.tsx
+++ b/ui-components/__tests__/page_components/LeasingAgent.test.tsx
@@ -36,7 +36,9 @@ describe("", () => {
listing.managementCompany = "Some Management Company"
listing.managementWebsite = "a fake management website url"
{
- const { queryByText } = render()
+ const { queryByText } = render(
+
+ )
expect(queryByText(listing.managementCompany)).toBeNull()
expect(queryByText("Website")).toBeNull()
}
From 0da90d195fd15fb1602f50ef202931cf82ae2924 Mon Sep 17 00:00:00 2001
From: Anders Schneider
Date: Thu, 12 Aug 2021 12:38:41 -0400
Subject: [PATCH 10/16] Make management company website link open a new tab
---
.../page_components/listing/listing_sidebar/LeasingAgent.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ui-components/src/page_components/listing/listing_sidebar/LeasingAgent.tsx b/ui-components/src/page_components/listing/listing_sidebar/LeasingAgent.tsx
index a9802d4eb2..10b9aa19ad 100644
--- a/ui-components/src/page_components/listing/listing_sidebar/LeasingAgent.tsx
+++ b/ui-components/src/page_components/listing/listing_sidebar/LeasingAgent.tsx
@@ -62,7 +62,7 @@ const LeasingAgent = (props: LeasingAgentProps) => {
{listing.managementCompany}
{listing.managementWebsite && (
-
+
{t("t.website")}
)}
From 1280b464aeb6f3cbff00da9cc074a1bac0fdf3b7 Mon Sep 17 00:00:00 2001
From: Anders Schneider
Date: Thu, 12 Aug 2021 14:53:04 -0400
Subject: [PATCH 11/16] Pass in management company details in the prop
---
sites/public/src/ListingView.tsx | 8 +++++++-
.../listing/listing_sidebar/LeasingAgent.tsx | 12 +++++++-----
2 files changed, 14 insertions(+), 6 deletions(-)
diff --git a/sites/public/src/ListingView.tsx b/sites/public/src/ListingView.tsx
index 3e15d83c0b..aae3e67fb1 100644
--- a/sites/public/src/ListingView.tsx
+++ b/sites/public/src/ListingView.tsx
@@ -299,7 +299,13 @@ export const ListingView = (props: ListingProps) => {
)}
-
+
diff --git a/ui-components/src/page_components/listing/listing_sidebar/LeasingAgent.tsx b/ui-components/src/page_components/listing/listing_sidebar/LeasingAgent.tsx
index 10b9aa19ad..1f9a4fbac4 100644
--- a/ui-components/src/page_components/listing/listing_sidebar/LeasingAgent.tsx
+++ b/ui-components/src/page_components/listing/listing_sidebar/LeasingAgent.tsx
@@ -7,7 +7,7 @@ import { openDateState } from "../../../helpers/state"
interface LeasingAgentProps {
listing: Listing
- showManagementCompany: boolean
+ managementCompany: { name: string; website: string }
}
const LeasingAgent = (props: LeasingAgentProps) => {
@@ -21,7 +21,9 @@ const LeasingAgent = (props: LeasingAgentProps) => {
? `tel:${listing.leasingAgentPhone.replace(/[-()]/g, "")}`
: ""
- const managementWebsite = listing.managementWebsite ? `http://${listing.managementWebsite}` : ""
+ const managementWebsite = props.managementCompany?.website
+ ? `http://${props.managementCompany.website}`
+ : ""
return (
@@ -57,11 +59,11 @@ const LeasingAgent = (props: LeasingAgentProps) => {
/>
)}
- {props.showManagementCompany && listing.managementCompany && (
+ {props.managementCompany && (
<>
-
{listing.managementCompany}
- {listing.managementWebsite && (
+ {props.managementCompany.name}
+ {props.managementCompany.website && (
{t("t.website")}
From 388ea8586ce7e7fdd8bdf2b411665d8e101a8655 Mon Sep 17 00:00:00 2001
From: Anders Schneider
Date: Thu, 12 Aug 2021 15:05:33 -0400
Subject: [PATCH 12/16] Make managementCompany optional, fix a warning
---
.../page_components/LeasingAgent.test.tsx | 19 +++++++++++--------
.../listing/listing_sidebar/LeasingAgent.tsx | 6 +++---
2 files changed, 14 insertions(+), 11 deletions(-)
diff --git a/ui-components/__tests__/page_components/LeasingAgent.test.tsx b/ui-components/__tests__/page_components/LeasingAgent.test.tsx
index 4d5b20897d..5dbe20110a 100644
--- a/ui-components/__tests__/page_components/LeasingAgent.test.tsx
+++ b/ui-components/__tests__/page_components/LeasingAgent.test.tsx
@@ -10,7 +10,7 @@ afterEach(cleanup)
describe("", () => {
it("renders data if application is open", () => {
const listing = Object.assign({}, ArcherListing) as Listing
- const { getByText } = render()
+ const { getByText } = render()
expect(listing.leasingAgentName && getByText(listing.leasingAgentName)).toBeTruthy()
expect(
listing.leasingAgentPhone && getByText(listing.leasingAgentPhone, { exact: false })
@@ -22,7 +22,7 @@ describe("", () => {
it("renders nothing if application is not open", () => {
const listing = Object.assign({}, ArcherListing) as Listing
listing.applicationOpenDate = new Date(moment().add(10, "days").format())
- const { queryByText } = render()
+ const { queryByText } = render()
expect(listing.leasingAgentName && queryByText(listing.leasingAgentName)).toBeNull()
expect(
listing.leasingAgentPhone && queryByText(listing.leasingAgentPhone, { exact: false })
@@ -33,18 +33,21 @@ describe("", () => {
})
it("shows management company details if showManagementCompany is set", () => {
const listing = Object.assign({}, ArcherListing) as Listing
- listing.managementCompany = "Some Management Company"
- listing.managementWebsite = "a fake management website url"
+ const managementCompany = "Some Management Company"
+ const managementWebsite = "a fake management website url"
{
const { queryByText } = render(
-
+
)
- expect(queryByText(listing.managementCompany)).toBeNull()
+ expect(queryByText(managementCompany)).toBeNull()
expect(queryByText("Website")).toBeNull()
}
{
- const { getByText } = render()
- expect(getByText(listing.managementCompany)).toBeTruthy()
+ const { getByText } = render()
+ expect(getByText(managementCompany)).toBeTruthy()
expect(getByText("Website")).toBeTruthy()
}
})
diff --git a/ui-components/src/page_components/listing/listing_sidebar/LeasingAgent.tsx b/ui-components/src/page_components/listing/listing_sidebar/LeasingAgent.tsx
index 1f9a4fbac4..2111e574a1 100644
--- a/ui-components/src/page_components/listing/listing_sidebar/LeasingAgent.tsx
+++ b/ui-components/src/page_components/listing/listing_sidebar/LeasingAgent.tsx
@@ -7,7 +7,7 @@ import { openDateState } from "../../../helpers/state"
interface LeasingAgentProps {
listing: Listing
- managementCompany: { name: string; website: string }
+ managementCompany?: { name: string; website: string }
}
const LeasingAgent = (props: LeasingAgentProps) => {
@@ -61,14 +61,14 @@ const LeasingAgent = (props: LeasingAgentProps) => {
{props.managementCompany && (
<>
-
+
{props.managementCompany.name}
{props.managementCompany.website && (
{t("t.website")}
)}
-
+
>
)}
From 213d7ce755e8912e132603235a269c4007c7a0d7 Mon Sep 17 00:00:00 2001
From: Lint Action
Date: Thu, 12 Aug 2021 19:09:55 +0000
Subject: [PATCH 13/16] Fix code style issues with Prettier
---
.../page_components/LeasingAgent.test.tsx | 17 ++++++++++-------
1 file changed, 10 insertions(+), 7 deletions(-)
diff --git a/ui-components/__tests__/page_components/LeasingAgent.test.tsx b/ui-components/__tests__/page_components/LeasingAgent.test.tsx
index 5dbe20110a..d7fe698ac6 100644
--- a/ui-components/__tests__/page_components/LeasingAgent.test.tsx
+++ b/ui-components/__tests__/page_components/LeasingAgent.test.tsx
@@ -36,17 +36,20 @@ describe("", () => {
const managementCompany = "Some Management Company"
const managementWebsite = "a fake management website url"
{
- const { queryByText } = render(
-
- )
+ const { queryByText } = render()
expect(queryByText(managementCompany)).toBeNull()
expect(queryByText("Website")).toBeNull()
}
{
- const { getByText } = render()
+ const { getByText } = render(
+
+ )
expect(getByText(managementCompany)).toBeTruthy()
expect(getByText("Website")).toBeTruthy()
}
From 9358f955a33b224fe2efdc91d37437f007ee6be0 Mon Sep 17 00:00:00 2001
From: Anders Schneider
Date: Thu, 12 Aug 2021 15:13:00 -0400
Subject: [PATCH 14/16] Clarify test
---
.../__tests__/page_components/LeasingAgent.test.tsx | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/ui-components/__tests__/page_components/LeasingAgent.test.tsx b/ui-components/__tests__/page_components/LeasingAgent.test.tsx
index d7fe698ac6..4509361486 100644
--- a/ui-components/__tests__/page_components/LeasingAgent.test.tsx
+++ b/ui-components/__tests__/page_components/LeasingAgent.test.tsx
@@ -31,15 +31,19 @@ describe("", () => {
listing.leasingAgentOfficeHours && queryByText(listing.leasingAgentOfficeHours)
).toBeNull()
})
- it("shows management company details if showManagementCompany is set", () => {
+ it("shows management company details if managementCompany is present", () => {
const listing = Object.assign({}, ArcherListing) as Listing
const managementCompany = "Some Management Company"
const managementWebsite = "a fake management website url"
+
+ // No managementCompany prop
{
const { queryByText } = render()
expect(queryByText(managementCompany)).toBeNull()
expect(queryByText("Website")).toBeNull()
}
+
+ // With managementCompany prop --> management company info is displayed
{
const { getByText } = render(
Date: Thu, 12 Aug 2021 15:20:04 -0400
Subject: [PATCH 15/16] Rationalize checking for website
---
.../listing/listing_sidebar/LeasingAgent.tsx | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/ui-components/src/page_components/listing/listing_sidebar/LeasingAgent.tsx b/ui-components/src/page_components/listing/listing_sidebar/LeasingAgent.tsx
index 2111e574a1..2b9e7975cd 100644
--- a/ui-components/src/page_components/listing/listing_sidebar/LeasingAgent.tsx
+++ b/ui-components/src/page_components/listing/listing_sidebar/LeasingAgent.tsx
@@ -21,10 +21,6 @@ const LeasingAgent = (props: LeasingAgentProps) => {
? `tel:${listing.leasingAgentPhone.replace(/[-()]/g, "")}`
: ""
- const managementWebsite = props.managementCompany?.website
- ? `http://${props.managementCompany.website}`
- : ""
-
return (
{t("leasingAgent.contact")}
@@ -64,7 +60,11 @@ const LeasingAgent = (props: LeasingAgentProps) => {
{props.managementCompany.name}
{props.managementCompany.website && (
-
+
{t("t.website")}
)}
From 4038a2f226642fde2e724500cd851d5ac30cb01e Mon Sep 17 00:00:00 2001
From: Anders Schneider
Date: Thu, 12 Aug 2021 15:29:41 -0400
Subject: [PATCH 16/16] Only prepend http if it's not already present
---
.../listing/listing_sidebar/LeasingAgent.tsx | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/ui-components/src/page_components/listing/listing_sidebar/LeasingAgent.tsx b/ui-components/src/page_components/listing/listing_sidebar/LeasingAgent.tsx
index 2b9e7975cd..18c4e2ea1c 100644
--- a/ui-components/src/page_components/listing/listing_sidebar/LeasingAgent.tsx
+++ b/ui-components/src/page_components/listing/listing_sidebar/LeasingAgent.tsx
@@ -21,6 +21,11 @@ const LeasingAgent = (props: LeasingAgentProps) => {
? `tel:${listing.leasingAgentPhone.replace(/[-()]/g, "")}`
: ""
+ let managementWebsite = props.managementCompany?.website
+ if (managementWebsite && !managementWebsite.startsWith("http")) {
+ managementWebsite = `http://${managementWebsite}`
+ }
+
return (
{t("leasingAgent.contact")}
@@ -59,12 +64,8 @@ const LeasingAgent = (props: LeasingAgentProps) => {
<>