Prototyped the barcode idea; Added a basic production system.

This commit is contained in:
Wynne Crisman
2019-10-07 15:51:50 -07:00
parent 8211da6b39
commit 2e57558ef4
50 changed files with 8949 additions and 782 deletions

View File

@@ -3,7 +3,7 @@ import { Mongo } from 'meteor/mongo';
import { check } from 'meteor/check';
import {SimpleSchema} from 'meteor/aldeed:simple-schema';
Workers = new Mongo.Collection('Workers');
let Workers = new Mongo.Collection('Workers');
let WORKER_ACTIVITIES = ['sales', 'prep', 'canning', 'farming'];
let workersSchema = new SimpleSchema({
name: {
@@ -60,7 +60,7 @@ let workersSchema = new SimpleSchema({
workersSchema.constants = {activities: WORKER_ACTIVITIES};
Workers.attachSchema(workersSchema);
if(Meteor.isServer) Meteor.publish('Workers', function() {
if(Meteor.isServer) Meteor.publish('workers', function() {
return Workers.find({});
});
@@ -122,4 +122,11 @@ if(Meteor.isServer) {
});
}
//Allows the client to do DB interaction without calling server side methods, while still retaining control over whether the user can make changes.
Workers.allow({
insert: function() {return false;},
update: function() {return false;},
remove: function() {return false;}
});
export default Workers;