Merge remote-tracking branch 'origin/master'

This commit is contained in:
2022-08-15 07:01:49 -07:00
5 changed files with 26 additions and 46 deletions

View File

@@ -4,7 +4,6 @@ import { Roles } from 'meteor/alanning:roles';
import {check} from "meteor/check";
import {Sites} from "/imports/api/sites";
import {parse} from "csv-parse";
import { ReactiveAggregate } from 'meteor/tunguska:reactive-aggregate';
// console.log("Setting Up Staff...")
@@ -15,15 +14,6 @@ if (Meteor.isServer) {
Meteor.publish('staff', function(siteId) {
return Staff.find({siteId});
});
Meteor.publish('staffWithAssetAssignments', function(query) {
ReactiveAggregate(this, Staff, {$lookup: {
from: 'assetAssignments',
localField: '_id',
foreignField: 'assigneeId',
as: 'assignments'
}}, {});
//Note: The options can use {clientCollection: 'your_name_here'} as the options to change the collection name on the client.
});
}
Meteor.methods({
'staff.add'(firstName, lastName, email, siteId) {