mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
AAE-33090 Open Next Task Checkbox (#10757)
* [AAE-33090] Add optional checkbox for 'open next task' feature * [AAE-33090] move translation to LABEL property * [33090] add unit tests * add tests for checkbox value * [AAE-33090] remove some comments * [AAE-33090] update documentation * AAE-33090 kind of a typo * AAE-33090 remove all comments
This commit is contained in:
@@ -85,11 +85,13 @@ The template defined inside `empty-form` will be shown when no form definition i
|
||||
| fieldValidators | [`FormFieldValidator`](../../../lib/core/src/lib/form/components/widgets/core/form-field-validator.ts)`[]` | | [FormFieldValidator](../../../lib/core/src/lib/form/components/widgets/core/form-field-validator.ts) allow to override the form field validators provided. |
|
||||
| form | [`FormModel`](../../../lib/core/src/lib/form/components/widgets/core/form.model.ts) | | Underlying form model instance. |
|
||||
| formId | `string` | | Task id to fetch corresponding form and values. |
|
||||
| isNextTaskCheckboxChecked | `boolean` | false | Whether the `Open next task` checkbox is checked by default or not. |
|
||||
| nameNode | `string` | | Name to assign to the new node where the metadata are stored. |
|
||||
| path | `string` | | Path of the folder where the metadata will be stored. |
|
||||
| processInstanceId | `string` | | ProcessInstanceId id to fetch corresponding form and values. |
|
||||
| readOnly | `boolean` | false | Toggle readonly state of the form. Forces all form widgets to render as readonly if enabled. |
|
||||
| showCompleteButton | `boolean` | true | Toggle rendering of the `Complete` outcome button. |
|
||||
| showNextTaskCheckbox | `boolean` | false | Toggle rendering of the `Open next task` checkbox. |
|
||||
| showRefreshButton | `boolean` | true | Toggle rendering of the `Refresh` button. |
|
||||
| showSaveButton | `boolean` | true | Toggle rendering of the `Save` outcome button. |
|
||||
| showTitle | `boolean` | true | Toggle rendering of the form title. |
|
||||
@@ -111,6 +113,7 @@ The template defined inside `empty-form` will be shown when no form definition i
|
||||
| formSaved | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`FormModel`](../../../lib/core/src/lib/form/components/widgets/core/form.model.ts)`>` | Emitted when the form is submitted with the `Save` or custom outcomes. |
|
||||
| displayModeOn | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`FormCloudDisplayModeConfiguration`](../../../lib/process-services-cloud/src/lib/services/form-fields.interfaces.ts)`>` | Emitted when a display mode configuration is turned on. |
|
||||
| displayModeOff | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`FormCloudDisplayModeConfiguration`](../../../lib/process-services-cloud/src/lib/services/form-fields.interfaces.ts)`>` | Emitted when a display mode configuration is turned off. |
|
||||
| nextTaskCheckboxCheckedChanged | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`MatCheckboxChange`](https://material.angular.io/components/checkbox/api#MatCheckboxChange)`>` | Emitted when the `Open next task` checkbox was toggled. |
|
||||
|
||||
## Details
|
||||
|
||||
|
@@ -37,9 +37,11 @@ Starts a process.
|
||||
| Name | Type | Default value | Description |
|
||||
| ---- | ---- | ------------- | ----------- |
|
||||
| appName | `string` | "" | (required) Name of the app. |
|
||||
| isNextTaskCheckboxChecked | `boolean` | false | Whether the `Open next task` checkbox is checked by default or not. |
|
||||
| maxNameLength | `number` | MAX_NAME_LENGTH | Maximum length of the process name. |
|
||||
| name | `string` | "" | Name of the process. |
|
||||
| processDefinitionName | `string` | | Name of the process definition. |
|
||||
| showNextTaskCheckbox | `boolean` | false | Toggle rendering of the `Open next task` checkbox. |
|
||||
| showSelectProcessDropdown | `boolean` | true | Show/hide the process dropdown list. |
|
||||
| showTitle | `boolean` | true | Show/hide title. |
|
||||
| values | [`TaskVariableCloud`](../../../lib/process-services-cloud/src/lib/form/models/task-variable-cloud.model.ts)`[]` | | Parameter to pass form field values in the start form if one is associated. |
|
||||
@@ -52,6 +54,7 @@ Starts a process.
|
||||
| cancel | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`ProcessInstanceCloud`](../../../lib/process-services-cloud/src/lib/process/start-process/models/process-instance-cloud.model.ts)`>` | Emitted when the starting process is cancelled |
|
||||
| error | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`ProcessInstanceCloud`](../../../lib/process-services-cloud/src/lib/process/start-process/models/process-instance-cloud.model.ts)`>` | Emitted when an error occurs. |
|
||||
| formContentClicked | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`ContentLinkModel`](../../../lib/core/src/lib/form/components/widgets/core/content-link.model.ts)`>` | Emitted when form content is clicked. |
|
||||
| nextTaskCheckboxCheckedChanged | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`MatCheckboxChange`](https://material.angular.io/components/checkbox/api#MatCheckboxChange)`>` | Emitted when the `Open next task` checkbox was toggled. |
|
||||
| processDefinitionSelection | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`ProcessDefinitionCloud`](../../../lib/process-services-cloud/src/lib/models/process-definition-cloud.model.ts)`>` | Emitted when process definition selection changes. |
|
||||
| success | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`ProcessInstanceCloud`](../../../lib/process-services-cloud/src/lib/process/start-process/models/process-instance-cloud.model.ts)`>` | Emitted when the process is successfully started. |
|
||||
|
||||
|
@@ -33,34 +33,37 @@ Save and Complete buttons get disabled when at least one of the form's inputs ar
|
||||
|
||||
### Properties
|
||||
|
||||
| Name | Type | Default value | Description |
|
||||
|---------------------------|---------------------------------------|---------------|---------------------------------------------------|
|
||||
| appName | `string` | "" | App id to fetch corresponding form and values. |
|
||||
| readOnly | `boolean` | false | Toggle readonly state of the task. |
|
||||
| showCancelButton | `boolean` | true | Toggle rendering of the `Cancel` button. |
|
||||
| showCompleteButton | `boolean` | true | Toggle rendering of the `Complete` button. |
|
||||
| showRefreshButton | `boolean` | false | Toggle rendering of the `Refresh` button. |
|
||||
| showTitle | `boolean` | true | Toggle rendering of the form title. |
|
||||
| showValidationIcon | `boolean` | true | Toggle rendering of the `Validation` icon. |
|
||||
| taskId | `string` | | Task id to fetch corresponding form and values. |
|
||||
| displayModeConfigurations | `FormCloudDisplayModeConfiguration[]` | | The available display configurations for the form |
|
||||
| Name | Type | Default value | Description |
|
||||
| ------------------------- | ------------------------------------- | ------------- | ------------------------------------------------------------------- |
|
||||
| appName | `string` | "" | App id to fetch corresponding form and values. |
|
||||
| isNextTaskCheckboxChecked | `boolean` | false | Whether the `Open next task` checkbox is checked by default or not. |
|
||||
| readOnly | `boolean` | false | Toggle readonly state of the task. |
|
||||
| showCancelButton | `boolean` | true | Toggle rendering of the `Cancel` button. |
|
||||
| showCompleteButton | `boolean` | true | Toggle rendering of the `Complete` button. |
|
||||
| showNextTaskCheckbox | `boolean` | false | Toggle rendering of the `Open next task` checkbox. |
|
||||
| showRefreshButton | `boolean` | false | Toggle rendering of the `Refresh` button. |
|
||||
| showTitle | `boolean` | true | Toggle rendering of the form title. |
|
||||
| showValidationIcon | `boolean` | true | Toggle rendering of the `Validation` icon. |
|
||||
| taskId | `string` | | Task id to fetch corresponding form and values. |
|
||||
| displayModeConfigurations | `FormCloudDisplayModeConfiguration[]` | | The available display configurations for the form |
|
||||
|
||||
### Events
|
||||
|
||||
| Name | Type | Description |
|
||||
|--------------------|---------------------------------------------------|--------------------------------------------------------------------------------------------------------|
|
||||
| cancelClick | `EventEmitter<string>` | Emitted when the cancel button is clicked. |
|
||||
| error | `EventEmitter<any>` | Emitted when any error occurs. |
|
||||
| executeOutcome | `EventEmitter<FormOutcomeEvent>` | Emitted when any outcome is executed. Default behaviour can be prevented via `event.preventDefault()`. |
|
||||
| formCompleted | `EventEmitter<FormModel>` | Emitted when the form is submitted with the `Complete` outcome. |
|
||||
| formContentClicked | `EventEmitter<ContentLinkModel>` | Emitted when form content is clicked. |
|
||||
| formSaved | `EventEmitter<FormModel>` | Emitted when the form is saved. |
|
||||
| onTaskLoaded | `EventEmitter<TaskDetailsCloudModel>` | Emitted when a task is loaded. |
|
||||
| taskClaimed | `EventEmitter<string>` | Emitted when the task is claimed. |
|
||||
| taskCompleted | `EventEmitter<string>` | Emitted when the task is completed. |
|
||||
| taskUnclaimed | `EventEmitter<string>` | Emitted when the task is unclaimed. |
|
||||
| displayModeOn | `EventEmitter<FormCloudDisplayModeConfiguration>` | Emitted when a display mode configuration is turned on. |
|
||||
| displayModeOff | `EventEmitter<FormCloudDisplayModeConfiguration>` | Emitted when a display mode configuration is turned off. |
|
||||
| Name | Type | Description |
|
||||
| ------------------------------ | ------------------------------------------------- | ------------------------------------------------------------------------------------------------------ |
|
||||
| cancelClick | `EventEmitter<string>` | Emitted when the cancel button is clicked. |
|
||||
| error | `EventEmitter<any>` | Emitted when any error occurs. |
|
||||
| executeOutcome | `EventEmitter<FormOutcomeEvent>` | Emitted when any outcome is executed. Default behaviour can be prevented via `event.preventDefault()`. |
|
||||
| formCompleted | `EventEmitter<FormModel>` | Emitted when the form is submitted with the `Complete` outcome. |
|
||||
| formContentClicked | `EventEmitter<ContentLinkModel>` | Emitted when form content is clicked. |
|
||||
| formSaved | `EventEmitter<FormModel>` | Emitted when the form is saved. |
|
||||
| nextTaskCheckboxCheckedChanged | `EventEmitter<MatCheckboxChange>` | Emitted when the `Open next task` checkbox was toggled. |
|
||||
| onTaskLoaded | `EventEmitter<TaskDetailsCloudModel>` | Emitted when a task is loaded. |
|
||||
| taskClaimed | `EventEmitter<string>` | Emitted when the task is claimed. |
|
||||
| taskCompleted | `EventEmitter<string>` | Emitted when the task is completed. |
|
||||
| taskUnclaimed | `EventEmitter<string>` | Emitted when the task is unclaimed. |
|
||||
| displayModeOn | `EventEmitter<FormCloudDisplayModeConfiguration>` | Emitted when a display mode configuration is turned on. |
|
||||
| displayModeOff | `EventEmitter<FormCloudDisplayModeConfiguration>` | Emitted when a display mode configuration is turned off. |
|
||||
|
||||
#### Enabling fullscreen display for the form of the task
|
||||
|
||||
|
@@ -33,31 +33,33 @@ Based on property taskDetails: TaskDetailsCloudModel shows a form or a screen.
|
||||
|
||||
### Properties
|
||||
|
||||
| Name | Type | Default value | Description |
|
||||
|---------------------------|---------------------------------------|---------------|---------------------------------------------------|
|
||||
| appName | `string` | "" | App id to fetch corresponding form and values. |
|
||||
| readOnly | `boolean` | false | Toggle readonly state of the task. |
|
||||
| showCancelButton | `boolean` | true | Toggle rendering of the `Cancel` button. |
|
||||
| showCompleteButton | `boolean` | true | Toggle rendering of the `Complete` button. |
|
||||
| showTitle | `boolean` | true | Toggle rendering of the form title. |
|
||||
| showValidationIcon | `boolean` | true | Toggle rendering of the `Validation` icon. |
|
||||
| taskId | `string` | | Task id to fetch corresponding form and values. |
|
||||
| displayModeConfigurations | `FormCloudDisplayModeConfiguration[]` | | The available display configurations for the form |
|
||||
| Name | Type | Default value | Description |
|
||||
| ------------------------- | ------------------------------------- | ------------- | ------------------------------------------------------------------- |
|
||||
| appName | `string` | "" | App id to fetch corresponding form and values. |
|
||||
| isNextTaskCheckboxChecked | `boolean` | false | Whether the `Open next task` checkbox is checked by default or not. |
|
||||
| readOnly | `boolean` | false | Toggle readonly state of the task. |
|
||||
| showCancelButton | `boolean` | true | Toggle rendering of the `Cancel` button. |
|
||||
| showCompleteButton | `boolean` | true | Toggle rendering of the `Complete` button. |
|
||||
| showNextTaskCheckbox | `boolean` | false | Toggle rendering of the `Open next task` checkbox. |
|
||||
| showTitle | `boolean` | true | Toggle rendering of the form title. |
|
||||
| showValidationIcon | `boolean` | true | Toggle rendering of the `Validation` icon. |
|
||||
| taskId | `string` | | Task id to fetch corresponding form and values. |
|
||||
| displayModeConfigurations | `FormCloudDisplayModeConfiguration[]` | | The available display configurations for the form |
|
||||
|
||||
### Events
|
||||
|
||||
| Name | Type | Description |
|
||||
|--------------------|---------------------------------------------------|--------------------------------------------------------------------------------------------------------|
|
||||
| cancelClick | `EventEmitter<string>` | Emitted when the cancel button is clicked. |
|
||||
| error | `EventEmitter<any>` | Emitted when any error occurs. |
|
||||
| executeOutcome | `EventEmitter<FormOutcomeEvent>` | Emitted when any outcome is executed. Default behaviour can be prevented via `event.preventDefault()`. |
|
||||
| formContentClicked | `EventEmitter<ContentLinkModel>` | Emitted when form content is clicked. |
|
||||
| formSaved | `EventEmitter<FormModel>` | Emitted when the form is saved. |
|
||||
| onTaskLoaded | `EventEmitter<TaskDetailsCloudModel>` | Emitted when a task is loaded. |
|
||||
| taskClaimed | `EventEmitter<string>` | Emitted when the task is claimed. |
|
||||
| taskCompleted | `EventEmitter<string>` | Emitted when the task is completed. |
|
||||
| taskUnclaimed | `EventEmitter<string>` | Emitted when the task is unclaimed. |
|
||||
|
|
||||
| Name | Type | Description |
|
||||
| ------------------------------ | ------------------------------------- | ------------------------------------------------------------------------------------------------------ |
|
||||
| cancelClick | `EventEmitter<string>` | Emitted when the cancel button is clicked. |
|
||||
| error | `EventEmitter<any>` | Emitted when any error occurs. |
|
||||
| executeOutcome | `EventEmitter<FormOutcomeEvent>` | Emitted when any outcome is executed. Default behaviour can be prevented via `event.preventDefault()`. |
|
||||
| formContentClicked | `EventEmitter<ContentLinkModel>` | Emitted when form content is clicked. |
|
||||
| formSaved | `EventEmitter<FormModel>` | Emitted when the form is saved. |
|
||||
| nextTaskCheckboxCheckedChanged | `EventEmitter<MatCheckboxChange>` | Emitted when the `Open next task` checkbox was toggled. |
|
||||
| onTaskLoaded | `EventEmitter<TaskDetailsCloudModel>` | Emitted when a task is loaded. |
|
||||
| taskClaimed | `EventEmitter<string>` | Emitted when the task is claimed. |
|
||||
| taskCompleted | `EventEmitter<string>` | Emitted when the task is completed. |
|
||||
| taskUnclaimed | `EventEmitter<string>` | Emitted when the task is unclaimed. |
|
||||
|
||||
#### Enabling fullscreen display for the form of the task
|
||||
|
||||
|
Reference in New Issue
Block a user