Skip to content

Instantly share code, notes, and snippets.

@sukima
Forked from robneville73/test.js
Last active May 9, 2024 23:49
Show Gist options
  • Save sukima/77cadd90f840cca8f73684d795c77dc0 to your computer and use it in GitHub Desktop.
Save sukima/77cadd90f840cca8f73684d795c77dc0 to your computer and use it in GitHub Desktop.
firstReport: computed.alias('reports.firstObject'),
someOtherThing: computed('reports.[]', function() {
return get(this, 'reports').map(report => doCoolStuff(report));
}),
...
...
...
getReports: task(function*() {
let reports = yield get(this, 'store').query('report-menu', {
q: 'classname-EQOrder' + get(this, 'constant').DELIM,
orderby: 'sequence'
});
set(this, 'reports', reports);
})
actions: {
fetchReports() {
get(this, 'getReports').perform();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment