Skip to content

feat(registration): add member repository#52

Open
dasher1505 wants to merge 2 commits into
mainfrom
feat/46-add-registration-repo
Open

feat(registration): add member repository#52
dasher1505 wants to merge 2 commits into
mainfrom
feat/46-add-registration-repo

Conversation

@dasher1505

Copy link
Copy Markdown
Contributor

No description provided.

@WilliamTayNZ WilliamTayNZ left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

good work! just a few things

Comment thread src/repositories/memberRepository.ts Outdated
Comment thread src/repositories/memberRepository.ts Outdated
Comment thread src/repositories/memberRepository.ts Outdated
Comment thread src/repositories/memberRepository.ts Outdated
Comment thread src/repositories/memberRepository.ts Outdated
Comment thread src/repositories/memberRepository.ts Outdated

@WilliamTayNZ WilliamTayNZ left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Good work Dasher 🔥 almost ready to go, just a few tiny changes, see comments

Also, since createMembershipRegistration is an important function which actually creates the membership registration, it would be good to specify an explicit contract for what it returns:

type CreateMembershipRegistrationResult =
  | { ok: true }
  | { ok: false; error: { type: "duplicate" | "database" } };

The function's return type should wrap the result type in a Promise, since the function is asynchronous.

Well done


// shared conditional fields
// shared conditional field
isConditionalReturningMember: registration.isEligibleReturningUoaStudent,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I forgot to mention we changed the isEligibleReturningUoaStudent field name to isConditionalReturningMember, so all instances of this should be updated accordingly

faculty: [],
upi: registration.upi,
studentId: registration.studentId,
isCurrentUoaStudent: registration.isCurrentUoaStudent,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

At the moment, the form does not collect this field for conditional returning members.

In the future, we will have a system to retrieve members from the previous year (the details of which are yet to be confirmed with the client), so this might change, but for now it should not be included.

registration: MemberRegistration,
): MemberCreateInput {
const memberData = {
// unconditonal fields

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

typo

discordUsername: registration.discordUsername,

// shared conditional fields
// shared conditional field

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Can we capitalise comments?

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.

2 participants