-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cledi selena edit senior #111
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@@ -3,7 +3,8 @@ import { z } from "zod"; | |||
|
|||
export const seniorSchema = z.object({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we potentially use this instead of redefining postSeniorSchema
and patchSeniorSchema
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job guys :) I only have a couple of small feedbacks.
- I noticed that you had to change quite a few places with the new schema changes. I think we can utilize the senior schema defined in
models/
to reduce work in the future. - Double check the routing in top-level
layout.tsx
for chapter leaders. - When you render items for
CardGrid
, don't forget to include a key.
cf9a050
to
6c94553
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I fixed the merge conflicts and updated the sidebar on my end. The functionality remains the same.
Description
Change senior field to have firstname and lastname in the database, instead of just one
name
field. Also created a page for chapter leader to view seniors, as well as add new ones @/private/[uid]/chapter-leader/seniors.Linked front-end senior add pop-up component to the senior API in the new backend route.
Issues
No issue was made for this.
Test
Run npx prisma generate to update the PrismaClient. Then, add a new senior in the /private/[uid]/chapter-leader/seniors page.
Possible Downsides
Lacks logic to validate whether the user is a chapter leader. Double check if the logic to fetch the user, fetch the chapter, fetch the corresponding seniors in that chapter, is in line with intended business logic.