main

mattermost/focalboard

Last updated at: 29/12/2023 09:42

property.tsx

TLDR

This file defines a class called UpdatedByProperty which extends the PropertyType class. It exports the UpdatedByProperty as the default export.

Classes

UpdatedByProperty

The UpdatedByProperty class is a subclass of PropertyType. It has the following properties and methods:

  • Editor: The Editor property is set to the UpdatedBy component.
  • name: The name property is set to the string 'Last Modified By'.
  • type: The type property is set to 'updatedBy'.
  • isReadOnly: The isReadOnly property is set to true.
  • displayName: The displayName property is a function that takes an intl object and returns the formatted message for the key 'PropertyType.UpdatedBy'.
  • canFilter: The canFilter property is set to true.
  • filterValueType: The filterValueType property is set to the string 'person'.
  • canGroup: The canGroup property is set to true.

END

// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
import {IntlShape} from 'react-intl'

import {PropertyType, PropertyTypeEnum, FilterValueType} from '../types'

import UpdatedBy from './updatedBy'

export default class UpdatedByProperty extends PropertyType {
    Editor = UpdatedBy
    name = 'Last Modified By'
    type = 'updatedBy' as PropertyTypeEnum
    isReadOnly = true
    displayName = (intl: IntlShape) => intl.formatMessage({id: 'PropertyType.UpdatedBy', defaultMessage: 'Last updated by'})
    canFilter = true
    filterValueType = 'person' as FilterValueType
    canGroup = true
}