diff --git a/README.md b/README.md index a4b6b40..7400bc2 100644 --- a/README.md +++ b/README.md @@ -1,36 +1,23 @@ # Open Health -Workout Routines -- Routine Name -- Exercise Type - - Aerobic - - Strength - - Flexibility - - Endurance -- Exercise Measure - - Distance - - Weight - - Time - - Rate -- Exercise Units - - Distance - - Miles - - Kilometers - - Meters - - Yards - - Feet - - Weight - - KG - - LBS - - Time - - Hours - - Minutes - - Seconds - - Milliseconds - - Rate - - Miles per Hour - - Kilometers per Hour - - Beats Per Minute - - Steps per Minute -- Instructions +This is a simple tracker for workouts, meals, and measurments. +1. Sign up / Register. +2. Create a Routine (Workout) +3. Add exercise(s) to the Routine, and add measures to your exercise. +4. Log your exercise based on the routine you're doing (e.g. Weights, Walking, Running, Swimming, Biking, etc) +5. See graphs to indicate your improvement over time. + +Repeat for Meal tracking, and Body Measurements + +## Built with +- MeteorJS +- Blaze Layout +- NodeJS +- FerretDB and PostgreSQL +- PicoCSS + +## LICENSED +Use if if you like it. No warranty of any kind is offered, not should it be expected. + +This project is free as in freedom, and free as in cost. diff --git a/client/General/Logbook/logbook.html b/client/General/Logbook/logbook.html new file mode 100644 index 0000000..346c710 --- /dev/null +++ b/client/General/Logbook/logbook.html @@ -0,0 +1,19 @@ + \ No newline at end of file diff --git a/client/General/Logbook/logbook.js b/client/General/Logbook/logbook.js new file mode 100644 index 0000000..63129c5 --- /dev/null +++ b/client/General/Logbook/logbook.js @@ -0,0 +1,27 @@ +import { FlowRouter } from 'meteor/ostrio:flow-router-extra'; +import { Workouts } from '../../../imports/api/workouts.js'; +import { WorkoutLog } from '../../../imports/api/workoutLog.js'; + +Template.logbook.onCreated(function() { + this.subscribe("myWorkoutRoutines"); + this.subscribe("myWorkoutLog"); +}); + +Template.logbook.onRendered(function() { + +}); + +Template.logbook.helpers({ + workouts: function() { + return Workouts.find({}); + }, + workoutCount: function() { + let routineId= this._id; + let count = WorkoutLog.find({ routineId: routineId }).count(); + return count; + }, +}); + +Template.logbook.events({ + +}); \ No newline at end of file diff --git a/client/General/Workouts/WorkoutLogs/workoutLog.js b/client/General/Workouts/WorkoutLogs/workoutLog.js index ddac58f..eb9c3ec 100644 --- a/client/General/Workouts/WorkoutLogs/workoutLog.js +++ b/client/General/Workouts/WorkoutLogs/workoutLog.js @@ -78,6 +78,15 @@ Template.workoutLog.events({ showSnackbar("Exercise Not Saved!", "red"); } else { showSnackbar("Exercise Added!", "green"); + $("#exerciseName").val(""); + $("#exerciseType").val(""); + $("#exerciseMeasure").val(""); + $("#exerciseUnitMeasure").val(""); + $("#exerciseMeasure2").val(""); + $("#exerciseUnitMeasure2").val(""); + $("#exerciseMeasure3").val(""); + $("#exerciseUnitMeasure3").val(""); + $("#exerciseInstruction").val(""); } } catch(error) { console.log(" ERROR trying to add an exercise to log: " + error); diff --git a/lib/route.js b/lib/route.js index 97130e3..b79efe1 100644 --- a/lib/route.js +++ b/lib/route.js @@ -75,4 +75,11 @@ FlowRouter.route('/workoutLog', { action() { this.render('MainLayout', { main: "workoutLog"}); } +}); + +FlowRouter.route('/logbook', { + name: 'logbook', + action() { + this.render('MainLayout', { main: "logbook"}); + } }); \ No newline at end of file