feat(registration): add member repository#52
Conversation
WilliamTayNZ
left a comment
There was a problem hiding this comment.
good work! just a few things
WilliamTayNZ
left a comment
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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 |
| discordUsername: registration.discordUsername, | ||
|
|
||
| // shared conditional fields | ||
| // shared conditional field |
There was a problem hiding this comment.
Can we capitalise comments?
No description provided.