Latest batch of work

This commit is contained in:
Dobie Wollert
2015-04-06 06:36:17 -04:00
parent d3089dcd17
commit 8cfff70ce0
11 changed files with 218 additions and 24 deletions

View File

@ -6,7 +6,7 @@ var mongoose = require('mongoose'),
var log = require('log4node');
var frequencies = ["Medical Device","Sterilizer - TT","Vaporizer","Ice Maker","Anesthesia","Waste Management System","Imaging","Medical Gas Systems","RAE","ERT","N2O Trace Gas","Sterilizer - F","Quarterly","Semi","Annual","legacy","DLLR"];
var frequencies = ["Medical Device","Sterilizer - TT","Vaporizer","Ice Maker","Anesthesia","Waste Management System","Imaging","Medical Gas Systems","RAE","ERT","N2O Trace Gas","Sterilizer - F","Quarterly","Semi","Annual","legacy","DLLR", "Isolation Panel"];
exports.index = function(req, res) {
log.info("clients.index");

View File

@ -75,7 +75,8 @@ module.exports = function(config, calendar) {
remarks: req.body.remarks || "",
status: req.body.status,
scheduling: req.body.scheduling,
techs: req.body.techs
techs: req.body.techs,
alternativeContact: req.body.alternativeContact
});
var notify = req.body._notify || "";
@ -238,6 +239,11 @@ module.exports = function(config, calendar) {
workorder.techs = req.body.techs
.filter(function(e) { return e; })
.map(function(t) { return t._id; });
workorder.invoiceNumber = req.body.invoiceNumber;
workorder.invoicedOn = req.body.invoicedOn;
workorder.checkNumber = req.body.checkNumber;
workorder.paidOn = req.body.paidOn;
workorder.alternativeContact = req.body.alternativeContact;
callback(err);
});

View File

@ -24,7 +24,12 @@ var workorderSchema = new Schema({
newValues: {},
modifiedBy: { type: ObjectId, ref: 'User' }
}],
deleted: { type: Boolean, default: false }
deleted: { type: Boolean, default: false },
invoiceNumber: String,
invoicedOn: Date,
checkNumber: String,
paidOn: Date,
alternativeContact: String
});
module.exports = mongoose.model('Workorder', workorderSchema);

View File

@ -41,27 +41,30 @@ html(lang="en", ng-app="biomed", ng-controller="biomed.PageCtrl")
ul.nav
li(data-match-route='/schedule.*')
a(href='/schedule')
i.icon-calendar
| Schedule
li
a(href='/schedule/pms')
| PM
li(data-match-route='/client.*')
a(href='/clients')
i.icon-briefcase
| Clients
li(data-match-route='/workorder.*')
a(href='/workorders')
i.icon-wrench
| Workorders
li(data-match-route='/accounting.*')
a(href='/accounting')
| Accounting
li(data-match-route='/posts.*', ng-show="accountHasPermission('system.admin')")
a(href='/posts')
i.icon-wrench
| Posts
li(data-match-route='/admin.*', ng-show="accountHasPermission('system.admin')")
a(href='/admin')
i.icon-wrench
| Admin
li.day-of-year
{{dayOfYear}}