Getting A better Log Entry Experience, and history setup
This commit is contained in:
parent
98a86ca6a8
commit
5d3396c333
15 changed files with 428 additions and 140 deletions
|
|
@ -5,63 +5,91 @@
|
|||
<select name="selectExerciseToLog" class="selectExerciseToLog" id="selectExerciseToLog">
|
||||
<option value="" disabled selected> + Add Log Entry</option>
|
||||
{{#each workoutLog}}
|
||||
<option value="{{_id}}">{{exerciseName}}</option>
|
||||
<option value="{{_id}} | {{exerciseName}}">{{exerciseName}}</option>
|
||||
{{/each}}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{#if $eq exIdSelected true}}
|
||||
<!-- add fields for log based on selection from drop button above -->
|
||||
<div class="grid">
|
||||
<div>
|
||||
<h3>{{exerciseToLog.exerciseName}}</h3>
|
||||
<div class="grid">
|
||||
{{#if $eq logIdSet false}}
|
||||
<div>
|
||||
<input type="number" class="exerciseWeight" id="exerciseWeight" placeholder="Enter Weight..." />
|
||||
</div>
|
||||
{{else}}
|
||||
<div>
|
||||
<h4>{{enteredWeight}}</h4>
|
||||
</div>
|
||||
{{/if}}
|
||||
<div>
|
||||
<button class="outline addASet" id="addASet">+ Add a Set</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid">
|
||||
<div>
|
||||
<label>{{exerciseToLog.exerciseMeasure}}</label>
|
||||
</div>
|
||||
<div>
|
||||
<input type="number" id="{{exerciseToLog.exerciseMeasure}}" />
|
||||
</div>
|
||||
<div>
|
||||
<label>{{exerciseToLog.exerciseUnitMeasure}}</label>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="grid">
|
||||
{{#if $neq exerciseToLog.exerciseMeasure2 ""}}
|
||||
<div>
|
||||
<label>{{exerciseToLog.exerciseMeasure2}}</label>
|
||||
</div>
|
||||
<div>
|
||||
<input type="number" id="{{exerciseToLog.exerciseMeasure2}}" />
|
||||
</div>
|
||||
<div>
|
||||
{{exerciseToLog.exerciseUnitMeasure2}}
|
||||
{{#if $eq addSet true}}
|
||||
<div class="grid">
|
||||
<div>
|
||||
<input type="number" class="addRepsVal" id="addRepsVal_{{ setNo }}">
|
||||
</div>
|
||||
<div>
|
||||
<button class="saveSet secondary" id="saveSet">Save Set</button>
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Set #</th>
|
||||
<th>Reps</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{#each setsRecorded}}
|
||||
<tr>
|
||||
<td>{{setNumber}}</td>
|
||||
<td>{{repCount}}</td>
|
||||
</tr>
|
||||
{{/each}}
|
||||
</tbody>
|
||||
</table>
|
||||
{{#if $neq prevWorkout false}}
|
||||
<hr>
|
||||
<div class="article">
|
||||
<header>Last Workout on {{prevWorkout.dateAdded}}</header>
|
||||
<table class="striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Weight</th>
|
||||
<th>Sets</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>{{prevWorkout.exerciseWeight}}</td>
|
||||
<td>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Set #</th>
|
||||
<th>Reps</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{#each prevWorkout.sets}}
|
||||
<tr>
|
||||
<td>{{setNumber}}</td>
|
||||
<td>{{repCount}}</td>
|
||||
</tr>
|
||||
{{/each}}
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
<hr>
|
||||
<div class="grid">
|
||||
{{#if $neq exerciseToLog.exerciseMeasure3 ""}}
|
||||
<div>
|
||||
<label>{{exerciseToLog.exerciseMeasure3}}</label>
|
||||
</div>
|
||||
<div>
|
||||
<input type="number" id="{{exerciseToLog.exerciseMeasure3}}" />
|
||||
</div>
|
||||
<div>
|
||||
{{exerciseToLog.exerciseUnitMeasure3}}
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
<div class="grid">
|
||||
<div>
|
||||
<button class="primary saveLogEntry right" id="saveLogEntry">Save</button>
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{> snackbar}}
|
||||
</template>
|
||||
Loading…
Add table
Add a link
Reference in a new issue