Horizon Framework

Preferences

Org Preferences

We support Org preferences via a callback to the host application. This means that it is expected that any host application provides them. The host should provide its org preferrences function to window.SkeduloPlatform.callbacks.getOrgPreferences. After the platform framework has been loaded.

Org preferences can be used within a Horizon component by importing getOrgPreferences from platform-core and calling the method.

import { getOrgPreferences } from '@skedulo/horizon-core'

getOrgPreferences()

A helper is provided to the templating system for checking org preferences, by calling _.host.getOrgPreferences in your nunjucks template.

{{ "✅" if _.host.getOrgPreferences().disableOnSite == true else "❌" }}

App Preferences

App preferences can be used within a Horizon component by importing getAppPreferences from platform-core and calling the method.

import { getAppPreferences } from '@skedulo/horizon-core'

getAppPreferences()

A helper is provided to the templating system for checking app preferences, by calling _.host.getAppPreferences in your nunjucks template.

{{ _.host.getAppPreferences().dateFormat }}