Skip to content

Commit

Permalink
feature(packages/email-templates): Add event collection email templat…
Browse files Browse the repository at this point in the history
…es (#14896)

* event collection created template

* event submitted to collection -> managers template

* event submitted to collection -> submitter template

* event submission approved template

* event submission denied template

* add template keys

* Apply suggestions from code review

---------

Co-authored-by: Julien Genestoux <[email protected]>
  • Loading branch information
0xTxbi and julien51 authored Oct 30, 2024
1 parent 7cf50d6 commit 77f2a9d
Show file tree
Hide file tree
Showing 6 changed files with 151 additions and 0 deletions.
15 changes: 15 additions & 0 deletions packages/email-templates/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ import LockTemplates from './templates/locks'
import bases from './templates/base/index'
import custom from './templates/custom'
import nextAuthCode from './templates/nextAuthCode'
import eventCollectionCreated from './templates/eventCollectionCreated'
import eventApprovedInCollection from './templates/eventApprovedInCollection'
import eventDeniedInCollection from './templates/eventDeniedInCollection'
import eventSubmittedToCollectionManager from './templates/eventSubmittedToCollectionManager'
import eventSubmittedToCollectionSubmitter from './templates/eventSubmittedToCollectionSubmitter'
export interface EmailTemplateProps {
nowrap?: boolean
subject: string
Expand All @@ -43,6 +48,11 @@ type Template =
| 'certificationKeyAirdropped'
| 'custom'
| 'nextAuthCode'
| 'eventCollectionCreated'
| 'eventApprovedInCollection'
| 'eventDeniedInCollection'
| 'eventSubmittedToCollectionManager'
| 'eventSubmittedToCollectionSubmitter'

export const EmailTemplates: Record<string, EmailTemplateProps> = {
confirmEmail,
Expand All @@ -63,6 +73,11 @@ export const EmailTemplates: Record<string, EmailTemplateProps> = {
inviteEvent,
eventDeployed,
nextAuthCode,
eventCollectionCreated,
eventApprovedInCollection,
eventDeniedInCollection,
eventSubmittedToCollectionManager,
eventSubmittedToCollectionSubmitter,
}

const templates: Record<string, EmailTemplateProps> = {}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
export default {
subject:
'The event "{{eventName}}" has been approved for "{{collectionName}}"',
html: `<h1>Event Approved</h1>
<p>
Congratulations! The event "<strong>{{eventName}}</strong>" has been approved and added to the "<strong>{{collectionName}}</strong>" collection.
</p>
{{eventDetailsLight
eventName
eventDate
eventUrl
}}
<p>
You can view this event in the collection and share the collection link to promote the event.
</p>
<p>
<a href="{{collectionUrl}}">View the collection</a>
</p>
<p>
If you have any questions or need further assistance, reply to this email.
</p>
`,
}
36 changes: 36 additions & 0 deletions packages/email-templates/src/templates/eventCollectionCreated.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
export default {
subject: 'Your event collection "{{collectionName}}" is live!',
html: `<h1>Your Event Collection is Live!</h1>
<p>
<strong>Congratulations!</strong> Your event collection "{{collectionName}}" has been successfully created. Start by sharing it with your community and add events.
</p>
{{collectionDetailsLight
collectionName
collectionUrl
}}
<p>
Next Steps:
</p>
<ul>
<li><strong>Share your collection</strong><br>
Use this link to share your collection: <a href="{{collectionUrl}}">{{collectionUrl}}</a></li>
<li><strong>Customize Settings</strong><br>
Update the description, images, and social links in your collection settings.</li>
<li><strong>Add Events</strong><br>
Add new events by creating them, using existing event URLs, or selecting from your existing events.</li>
<li><strong>Manage Contributors</strong><br>
Assign additional managers to help curate and approve events.</li>
</ul>
<p>
Need assistance? Reply to this email, and we’ll be happy to help.
</p>
`,
}
20 changes: 20 additions & 0 deletions packages/email-templates/src/templates/eventDeniedInCollection.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
export default {
subject:
'The event "{{eventName}}" was not approved for "{{collectionName}}"',
html: `<h1>Event Submission Update</h1>
<p>
Unfortunately, the event "<strong>{{eventName}}</strong>" was not approved for the "<strong>{{collectionName}}</strong>" collection.
</p>
{{eventDetailsLight
eventName
eventDate
eventUrl
}}
<p>
Thank you for your interest in contributing to this collection.
</p>
`,
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
export default {
subject: 'New event "{{eventName}}" submitted to "{{collectionName}}"',
html: `<h1>New Event Submitted</h1>
<p>
A new event titled "<strong>{{eventName}}</strong>" has been submitted to the "<strong>{{collectionName}}</strong>" collection.
</p>
{{eventDetailsLight
eventName
eventDate
eventUrl
}}
<p>
Please review and approve or reject the event.
</p>
<p>
<a href="{{collectionUrl}}">Go to the collection dashboard</a>
</p>
<p>
Need assistance? Reply to this email, and we’ll be happy to help.
</p>
`,
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
export default {
subject:
'The event "{{eventName}}" has been submitted to "{{collectionName}}"',
html: `<h1>Event Submission Received</h1>
<p>
Thank you for submitting your event "<strong>{{eventName}}</strong>" to the collection "<strong>{{collectionName}}</strong>".
</p>
{{eventDetailsLight
eventName
eventDate
eventUrl
}}
<p>
Your event is now pending approval. You will receive a notification once it has been reviewed.
</p>
<p>
If you have any questions, feel free to reply to this email.
</p>
`,
}

0 comments on commit 77f2a9d

Please sign in to comment.