src/lib/shared/interfaces/attribute-item-input.interface.ts
AttributeItemInput is used to further define the attributes that are displayed in the inbox The attributes of the items are enhanced by a label, a filterable property, selection if it's a displayed attribute and a quick icon filter property.
Example :// Import
import { AttributeItemInput } from '@talenra/inbox';const attributes: AttributeItemInput[] = [
{
identifier: 'caseFlags',
label: 'Hinweise',
defaultAttribute: 'detail',
iconFilter: {
identifier: 'caseFlags',
icon: 'error',
activeIconColor: 'primary',
iconTooltip: 'Hinweis',
displayedString: (elem) => {
return 'Beinhaltet die Rolle MA' + elem['caseFlags'].filter((s: string | string[]) => s.includes('MA')).length;
},
assignmentCondition: (elem) => {
return elem['caseFlags'].filter((s: string | string[]) => s.includes('MA')).length != 0;
},
},
},
// attribute for complex data structure (see section dataItems)
{
identifier: 'workflowCase.pvRoles',
label: 'Hinweise',
filterable: 'multi-select',
defaultAttribute: 'detail',
singleMultiSelectOptions: ['Mitglied prüfen', 'Lohndeklaration erfassen', 'Partner prüfen'],
},
{
identifier: 'workflowCase.initialElements.partnerFlag',
label: 'Hinweise',
filterable: 'multi-select',
allowEmptyDataItemFilter: false,
},
];
Properties |
|
| allowEmptyDataItemFilter |
allowEmptyDataItemFilter:
|
Type : boolean
|
| Optional |
|
Defines if the options for the filter should contain the not available option '–'. If set to true, the options will contain the '–' option (default). If set to false, the options will not contain the '–' option. If not set, the options will contain the '–' option. The '–' option is used to filter for items that have no value for the specific attribute. |
| dateFilterRestriction |
dateFilterRestriction:
|
Type : TDateFilterRestrictions
|
| Optional |
|
Restrictions that apply to the filterMode = |
| filterMode |
filterMode:
|
Type : TAttributeFilterModes
|
| Optional |
|
The filterMode attribute defines the type of filter that is used for the attribute. 'multi-select' | 'single-select' | 'date-range' | 'char-range' | 'number-range' | 'text-field'. 'multi-select' is used for attributes with a string value and enables multiple options. 'single-select' is used for attributes with a string value allows only one option. 'date-range' is used for attributes with a date value (type has to be Date). 'char-range' is used for attributes with a string value. 'number-range' is used for attributes with a number value. 'text-field' is used for attributes with a string value and enables a text field. |
| iconFilter |
iconFilter:
|
Type : IIconInput
|
| Optional |
|
Defines if the attribute should be filtered with an icon (quick filter). |
| identifier |
identifier:
|
Type : string
|
|
The identifier of the attribute (has to correspond with the key of the attribute). |
| label |
label:
|
Type : string
|
|
The label should be the translation of the identifier (is the text displayed in the inbox). |
| sortable |
sortable:
|
Type : boolean
|
| Optional |
|
The sortable attribute defines if the attribute is sortable. |