Added Measurements input
This commit is contained in:
parent
ba17d57987
commit
98a86ca6a8
12 changed files with 337 additions and 10 deletions
|
|
@ -6,6 +6,8 @@ import { Roels } from "meteor/roles";
|
|||
import { Workouts } from "../imports/api/workouts";
|
||||
import { WorkoutLog } from "../imports/api/workoutLog";
|
||||
import { LogEntry } from "../imports/api/logEntry";
|
||||
import { Measurements } from "../imports/api/measurements";
|
||||
import { MeasureLogEntry } from "../imports/api/measureLogEntry";
|
||||
|
||||
Meteor.publish("SystemConfig", function() {
|
||||
try {
|
||||
|
|
@ -67,3 +69,33 @@ Meteor.publish("myLogEntries", function (routineId) {
|
|||
console.log(" ERROR in pulling workout routines: " + error);
|
||||
}
|
||||
});
|
||||
|
||||
Meteor.publish("allMyLogEntries", function() {
|
||||
try {
|
||||
if (this.userId) {
|
||||
return LogEntry.find({ addedBy: this.userId });
|
||||
}
|
||||
} catch(error) {
|
||||
console.log(" ERROR returning all of my log entries: " + error);
|
||||
}
|
||||
});
|
||||
|
||||
Meteor.publish("myMeasures", function() {
|
||||
try {
|
||||
if (this.userId) {
|
||||
return Measurements.find({ addedBy: this.userId, measurementActive: true });
|
||||
}
|
||||
} catch(error) {
|
||||
console.log(" ERROR returning all of my measurements: " + error);
|
||||
}
|
||||
});
|
||||
|
||||
Meteor.publish("myMeasureLog", function() {
|
||||
try {
|
||||
if (this.userId) {
|
||||
return MeasureLogEntry.find({ addedBy: this.userId });
|
||||
}
|
||||
} catch(error) {
|
||||
console.log(" ERROR returning all of my measurement log entries: " + error);
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue