Widget

Entity description

A dashboard widget is a customizable component that can be added to a dashboard to display information or functionality. Widgets are owned by specific applications and may require permissions or module feature flags (FF) to be visible for staff members.

Properties

NameDescriptionTypeExample
uidUnique identifier of the dashboardWidget objectstringd290f1ee-6c54-4b01-90e6-d701748f0851
app_code_nameThe code name of the app that owns the widgetstringmyappcode
display_nameThe widget display name in different languagesobject{ "en": "Payments", "fr": "Paiements" }
permissionsThe permissions required for the widget to show up for a staff member. If it is null, no restrictions will be enforcedarray["payments_edit", "payments_read"]
moduleThe module (FF) required for the widget to show up for a staff memberstringPayments
component_dataA configuration object is passed to the widget to initialize it. Can vary based on the widget classobject{ "name": "iFrame", "config": { "title": "calendar", "url": "www.partnerdomain.com/calendar" } }
dimensionsThe dimensions of the widget in grid unitsobjectSee Dimensions table below
created_atThe time the staffWidgetsBoard was createdstring2021-07-20T14:00:00.000Z
updated_atThe time the staffWidgetsBoard was last updatedstring2021-07-20T14:00:00.000Z

Dimensions Properties

NameDescriptionTypeExample
min_widthThe minimum width of the widget in grid unitsinteger1
min_heightThe minimum height of the widget in grid unitsinteger1
max_widthThe maximum width of the widget in grid unitsinteger3
max_heightThe maximum height of the widget in grid unitsinteger2
heightThe default height of the widgetinteger2
widthThe default width of the widgetinteger2

Example

{
  "uid": "d290f1ee-6c54-4b01-90e6-d701748f0851",
  "app_code_name": "myappcode",
  "display_name": {
    "en": "Payments",
    "fr": "Paiements"
  },
  "permissions": ["payments_edit", "payments_read"],
  "module": "Payments",
  "dimensions": {
    "max_height": 2,
    "min_height": 1,
    "height": 2,
    "max_width": 3,
    "min_width": 1,
    "width": 2
  },
  "component_data": {
    "name": "iFrame",
    "config": {
      "title": "calendar",
      "url": "www.partnerdomain.com/calendar"
    }
  },
  "created_at": "2021-07-20T14:00:00.000Z",
  "updated_at": "2021-07-20T14:00:00.000Z"
}