From 6a3dca66d94023a81dd50be70327b3690850a9df Mon Sep 17 00:00:00 2001 From: Morgan Ludtke <42942267+ludtkemorgan@users.noreply.github.com> Date: Fri, 6 Oct 2023 08:23:09 -0500 Subject: [PATCH 1/2] fix: update footer email (#375) --- sites/public/src/lib/helpers.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sites/public/src/lib/helpers.tsx b/sites/public/src/lib/helpers.tsx index d69d637c3c..58685c9484 100644 --- a/sites/public/src/lib/helpers.tsx +++ b/sites/public/src/lib/helpers.tsx @@ -383,8 +383,8 @@ export const getSiteFooter = () => {
San Francisco, CA 94105-2066
{t("footer.mondayToFriday")}
- - bahfa@bayareametro.gov + + doorway@bayareametro.gov

From c2762ee2d7d0455bb01f29d50fe74b092dca3080 Mon Sep 17 00:00:00 2001 From: Emily Jablonski <65367387+emilyjablonski@users.noreply.github.com> Date: Fri, 6 Oct 2023 14:20:20 -0600 Subject: [PATCH 2/2] feat: new email template for listing opportunity (#360) --- backend/core/src/email/email.service.ts | 33 +++++++++++++++ .../src/shared/views/listing-opportunity.hbs | 42 +++++++++++++++++++ .../core/src/shared/views/partials/head.hbs | 8 ++++ 3 files changed, 83 insertions(+) create mode 100644 backend/core/src/shared/views/listing-opportunity.hbs diff --git a/backend/core/src/email/email.service.ts b/backend/core/src/email/email.service.ts index 39553fbbd0..3bc6235a99 100644 --- a/backend/core/src/email/email.service.ts +++ b/backend/core/src/email/email.service.ts @@ -214,6 +214,39 @@ export class EmailService { ) } + public async listingOpportunity(user: User, appUrl: string) { + const jurisdiction = await this.getUserJurisdiction(user) + void (await this.loadTranslations(jurisdiction, user.language)) + const compiledTemplate = this.template("listing-opportunity") + + if (this.configService.get("NODE_ENV") == "production") { + Logger.log( + `Preparing to send a listing opportunity email to ${user.email} from ${jurisdiction.emailFromAddress}...` + ) + } + + // TODO: This is mock data just for the template that will need to be updated + await this.send( + user.email, + jurisdiction.emailFromAddress, + "New rental opportunity", + compiledTemplate({ + appUrl, + tableRows: [ + { label: "Community", value: "Senior 55+" }, + { label: "Applications Due", value: "August 11, 2021" }, + { label: "Address", value: "2330 Webster Street, Oakland CA 94612" }, + { label: "1 Bedrooms", value: "1 unit, 1 bath, 668 sqft" }, + { label: "2 Bedrooms", value: "2 units, 1-2 baths, 900 - 968 sqft" }, + { label: "Rent", value: "$1,251 - $1,609 per month" }, + { label: "Minimum Income", value: "$2,502 - $3,218 per month" }, + { label: "Maximum Income", value: "$6,092 - $10,096 per month" }, + { label: "Lottery Date", value: "August 31, 2021" }, + ], + }) + ) + } + private async loadTranslations(jurisdiction: Jurisdiction | null, language: Language) { let jurisdictionalTranslations: Translation | null, genericTranslations: Translation | null, diff --git a/backend/core/src/shared/views/listing-opportunity.hbs b/backend/core/src/shared/views/listing-opportunity.hbs new file mode 100644 index 0000000000..738ad65df2 --- /dev/null +++ b/backend/core/src/shared/views/listing-opportunity.hbs @@ -0,0 +1,42 @@ +{{#> layout_default }} + +

Rental opportunity at
Listing name

+ + + + + + + + + + + + + + +
+ View Listing & Apply + +
+{{/layout_default }} diff --git a/backend/core/src/shared/views/partials/head.hbs b/backend/core/src/shared/views/partials/head.hbs index e813416c57..73ee187af6 100644 --- a/backend/core/src/shared/views/partials/head.hbs +++ b/backend/core/src/shared/views/partials/head.hbs @@ -230,6 +230,10 @@ font-size: 22px; } + .bold { + font-weight: 700; + } + /* ------------------------------------- BUTTONS ------------------------------------- */ @@ -337,6 +341,10 @@ margin: 20px 0; } + .fit-content { + max-width: fit-content; + } + /* ------------------------------------- RESPONSIVE AND MOBILE FRIENDLY STYLES ------------------------------------- */