* FIX: Misc fixes for sentiment in the admin dashboard - Fixes missing filters for the main graph - Fixes previous 30 days trend in emotion table Also moves links to individual cells in emotion table, so admins can drill down to the specific time period on their reports. * lints
28 lines
696 B
JavaScript
28 lines
696 B
JavaScript
import Component from "@ember/component";
|
|
import { attributeBindings, classNames } from "@ember-decorators/component";
|
|
import getURL from "discourse-common/lib/get-url";
|
|
|
|
@classNames("admin-report-counters")
|
|
@attributeBindings("model.description:title")
|
|
export default class AdminReportEmotion extends Component {
|
|
get filterURL() {
|
|
return getURL(`/filter?q=`);
|
|
}
|
|
|
|
get today() {
|
|
return moment().format("YYYY-MM-DD");
|
|
}
|
|
|
|
get yesterday() {
|
|
return moment().subtract(1, "day").format("YYYY-MM-DD");
|
|
}
|
|
|
|
get lastWeek() {
|
|
return moment().subtract(1, "week").format("YYYY-MM-DD");
|
|
}
|
|
|
|
get lastMonth() {
|
|
return moment().subtract(1, "month").format("YYYY-MM-DD");
|
|
}
|
|
}
|