CodeForPhilly / prevention-point

Current Functional Product
MIT License
30 stars 15 forks source link

Check front end for hard coded values #447

Closed MikeyManoguerra closed 3 years ago

MikeyManoguerra commented 3 years ago

this one can be iceboxed for now but it should be done before putting in production. any values should rely on requests to back end for data

MikeyManoguerra commented 3 years ago

one potential solution is to add unchangeable slugs to program and service tables

JackRyan1989 commented 3 years ago

So I actually have no idea what that means! Which is exciting. Maybe we could chat a bit more about that on Slack?

MikeyManoguerra commented 3 years ago

I specifically want to get these out of the component, the program and service ids here:

https://github.com/CodeForPhilly/prevention-point/blob/24894c0bef8fc9b1105664936aee41645d6bbc5d/frontend/src/components/SepForm.js#L289

For a slug based solution:

JackRyan1989 commented 3 years ago

@MikeyManoguerra So for this particular case (SEP data), are the fields Urgency, Program and Service always going to be set to those particular values? If so, would it make sense to put the constants in the ParticipantStore rather than in the table itself? Also, by table field, do you mean values placed into the /constants index.js file? I would think we could then import those values into the ParticipantStore. Let me know if I'm totally off the mark here.

MikeyManoguerra commented 3 years ago

@JackRyan1989 sorry i missed these questions. by tables and fields i was referring to db models