Skip to content
This repository was archived by the owner on Oct 7, 2025. It is now read-only.

Commit fdfac90

Browse files
zesanrahimHasithDeAlwis
authored andcommitted
feat(axiom): add email seed data
1 parent fd63e29 commit fdfac90

File tree

1 file changed

+160
-57
lines changed

1 file changed

+160
-57
lines changed

libs/db/collections/models/Emails.ts

Lines changed: 160 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export const Emails: CollectionConfig = {
3838
fields: [
3939
{
4040
name: 'text',
41-
type: 'text',
41+
type: 'textarea',
4242
required: true,
4343
},
4444
{
@@ -51,6 +51,37 @@ export const Emails: CollectionConfig = {
5151
type: 'text',
5252
required: true,
5353
},
54+
{
55+
name: 'secondButtonText',
56+
type: 'text',
57+
required: false,
58+
},
59+
{
60+
name: 'secondButtonLink',
61+
type: 'text',
62+
required: false,
63+
},
64+
{
65+
name: 'events',
66+
type: 'array',
67+
fields: [
68+
{
69+
name: 'title',
70+
type: 'text',
71+
required: false,
72+
},
73+
{
74+
name: 'text',
75+
type: 'textarea',
76+
required: false,
77+
},
78+
{
79+
name: 'buttonText',
80+
type: 'text',
81+
required: false,
82+
},
83+
],
84+
},
5485
{
5586
name: 'footer',
5687
type: 'text',
@@ -61,6 +92,7 @@ export const Emails: CollectionConfig = {
6192
],
6293
}
6394

95+
6496
export async function seedEmails(payload: Payload) {
6597
try {
6698
await Promise.all(
@@ -73,6 +105,9 @@ export async function seedEmails(payload: Payload) {
73105
text: email.body.text,
74106
buttonText: email.body.buttonText,
75107
buttonLink: email.body.buttonLink,
108+
secondButtonText: email.body.secondButtonText || null,
109+
secondButtonLink: email.body.secondButtonLink || null,
110+
events: email.body.events || [],
76111
footer: email.body.footer,
77112
},
78113
},
@@ -86,59 +121,127 @@ export async function seedEmails(payload: Payload) {
86121
}
87122
}
88123

89-
export const emailSeedData = [
90-
{
91-
title: 'Thank you for registering Hasith!',
92-
body: {
93-
text: 'Your submission has been received. Looking forward to seeing you on March 14th!',
94-
buttonText: 'RSVP',
95-
buttonLink: 'https://portal.cuhacking.ca/',
96-
footer: 'See you there!',
97-
},
98-
},
99-
{
100-
title: 'Welcome to the Community!',
101-
body: {
102-
text: 'We’re excited to have you on board. Stay tuned for updates and events!',
103-
buttonText: 'Join Discord',
104-
buttonLink: 'https://discord.gg/example',
105-
footer: 'Connect with the community!',
106-
},
107-
},
108-
{
109-
title: 'Your Weekly Update',
110-
body: {
111-
text: 'Here’s what’s happening this week at CUHacking.',
112-
buttonText: 'Read More',
113-
buttonLink: 'https://cuhacking.ca/blog',
114-
footer: 'Check out the latest news!',
115-
},
116-
},
117-
{
118-
title: 'Reminder: Hackathon Starts Soon!',
119-
body: {
120-
text: 'The hackathon kicks off in just 3 days. Make sure you’re prepared!',
121-
buttonText: 'Event Details',
122-
buttonLink: 'https://cuhacking.ca/hackathon',
123-
footer: 'See the schedule here.',
124-
},
125-
},
126-
{
127-
title: 'Thank You for Attending!',
128-
body: {
129-
text: 'We hope you had a great time at our event. Your feedback is valuable to us.',
130-
buttonText: 'Give Feedback',
131-
buttonLink: 'https://forms.example.com/feedback',
132-
footer: 'Help us improve!',
133-
},
134-
},
135-
{
136-
title: 'Exclusive Offer for cuHacking Members!',
137-
body: {
138-
text: 'As a valued member, we’re giving you early access to our upcoming event!',
139-
buttonText: 'Claim Your Spot',
140-
buttonLink: 'https://cuhacking.ca/exclusive',
141-
footer: 'Limited spots available!',
142-
},
143-
},
144-
]
124+
125+
// WIP - NOT FINISHED YET
126+
// export const emailSeedData = [
127+
// {
128+
// title: 'Thank you for registering Hasith!',
129+
// body: {
130+
// text: 'Your submission has been received. Looking forward to seeing you on March 14th!\n\nDetails ...\n📍 Richcraft Hall (1125 Colonel By Dr, Carleton University)\n⌛ March 14-16 (Check-in from 5pm - 9pm)',
131+
// buttonText: 'RSVP',
132+
// buttonLink: 'https://portal.cuhacking.ca/',
133+
// secondButtonText: 'ADD TO CALENDAR',
134+
// secondButtonLink: 'https://calendar.google.com/calendar/event?action=TEMPLATE',
135+
// events: [
136+
// {
137+
// title: 'Upcoming events...',
138+
// },
139+
// {
140+
// title: 'Intro to QNX',
141+
// text: 'Learn about QNX with 3 awesome speakers + meet some interns. Make sure you bring your laptop.',
142+
// buttonText: 'REGISTER',
143+
// }
144+
// ],
145+
// footer: 'See you there!',
146+
// },
147+
// },
148+
// {
149+
// title: 'Welcome to the Community!',
150+
// body: {
151+
// text: `We're excited to have you on board. Stay tuned for updates and events!\n\n🎉 Join our Discord server to connect with other hackers\n💻 Check out our workshops\n🏆 Get ready for the upcoming hackathon`,
152+
// buttonText: 'JOIN DISCORD',
153+
// buttonLink: 'https://discord.gg/VnbWdAe8kA',
154+
// secondButtonText: 'EXPLORE WORKSHOPS',
155+
// secondButtonLink: 'https://cuhacking.ca/workshops',
156+
// events: [
157+
// {
158+
// title: 'Upcoming events...',
159+
// },
160+
// {
161+
// title: 'Networking Mixer',
162+
// text: 'Meet industry professionals and fellow hackers',
163+
// buttonText: 'RSVP',
164+
// }
165+
// ],
166+
// footer: 'Connect with the community!',
167+
// },
168+
// },
169+
// {
170+
// title: 'Your Weekly Update',
171+
// body: {
172+
// text: `Here's what's happening this week at cuHacking.\n\n🚀 New workshops announced\n🎙️ Guest speakers from QNX and Fullscript\n🧩 Practice hackathon challenges`,
173+
// buttonText: 'READ MORE',
174+
// buttonLink: 'https://cuhacking.ca/blog',
175+
// secondButtonText: 'VIEW SCHEDULE',
176+
// secondButtonLink: 'https://cuhacking.ca/schedule',
177+
// events: [
178+
// {
179+
// title: 'Upcoming events...',
180+
// },
181+
// {
182+
// title: 'Workshop: Intro to React',
183+
// text: 'Learn the basics of React with our experienced mentors',
184+
// buttonText: 'REGISTER',
185+
// },
186+
// {
187+
// title: 'Tech Talk: Cybersecurity Basics',
188+
// text: 'Join CSE for an introduction to cybersecurity principles',
189+
// buttonText: 'REGISTER',
190+
// }
191+
// ],
192+
// footer: 'Check out the latest news!',
193+
// },
194+
// },
195+
// {
196+
// title: 'Reminder: Hackathon Starts Soon!',
197+
// body: {
198+
// text: `The hackathon kicks off in just 3 days. Make sure you're prepared!\n\nWhat to bring?\n🪪 Government ID\n💻 Your laptop + charger\n🛏️ Sleeping bags\n🪥 Personal hygiene (plz bring deodorant, plz ...)\n🥤 Reusable water bottle\n🤪 A positive attitude!`,
199+
// buttonText: 'EVENT DETAILS',
200+
// buttonLink: 'https://cuhacking.ca/hackathon',
201+
// secondButtonText: 'JOIN DISCORD',
202+
// secondButtonLink: 'https://discord.gg/VnbWdAe8kA',
203+
// events: [
204+
// {
205+
// title: 'Pre-Hackathon Workshop',
206+
// text: 'Get a head start with our pre-hackathon workshop',
207+
// buttonText: 'JOIN NOW',
208+
// }
209+
// ],
210+
// footer: 'See the schedule here.',
211+
// },
212+
// },
213+
// {
214+
// title: 'Thank You for Attending!',
215+
// body: {
216+
// text: 'We hope you had a great time at our event. Your feedback is valuable to us.\n\n🏆 Congratulations to all winners!\n📸 Check out event photos\n🗓️ Stay tuned for our next hackathon',
217+
// buttonText: 'GIVE FEEDBACK',
218+
// buttonLink: 'https://forms.example.com/feedback',
219+
// secondButtonText: 'VIEW PHOTOS',
220+
// secondButtonLink: 'https://cuhacking.ca/gallery',
221+
// events: [
222+
// {
223+
// title: 'Upcoming events...',
224+
// },
225+
// {
226+
// title: 'Project Showcase',
227+
// text: 'Present your hackathon project to industry professionals',
228+
// buttonText: 'REGISTER',
229+
// }
230+
// ],
231+
// footer: 'Help us improve!',
232+
// },
233+
// },
234+
// {
235+
// title: 'Exclusive Offer for cuHacking Members!',
236+
// body: {
237+
// text: `As a valued member, we're giving you early access to our upcoming event!\n\n🎁 Special perks for cuHacking members\n🔥 Limited spots available\n🚀 Exclusive networking opportunities`,
238+
// buttonText: 'CLAIM YOUR SPOT',
239+
// buttonLink: 'https://cuhacking.ca/exclusive',
240+
// secondButtonText: 'LEARN MORE',
241+
// secondButtonLink: 'https://cuhacking.ca/membership-benefits',
242+
// events: [
243+
// ],
244+
// footer: 'Limited spots available!',
245+
// },
246+
// },
247+
// ]

0 commit comments

Comments
 (0)