Project

General

Profile

« Previous | Next » 

Revision 60724

[Monitor dashboard|Trunk]

- Extract start//end year from filters: make it work for projects

View differences:

modules/uoa-monitor-portal/trunk/monitor_dashboard/src/app/utils/indicator-utils.ts
735 735
      }
736 736
      for (let filter of query["query"]["filters"]) {
737 737
        for (let gfilter of filter["groupFilters"]) {
738
          if (gfilter["field"].indexOf(".year") != -1 && gfilter["type"].indexOf(">") != -1) {
738
          if ((gfilter["field"].indexOf(".year") != -1 || gfilter["field"].indexOf(".start year") != -1) && gfilter["type"].indexOf(">") != -1) {
739 739
            start_year = gfilter["values"][0];
740 740
            gfilter["values"][0] = ChartHelper.prefix + "start_year" + ChartHelper.suffix;
741 741
            indicatorPath.parameters["start_year"] = start_year;
......
753 753
      }
754 754
      for (let filter of query["query"]["filters"]) {
755 755
        for (let gfilter of filter["groupFilters"]) {
756
          if (gfilter["field"].indexOf(".year") != -1 && gfilter["type"].indexOf("<") != -1) {
756
          if ((gfilter["field"].indexOf(".year") != -1 || gfilter["field"].indexOf(".start year") != -1) && gfilter["type"].indexOf("<") != -1) {
757 757
            end_year = gfilter["values"][0];
758 758
            gfilter["values"][0] = ChartHelper.prefix + "end_year" + ChartHelper.suffix;
759 759
            indicatorPath.parameters["end_year"] = end_year;

Also available in: Unified diff