mirror of
https://github.com/atlanticbiomedical/biomedjs.git
synced 2025-07-02 00:47:26 -04:00
388 lines
18 KiB
HTML
388 lines
18 KiB
HTML
<ul class="breadcrumb">
|
|
<li><a href="/clients"><i class="icon-briefcase"></i> Clients</a><span class="divider"></span><li>
|
|
<li ng-hide="loading" class="active">{{master.name}} ({{master.identifier}})<li>
|
|
</ul>
|
|
<i ng-show="loading" class="loader"></i>
|
|
<header ng-hide="loading">
|
|
<h1>{{master.name}}</h1>
|
|
<p class="lead">{{master.identifier}}</p>
|
|
<a class="btn btn-primary" href="/workorders/add?clientId={{master._id}}" ng-show="accountHasPermission('system.edit')">Work Order</a>
|
|
<a class="btn" href="/workorders/add?workorderType=meeting&clientId={{master._id}}" ng-show="accountHasPermission('system.edit')">Meeting</a>
|
|
<a class="btn" href="/devices/add?clientId={{master._id}}" ng-show="accountHasPermission('system.edit')">Device</a>
|
|
</header>
|
|
<div ng-hide="loading" class="tabbable">
|
|
<div class="tab-content">
|
|
<div class="tab-pane active form" title="Details">
|
|
<div class="form-section">
|
|
<div class="section-label">Client Name</div>
|
|
<div class="section-container">
|
|
<div ng-hide="identification.visible" class="form-preview">
|
|
{{master.name}}<br>
|
|
{{master.identifier}}<br>
|
|
<a ng-click="identification.edit()" ng-class="{disabled: editing}" ng-show="accountHasPermission('system.edit')">Edit</a>
|
|
</div>
|
|
<div ng-form="identificationForm" ng-show="identification.visible" class="form-editor">
|
|
<div ng-class="{error: identificationForm.name.$invalid}" class="control-group">
|
|
<label class="control-label">Name</label>
|
|
<div class="controls">
|
|
<input ng-model="identification.model.name" type="text" name="name" required="true" class="input-xlarge">
|
|
<span ng-show="identificationForm.name.$error.required" class="help-inline">Required</span>
|
|
</div>
|
|
</div>
|
|
<div ng-class="{error: identificationForm.identifier.$invalid}" class="control-group">
|
|
<label class="control-label">Identifier</label>
|
|
<div class="controls">
|
|
<input
|
|
ng-model="identification.model.identifier"
|
|
ab-unique="{field: 'identifier', key: master._id}"
|
|
required="true"
|
|
type="text"
|
|
name="identifier"
|
|
class="input-xlarge">
|
|
<span ng-show="identificationForm.identifier.$error.required" class="help-inline">Required</span>
|
|
<span ng-show="identificationForm.identifier.$error.unique" class="help-inline">Identifier must be unique</span>
|
|
</div>
|
|
</div>
|
|
<div class="form-actions">
|
|
<button ng-disabled="identificationForm.$invalid" ng-click="identification.save()" type="button" class="btn btn-primary">Save</button>
|
|
<button ng-click="identification.reset()" type="button" class="btn">Cancel</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="form-section">
|
|
<div class="section-label">Address</div>
|
|
<div class="section-container">
|
|
<div ng-hide="address.visible" class="form-preview">
|
|
{{master.address.street1}}<br>
|
|
{{master.address.street2}}<br ng-show="master.address.street2">
|
|
{{master.address.city}}, {{master.address.state}}. {{master.address.zip}}<br>
|
|
<a ng-click="address.edit()" ng-class="{disabled: editing}" ng-show="accountHasPermission('system.edit')">Edit</a>
|
|
</div>
|
|
<div ng-form="addressForm" ng-show="address.visible" class="form-editor">
|
|
<div ng-class="{error: addressForm.street1.$invalid}" class="control-group">
|
|
<label class="control-label">Street</label>
|
|
<div class="controls">
|
|
<input ng-model="address.model.address.street1" type="text" name="street1" required="true" class="input-xlarge">
|
|
<span ng-show="addressForm.street1.$error.required" class="help-inline">Required</span>
|
|
</div>
|
|
</div>
|
|
<div class="control-group">
|
|
<label class="control-label">Suite/Unit</label>
|
|
<div class="controls">
|
|
<input ng-model="address.model.address.street2" type="text" name="street2" class="input-xlarge">
|
|
</div>
|
|
</div>
|
|
<div ng-class="{error: addressForm.city.$invalid}" class="control-group">
|
|
<label class="control-label">City</label>
|
|
<div class="controls">
|
|
<input ng-model="address.model.address.city" type="text" name="city" class="input-xlarge">
|
|
<span ng-show="addressForm.city.$error.required" class="help-inline">Required</span>
|
|
</div>
|
|
</div>
|
|
<div ng-class="{error: addressForm.state.$invalid}" class="control-group">
|
|
<label class="control-label">State</label>
|
|
<div class="controls">
|
|
<select ng-model="address.model.address.state" name="state" class="input-xlarge">
|
|
<option value="AL">Alabama</option>
|
|
<option value="AK">Alaska</option>
|
|
<option value="AZ">Arizona</option>
|
|
<option value="AR">Arkansas</option>
|
|
<option value="CA">California</option>
|
|
<option value="CO">Colorado</option>
|
|
<option value="CT">Connecticut</option>
|
|
<option value="DC">District of Columbia</option>
|
|
<option value="DE">Delaware</option>
|
|
<option value="FL">Florida</option>
|
|
<option value="GA">Georgia</option>
|
|
<option value="HI">Hawaii</option>
|
|
<option value="ID">Idaho</option>
|
|
<option value="IL">Illinois</option>
|
|
<option value="ID">Indiana</option>
|
|
<option value="IA">Iowa</option>
|
|
<option value="KS">Kansas</option>
|
|
<option value="KY">Kentucky</option>
|
|
<option value="LA">Louisiana</option>
|
|
<option value="ME">Maine</option>
|
|
<option value="MD">Maryland</option>
|
|
<option value="MA">Massachusetts</option>
|
|
<option value="MI">Michigan</option>
|
|
<option value="MN">Minnesota</option>
|
|
<option value="MS">Mississippi</option>
|
|
<option value="MO">Missouri</option>
|
|
<option value="MT">Montana</option>
|
|
<option value="NE">Nebraska</option>
|
|
<option value="NV">Nevada</option>
|
|
<option value="NH">New Hampshire</option>
|
|
<option value="NJ">New Jersey</option>
|
|
<option value="NM">New Mexico</option>
|
|
<option value="NY">New York</option>
|
|
<option value="NC">North Carolina</option>
|
|
<option value="ND">North Dakota</option>
|
|
<option value="OH">Ohio</option>
|
|
<option value="OK">Oklahoma</option>
|
|
<option value="OR">Oregon</option>
|
|
<option value="PA">Pennsylvania</option>
|
|
<option value="RI">Rhode Island</option>
|
|
<option value="SA">South Carolina</option>
|
|
<option value="SD">South Dakota</option>
|
|
<option value="TN">Tennessee</option>
|
|
<option value="TX">Texas</option>
|
|
<option value="UT">Utah</option>
|
|
<option value="VT">Vermont</option>
|
|
<option value="VA">Virginia</option>
|
|
<option value="WA">Washington</option>
|
|
<option value="WV">West Virginia</option>
|
|
<option value="WI">Wisconsin</option>
|
|
<option value="WY">Wyoming</option>
|
|
</select>
|
|
<span ng-show="addressForm.state.$error.required" class="help-inline">Required</span>
|
|
</div>
|
|
</div>
|
|
<div ng-class="{error: addressForm.zip.$invalid}" class="control-group">
|
|
<label class="control-label">Zipcode</label>
|
|
<div class="controls">
|
|
<input ng-model="address.model.address.zip" type="text" name="zip" class="input-small">
|
|
<span ng-show="addressForm.zip.$error.required" class="help-inline">Required</span>
|
|
</div>
|
|
</div>
|
|
<div class="form-actions">
|
|
<button ng-disabled="addressForm.$invalid" ng-click="address.save()" type="button" class="btn btn-primary">Save</button>
|
|
<button ng-click="address.reset()" type="button" class="btn">Cancel</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="form-section">
|
|
<div class="section-label">Primary Contact</div>
|
|
<div class="section-container">
|
|
<div ng-hide="primaryContact.visible" class="form-preview">
|
|
{{master.contacts[0].name}}<br ng-show="master.contacts[0].name">
|
|
{{master.contacts[0].phone}}<br ng-show="master.contacts[0].phone">
|
|
<a href="mailto:{{master.contacts[0].email}}">{{master.contacts[0].email}}</a><br ng-show="master.contacts[0].email">
|
|
<a ng-click="primaryContact.edit()" ng-class="{disabled: editing}" ng-show="accountHasPermission('system.edit')">Edit</a>
|
|
</div>
|
|
<div ng-show="primaryContact.visible" class="form-editor">
|
|
<div class="control-group">
|
|
<label class="control-label">Name</label>
|
|
<div class="controls">
|
|
<input ng-model="primaryContact.model.contacts[0].name" type="text" class="input-xlarge">
|
|
</div>
|
|
</div>
|
|
<div class="control-group">
|
|
<label class="control-label">Phone</label>
|
|
<div class="controls">
|
|
<input ng-model="primaryContact.model.contacts[0].phone" type="text" class="input-xlarge">
|
|
</div>
|
|
</div>
|
|
<div class="control-group">
|
|
<label class="control-label">E-Mail</label>
|
|
<div class="controls">
|
|
<input ng-model="primaryContact.model.contacts[0].email" type="text" class="input-xlarge">
|
|
</div>
|
|
</div>
|
|
<div class="form-actions">
|
|
<button ng-click="primaryContact.save()" type="button" class="btn btn-primary">Save</button>
|
|
<button ng-click="primaryContact.reset()" type="button" class="btn">Cancel</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="form-section">
|
|
<div class="section-label">Secondary Contact</div>
|
|
<div class="section-container">
|
|
<div ng-hide="secondaryContact.visible" class="form-preview">
|
|
{{master.contacts[1].name}}<br ng-show="master.contacts[1].name">
|
|
{{master.contacts[1].phone}}<br ng-show="master.contacts[1].phone">
|
|
{{master.contacts[1].email}}<br ng-show="master.contacts[1].email">
|
|
<a ng-click="secondaryContact.edit()" ng-class="{disabled: editing}" ng-show="accountHasPermission('system.edit')">Edit</a>
|
|
</div>
|
|
<div ng-show="secondaryContact.visible" class="form-editor">
|
|
<div class="control-group">
|
|
<label class="control-label">Name</label>
|
|
<div class="controls">
|
|
<input ng-model="secondaryContact.model.contacts[1].name" type="text" class="input-xlarge">
|
|
</div>
|
|
</div>
|
|
<div class="control-group">
|
|
<label class="control-label">Phone</label>
|
|
<div class="controls">
|
|
<input ng-model="secondaryContact.model.contacts[1].phone" type="text" class="input-xlarge">
|
|
</div>
|
|
</div>
|
|
<div class="control-group">
|
|
<label class="control-label">E-Mail</label>
|
|
<div class="controls">
|
|
<input ng-model="secondaryContact.model.contacts[1].email" type="text" class="input-xlarge">
|
|
</div>
|
|
</div>
|
|
<div class="form-actions">
|
|
<button ng-click="secondaryContact.save()" type="button" class="btn btn-primary">Save</button>
|
|
<button ng-click="secondaryContact.reset()" type="button" class="btn">Cancel</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="form-section" ng-show="accountHasPermission('system.admin')">
|
|
<div class="section-label">Other</div>
|
|
<div class="section-container">
|
|
<button ng-click="other.destroy()" type="button" class="btn btn-danger">Remove client</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="tab-pane" title="Workorders">
|
|
<div class="row-fluid">
|
|
<div class="span12">
|
|
<table class="biomed-table">
|
|
<thead>
|
|
<tr>
|
|
<th style="width: 80%">Workorder</th>
|
|
<th style="width: 10%">Date</th>
|
|
<th style="width: 10%">Status</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<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?workorderType=pm&clientId={{master._id}}&type={{pm}}">Preventive Maintenance ({{pm}})</a><br>
|
|
</td>
|
|
<td>This Month</td>
|
|
<td>PM Due</td>
|
|
</tr>
|
|
<tr ng-repeat="workorder in workorders">
|
|
<td>
|
|
<a ng-href="/workorders/{{workorder._id}}"><span ng-if="workorder.reason">{{workorder.reason}}</span><i ng-if="!workorder.reason">-- No Reason --</i></a><br>
|
|
<strong>Techs:</strong> {{ workorder.techs | techs }}<br>
|
|
{{workorder.remarks}}
|
|
</td>
|
|
<td>{{workorder.scheduling.start | date}}</td>
|
|
<td>{{workorder.status}}</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="tab-pane" title="Frequency" visible="{{accountHasPermission('client.frequency')}}">
|
|
<table class="table frequency">
|
|
<thead>
|
|
<tr>
|
|
<th></th>
|
|
<th>JAN</th>
|
|
<th>FEB</th>
|
|
<th>MAR</th>
|
|
<th>APR</th>
|
|
<th>MAY</th>
|
|
<th>JUN</th>
|
|
<th>JUL</th>
|
|
<th>AUG</th>
|
|
<th>SEP</th>
|
|
<th>OCT</th>
|
|
<th>NOV</th>
|
|
<th>DEC</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr ng-repeat="(frequency, values) in master.frequencies">
|
|
<td class="name">{{frequency}}</td>
|
|
<td ng-repeat="enabled in values track by $index" class="{{enabled}}"><a ng-click="toggleFrequency(frequency, $index)"><i ng-class="{ 'icon-ok': enabled, 'icon-remove': !enabled }"></i></a></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<div class="tab-pane" title="Devices">
|
|
<div class="row-fluid">
|
|
<div class="span12">
|
|
<table class="biomed-table">
|
|
<thead>
|
|
<tr>
|
|
<th style="width: 7%">Control #</th>
|
|
<th style="width: 6%">Device</th>
|
|
<th style="width: 5%">Manufacturer</th>
|
|
<th style="width: 5%">Model</th>
|
|
<th style="width: 5%">Serial No.</th>
|
|
<th style="width: 8%">Purchase Date</th>
|
|
<th style="width: 6%">Warranty Expiration</th>
|
|
<th style="width: 4%">PM Test</th>
|
|
<th style="width: 8%">Last Test Run</th>
|
|
<th style="width: 4%">Location</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr ng-hide="devices.length"><td colspan="11" class="table-message">There is no information to display.</td></tr>
|
|
<tr ng-repeat="device in devices">
|
|
<td><a href="/devices/{{device._id}}">{{device.biomedId}}</a></td>
|
|
<td>{{device.deviceType.category}}</td>
|
|
<td>{{device.deviceType.make}}</td>
|
|
<td>{{device.deviceType.model}}</td>
|
|
<td>{{device.serialNumber}}</td>
|
|
<td>{{device.purchaseDate | date}}</td>
|
|
<td>{{device.warrantyExpiration | date}}</td>
|
|
<td><a href="/testRuns/add?deviceId{{device._id}}">New</a></td>
|
|
<td>
|
|
<div ng-if="device.lastTestRun">
|
|
<a href="http://localhost:9000/testRuns/{{device.lastTestRun._id}}">
|
|
<span>{{device.lastTestRun.date | date}} | </span>
|
|
<span ng-if="device.lastTestRun.result">Passed</span>
|
|
<span ng-if="!device.lastTestRun.result">Failed</span>
|
|
</a>
|
|
</div>
|
|
</td>
|
|
<td>{{device.location}}</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</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}" ng-show="accountHasPermission('system.edit')">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}" ng-show="accountHasPermission('system.edit')">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>
|
|
<b>Notice:</b>
|
|
<p>Changes to the notes for a client does not automatically update every workorder that currently exists for the client. Only new workorders will contain the changed / updated notes. If you need to update the notes for a specific workorder you should go to the work order and re-save the workorder. This will push the updated notes to the techs calendar.</p>
|
|
</div>
|