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.
Figure: Example View in the Designer
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
Component | Relation |
---|---|
Resource | Can be assigned multiple entries |
Entry | References exactly one resource and one operation |
Operation | May be shared across multiple entries |
Configuration Overview
Main Configuration
Property | Description |
---|---|
entityField | Reference to the resource-providing Entity (typically #ENTITY ) |
Resources Section
Property | Description |
---|---|
initialDateField | Optional. Initial date as ISO-8601 string (yyyy.MM.dd ) |
parentField | Enables tree structure; NULL values are treated as root nodes |
businessHoursFromField | Defines start of visible work hours (e.g., "08:00" ) |
businessHoursToField | Defines end of work hours (e.g., "17:30" ) |
Working hours define the white range in day mode. Time outside this range is rendered with grey shading.
Figure: Visual representation of working hours in day mode
Entries Section
Property | Required | Description |
---|---|---|
entryEntityField | ✅ | Reference to the Consumer Entity providing the entries |
entryResourceIdField | ✅ | Field containing the UID of the associated resource |
entryDatetimeStartField | ✅ | Start datetime of the entry (DATE type, filterable) |
entryDatetimeEndField | ✅ | End datetime of the entry (DATE type, filterable) |
entrySelectedResourcesField | JSON array of selected resource UIDs (optional multi-resource support) | |
entryResourceOperationIdField | ✅ | UID 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
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
Context | Purpose | Views |
---|---|---|
ExampleResource | Manage resource Entities | Edit_view , Filter_view , Preview_view |
ExamplePlanning | Resource planning interface | Filter_view , Preview_view |
ExampleEntry | Entry data maintenance | Edit_view , Preview_view |
ExampleOperation | Operation (task) management | Edit_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
To align with your corporate design or color strategy, override these constants in the theme configuration of your ADITO instance.