Skip to content

Commit 5701ff0

Browse files
authored
Merge branch 'main' into rearangeUnits
2 parents 3c071bc + bb8edfb commit 5701ff0

File tree

157 files changed

+13808
-1683
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

157 files changed

+13808
-1683
lines changed

.github/workflows/lint.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ on:
88
- "frontend/**"
99
- "backend/**"
1010
- "backend/python/**"
11+
- ".github/workflows/lint.yml"
1112
pull_request:
1213
branches:
1314
- main
@@ -52,12 +53,12 @@ jobs:
5253
- name: Lint frontend
5354
if: steps.changes.outputs.frontend == 'true'
5455
working-directory: ./frontend
55-
run: yarn lint
56+
run: yarn lint --max-warnings 0
5657

5758
- name: Lint TypeScript backend
5859
if: steps.changes.outputs.typescript-backend == 'true'
5960
working-directory: ./backend
60-
run: yarn lint
61+
run: yarn lint --max-warnings 0
6162

6263
- name: Lint Python backend
6364
if: steps.changes.outputs.python-backend == 'true'

backend/emails/adminInvite.ts

Lines changed: 156 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,156 @@
1+
import { defaultLoginLink } from "./constants";
2+
3+
const adminInviteEmail = (
4+
verifyEmailLink: string,
5+
temporaryPassword: string,
6+
loginLink: string = defaultLoginLink,
7+
): string => `
8+
<html lang="en">
9+
10+
<head>
11+
<meta charset="UTF-8" />
12+
<meta name="viewport" content="width=device-width" />
13+
<title>Admin Invitation Email</title>
14+
</head>
15+
16+
<body style="margin: 0">
17+
<table width="100%" cellpadding="0" cellspacing="0" style="
18+
font-family: Lexend Deca, Arial, sans-serif;
19+
font-size: 14px;
20+
font-weight: 400;
21+
line-height: 140%;
22+
letter-spacing: 0.32px;
23+
color: #000;
24+
">
25+
<!-- TOP BANNER -->
26+
<tr>
27+
<td style="
28+
padding: 16px 32px;
29+
text-align: center;
30+
border-bottom: 2px solid #FFE6DD;
31+
background: #FCC4B1;
32+
">
33+
<img src="https://firebasestorage.googleapis.com/v0/b/extendafamily-7613e.appspot.com/o/eaf-logo.png?alt=media&token=9f3f5da0-264e-42a5-85a7-0c1fb120b27c" alt="Extend-A-Family logo" style="height: 40px" />
34+
</td>
35+
</tr>
36+
37+
<!-- SPACER -->
38+
<tr>
39+
<td height="32" style="line-height: 0">&nbsp;</td>
40+
</tr>
41+
42+
<!-- MAIN CONTENT -->
43+
<tr>
44+
<td style="padding: 0 32px">
45+
<p style="margin: 0 0 20px">Hello,</p>
46+
47+
<p style="margin: 0 0 20px">
48+
You have been invited as an administrator on the Extend-A-Family Waterloo Region Financial Literacy Tool.
49+
</p>
50+
51+
<p style="margin: 0 0 20px">
52+
Please click <a href="${verifyEmailLink}">here</a> to verify your email. Then, please use the temporary
53+
password below to <a href="${loginLink}">login</a>.
54+
</p>
55+
56+
<div style="
57+
display: flex;
58+
padding: 20px;
59+
margin: 0 0 20px;
60+
flex-direction: column;
61+
justify-content: center;
62+
align-items: center;
63+
gap: 8px;
64+
align-self: stretch;
65+
border-radius: 8px;
66+
background: var(--Neutral-Light-Hover, #F8FAFA);
67+
">
68+
<p style="
69+
width: 100%;
70+
margin: 0;
71+
text-align: center;
72+
color: var(--Neutral-900, #111);
73+
font-family: Courier New, monospace;
74+
font-size: 18px;
75+
font-style: normal;
76+
font-weight: 400;
77+
line-height: 140%;
78+
letter-spacing: 0.4px;
79+
">${temporaryPassword}</p>
80+
</div>
81+
82+
<!-- RESPOND BUTTON -->
83+
<table width="100%" cellpadding="0" cellspacing="0">
84+
<tr>
85+
<td style="text-align: center">
86+
<a href="${loginLink}" style="
87+
display: inline-block;
88+
background: #8F4C34;
89+
padding: 10px 24px;
90+
border-radius: 4px;
91+
text-decoration: none;
92+
color: #fff;
93+
font-weight: 300;
94+
letter-spacing: 0.7px;
95+
">
96+
LOG IN
97+
</a>
98+
</td>
99+
</tr>
100+
</table>
101+
</td>
102+
</tr>
103+
104+
<!-- SPACER -->
105+
<tr>
106+
<td height="32" style="line-height: 0">&nbsp;</td>
107+
</tr>
108+
109+
<!-- SIGNATURE -->
110+
<tr>
111+
<td style="padding: 0 32px">
112+
<p style="margin: 0">
113+
Extend-A-Family Waterloo Region 💙
114+
</p>
115+
</td>
116+
</tr>
117+
118+
<!-- SPACER -->
119+
<tr>
120+
<td height="32" style="line-height: 0">&nbsp;</td>
121+
</tr>
122+
123+
<!-- DIVIDER -->
124+
<tr>
125+
<td style="padding: 0 32px">
126+
<table width="100%" cellpadding="0" cellspacing="0">
127+
<tr>
128+
<td style="border-top: 1px solid #d1d2d4; line-height: 1px">
129+
&nbsp;
130+
</td>
131+
</tr>
132+
</table>
133+
</td>
134+
</tr>
135+
136+
<!-- FOOTER -->
137+
<tr>
138+
<td style="
139+
color: var(--Neutral-700, #555759);
140+
font-size: 12px;
141+
font-style: normal;
142+
font-weight: 400;
143+
line-height: 140%;
144+
letter-spacing: 0.32px;
145+
padding: 20px;
146+
">
147+
This is an automatic message. If you need help, feel free to reply to this email.
148+
</td>
149+
</tr>
150+
</table>
151+
</body>
152+
153+
</html>
154+
`;
155+
156+
export default adminInviteEmail;

