Skip to content

TrainerDashboard

Display a trainer[Specific user] dashboard base on configured query.

Trainer dashboard configuration in navigation menu.

{
  "query": "current user ^ program starting from -12 to +1 month with [any], participant = trainer",
  "mode": "trainer",
  "title": "Trainer Dashboard",
  "programStatsQuery": "program starting from -12 to +1 month with [any]",
  "participantQuery": "program starting from -12 to +1 month with [any] participant = trainer"
}

Attributes

  • query: It provides query that is use for which program to shown to the user as mentioned above configuration.
  • mode: The mode is simply tells us the mode like trainer as mentioned above configuration.
  • programStatsQuery: It provides query for the cohort.
  • participantQuery: It provides query for the participants which is trainer in this configuration.

Trainer dashboard configuration in layout menu

Same as fixed or open program layout as you can see here

{
  "classes": {
    "container": "m-0 p-0"
  },
  "rows": [
    {
      "cols": [
        {
          "title": "General dashboard",
          "tile": "statistics",
          "query": "given program[%program], all trackers from %span",
          "range": "%range",
          "start": "%start",
          "end": "%end",
          "className": {
            "table": "mt-2"
          },
          "stats": [
            {
              "handles": [
                "preprogramDiet",
                "preprogramEquipment",
                "preprogramPhysical",
                "preprogramPhotos",
                "preprogramDiet2",
                "preprogramEquipment2",
                "preprogramPhysical2",
                "startPhoto"
              ],
              "title": "Pre program",
              "icon": "fal fa-clipboard-check"
            },
            {
              "...": "..."
            }
          ],
          "_id": "28"
        }
      ]
    }
  ]
}