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

@@ -1,3 +1,4 @@
import {Mongo} from 'meteor/mongo';
import Measures from "./Measure.js";
import Venues from "./Venue.js";
import Products from "./Product.js";
@@ -8,15 +9,18 @@ import Logs from "./Logs.js";
import Users from "./User.js";
import UserRoles from "./Roles.js";
import Workers from "./Worker.js";
import Barcodes from "./Barcode.js";
import Batches from "./Batch.js";
import './Reports.js';
import './Label.js';
//Save the collections in the Meteor.collections property for easy access without name conflicts.
Meteor.collections = {Measures, Venues, Products, ProductTags, Sales, SalesSheets, Logs, Users, UserRoles, Workers};
Meteor.collections = {Measures, Venues, Products, ProductTags, Sales, SalesSheets, Logs, Users, UserRoles, Workers, Barcodes, Batches};
//If this is the server then setup the default admin user if none exist.
if(Meteor.isServer) {
//Change this to find admin users, create a default admin user if none exists.
if(Users.find({}).count() == 0) {
if(Users.find({}).count() === 0) {
try {
console.log("Creating a default admin user: admin/admin");
@@ -28,4 +32,14 @@ if(Meteor.isServer) {
console.log(err);
}
}
Meteor.validators = {};
Meteor.validators.ObjectID = Match.Where(function(id) {
if(id instanceof Mongo.ObjectID) {
id = id._str;
}
check(id, String);
return /[0-9a-fA-F]{24}/.test(id);
});
}