This repository has been archived by the owner on Jan 9, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5f4505d
commit 133abd0
Showing
8 changed files
with
83 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import AbstractPagedController from 'hospitalrun/controllers/abstract-paged-controller'; | ||
import UserSession from 'hospitalrun/mixins/user-session'; | ||
export default AbstractPagedController.extend(UserSession, { | ||
startKey: [], | ||
canAddVisit: function() { | ||
return this.currentUserCan('add_visit'); | ||
}.property(), | ||
|
||
canEdit: function() { | ||
// Add and edit are the same capability | ||
return this.currentUserCan('add_appointment'); | ||
}.property(), | ||
|
||
canDelete: function() { | ||
return this.currentUserCan('delete_appointment'); | ||
}.property(), | ||
|
||
sortProperties: ['startDate', 'endDate'], | ||
sortAscending: true | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import AbstractIndexRoute from 'hospitalrun/routes/abstract-index-route'; | ||
import { translationMacro as t } from 'ember-i18n'; | ||
|
||
export default AbstractIndexRoute.extend({ | ||
editReturn: 'appointments.missed', | ||
modelName: 'appointment', | ||
pageTitle: t('appointments.missed') | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{{#item-listing paginationProps=paginationProps }} | ||
<table class="table"> | ||
<tr class="table-header"> | ||
<th>{{t 'labels.date'}}</th> | ||
<th>{{t 'labels.name'}}</th> | ||
<th>{{t 'labels.type'}}</th> | ||
<th>{{t 'labels.location'}}</th> | ||
<th>{{t 'labels.provider'}}</th> | ||
<th>{{t 'labels.status'}}</th> | ||
<th>{{t 'labels.actions'}}</th> | ||
</tr> | ||
{{#each model as |appointment|}} | ||
{{partial 'appointments/item'}} | ||
{{/each}} | ||
</table> | ||
{{/item-listing}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { moduleFor, test } from 'ember-qunit'; | ||
|
||
moduleFor('route:appointments/missed', 'Unit | Route | appointments/missed', { | ||
// Specify the other units that are required for this test. | ||
// needs: ['controller:foo'] | ||
}); | ||
|
||
test('it exists', function(assert) { | ||
let route = this.subject(); | ||
assert.ok(route); | ||
}); |