Added an initial cut at a student segement of the site, with a list of workshops and the ability to sign up for them.

This commit is contained in:
2022-10-26 08:45:21 -07:00
parent d7319e340c
commit 77b420ea6f
12 changed files with 538 additions and 32 deletions

View File

@@ -9,7 +9,7 @@ import {AssetAssignmentHistory} from "/imports/api/asset-assignment-history";
// console.log("Setting Up Assets...")
export const Assets = new Mongo.Collection('assets');
export const conditions = ['New','Like New','Good','Okay','Damaged']
export const conditions = ['New','Like New','Good','Okay','Damaged', 'Missing', 'Decommissioned']
/*
const AssetsSchema = new SimpleSchema({
@@ -90,7 +90,7 @@ Meteor.methods({
check(condition, String);
if(conditionDetails) check(conditionDetails, String);
if(condition !== 'New' && condition !== 'Like New' && condition !== 'Good' && condition !== 'Okay' && condition !== 'Damaged') {
if(!conditions.includes(condition)) {
//Should never happen.
console.error("Invalid condition option in assets.add(..)");
throw new Meteor.Error("Invalid condition option.");
@@ -123,7 +123,7 @@ Meteor.methods({
check(condition, String);
if(conditionDetails) check(conditionDetails, String);
if(condition !== 'New' && condition !== 'Like New' && condition !== 'Good' && condition !== 'Okay' && condition !== 'Damaged') {
if(!conditions.includes(condition)) {
//Should never happen.
console.error("Invalid condition option in assets.update(..)");
throw new Meteor.Error("Invalid condition option.");
@@ -176,7 +176,7 @@ Meteor.methods({
if(!date) date = new Date();
if(condition !== 'New' && condition !== 'Like New' && condition !== 'Good' && condition !== 'Okay' && condition !== 'Damaged') {
if(!conditions.includes(condition)) {
//Should never happen.
console.error("Invalid condition option in assets.unassign(..)");
throw new Meteor.Error("Invalid condition option.");
@@ -225,7 +225,7 @@ Meteor.methods({
if(!date) date = new Date();
if(condition !== 'New' && condition !== 'Like New' && condition !== 'Good' && condition !== 'Okay' && condition !== 'Damaged') {
if(!conditions.includes(condition)) {
//Should never happen.
console.error("Invalid condition option in assets.unassign(..)");
throw new Meteor.Error("Invalid condition option.");