ResourceInfoColumn

Displays basic resource information. Defaults to showing an image + name + event count (all configurable).

If a resource has no image, you can either provide an icon using iconCls in the data (you then need to specify image === false in your data) or the resource initials will be shown. If you don't want to show any avatar at all, you can set showAvatar to false for the Resource record.

Be sure to specify resourceImagePath to instruct the column where to look for the images.

If an image fails to load or if a resource lacks an image, the resource name initials will be rendered. If the resource has an eventColor specified, it will be used as the background color of the initials.

Resource info column
//<code-header>
fiddle.title = 'Resource info column';
//</code-header>
const scheduler = new Scheduler({
    appendTo : targetElement,

    // makes scheduler as high as it needs to be to fit rows
    autoHeight : true,

    startDate : new Date(2018, 4, 6),
    endDate   : new Date(2018, 4, 13),

    viewPreset : 'dayAndWeek',

    resourceImagePath : 'data/Scheduler/images/transparent-users/',

    columns : [
        { type : 'resourceInfo', field : 'name', text : 'Name', width : 165 }
    ],

    resources : [
        { id : 1, name : 'Arnold Smith', image : 'arnold.png' },
        { id : 2, name : 'Gloria Rogers', image : 'gloria.png' },
        { id : 3, name : 'Jane Miller', eventColor : 'indigo', image : false }
    ],

    events : [
        { id : 1, resourceId : 1, name : 'Interview', startDate : '2018-05-06', endDate : '2018-05-07' },
        { id : 2, resourceId : 1, name : 'Press meeting', startDate : '2018-05-08', endDate : '2018-05-09' },
        { id : 3, resourceId : 2, name : 'Audition', startDate : '2018-05-07', endDate : '2018-05-09' },
        { id : 4, resourceId : 2, name : 'Script deadline', startDate : '2018-05-11', endDate : '2018-05-11' },
        { id : 5, resourceId : 3, name : 'Rehearsal', startDate : '2018-05-09', endDate : '2018-05-11' }
    ]
});

Configs

86

Common

autoWidthColumn
fieldColumn
fitModeColumn
flexColumn
listenersEvents
maxWidthColumn
textColumn
widthColumn

Other

Specify 0 to prevent the column from adapting its content according to the used row height, or specify a threshold (row height) at which scaling should start.

Show number of events assigned to the resource below the name.

Show image. Looks for image name in fields on the resource in the following order: 'imageUrl', 'image', 'name'. Set showImage to a field name to use a custom field. Set Scheduler.resourceImagePath to specify where to load images from. If no extension found, defaults to resourceImageExtension.

A template string to render any extra information about the resource below the name

ParameterTypeDescription
resourceRecordResourceModel

The record representing the current row

Returns: String | null
showRole: Boolean | String= falseAlso a property

Show resource role below the name. Specify true to display data from the role field, or specify a field name to read this value from.

Use the resource name as the image name when no image is specified on the resource.

formulaColumn
pinnedColumn
readOnlyColumn

Accessibility

ariaLabelColumn

Export

Integration

vueColumn

Interaction

collapsedColumn
draggableColumn
editorColumn
groupableColumn
hideableColumn
resizableColumn
sealedColumn
sortableColumn

Layout

alignColumn
hiddenColumn
lockedColumn
minWidthColumn
regionColumn

Menu

Merge cells

mergeableColumn

Misc

localeClassLocalizable
localizableLocalizable
tagsColumn
treeColumn

Rendering

cellClsColumn
clsColumn
iconColumn
rendererColumn
tooltipColumn

Summary

sumColumn
summariesColumn

Properties

156

Common

autoWidthColumn
fieldColumn
fitModeColumn
flexColumn
maxWidthColumn
textColumn
widthColumn

Class hierarchy

isResourceInfoColumn: Boolean= truereadonly
Identifies an object as an instance of ResourceInfoColumn class, or subclass thereof.
isResourceInfoColumn: Boolean= truereadonlystatic
Identifies an object as an instance of ResourceInfoColumn class, or subclass thereof.
isColumnColumn
isEventsEvents
isLocalizableLocalizable
isModelModel
isModelLinkModelLink
isModelStmModelStm
isTreeNodeTreeNode

Other

Specify 0 to prevent the column from adapting its content according to the used row height, or specify a threshold (row height) at which scaling should start.

Show number of events assigned to the resource below the name.

showImage: Boolean= trueAlso a config

Show image. Looks for image name in fields on the resource in the following order: 'imageUrl', 'image', 'name'. Set showImage to a field name to use a custom field. Set Scheduler.resourceImagePath to specify where to load images from. If no extension found, defaults to resourceImageExtension.

A template string to render any extra information about the resource below the name

ParameterTypeDescription
resourceRecordResourceModel

The record representing the current row

Returns: String | null
showRole: Boolean | String= falseAlso a config

Show resource role below the name. Specify true to display data from the role field, or specify a field name to read this value from.

Use the resource name as the image name when no image is specified on the resource.

$namestaticModel
defaultsColumn
elementColumn
formulaColumn
gridColumn
pinnedColumn
readOnlyColumn
relationsstaticModel
subGridColumn
typestaticColumn
visibleColumn

Accessibility

ariaLabelColumn

Editing

copyOfModel
isValidModel

Export

Fields

allFieldsstaticModel
autoExposeFieldsstaticModel
childrenFieldstaticModel
fieldMapstaticModel
fieldsstaticModel
idFieldstaticModel

Grouping

Identification

keyModel

Integration

vueColumn

Interaction

collapsedColumn
draggableColumn
editorColumn
groupableColumn
hideableColumn
resizableColumn
sealedColumn
sortableColumn

JSON

jsonModel

Layout

alignColumn
hiddenColumn
lockedColumn
minWidthColumn
regionColumn

Lifecycle

configBase

Linked records

hasLinksModelLink
isLinkedModelLink
recordLinksModelLink

Menu

Merge cells

mergeableColumn

Misc

localeHelperLocalizable
localeManagerLocalizable
stmModelStm
tagsColumn
treeColumn

Parent & children

allChildrenTreeNode
childLevelTreeNode
firstChildTreeNode
isLeafTreeNode
isLoadedTreeNode
isParentTreeNode
isRootTreeNode
lastChildTreeNode
nextSiblingTreeNode
parentTreeNode
parentIdTreeNode

Rendering

cellClsColumn
clsColumn
iconColumn
rendererColumn
tooltipColumn

Summary

sumColumn
summariesColumn

Functions

77

Configuration

applyDefaultsstaticBase

Editing

copyModel
getDataModel
removeModel
setModel

Events

Fields

addFieldstaticModel
getModel
processFieldstaticModel
removeFieldstaticModel

Identification

asIdstaticModel

JSON

toJSONModel

Lifecycle

destroystaticBase

Misc

equalsModel
initClassstaticBase
isOfTypeNamestaticBase
linkModelLink
mixinstaticBase
optionalLstaticLocalizable

Other

hideColumn
LstaticLocalizable
onEvents
relayAllEvents
showColumn
toggleColumn
triggerEvents
unEvents

Parent & children

appendChildTreeNode
bubbleTreeNode
bubbleWhileTreeNode
containsTreeNode
isExpandedTreeNode
removeChildTreeNode
traverseTreeNode

Events

5

Event handlers

5

Typedefs

2

CSS variables

5
NameDescription
--b-resource-info-column-name-font-weightResource name font weight
--b-resource-info-column-role-font-sizeResource role font size
--b-resource-info-column-role-colorResource role color
--b-resource-info-column-role-row-hover-colorResource role color on a hovered row
--b-resource-info-column-avatar-background-colorAvatar background color