Skip to main content

ResourceTimeline

The ResourceTimeline ViewTemplate provides a calendar-based planning interface with two main areas:

  • A tree-structured list of resources (on the left)
  • A timeline of scheduled operations (on the right)

This layout is primarily used to manage time-based operations such as service visits, appointments, or internal personnel planning.


Functional Overview

The interface consists of:

  • Left Pane: A hierarchical tree of resources (e.g., employees, machines)
  • Right Pane: A timeline showing operations scheduled for each resource
  • Interaction: Entries can be created, updated, or moved via drag-and-drop
  • Use Cases: Scheduling of field service technicians, project planning, machine utilization, etc.

ResourceTimeline Designer Example
Figure: Example View in the Designer

ResourceTimeline Client Example
Figure: Appearance in the ADITO client (External Work > Resource Planning)


Entity Model

The ViewTemplate is built upon a three-entity structure:

  • Resource Entity: Represents the schedulable unit (e.g., employee, room, equipment)
  • Entry Entity: Links a resource to a specific time window and operation
  • Operation Entity: Describes the activity or job to be performed

Entity Relationships

ComponentRelation
ResourceCan be assigned multiple entries
EntryReferences exactly one resource and one operation
OperationMay be shared across multiple entries

Configuration Overview

Main Configuration

PropertyDescription
entityFieldReference to the resource-providing Entity (typically #ENTITY)

Resources Section

PropertyDescription
initialDateFieldOptional. Initial date as ISO-8601 string (yyyy.MM.dd)
parentFieldEnables tree structure; NULL values are treated as root nodes
businessHoursFromFieldDefines start of visible work hours (e.g., "08:00")
businessHoursToFieldDefines end of work hours (e.g., "17:30")
note

Working hours define the white range in day mode. Time outside this range is rendered with grey shading.

Business Hour Visualisation
Figure: Visual representation of working hours in day mode


Entries Section

PropertyRequiredDescription
entryEntityFieldReference to the Consumer Entity providing the entries
entryResourceIdFieldField containing the UID of the associated resource
entryDatetimeStartFieldStart datetime of the entry (DATE type, filterable)
entryDatetimeEndFieldEnd datetime of the entry (DATE type, filterable)
entrySelectedResourcesFieldJSON array of selected resource UIDs (optional multi-resource support)
entryResourceOperationIdFieldUID of the operation associated with the entry

Implementation Notes

Responsibilities of each Entity

Resource Entity (e.g., Resource_entity)

  • Provides the list of resources to be shown in the tree
  • Acts as the Provider for the Consumer relation with the entry Entity
warning

Disable paging for this entity to avoid tree truncation. Enable caching to improve performance.

Entry Entity (e.g., ResourcePlanning_entity)

  • Stores scheduled entry data
  • Connects to both Resource and Operation Entities
  • Implements logic for:
    • Filtering by date
    • Drag-and-drop editing
    • Handling multi-resource scheduling (if needed)

Operation Entity (e.g., ResourceOperation_entity)

  • Represents the task being scheduled (e.g., repair, meeting)
  • Often shown in selection lists or dropdowns
  • Connected to entries via UID references

Example: Minimal Setup

A minimal implementation would include:

  • A set of resources with defined availability (working hours)
  • Simple operations containing titles or descriptions
  • Entries with precise start and end timestamps

Code Example: Drag-and-Drop Update of Resource ID

This logic handles updating the resource UID when an entry is moved via drag-and-drop:

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]);
}

UI Structure

ContextPurposeViews
ExampleResourceManage resource EntitiesEdit_view, Filter_view, Preview_view
ExamplePlanningResource planning interfaceFilter_view, Preview_view
ExampleEntryEntry data maintenanceEdit_view, Preview_view
ExampleOperationOperation (task) managementEdit_view, Filter_view, Preview_view

Color Configuration

Colors are predefined via constants. You can assign them programmatically or override them in your theme.

Active Entry Colors

neon.RESOURCETIMELINE_ACTIVE_COLOR_1
neon.RESOURCETIMELINE_ACTIVE_COLOR_2
neon.RESOURCETIMELINE_ACTIVE_COLOR_3
neon.RESOURCETIMELINE_ACTIVE_COLOR_4
neon.RESOURCETIMELINE_ACTIVE_COLOR_5
neon.RESOURCETIMELINE_ACTIVE_COLOR_6
neon.RESOURCETIMELINE_ACTIVE_COLOR_7
neon.RESOURCETIMELINE_ACTIVE_COLOR_8
neon.RESOURCETIMELINE_ACTIVE_COLOR_9
neon.RESOURCETIMELINE_ACTIVE_COLOR_10
neon.RESOURCETIMELINE_ACTIVE_COLOR_11

Passive Entry Colors

neon.RESOURCETIMELINE_PASSIVE_COLOR_1
neon.RESOURCETIMELINE_PASSIVE_COLOR_2
neon.RESOURCETIMELINE_PASSIVE_COLOR_3
neon.RESOURCETIMELINE_PASSIVE_COLOR_4
neon.RESOURCETIMELINE_PASSIVE_COLOR_5
neon.RESOURCETIMELINE_PASSIVE_COLOR_6
neon.RESOURCETIMELINE_PASSIVE_COLOR_7
neon.RESOURCETIMELINE_PASSIVE_COLOR_8
neon.RESOURCETIMELINE_PASSIVE_COLOR_9
neon.RESOURCETIMELINE_PASSIVE_COLOR_10
neon.RESOURCETIMELINE_PASSIVE_COLOR_11
tip

To align with your corporate design or color strategy, override these constants in the theme configuration of your ADITO instance.