Skip to content

Rallly is an open-source scheduling and collaboration tool designed to make organizing events and meetings easier.

🌱 Add participant notes to seed data (#2853)

Luke Vellab049bd2fded1
diff --git a/packages/database/prisma/seed.ts b/packages/database/prisma/seed.ts
index 444264abb..57a5bbf1d 100644
--- a/packages/database/prisma/seed.ts
+++ b/packages/database/prisma/seed.ts
@@ -115,8 +115,7 @@ async function main() {
scheduledEventId: poll.scheduledEventId,
hideParticipants: poll.hideParticipants,
hideScores: poll.hideScores,
- // Seed polls model pre-existing data, which predates the comments-off default
- disableComments: poll.disableComments ?? false,
+ disableComments: poll.disableComments ?? !poll.comments?.length,
requireParticipantEmail: poll.requireParticipantEmail,
kind,
},
@@ -146,6 +145,7 @@ async function main() {
pollId,
name: part.name,
email: part.email,
+ note: part.note,
userId: part.userId,
},
});
diff --git a/packages/database/prisma/seed/data.ts b/packages/database/prisma/seed/data.ts
index 726b0a14e..98736def9 100644
--- a/packages/database/prisma/seed/data.ts
+++ b/packages/database/prisma/seed/data.ts
@@ -142,6 +142,7 @@ export type PollDef = {
name: string;
email?: string;
userId?: string;
+ note?: string;
votes: VoteType[];
}>;
comments?: Array<{
@@ -229,6 +230,7 @@ const personalPolls: PollDef[] = [
{
name: "Priya Patel",
+ note: "Still recovering from a knee injury, so I'd prefer a slower pace if that's ok.",
votes: ["no", "yes", "yes", "ifNeedBe"],
},
{
@@ -314,6 +316,7 @@ const personalPolls: PollDef[] = [
{
name: "David Chen",
+ note: "Traveling for work the week of the 15th, so the earlier dates suit me best.",
votes: ["yes", "ifNeedBe", "no", "no"],
},
{
@@ -509,6 +512,7 @@ const acmePolls: PollDef[] = [
name: "Emily Nakamura",
userId: "user-4",
+ note: "I'm out Monday but flexible otherwise. Can join remotely if needed.",
votes: ["no", "yes", "yes", "yes"],
},
{