Giter VIP home page Giter VIP logo

Comments (4)

theebank avatar theebank commented on September 1, 2024

[](930c2c5)

from fitnis.

theebank avatar theebank commented on September 1, 2024
image

These arrows should only be rendered if there is something to expand

from fitnis.

theebank avatar theebank commented on September 1, 2024

Need to remodel how data is being set to backend

Front-End:

Collects and structures the data in an easily manageable format:

data: {
    programname: "...",
    exercises: [
    {
        exerciseid: "...",
        exercisename: "...",
        sets: [
            { set: 1, reps: 8, RPE: 7, Notes: "Felt good" },
            { set: 2, reps: 8, RPE: 8, Notes: "Tough but manageable" },
        ]
    },
   ]
}

Back-End:

Receives the data and processes it to fit the relational database schema:
Extracts the programname and creates a new workout program entry if needed.
Iterates through each exercise in the exercises array:
Checks if the exerciseid already exists or if a new record should be created.
For each set in the sets array, creates a new entry in the Sets Table with the corresponding exerciseid, reps, RPE, and Notes.

Database Operations:

The workout plan, exercises, and sets are all stored in their respective tables, with relationships defined by foreign keys.
This could involve multiple insert queries, potentially within a transaction to ensure data consistency.

from fitnis.

theebank avatar theebank commented on September 1, 2024

Front-end:

Step 1: Add exercises to workout cart
Step 2: Add desired amount of sets + info (reps, rpe, notes) to each exercise

  • currently storing the number of sets per exercise like [3,3,3,4,5]
  • Might be better to do like [[8,8,8],[8,8,8]] (2d array where each element in parent array is an array of reps)
    • if sets are needed can just find the length of the array
    • Could do a similar weight array type thing

Step 3: name workout

from fitnis.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.