Skip to content

feat: edit consents after submission - #285

Open
bfng72 wants to merge 2 commits into
mainfrom
consent-editing
Open

bfng72 wants to merge 2 commits into
mainfrom
consent-editing

Conversation

@bfng72

@bfng72 bfng72 commented Sep 14, 2026

Copy link
Copy Markdown
  • enabled consent editing after submission, db will update accordingly
  • added a line on dashboard if application is submitted/accepted/waiting-list to hint user that they can edit their consents on the submit page

@Lordfirespeed Lordfirespeed left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Really nice work, great job! just a couple of changes and you should be good to go :)

}

private async saveConsents(userId: string, payload: z.infer<typeof submitFormSchema>){
return prisma.$transaction([

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Missing await?

}),
])

await this.saveConsents(request.userProfile.sub, payload)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This being moved to here means the consents are now being saved in a separate transaction from the user submission state being updated - we can't have that!

add a function which returns the values from all the upsertConsent calls in an array (don't await them), then you can spread that array into the transaction above. Lemme know if you'd like an example in case that doesn't make sense

Check your inbox for a confirmation email - you will need the QR code inside to check-in on the day of the
event.
</p>
<p>You can still change your consents <Link href="/dashboard/submit" className="underline">here</Link>. Or just click &quot;Submit&quot; on the navigation bar.</p>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nitpick: since this text is repeated, I'd prefer you make a small component for it

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