Skip to main content

ResourceTimeline

Purpose

The ResourceTimeline ViewTemplate provides a planning interface for time-based assignments. It combines a resource tree with a timeline of scheduled operations and is suitable for scenarios such as service planning, appointments, or personnel scheduling.

ResourceTimeline Client Example Figure: ResourceTimeline in the ADITO client.

Behavior

The ViewTemplate consists of:

  • a tree of resources on the left
  • a timeline of entries on the right
  • interactive planning behavior such as drag-and-drop updates

The implementation usually relies on three logical entities:

  • a resource entity
  • an entry entity
  • an operation entity

Configuration

The main ViewTemplate property is:

PropertyDescription
entityFieldDefines the resource-providing Entity, typically #ENTITY.

Important resource-related properties include:

PropertyDescription
initialDateFieldDefines the initial date shown in the View.
parentFieldDefines the resource tree structure.
businessHoursFromFieldDefines the start of the visible work hours.
businessHoursToFieldDefines the end of the visible work hours.

Important entry-related properties include:

PropertyDescription
entryEntityFieldDefines the Consumer Entity that provides the entries.
entryResourceIdFieldDefines the resource UID assigned to an entry.
entryDatetimeStartFieldDefines the start timestamp.
entryDatetimeEndFieldDefines the end timestamp.
entrySelectedResourcesFieldOptionally defines a JSON array for multi-resource scenarios.
entryResourceOperationIdFieldDefines the operation UID linked to the entry.
warning

Paging should be disabled for the resource entity to avoid incomplete tree structures.

Example usage

The ViewTemplate is used in scheduling scenarios such as External Work > Resource Planning.

ResourceTimeline Designer Example Figure: ResourceTimeline in the Designer. Business Hour Visualisation Figure: Working-hour visualization in day mode.

Implementation hints

In drag-and-drop scenarios, the updated resource assignment can be resolved, for example, through logic such as:

import { result, vars } from "@aditosoftware/jdito-types";

if (vars.get("$field.SelectedResources") && JSON.parse(vars.get("$field.SelectedResources"))?.length > 0) {
result.string(JSON.parse(vars.get("$field.SelectedResources"))[0]);
}

The ViewTemplate also supports predefined active and passive color constants such as neon.RESOURCETIMELINE_ACTIVE_COLOR_1 and neon.RESOURCETIMELINE_PASSIVE_COLOR_1, which can be overridden in the theme.