Jbays / gymnastics-tracker

full stack app to track my gymnastics progress
0 stars 0 forks source link

Add constants to data directory #17

Closed Jbays closed 6 years ago

Jbays commented 6 years ago

How to convert exercise_ids and progression_ids and the rest into their plain-language equivalents?

Ex. The plain language equivalent for exercise_id = 1 is 'assisted squat'.

The regular user will not understand do mastery_id=7 && step_id = 63 of exercise_id = 1 of progression_id = 1 Plain Language Equivalent --> do 5 sets of 15 reps of assisted squats. Single leg squat progression.

One way to convert to plain language is various knex joins. While workable, this solution will not scale.

What about in data directory a js file called 'allConstants'? From there, you'll find all the various plain language equivalents. The allConstants script'll make those knex queries. Write those results to a file. Then I can require / import that file wherever I need plain language equivalents.

Jbays commented 6 years ago

Finished this.