-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathhealth-dashboard.js
More file actions
37 lines (31 loc) · 929 Bytes
/
health-dashboard.js
File metadata and controls
37 lines (31 loc) · 929 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import Ember from 'ember';
import CheckinByDate from 'flaredown/mixins/checkin-by-date';
const {
set,
Component,
inject: { service },
computed: { alias },
setProperties,
} = Ember;
export default Component.extend(CheckinByDate, {
patternsVisible: false,
chartVisible: true,
journalIsVisible: alias('chartJournalSwitcher.journalIsVisible'),
chartJournalSwitcher: service(),
i18n: service(),
actions: {
routeToCheckin(date) {
this.routeToCheckin(date);
},
showJournal() {
setProperties(this, { journalIsVisible: true, chartVisible: false, patternsVisible: false });
},
showChart() {
set(this, 'journalIsVisible', false);
setProperties(this, { journalIsVisible: false, chartVisible: true, patternsVisible: false });
},
showPatterns() {
setProperties(this, { journalIsVisible: false, chartVisible: false, patternsVisible: true });
},
},
});