mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-3103] Added new inputs & columns Task List Demo - Rebase (#3659)
* Added columns, inputs and error message alert * Add basic documentation * [ADF-3101] Trailing whitespaces removed
This commit is contained in:
committed by
Eugenio Romano
parent
fdde0257d8
commit
e1d5ef6ee9
@@ -5,7 +5,7 @@
|
|||||||
<mat-label>App Id</mat-label>
|
<mat-label>App Id</mat-label>
|
||||||
<input
|
<input
|
||||||
matInput
|
matInput
|
||||||
class="form-control"
|
class="form-control"
|
||||||
[formControl]="taskAppId">
|
[formControl]="taskAppId">
|
||||||
<mat-error *ngIf="taskAppId.hasError('required')">
|
<mat-error *ngIf="taskAppId.hasError('required')">
|
||||||
{{ 'TASK_LIST_DEMO.ERROR_MESSAGE.APP_ID_REQUIRED_ERROR' | translate }}
|
{{ 'TASK_LIST_DEMO.ERROR_MESSAGE.APP_ID_REQUIRED_ERROR' | translate }}
|
||||||
@@ -18,8 +18,8 @@
|
|||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<mat-label>Task Name</mat-label>
|
<mat-label>Task Name</mat-label>
|
||||||
<input
|
<input
|
||||||
matInput
|
matInput
|
||||||
class="form-control"
|
class="form-control"
|
||||||
[formControl]="taskName">
|
[formControl]="taskName">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
@@ -27,7 +27,7 @@
|
|||||||
<mat-label>Task Id</mat-label>
|
<mat-label>Task Id</mat-label>
|
||||||
<input
|
<input
|
||||||
matInput
|
matInput
|
||||||
class="form-control"
|
class="form-control"
|
||||||
[formControl]="taskId">
|
[formControl]="taskId">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
@@ -35,7 +35,7 @@
|
|||||||
<mat-label>Start</mat-label>
|
<mat-label>Start</mat-label>
|
||||||
<input
|
<input
|
||||||
matInput
|
matInput
|
||||||
class="form-control"
|
class="form-control"
|
||||||
matTooltip="{{ 'TASK_LIST_DEMO.TOOLTIP_MESSAGE.START_INPUT' | translate }}"
|
matTooltip="{{ 'TASK_LIST_DEMO.TOOLTIP_MESSAGE.START_INPUT' | translate }}"
|
||||||
[formControl]="taskStart">
|
[formControl]="taskStart">
|
||||||
<mat-error *ngIf="taskStart.hasError('pattern')">
|
<mat-error *ngIf="taskStart.hasError('pattern')">
|
||||||
@@ -46,8 +46,8 @@
|
|||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<mat-label>ProcessDefinitionId</mat-label>
|
<mat-label>ProcessDefinitionId</mat-label>
|
||||||
<input
|
<input
|
||||||
matInput
|
matInput
|
||||||
class="form-control"
|
class="form-control"
|
||||||
[formControl]="taskProcessDefinitionId">
|
[formControl]="taskProcessDefinitionId">
|
||||||
<mat-hint>E.g. SimpleProcess:1:2</mat-hint>
|
<mat-hint>E.g. SimpleProcess:1:2</mat-hint>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
@@ -64,7 +64,7 @@
|
|||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<mat-label>Process Instance</mat-label>
|
<mat-label>Process Instance</mat-label>
|
||||||
<mat-select
|
<mat-select
|
||||||
class="form-control"
|
class="form-control"
|
||||||
[formControl]="taskIncludeProcessInstance">
|
[formControl]="taskIncludeProcessInstance">
|
||||||
<mat-option *ngFor="let includeProcessInstanceOption of includeProcessInstanceOptions" [value]="includeProcessInstanceOption.value">{{ includeProcessInstanceOption.title }}</mat-option>
|
<mat-option *ngFor="let includeProcessInstanceOption of includeProcessInstanceOptions" [value]="includeProcessInstanceOption.value">{{ includeProcessInstanceOption.title }}</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
@@ -73,7 +73,7 @@
|
|||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<mat-label>Assignment</mat-label>
|
<mat-label>Assignment</mat-label>
|
||||||
<mat-select
|
<mat-select
|
||||||
class="form-control"
|
class="form-control"
|
||||||
[formControl]="taskAssignment">
|
[formControl]="taskAssignment">
|
||||||
<mat-option *ngFor="let assignmentOption of assignmentOptions" [value]="assignmentOption.value">{{ assignmentOption.title }}</mat-option>
|
<mat-option *ngFor="let assignmentOption of assignmentOptions" [value]="assignmentOption.value">{{ assignmentOption.title }}</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
@@ -82,7 +82,7 @@
|
|||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<mat-label>State</mat-label>
|
<mat-label>State</mat-label>
|
||||||
<mat-select
|
<mat-select
|
||||||
class="form-control"
|
class="form-control"
|
||||||
[formControl]="taskState">
|
[formControl]="taskState">
|
||||||
<mat-option *ngFor="let stateOption of stateOptions" [value]="stateOption.value">{{ stateOption.title }}</mat-option>
|
<mat-option *ngFor="let stateOption of stateOptions" [value]="stateOption.value">{{ stateOption.title }}</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
@@ -91,7 +91,7 @@
|
|||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<mat-label>Sort</mat-label>
|
<mat-label>Sort</mat-label>
|
||||||
<mat-select
|
<mat-select
|
||||||
class="form-control"
|
class="form-control"
|
||||||
[formControl]="taskSort">
|
[formControl]="taskSort">
|
||||||
<mat-option *ngFor="let sortOption of sortOptions" [value]="sortOption.value">{{ sortOption.title }}</mat-option>
|
<mat-option *ngFor="let sortOption of sortOptions" [value]="sortOption.value">{{ sortOption.title }}</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
@@ -104,13 +104,13 @@
|
|||||||
|
|
||||||
<div>
|
<div>
|
||||||
<adf-tasklist
|
<adf-tasklist
|
||||||
[appId]="appId"
|
[appId]="appId"
|
||||||
[taskId]="id"
|
[taskId]="id"
|
||||||
[name]="name"
|
[name]="name"
|
||||||
[processDefinitionId]="processDefinitionId"
|
[processDefinitionId]="processDefinitionId"
|
||||||
[processInstanceId]="processInstanceId"
|
[processInstanceId]="processInstanceId"
|
||||||
[assignment]="assignment"
|
[assignment]="assignment"
|
||||||
[state]="state"
|
[state]="state"
|
||||||
[sort]="sort"
|
[sort]="sort"
|
||||||
[start]="start"
|
[start]="start"
|
||||||
[includeProcessInstance]="includeProcessInstance"
|
[includeProcessInstance]="includeProcessInstance"
|
||||||
@@ -127,7 +127,7 @@
|
|||||||
</data-columns>
|
</data-columns>
|
||||||
</adf-tasklist>
|
</adf-tasklist>
|
||||||
|
|
||||||
<adf-pagination
|
<adf-pagination
|
||||||
[target]="taskList">
|
[target]="taskList">
|
||||||
</adf-pagination>
|
</adf-pagination>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -15,23 +15,6 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
|
||||||
* @license
|
|
||||||
* Copyright 2016 Alfresco Software, Ltd.
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { Component, OnInit } from '@angular/core';
|
import { Component, OnInit } from '@angular/core';
|
||||||
import { FormGroup, FormBuilder, Validators, FormControl, AbstractControl } from '@angular/forms';
|
import { FormGroup, FormBuilder, Validators, FormControl, AbstractControl } from '@angular/forms';
|
||||||
import { ActivatedRoute, Params } from '@angular/router';
|
import { ActivatedRoute, Params } from '@angular/router';
|
||||||
|
@@ -47,10 +47,13 @@ Renders a list containing all the tasks matched by the parameters specified.
|
|||||||
| multiselect | `boolean` | false | Toggles multiple row selection, renders checkboxes at the beginning of each row |
|
| multiselect | `boolean` | false | Toggles multiple row selection, renders checkboxes at the beginning of each row |
|
||||||
| name | `string` | | Name of the tasklist. |
|
| name | `string` | | Name of the tasklist. |
|
||||||
| page | `number` | 0 | The page number of the tasks to fetch. |
|
| page | `number` | 0 | The page number of the tasks to fetch. |
|
||||||
|
| start | `number` | 0 | Another approach to specify which page you want load. |
|
||||||
| processDefinitionId | `string` | | The Definition Id of the process. |
|
| processDefinitionId | `string` | | The Definition Id of the process. |
|
||||||
| processDefinitionKey | `string` | | (**Deprecated:** 2.4.0) The Definition Key of the process. |
|
| processDefinitionKey | `string` | | (**Deprecated:** 2.4.0) The Definition Key of the process. |
|
||||||
| processInstanceId | `string` | | The Instance Id of the process. |
|
| processInstanceId | `string` | | The Instance Id of the process. |
|
||||||
|
| taskId | `string` | | The taskId you want to be fetched. |
|
||||||
| selectFirstRow | `boolean` | true | Toggles default selection of the first row |
|
| selectFirstRow | `boolean` | true | Toggles default selection of the first row |
|
||||||
|
| includeProcessInstance | `boolean` | false | Include the process instance info |
|
||||||
| selectionMode | `string` | "single" | Row selection mode. Can be none, `single` or `multiple`. For `multiple` mode, you can use Cmd (macOS) or Ctrl (Win) modifier key to toggle selection for multiple rows. |
|
| selectionMode | `string` | "single" | Row selection mode. Can be none, `single` or `multiple`. For `multiple` mode, you can use Cmd (macOS) or Ctrl (Win) modifier key to toggle selection for multiple rows. |
|
||||||
| size | `number` | | The number of tasks to fetch. Default value: 25. |
|
| size | `number` | | The number of tasks to fetch. Default value: 25. |
|
||||||
| sort | `string` | | Define the sort order of the tasks. Possible values are : `created-desc`, `created-asc`, `due-desc`, `due-asc` |
|
| sort | `string` | | Define the sort order of the tasks. Possible values are : `created-desc`, `created-asc`, `due-desc`, `due-asc` |
|
||||||
|
Reference in New Issue
Block a user