li-team

Added in: release-2023-03

Notice: The li-team plugin is only available if the Planning System is enabled.

Supported Features

Document
Media
Include
Document Creation Flow
Push Message
Table Dashboard
Display Filter
Search Indexing
System Metadata

Description

The team metadata plugin li-team enables a user to associate other users with the current document by adding or removing them from the teams plugin. Additionally one user can be marked as the owner. The owner can not be removed from the team.

Default UI

Metadata Form:

Team plugin in the meta data

Dashboard:

Team plugin in the Table Dashboard

Storage Format

{
  // 'id' and '*By' keys are always user ids
  owner: {
    id: <Number>,
    assignedAt: <ISO8601 String>,
    assignedBy: <Number>
  },
  activeUsers: {
    id: <Number>,
    addedAt: <ISO8601 String>,
    addedBy: <Number>
  },
  inactiveUsers: ms.arrayOf(ms.strictObj({
    id: <Number>,
    addedAt: <ISO8601 String>,
    addedBy: <Number>,
    removedAt: <ISO8601 String>,
    removedBy: <Number>'
  }))
}

Content Type Config

{
  handle: 'myContentType',
  // ...
  metadata: [
    {
      handle: 'myHandle'
      type: 'li-team',
      config: {
        // common
        hideFromForm: false,                      // optional, default: false
        required: false,                          // optional, default: false
        requiredErrorMessage: 'Provide a value',  // optional
        index: true,                              // optional, default: false. Added in: release-2023-07
      },
      ui: {
        label: 'My Team',                         // optional, takes camelized name otherwise
        config: {
          readOnly: false,                        // optional, default: false
        }
      }
    }
    // ...
  ]
}

Additional Config

Table Dashboard config:

columns: [
  ...,
  {
    label: 'Team',
    metadataPropertyName: 'myTeam',
    editable: true,
    minWidth: 200,
    growFactor: 1,
    priority: 2
  }
]