mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-12 17:04:57 +00:00
AAE-34514 Disable next task checkbox for forms (#10824)
This commit is contained in:
parent
2c438760ea
commit
0f1200b5a2
@ -12,7 +12,7 @@
|
||||
[showTitle]="showTitle"
|
||||
[taskId]="taskId"
|
||||
[taskDetails]="taskDetails"
|
||||
[showNextTaskCheckbox]="showNextTaskCheckbox && canCompleteTask()"
|
||||
[showNextTaskCheckbox]="showNextTaskCheckbox && canCompleteTask() && nextTaskCheckboxForFormsActivated"
|
||||
[isNextTaskCheckboxChecked]="isNextTaskCheckboxChecked"
|
||||
(cancelClick)="onCancelForm()"
|
||||
(executeOutcome)="onExecuteOutcome($event)"
|
||||
@ -68,7 +68,7 @@
|
||||
<mat-card-actions class="adf-task-form-actions" align="end">
|
||||
<mat-checkbox
|
||||
id="adf-form-open-next-task"
|
||||
*ngIf="showNextTaskCheckbox && canCompleteTask()"
|
||||
*ngIf="showNextTaskCheckbox && canCompleteTask() && nextTaskCheckboxForFormsActivated"
|
||||
[checked]="isNextTaskCheckboxChecked"
|
||||
(change)="onNextTaskCheckboxCheckedChanged($event)"
|
||||
>{{ 'ADF_CLOUD_TASK_FORM.OPEN_NEXT_TASK.LABEL' | translate }}
|
||||
|
@ -480,6 +480,11 @@ describe('UserTaskCloudComponent', () => {
|
||||
});
|
||||
|
||||
it('should allow controlling [open next task] checkbox visibility', () => {
|
||||
if (!component.nextTaskCheckboxForFormsActivated) {
|
||||
expect(true).toBeTrue();
|
||||
return;
|
||||
}
|
||||
|
||||
taskDetails.formKey = 'form';
|
||||
component.getTaskType();
|
||||
component.taskId = 'taskId';
|
||||
@ -556,6 +561,11 @@ describe('UserTaskCloudComponent', () => {
|
||||
});
|
||||
|
||||
it('should allow controlling [open next task] checkbox value', async () => {
|
||||
if (!component.nextTaskCheckboxForFormsActivated) {
|
||||
expect(true).toBeTrue();
|
||||
return;
|
||||
}
|
||||
|
||||
taskDetails.formKey = 'form';
|
||||
component.getTaskType();
|
||||
|
||||
@ -584,6 +594,11 @@ describe('UserTaskCloudComponent', () => {
|
||||
});
|
||||
|
||||
it('should call onNextTaskCheckboxCheckedChanged when the checkbox is checked', async () => {
|
||||
if (!component.nextTaskCheckboxForFormsActivated) {
|
||||
expect(true).toBeTrue();
|
||||
return;
|
||||
}
|
||||
|
||||
taskDetails.formKey = 'form';
|
||||
component.getTaskType();
|
||||
|
||||
|
@ -160,6 +160,12 @@ export class UserTaskCloudComponent implements OnInit, OnChanges {
|
||||
taskType: TaskTypesType;
|
||||
taskTypeEnum = TaskTypes;
|
||||
|
||||
/**
|
||||
* The `Open next task` feature is currently disabled for forms only.
|
||||
* See https://hyland.atlassian.net/browse/AAE-34514 for further details.
|
||||
*/
|
||||
readonly nextTaskCheckboxForFormsActivated = false;
|
||||
|
||||
private taskCloudService: TaskCloudService = inject(TaskCloudService);
|
||||
private readonly destroyRef = inject(DestroyRef);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user