selectedByTimeFrame property

  1. @computed
ObservableList<TicketsGroupedByTimeFrame> get selectedByTimeFrame

Implementation

@computed
ObservableList<TicketsGroupedByTimeFrame> get selectedByTimeFrame {
  switch (timeFrame) {
    case Timespan.day:
      return ObservableList.of(
          tickets.groupByHour(range.value.start, range.value.end));
    case Timespan.week:
      return ObservableList.of(
          tickets.groupByDayOfTheWeek(range.value.start, range.value.end));
    case Timespan.month:
      return ObservableList.of(
          tickets.groupByDayOfTheMonth(range.value.start, range.value.end));
    default:
      return ObservableList.of([]);
  }
}