Northeastern-Electric-Racing / PM-Dashboard-v2

Northeastern Electric Racing Project Management Dashboard - version 2
https://nerpm.netlify.app
GNU Affero General Public License v3.0
15 stars 2 forks source link

#732 - Teams #754

Closed anthonybernardi closed 2 years ago

anthonybernardi commented 2 years ago

Changes

This is an initial PR. I've only done the schema so far and some types set up. Bare bones of two basic endpoints too.

Notes

A lot more to do but I just want to make sure that I'm on the right track

Test Cases

still need to manually test the backend stuff and make sure it's working

To Do

Closes #732

anthonybernardi commented 2 years ago

Update: I think that I'll be satisfied with this pr if we get the prisma schema in and the basic teams backend file going. Initially wanted to do a lot more but I think it would be better to get this out then other people can do some endpoints on it also I don't have time to do everything so quickly.

Teams page and icon ui: image

anthonybernardi commented 2 years ago

So my plan for the description field is that the users write it in markdown (and maybe there's a preview button and a link to a simple markdown guide), then to store it in the database we have to replace every line break with a unique character/string (i.e., ###THIS IS A LINE BREAK###) because otherwise postgres replaces them with just a normal space. Then when the front end retrieves it to render it again you just replace all instances of the unique character with \n and then use a package to display it as markdown

jamescd18 commented 2 years ago

Are we not able to use \n as the special character? Does Postgres scrub that out?

anthonybernardi commented 2 years ago

Are we not able to use \n as the special character? Does Postgres scrub that out?

yeah that would probably work, I just tested it with a longer one