Cleaned up the chromebooks view; Reorganized the admin view; Added functionality to import students and staff (still need to add/test functionality to edit them and delete them).
This commit is contained in:
@@ -2,6 +2,7 @@ import { Meteor } from 'meteor/meteor';
|
||||
import { Mongo } from 'meteor/mongo';
|
||||
import { check } from 'meteor/check';
|
||||
import { MongoClient } from 'mongodb';
|
||||
import {Assets} from "/imports/api/assets";
|
||||
//import {Roles} from 'alanning/roles';
|
||||
|
||||
//export const Records = new Mongo.Collection('records');
|
||||
@@ -48,6 +49,14 @@ if (Meteor.isServer) {
|
||||
$regex: params.serial,
|
||||
$options: "i"
|
||||
} : params.serial;
|
||||
else if (params.assetId) {
|
||||
let asset = Assets.findOne({assetId: params.assetId});
|
||||
|
||||
if(asset.serial) {
|
||||
// An exact search.
|
||||
query.serial = asset.serial;
|
||||
}
|
||||
}
|
||||
else if (params.email) query.email = params.regex ? {
|
||||
$regex: params.email,
|
||||
$options: "i"
|
||||
|
||||
Reference in New Issue
Block a user