Various changes

This commit is contained in:
Dobie Wollert
2013-06-17 04:08:57 -04:00
parent a5f054cbbf
commit b92068b6b2
12 changed files with 179 additions and 13 deletions

View File

@ -5,7 +5,7 @@ angular.module('biomed', ['biomed.filters', 'biomed.services', 'biomed.directive
$rootScope.TECH_GROUPS = {
all: 'All',
biomed: 'Biomed',
ice: 'Ice',
ice: 'ICE',
sales: 'Sales',
other: 'Others'
};

View File

@ -300,16 +300,24 @@ biomed.WorkorderAddCtrl = function($scope, $location, Workorders, Schedule, Clie
var search = $location.search();
if (search.clientId) {
if (search.workorderType == 'pm') {
$scope.model.client = search.clientId;
}
$scope.model.reason = "Preventive Maintenance";
$scope.model.maintenanceType = search.type;
if (search.reason) {
$scope.model.reason = search.reason;
}
$scope.workorderType = 'pm';
} else {
if (search.clientId) {
$scope.model.client = search.clientId;
}
if (search.remarks) {
$scope.model.remarks = search.remarks;
if (search.reason) {
$scope.model.reason = search.reason;
}
if (search.remarks) {
$scope.model.remarks = search.remarks;
}
}
updateAllUsers();

View File

@ -239,7 +239,7 @@
<tr ng-hide="workorders.length"><td colspan="4" class="table-message">There is no information to display.</td></tr>
<tr ng-repeat="pm in pms">
<td>
<a ng-href="/workorders/add?clientId={{master._id}}&amp;reason=Preventive%20Maintenance&amp;remarks={{pm}}">Preventive Maintenance ({{pm}})</a><br>
<a ng-href="/workorders/add?workorderType=pm&clientId={{master._id}}&amp;type={{pm}}">Preventive Maintenance ({{pm}})</a><br>
</td>
<td>This Month</td>
<td>PM Due</td>
@ -285,4 +285,4 @@
</tbody>
</table>
</div>
</div>
</div>

View File

@ -43,7 +43,7 @@
<tr ng-show="loading"><td colspan="4" class="table-loading"><i class="loader"></i></td></tr>
<tr ng-hide="loading || pms.length"><td colspan="4" class="table-message">There is no information to display.</td></tr>
<tr ng-hide="loading" ng-repeat="pm in pms">
<td><a ng-href="/workorders/add?clientId={{pm.client._id}}&amp;reason=Preventive%20Maintenance&amp;remarks={{pm.reason}}">{{pm.client.name}} ({{pm.client.identifier | uppercase}})</a><br>
<td><a ng-href="/workorders/add?workorderType=pm&amp;clientId={{pm.client._id}}&amp;type={{pm.reason}}">{{pm.client.name}} ({{pm.client.identifier | uppercase}})</a><br>
<td>{{pm.reason}}</td>
<td>{{pm.client.contacts[0].name}}</td>
<td>{{pm.lient.contacts[0].phone}}</td>
@ -51,4 +51,4 @@
</tbody>
</table>
</div>
</div>
</div>

View File

@ -29,7 +29,7 @@
<div class="control-group">
<label class="control-label">Reason</label>
<div class="controls">
<select ng-model="model.reason" name="reason" class="input-xlarge">
<select ng-model="model.reason" name="reason" class="input-xlarge" ng-disabled="{{workorderType == 'pm'}}">
<option value="Add New Equipment">Add New Equipment</option>
<option value="As Directed">As Directed</option>
<option value="Autoclave Repair">Autoclave Repair</option>
@ -45,6 +45,25 @@
</select>
</div>
</div>
<div class="control-group" ng-show="model.reason == 'Preventive Maintenance'">
<label class="control-label">Maintenance Type</label>
<div class="controls">
<select ng-model="model.maintenanceType" name="maintenanceType" class="input-xlarge" ng-disabled="{{workorderType == 'pm'}}">
<option value="anesthesia">anesthesia</option>
<option value="annual">annual</option>
<option value="ert">ert</option>
<option value="imaging">imaging</option>
<option value="medgas">medgas</option>
<option value="neptune">neptune</option>
<option value="quarterly">quarterly</option>
<option value="rae">rae</option>
<option value="semi">semi</option>
<option value="sterilizer">sterilizer</option>
<option value="tg">tg</option>
<option value="legacy" disabled>legacy</option>
</select>
</div>
</div>
<div class="control-group">
<label class="control-label">Remarks</label>
<div class="controls">

View File

@ -40,6 +40,7 @@
<div class="section-label">Remarks</div>
<div class="section-container">
<div ng-hide="remarks.visible" class="form-preview">
{{master.reason}}<br>
{{master.remarks}}<br>
<a ng-click="remarks.edit()" ng-class="{disabled: editing}">Edit</a>
</div>
@ -63,6 +64,26 @@
</select>
</div>
</div>
<div class="control-group" ng-show="remarks.model.reason == 'Preventive Maintenance'">
<label class="control-label">Maintenance Type</label>
<div class="controls">
<select ng-model="remarks.model.maintenanceType" name="maintenanceType" class="input-xlarge">
<option value="anesthesia">anesthesia</option>
<option value="annual">annual</option>
<option value="ert">ert</option>
<option value="imaging">imaging</option>
<option value="medgas">medgas</option>
<option value="neptune">neptune</option>
<option value="quarterly">quarterly</option>
<option value="rae">rae</option>
<option value="semi">semi</option>
<option value="sterilizer">sterilizer</option>
<option value="tg">tg</option>
<option value="legacy" disabled>legacy</option>
</select>
</div>
</div>
<div class="control-group">
<label class="control-label">Remarks</label>
<div class="controls">