Skip to content

Commit ed086c3

Browse files
authored
feat(email): mentorship requested include background + expectations (#229)
1 parent 2684195 commit ed086c3

File tree

4 files changed

+12
-11
lines changed

4 files changed

+12
-11
lines changed

content/email_templates/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ nodemon --config nodemon-emails.json
1212
|Mentorship accepted|http://localhost:3003/mentorship-accepted?data={%22menteeName%22:%22Moshe%22,%22mentorName%22:%20%22Brent%22,%22contactURL%22:%20%22https%22,%20%22openRequests%22:%208}|
1313
|Mentorship declined|http://localhost:3003/mentorship-declined?data={%22menteeName%22:%22Moshe%22,%22mentorName%22:%22Brent%22,%22reason%22:%22because%22}|
1414
|Mentorship cancelled|http://localhost:3003/mentorship-cancelled?data={%22menteeName%22:%22Moshe%22,%22mentorName%22:%20%22Brent%22,%22reason%22:%20%22I%27ve%20already%20found%20a%20mentor%22}|
15-
|Mentorship requested|http://localhost:3003/mentorship-requested?data={%22menteeName%22:%22Moshe%22,%22mentorName%22:%22Brent%22,%22message%22:%22because%22}|
15+
|Mentorship requested|http://localhost:3003/mentorship-requested?data={%22menteeName%22:%22Moshe%22,%22mentorName%22:%22Brent%22,%22message%22:%22because%22,%22background%22:%22here%20is%20my%20background%22,%22expectation%22:%22I'm%20expecting%20for%20the%20best!%22}|
1616
|Mentorship reminder|http://localhost:3003/mentorship-reminder?data={%22menteeName%22:%22Moshe%22,%22mentorName%22:%22Brent%22,%22message%22:%22because%22}|
1717
|Mentor application received|http://localhost:3003/mentor-application-received?data={%22name%22:%22Brent%22}|
1818
|Mentorship application denied|http://localhost:3003/mentor-application-declined?data={%22name%22:%22Moshe%22,%22reason%22:%22your%20avatar%20is%20not%20you%22}|

content/email_templates/mentorship-requested.html

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,13 @@ <h2 style="font-size: 26px; font-weight: normal;">
2424
You have a new mentorship request from
2525
<span style="font-weight: bold; font-style: italic;"><%= menteeName %></span>
2626
</p>
27-
<p>Here's a brief message they wanted to share with you:</p>
28-
<pre><%= message %></pre>
27+
<p>Here are the details they shared with you about them</p>
28+
<h4>Message</h4>
29+
<pre><%= background %></pre>
30+
<h4>Background</h4>
31+
<pre><%= background %></pre>
32+
<h4>Expectations</h4>
33+
<pre><%= expectation %></pre>
2934
<p>
3035
Please check your account to review the full request and respond when you
3136
can. They are as excited as you are to learn everything you have to share!

src/modules/email/interfaces/email.interface.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ type MentorshipRequested = {
5353
menteeName: string;
5454
mentorName: string;
5555
message: string;
56+
background: string;
57+
expectation: string;
5658
};
5759
};
5860

src/modules/mentorships/mentorships.controller.ts

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -93,14 +93,6 @@ export class MentorshipsController {
9393
});
9494

9595
try {
96-
const emailData = {
97-
to: mentor.email,
98-
templateId: Template.MENTORSHIP_REQUEST,
99-
dynamic_template_data: {
100-
name: current.name,
101-
message: data.message,
102-
},
103-
};
10496
await this.emailService.sendLocalTemplate({
10597
name: 'mentorship-requested',
10698
to: mentor.email,
@@ -109,6 +101,8 @@ export class MentorshipsController {
109101
mentorName: mentor.name,
110102
menteeName: current.name,
111103
message: data.message,
104+
background: data.background,
105+
expectation: data.expectation,
112106
},
113107
});
114108
} catch (error) {

0 commit comments

Comments
 (0)