mirror of
https://github.com/atlanticbiomedical/biomedjs.git
synced 2025-07-02 00:47:26 -04:00
stuff
This commit is contained in:
@ -8,7 +8,7 @@ var frequencies = ["annual","semi","quarterly","sterilizer","tg","ert","rae","me
|
|||||||
|
|
||||||
exports.index = function(req, res) {
|
exports.index = function(req, res) {
|
||||||
var query = Client.find({ deleted: false })
|
var query = Client.find({ deleted: false })
|
||||||
.select('name identifier')
|
.select('name identifier address')
|
||||||
.slice('contacts', 1)
|
.slice('contacts', 1)
|
||||||
.sort('name')
|
.sort('name')
|
||||||
.exec(function(err, results) {
|
.exec(function(err, results) {
|
||||||
@ -79,6 +79,7 @@ exports.create = function(req, res, next) {
|
|||||||
identifier: req.body.identifier,
|
identifier: req.body.identifier,
|
||||||
contacts: req.body.contacts,
|
contacts: req.body.contacts,
|
||||||
address: req.body.address,
|
address: req.body.address,
|
||||||
|
notes: req.body.notes,
|
||||||
frequencies: {}
|
frequencies: {}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -108,6 +109,7 @@ exports.update = function(req, res, next) {
|
|||||||
client.contacts = req.body.contacts;
|
client.contacts = req.body.contacts;
|
||||||
client.address = req.body.address;
|
client.address = req.body.address;
|
||||||
client.frequencies = req.body.frequencies;
|
client.frequencies = req.body.frequencies;
|
||||||
|
client.notes = req.body.notes;
|
||||||
|
|
||||||
return client.save(function(err) {
|
return client.save(function(err) {
|
||||||
if (!err) {
|
if (!err) {
|
||||||
|
@ -134,6 +134,8 @@ module.exports = function(calendar) {
|
|||||||
cmd.$inc[key] = 1;
|
cmd.$inc[key] = 1;
|
||||||
console.log(cmd);
|
console.log(cmd);
|
||||||
Client.findByIdAndUpdate(req.body.client, cmd, function(err, ignored) { callback(err, result) });
|
Client.findByIdAndUpdate(req.body.client, cmd, function(err, ignored) { callback(err, result) });
|
||||||
|
} else {
|
||||||
|
callback(null, result);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
@ -20,7 +20,11 @@ var clientSchema = new Schema({
|
|||||||
frequencies: {},
|
frequencies: {},
|
||||||
pms: {},
|
pms: {},
|
||||||
workorders: [{ type: ObjectId, ref: 'Workorder' }],
|
workorders: [{ type: ObjectId, ref: 'Workorder' }],
|
||||||
deleted: { type: Boolean, default: false }
|
deleted: { type: Boolean, default: false },
|
||||||
|
notes: {
|
||||||
|
internal: String,
|
||||||
|
tech: String
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
module.exports = mongoose.model('Client', clientSchema);
|
module.exports = mongoose.model('Client', clientSchema);
|
||||||
|
@ -131,7 +131,8 @@ biomed.ClientEditCtrl = function($scope, $routeParams, Clients) {
|
|||||||
$scope.primaryContact = createContactController(0);
|
$scope.primaryContact = createContactController(0);
|
||||||
$scope.secondaryContact = createContactController(1);
|
$scope.secondaryContact = createContactController(1);
|
||||||
$scope.other = createOtherController();
|
$scope.other = createOtherController();
|
||||||
|
$scope.internalNotes = createController();
|
||||||
|
$scope.techNotes = createController();
|
||||||
function updatePms() {
|
function updatePms() {
|
||||||
var currentMonth = new Date().getMonth();
|
var currentMonth = new Date().getMonth();
|
||||||
|
|
||||||
|
@ -165,6 +165,27 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="form-section">
|
||||||
|
<div class="section-label">Notes</div>
|
||||||
|
<div class="section-container">
|
||||||
|
<div class="form-editor">
|
||||||
|
<div class="control-group">
|
||||||
|
<label class="control-label">Internal</label>
|
||||||
|
<div class="controls">
|
||||||
|
<textarea ng-model="model.notes.internal" type="text" class="input-xlarge"></textarea>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="control-group">
|
||||||
|
<label class="control-label">Tech</label>
|
||||||
|
<div class="controls">
|
||||||
|
<textarea ng-model="model.notes.tech" type="text" class="input-xlarge"></textarea>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="form-section">
|
<div class="form-section">
|
||||||
<div class="section-label"> </div>
|
<div class="section-label"> </div>
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
<header ng-hide="loading">
|
<header ng-hide="loading">
|
||||||
<h1>{{master.name}}</h1>
|
<h1>{{master.name}}</h1>
|
||||||
<p class="lead">{{master.identifier}}</p>
|
<p class="lead">{{master.identifier}}</p>
|
||||||
|
<a href="/workorders/add?clientId={{master._id}}">Create new Workorder</a>
|
||||||
</header>
|
</header>
|
||||||
<div ng-hide="loading" class="tabbable">
|
<div ng-hide="loading" class="tabbable">
|
||||||
<div class="tab-content">
|
<div class="tab-content">
|
||||||
@ -224,9 +225,6 @@
|
|||||||
<div class="tab-pane" title="Workorders">
|
<div class="tab-pane" title="Workorders">
|
||||||
<div class="row-fluid">
|
<div class="row-fluid">
|
||||||
<div class="span12">
|
<div class="span12">
|
||||||
<div class="toolbelt">
|
|
||||||
<a href="/workorders/add?clientId={{master._id}}" class="btn btn-primary">Create new Workorder</a>
|
|
||||||
</div>
|
|
||||||
<table class="biomed-table">
|
<table class="biomed-table">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
@ -312,4 +310,51 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="tab-pane form" title="Notes">
|
||||||
|
<div class="form-section">
|
||||||
|
<div class="section-label">Internal Notes</div>
|
||||||
|
<div class="section-container">
|
||||||
|
<div ng-hide="internalNotes.visible" class="form-preview">
|
||||||
|
{{master.notes.internal}}<br ng-show="master.notes.internal">
|
||||||
|
<a ng-click="internalNotes.edit()" ng-class="{disabled: editing}">Edit</a>
|
||||||
|
</div>
|
||||||
|
<div ng-show="internalNotes.visible" class="form-editor">
|
||||||
|
<div class="control-group">
|
||||||
|
<label class="control-label">Notes</label>
|
||||||
|
<div class="controls">
|
||||||
|
<textarea ng-model="internalNotes.model.notes.internal" class="input-xlarge"></textarea>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-actions">
|
||||||
|
<button ng-click="internalNotes.save()" type="button" class="btn btn-primary">Save</button>
|
||||||
|
<button ng-click="internalNotes.reset()" type="button" class="btn">Cancel</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-section">
|
||||||
|
<div class="section-label">Tech Notes</div>
|
||||||
|
<div class="section-container">
|
||||||
|
<div ng-hide="techNotes.visible" class="form-preview">
|
||||||
|
{{master.notes.tech}}<br ng-show="master.notes.tech">
|
||||||
|
<a ng-click="techNotes.edit()" ng-class="{disabled: editing}">Edit</a>
|
||||||
|
</div>
|
||||||
|
<div ng-show="techNotes.visible" class="form-editor">
|
||||||
|
<div class="control-group">
|
||||||
|
<label class="control-label">Notes</label>
|
||||||
|
<div class="controls">
|
||||||
|
<textarea ng-model="techNotes.model.notes.tech" class="input-xlarge"></textarea>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-actions">
|
||||||
|
<button ng-click="techNotes.save()" type="button" class="btn btn-primary">Save</button>
|
||||||
|
<button ng-click="techNotes.reset()" type="button" class="btn">Cancel</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
@ -22,6 +22,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-section">
|
<div class="form-section">
|
||||||
<div class="section-label">Remarks</div>
|
<div class="section-label">Remarks</div>
|
||||||
<div class="section-container">
|
<div class="section-container">
|
||||||
@ -185,10 +186,6 @@
|
|||||||
<div class="form-section">
|
<div class="form-section">
|
||||||
<div class="section-label"> </div>
|
<div class="section-label"> </div>
|
||||||
<div class="section-container">
|
<div class="section-container">
|
||||||
<p><b>Note:</b></p>
|
|
||||||
<p>Please only click save once, your work order is being saved the first time you click the button. There is a small bug preventing the page from returning you back to where you came from. This will be fixed after working hours.</p>
|
|
||||||
<p>If you notice any other issues, or need help with a work order, please feel free to <a href="http://atlanticbiomedical.com/ticket/" target="new"> Open a Ticket</a>
|
|
||||||
<br><br>
|
|
||||||
<button ng-click="save()" type="button" class="btn btn-primary">Save</button>
|
<button ng-click="save()" type="button" class="btn btn-primary">Save</button>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
Reference in New Issue
Block a user