backend/emails/constants.ts

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
export const defaultLoginLink = "https://eaf.jimmyliu.dev/welcome";
2+
3+
export const defaultReplyToEmail = "pranol.mathan@eafwr.on.ca";
4+
5+
export const ROLE_COLORS = {
6+
Learner: {
7+
Light: {
8+
Default: "#E8FCFF",
9+
Hover: "#CCF8FF",
10+
Selected: "#AFF0FA",
11+
Pressed: "#90E3F0",
12+
},
13+
Dark: {
14+
Default: "#006C7D",
15+
Hover: "#004D59",
16+
Selected: "#003942",
17+
Pressed: "#002E36",
18+
},
19+
},
20+
Administrator: {
21+
Light: {
22+
Default: "#FFE6DD",
23+
Hover: "#FCC4B1",
24+
Selected: "#FFD9CC",
25+
Pressed: "#FCC4B1",
26+
},
27+
Dark: {
28+
Default: "#8F4C34",
29+
Hover: "#663625",
30+
Selected: "#4D281C",
31+
Pressed: "#3C2016",
32+
},
33+
},
34+
Facilitator: {
35+
Light: {
36+
Default: "#F2F3FF",
37+
Hover: "#E5E7FF",
38+
Selected: "#D9DBFF",
39+
Pressed: "#CACDFC",
40+
},
41+
Dark: {
42+
Default: "#4F549E",
43+
Hover: "#32377D",
44+
Selected: "#1F2469",
45+
Pressed: "#191D54",
46+
},
47+
},
48+
};
Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
import { defaultLoginLink } from "./constants";
2+
3+
const facilitatorApprovedEmail = (
4+
loginLink: string = defaultLoginLink,
5+
): string => `
6+
<html lang="en">
7+
8+
<head>
9+
<meta charset="UTF-8" />
10+
<meta name="viewport" content="width=device-width" />
11+
<title>Facilitator Approved Email</title>
12+
</head>
13+
14+
<body style="margin: 0">
15+
<table width="100%" cellpadding="0" cellspacing="0" style="
16+
font-family: Lexend Deca, Arial, sans-serif;
17+
font-size: 14px;
18+
font-weight: 400;
19+
line-height: 140%;
20+
letter-spacing: 0.32px;
21+
color: #000;
22+
">
23+
<!-- TOP BANNER -->
24+
<tr>
25+
<td style="
26+
padding: 16px 32px;
27+
text-align: center;
28+
border-bottom: 2px solid #E5E7FF;
29+
background: #F2F3FF;
30+
">
31+
<img src="https://firebasestorage.googleapis.com/v0/b/extendafamily-7613e.appspot.com/o/eaf-logo.png?alt=media&token=9f3f5da0-264e-42a5-85a7-0c1fb120b27c" alt="Extend-A-Family logo" style="height: 40px" />
32+
</td>
33+
</tr>
34+
35+
<!-- SPACER -->
36+
<tr>
37+
<td height="32" style="line-height: 0">&nbsp;</td>
38+
</tr>
39+
40+
<!-- MAIN CONTENT -->
41+
<tr>
42+
<td style="padding: 0 32px">
43+
<p style="margin: 0 0 20px">Hello,</p>
44+
45+
<p style="margin: 0 0 20px">
46+
Your account for the Smart Spending, Smart Saving Financial Literacy Tool has been approved. Please login to get started!
47+
</p>
48+
49+
<!-- RESPOND BUTTON -->
50+
<table width="100%" cellpadding="0" cellspacing="0">
51+
<tr>
52+
<td style="text-align: center">
53+
<a href="${loginLink}" style="
54+
display: inline-block;
55+
background: #4F549E;
56+
padding: 10px 24px;
57+
border-radius: 4px;
58+
text-decoration: none;
59+
color: #fff;
60+
font-weight: 300;
61+
letter-spacing: 0.7px;
62+
">
63+
LOG IN
64+
</a>
65+
</td>
66+
</tr>
67+
</table>
68+
</td>
69+
</tr>
70+
71+
<!-- SPACER -->
72+
<tr>
73+
<td height="32" style="line-height: 0">&nbsp;</td>
74+
</tr>
75+
76+
<!-- SIGNATURE -->
77+
<tr>
78+
<td style="padding: 0 32px">
79+
<p style="margin: 0">
80+
Extend-A-Family Waterloo Region 💙
81+
</p>
82+
</td>
83+
</tr>
84+
85+
<!-- SPACER -->
86+
<tr>
87+
<td height="32" style="line-height: 0">&nbsp;</td>
88+
</tr>
89+
90+
<!-- DIVIDER -->
91+
<tr>
92+
<td style="padding: 0 32px">
93+
<table width="100%" cellpadding="0" cellspacing="0">
94+
<tr>
95+
<td style="border-top: 1px solid #d1d2d4; line-height: 1px">
96+
&nbsp;
97+
</td>
98+
</tr>
99+
</table>
100+
</td>
101+
</tr>
102+
103+
<!-- FOOTER -->
104+
<tr>
105+
<td style="
106+
color: var(--Neutral-700, #555759);
107+
font-size: 12px;
108+
font-style: normal;
109+
font-weight: 400;
110+
line-height: 140%;
111+
letter-spacing: 0.32px;
112+
padding: 20px;
113+
">
114+
This is an automatic message. If you need help, feel free to reply to this email.
115+
</td>
116+
</tr>
117+
</table>
118+
</body>
119+
120+
</html>
121+
`;
122+
123+
export default facilitatorApprovedEmail;

0 commit comments

Comments
 (0)