cybernetisk / internsystem-v2

A NextJS-based website. Used for public information about Cybernetisk Selskab, and necessary tools for volunteers at the bar/café Escape.
https://cyb.no
MIT License
7 stars 8 forks source link

Comments not appearing on membership page #55

Closed yrjarv closed 2 weeks ago

yrjarv commented 1 month ago

When creating a new member in /pages/main/volunteering/membership, the comment doesn't show up in the table

To Reproduce Go to http://localhost:3005/pages/main/volunteering/membership, and enter a random name and a comment. Press "Add new member". The member will then show up in the table on the right, but the comment you inputted will not. This issue seems to be on cyb.no too, but I do not want to send test data to the prod database.

Screenshots image

EricSvebakk commented 1 month ago

A quick look at MEMBERSHIP_TABLE_HEADERS in membership/page.js reveals that the id referenced for the comment column in the database is incorrect.

The table header references comment, while the database table column is named comments.

This was an oversight on my part. The table was migrated from the old system, and the column should be renamed in the database to comment.

I will update the database, however the prisma schema must be updated as well. If you wish to fix this, I will merge the pull-request and update the database.