Improvements to new community dashboard

- Limit dashboard to yearly,quarterly,monthly,weekly
- Always prefer UTC full days for reporting
This commit is contained in:
Sam
2018-05-09 18:05:40 +10:00
parent 36d9f7f814
commit c475905387
6 changed files with 29 additions and 10 deletions

View File

@@ -1,5 +1,5 @@
import DropdownSelectBoxComponent from "select-kit/components/dropdown-select-box";
import computed from "ember-addons/ember-computed-decorators";
import computed, { on } from "ember-addons/ember-computed-decorators";
export default DropdownSelectBoxComponent.extend({
classNames: ["period-chooser"],
@@ -14,6 +14,14 @@ export default DropdownSelectBoxComponent.extend({
return isExpanded ? "caret-up" : "caret-down";
},
@on("didReceiveAttrs")
_setFullDay() {
this.get("headerComponentOptions").setProperties({fullDay: this.get("fullDay")});
this.get("rowComponentOptions").setProperties({fullDay: this.get("fullDay")});
},
actions: {
onSelect() {
this.sendAction("action", this.get("computedValue"));

View File

@@ -1,5 +1,5 @@
<h2 class="selected-name" title={{title}}>
{{period-title value showDateRange=true}}
{{period-title value showDateRange=true fullDay=options.fullDay}}
</h2>
{{d-icon caretIcon class="caret-icon"}}

View File

@@ -1,5 +1,5 @@
<span class="selection-indicator"></span>
<span class="period-title">
{{period-title value showDateRange=true}}
{{period-title value showDateRange=true fullDay=options.fullDay}}
</span>