Skip to content

Commit

Permalink
Add the list of active terms to onboarding email (#28)
Browse files Browse the repository at this point in the history
This PR adds an `activeTerms` input to the onboarding email. This shows
a list of active terms to the user.

<img width="464" alt="image"
src="https://github.com/user-attachments/assets/93c2a740-a5ea-44b8-b531-3dcf38b4260e"
/>
  • Loading branch information
ben-z authored Jan 1, 2025
1 parent def2f1e commit 6db9003
Showing 1 changed file with 39 additions and 10 deletions.
49 changes: 39 additions & 10 deletions emails/onboarding.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {
Heading,
Hr,
Link,
Section,
Expand All @@ -11,6 +12,7 @@ import { WATcloudEmail } from "./_common/watcloud-email";
const WATcloudOnboardingEmailProps = z.object({
name: z.string(),
services: z.array(z.string()),
activeTerms: z.array(z.string()),
});

type WATcloudOnboardingEmailProps = z.infer<typeof WATcloudOnboardingEmailProps>;
Expand All @@ -31,23 +33,46 @@ export const WATcloudOnboardingEmail = (props: WATcloudOnboardingEmailProps) =>
<WATcloudEmail previewText={previewText}>
<Text>Hi {name},</Text>
<Text>
Welcome to WATcloud, WATonomous's compute cluster and infrastructure.
You are receiving this email because you have been granted access to WATcloud, or your access has been updated.
Welcome to WATcloud, WATonomous's compute cluster and infrastructure!
</Text>
<Text>
You are receiving this email because you have been granted access to WATcloud, or your existing access has been updated.
</Text>
<Hr />
<Section>
<Text>Here's a list of services that you now have access to:</Text>
<Heading as="h3">Your Access Details</Heading>
<Text>
Our records indicate that you are, or have been, active during the following term(s):
</Text>
<ul style={{ fontSize: "14px", lineHeight: "24px" }}>
{props.activeTerms?.map((term) => (
<li key={term}>{term}</li>
))}
</ul>
</Section>
<Section>
<Heading as="h3">Services You Have Access To</Heading>
<Text>
You now have access to the following services:
</Text>
{accessInstructions}
<Text>
Access instructions for each service can be found in the <Link href="https://cloud.watonomous.ca/docs/services" style={{ color: "#1e90ff", textDecoration: "none" }}>Services</Link> documentation.
If you are an alumnus, you may retain access to some services beyond the active terms.
</Text>
</Section>
<Section>
<Heading as="h3">Getting Started</Heading>
<Text>
Access instructions for each service are available in the <Link href="https://cloud.watonomous.ca/docs/services" style={{ color: "#1e90ff", textDecoration: "none" }}>Services Documentation</Link>.
</Text>
</Section>
<Section>
<Heading as="h3">Questions or Assistance?</Heading>
<Text>
If you have any questions or need assistance, feel free to reach out to your <Link href="https://cloud.watonomous.ca/docs/services#watcloud-contact" style={{ color: "#1e90ff", textDecoration: "none" }}>WATcloud contact</Link> or email the WATcloud team at <Link href={`mailto:[email protected]`} style={{ color: "#1e90ff", textDecoration: "none" }}>[email protected]</Link>.
</Text>
</Section>
<Hr />
<Text>
If you have any questions, please reach out to your <Link href="https://cloud.watonomous.ca/docs/services#watcloud-contact" style={{ color: "#1e90ff", textDecoration: "none" }}>WATcloud contact</Link> or the WATcloud team at <Link href={`mailto:[email protected]`} style={{ color: "#1e90ff", textDecoration: "none" }}>[email protected]</Link>.
</Text>
<Text>
Vroom vroom,
Vroom vroom!
</Text>
<pre style={{ fontFamily: "Courier New, monospace" }}>
{dedent(String.raw`
Expand All @@ -66,6 +91,10 @@ export const WATcloudOnboardingEmail = (props: WATcloudOnboardingEmailProps) =>
WATcloudOnboardingEmail.PreviewProps = {
name: "John Doe",
services: ["Compute Cluster", "Discord", "Google Workspace"],
activeTerms: [
"2024 Fall (2024-09-01 to 2024-12-31)",
"2025 Winter (2025-01-01 to 2025-04-30)"
],
} as WATcloudOnboardingEmailProps;

export default WATcloudOnboardingEmail;

0 comments on commit 6db9003

Please sign in to comment.