Skip to content

#4244 events attendance#4330

Open
Santiordon wants to merge 8 commits into
developfrom
#4244-events-attendance
Open

#4244 events attendance#4330
Santiordon wants to merge 8 commits into
developfrom
#4244-events-attendance

Conversation

@Santiordon

Copy link
Copy Markdown
Contributor

Changes

Added the following:

  1. Event
  2. Schedule_Slot
  3. Document
  4. Meeting_Attendance

Checklist

  • All commits are tagged with the ticket number
  • No linting errors / newline at end of file warnings
  • All code follows repository-configured prettier formatting
  • No merge conflicts
  • All checks passing
  • Screenshots of UI changes (see Screenshots section)
  • Remove any non-applicable sections of this template
  • Assign the PR to yourself
  • No yarn.lock changes (unless dependencies have changed)
  • Request reviewers & ping on Slack
  • PR is linked to the ticket (fill in the closes line below)

Closes #4244 (issue #)

@Santiordon
Santiordon requested a review from Steph375 July 15, 2026 02:19
@Santiordon Santiordon self-assigned this Jul 15, 2026
@Santiordon Santiordon linked an issue Jul 15, 2026 that may be closed by this pull request

@Steph375 Steph375 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Just a couple of things!

Comment thread src/backend/src/prisma/seed/event.process.ts Outdated
Comment thread src/backend/src/prisma/seed/event.process.ts
userCreatedId: string,
attendeeIds: string[]
): Prisma.Meeting_AttendanceCreateInput => ({
slackChannelId: `C${Math.random().toString(36).substring(2, 12).toUpperCase()}`,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these use Math.random and the global faker instead of the seeded one, so they won't be reproducible. can we route them through the injected faker (faker.string.uuid() / faker.string.numeric)

Comment thread src/backend/src/prisma/factories/event.factory.ts Outdated
Steph375
Steph375 previously approved these changes Jul 16, 2026
@wavehassman
wavehassman self-requested a review July 17, 2026 00:45
Comment thread src/backend/src/prisma/factories/event.factory.ts Outdated
Comment thread src/backend/src/prisma/factories/event.factory.ts Outdated
Comment thread src/backend/src/prisma/factories/event.factory.ts Outdated
Comment thread src/backend/src/prisma/factories/event.factory.ts Outdated

@wavehassman wavehassman left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Big things I noticed:

  1. Events do not follow their event types required and optional fields
  2. No event and document date created, you changed it for Meeting Attendance but not these
  3. approvalRequiredByUserId and approved are linked together so shouldn't be set randomly

I would look at the service functions for events, so you understand how everything is linked

const CAR_COUNT = 5;

const FROM_MONTH = 1; // January
const FROM_MONTH = 5; // May

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why did you change these?

export const generateEventDateCreated = (faker: Faker, initialDateScheduled: Date): Date =>
addDaysToDate(initialDateScheduled, -faker.number.int({ min: 1, max: 14 }));

export const generateEventStatus = (

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does not include confirmed

? [...requiredMemberIds, ...this.faker.helpers.arrayElements(optionalMemberIds)]
: [...this.faker.helpers.arrayElements(requiredMemberIds), ...this.faker.helpers.arrayElements(optionalMemberIds)]
: [];
const deniedMemberIds = eventType.requiresConfirmation

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I honestly don't think denied members is ever used
Could just be []

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Seed Data] - Generate Events and Attendance Data

3 participants