Updating the Dashboard
This commit is contained in:
parent
b5bab7b2a6
commit
5e446d5634
2 changed files with 25 additions and 1 deletions
|
|
@ -3,7 +3,15 @@
|
||||||
<div class="grid">
|
<div class="grid">
|
||||||
<div>
|
<div>
|
||||||
<article class="infoCard" id="workouts">
|
<article class="infoCard" id="workouts">
|
||||||
|
<div class="grid">
|
||||||
|
<div>
|
||||||
<h3>Workouts</h3>
|
<h3>Workouts</h3>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<p class="right">{{workoutCount}}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
</article>
|
</article>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,25 @@
|
||||||
import { FlowRouter } from 'meteor/ostrio:flow-router-extra';
|
import { FlowRouter } from 'meteor/ostrio:flow-router-extra';
|
||||||
|
import { Workouts } from '../../../imports/api/workouts';
|
||||||
|
import { WorkoutLog } from '../../../imports/api/workoutLog';
|
||||||
|
import { LogEntry } from '../../../imports/api/logEntry';
|
||||||
|
|
||||||
|
Template.home.onCreated(function() {
|
||||||
|
this.subscribe("myWorkoutRoutines");
|
||||||
|
this.subscribe("myWorkoutLog");
|
||||||
|
this.subscribe("myLogEntries");
|
||||||
|
});
|
||||||
|
|
||||||
|
Template.home.onRendered(function() {
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
Template.home.helpers({
|
Template.home.helpers({
|
||||||
loginOrReg: function () {
|
loginOrReg: function () {
|
||||||
return Session.get("loginOrReg");
|
return Session.get("loginOrReg");
|
||||||
},
|
},
|
||||||
|
workoutCount: function() {
|
||||||
|
return Workouts.find({}).count();
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
Template.home.events({
|
Template.home.events({
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue