Skip to content

OpenVariable

Display the dashboard with open mode with different time span for each users.

Open variable dashboard configuration in navigation menu.

{
  "query": "program open from -6 to +12 months",
  "mode": "open-variable",
  "title": "Open programs",
  "programStatsQuery": "program open from -6 to +12 months with [any]",
  "participantQuery": "program open from -6 to +12 months with [any] participant = trainer",
  "programKindGroup": {
    "excludes": [
      "skill",
      "challenge"
    ]
  }
}

Open variable dashboard configuration in layout menu

For more details about the configured attribute see the

{
  "classes": {
    "container": "m-0 p-0"
  },
  "rows": [
    {
      "cols": [
        {
          "title": "General dashboard",
          "tile": "statistics",
          "participant": "given program [%program] with [active, completed, graduated, background]",
          "query": "given user[%id], all trackers from %userSpan",
          "popupDateRange1": "%userSpan",
          "exceptionStatsQuery": "all users, all trackers exists from today to -40 days where dispatch.taskState is 'flagged'",
          "isOpen": true,
          "isHighTouch": true,
          "showProgram": false,
          "popupDateRange": "+7 to -30 days",
          "highTouchQuery": "given user [%user] ^ program active from today to +7 days with [any]",
          "highTouchTemplate": "{values.baseName} day {values.programDay}",
          "columns": [
            {
              "show": "participations",
              "query": "given user [%user] ^ program active from today to +7 days with [live]",
              "template": "{values.baseName} day {values.programDay}"
            },
            {
              "show": "programDay"
            }
          ],
          "startDate": "user",
          "className": {
            "table": "mt-2"
          },
          "classes": {
            "root": "test"
          },
          "stats": [
            {
              "handles": [
                "preprogramDiet",
                "preprogramEquipment",
                "preprogramPhysical",
                "preprogramPhotos",
                "preprogramDiet2",
                "preprogramEquipment2",
                "preprogramPhysical2",
                "startPhoto",
                "intake"
              ],
              "title": "Pre program",
              "tracking": "pre-program",
              "icon": "fal fa-clipboard-check",
              "formatBackground": [
                {
                  "color": "lightgrey, #222",
                  "range": "days < 0",
                  "tableData": {
                    "id": 0
                  }
                },
                {
                  "color": "limegreen, #222",
                  "range": "days >= 0 and days <= 4",
                  "tableData": {
                    "id": 1
                  }
                },
                {
                  "color": "gold, #222",
                  "range": "days > 4 and days <= 8",
                  "tableData": {
                    "id": 2
                  }
                },
                {
                  "color": "red, #fff",
                  "range": "days > 8 and days <= 12",
                  "tableData": {
                    "id": 3
                  }
                },
                {
                  "color": "firebrick, #fff",
                  "range": "days > 12",
                  "tableData": {
                    "id": 4
                  }
                }
              ]
            }
          ],
          "_id": "28"
        }
      ]
    }
  ]
}