-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add email template for file expiry #18
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good after the changes!
@@ -11,7 +11,7 @@ import { getAsset, registerAsset, WATcloudURI } from "../../utils/watcloud-uri"; | |||
registerAsset('watcloud-logo', new WATcloudURI("watcloud://v1/sha256:393767e36d5387815c15d11c506c3c820de5db41723ffc062751673621dedb15?name=1024x512%20black%401x.png")) | |||
|
|||
// Wrapper for WATcloud-themed emails | |||
export function WATcloudEmail({ | |||
export function Email({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
export function Email({ | |
export function WATcloudEmail({ |
Oh we should keep this as-is. I was talking about the per-email function names.
|
||
type EmailProps = z.infer<typeof EmailProps>; | ||
|
||
export const FileExpiryEmail = (props: EmailProps) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be called email, because we don't use it externally anyway.
export const FileExpiryEmail = (props: EmailProps) => { | |
const Email = (props: EmailProps) => { |
const { name, paths, daysForExpiry, deletionDate} = EmailProps.parse(props); | ||
|
||
const previewText = `You have expired files in the WATO drives`; | ||
const mapPathToMachine = (): Record<string, string[]> => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like we can just keep this simple and just list the strings, don't need to group by machine. But that's up to you.
DIDN"T MEAN TO MERGE! |
Add custom email type for notifying users when their files expire ![image](https://github.com/user-attachments/assets/39c1ff8d-13ec-417c-b884-9be5330852e5) Continuation of #18
Need a unique email template for sending file expiry related emails.
Lists the expired emails from each machine
Tested using the cli to generate emails and it gives output as expected.