Files
biomedjs/public/partials/clients/edit.html

388 lines
18 KiB
HTML
Raw Permalink Normal View History

2013-05-06 03:38:29 -04:00
<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>
2015-07-19 21:31:10 -04:00
<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>
2015-08-03 05:00:22 -04:00
<a class="btn" href="/devices/add?clientId={{master._id}}" ng-show="accountHasPermission('system.edit')">Device</a>
2013-05-06 03:38:29 -04:00
</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>
2014-09-14 07:03:21 -04:00
<a ng-click="identification.edit()" ng-class="{disabled: editing}" ng-show="accountHasPermission('system.edit')">Edit</a>
2013-05-06 03:38:29 -04:00
</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">
2015-04-19 21:15:06 -04:00
<input
ng-model="identification.model.identifier"
ab-unique="{field: 'identifier', key: master._id}"
required="true"
type="text"
name="identifier"
class="input-xlarge">
2013-05-06 03:38:29 -04:00
<span ng-show="identificationForm.identifier.$error.required" class="help-inline">Required</span>
2015-04-19 21:15:06 -04:00
<span ng-show="identificationForm.identifier.$error.unique" class="help-inline">Identifier must be unique</span>
2013-05-06 03:38:29 -04:00
</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>
2014-09-14 07:03:21 -04:00
<a ng-click="address.edit()" ng-class="{disabled: editing}" ng-show="accountHasPermission('system.edit')">Edit</a>
2013-05-06 03:38:29 -04:00
</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">
2014-08-25 06:14:05 -04:00
<a href="mailto:{{master.contacts[0].email}}">{{master.contacts[0].email}}</a><br ng-show="master.contacts[0].email">
2014-09-14 07:03:21 -04:00
<a ng-click="primaryContact.edit()" ng-class="{disabled: editing}" ng-show="accountHasPermission('system.edit')">Edit</a>
2013-05-06 03:38:29 -04:00
</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">
2014-09-14 07:03:21 -04:00
<a ng-click="secondaryContact.edit()" ng-class="{disabled: editing}" ng-show="accountHasPermission('system.edit')">Edit</a>
2013-05-06 03:38:29 -04:00
</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>
2014-07-25 03:00:29 -04:00
<div class="form-section" ng-show="accountHasPermission('system.admin')">
2013-05-06 03:38:29 -04:00
<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>
2013-06-17 04:08:57 -04:00
<a ng-href="/workorders/add?workorderType=pm&clientId={{master._id}}&amp;type={{pm}}">Preventive Maintenance ({{pm}})</a><br>
2013-05-06 03:38:29 -04:00
</td>
<td>This Month</td>
<td>PM Due</td>
</tr>
<tr ng-repeat="workorder in workorders">
<td>
2015-11-25 01:06:03 -05:00
<a ng-href="/workorders/{{workorder._id}}"><span ng-if="workorder.reason">{{workorder.reason}}</span><i ng-if="!workorder.reason">-- No Reason --</i></a><br>
2013-05-06 03:38:29 -04:00
<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>
2015-04-06 03:28:20 -04:00
<div class="tab-pane" title="Frequency" visible="{{accountHasPermission('client.frequency')}}">
2013-05-06 03:38:29 -04:00
<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>
2015-04-20 05:31:12 -04:00
<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>
2013-05-06 03:38:29 -04:00
</tr>
</tbody>
</table>
</div>
2013-09-04 03:05:47 -04:00
<div class="tab-pane" title="Devices">
2013-07-19 01:27:47 -07:00
<div class="row-fluid">
<div class="span12">
<table class="biomed-table">
<thead>
<tr>
2015-08-10 01:42:48 -04:00
<th style="width: 7%">Control #</th>
2015-10-14 02:51:05 -07:00
<th style="width: 6%">Device</th>
<th style="width: 5%">Manufacturer</th>
2014-07-25 03:00:29 -04:00
<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>
2015-08-23 22:40:30 -07:00
<th style="width: 4%">PM Test</th>
<th style="width: 8%">Last Test Run</th>
2015-07-19 21:31:10 -04:00
<th style="width: 4%">Location</th>
2013-07-19 01:27:47 -07:00
</tr>
</thead>
<tbody>
2015-08-03 05:00:22 -04:00
<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>
2015-08-05 06:03:02 -07:00
<td>{{device.deviceType.category}}</td>
2015-08-03 05:00:22 -04:00
<td>{{device.deviceType.make}}</td>
<td>{{device.deviceType.model}}</td>
<td>{{device.serialNumber}}</td>
<td>{{device.purchaseDate | date}}</td>
<td>{{device.warrantyExpiration | date}}</td>
2015-08-23 22:40:30 -07:00
<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>
2015-08-03 05:00:22 -04:00
<td>{{device.location}}</td>
2013-07-19 01:27:47 -07:00
</tr>
</tbody>
</table>
</div>
</div>
</div>
2013-09-30 01:47:14 -04:00
<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">
2014-09-14 07:03:21 -04:00
<a ng-click="internalNotes.edit()" ng-class="{disabled: editing}" ng-show="accountHasPermission('system.edit')">Edit</a>
2013-09-30 01:47:14 -04:00
</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">
2014-09-14 07:03:21 -04:00
<a ng-click="techNotes.edit()" ng-class="{disabled: editing}" ng-show="accountHasPermission('system.edit')">Edit</a>
2013-09-30 01:47:14 -04:00
</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>
2014-07-25 03:00:29 -04:00
<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>
2013-06-17 04:08:57 -04:00
</div>