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"
|
[showTitle]="showTitle"
|
||||||
[taskId]="taskId"
|
[taskId]="taskId"
|
||||||
[taskDetails]="taskDetails"
|
[taskDetails]="taskDetails"
|
||||||
[showNextTaskCheckbox]="showNextTaskCheckbox && canCompleteTask()"
|
[showNextTaskCheckbox]="showNextTaskCheckbox && canCompleteTask() && nextTaskCheckboxForFormsActivated"
|
||||||
[isNextTaskCheckboxChecked]="isNextTaskCheckboxChecked"
|
[isNextTaskCheckboxChecked]="isNextTaskCheckboxChecked"
|
||||||
(cancelClick)="onCancelForm()"
|
(cancelClick)="onCancelForm()"
|
||||||
(executeOutcome)="onExecuteOutcome($event)"
|
(executeOutcome)="onExecuteOutcome($event)"
|
||||||
@ -68,7 +68,7 @@
|
|||||||
<mat-card-actions class="adf-task-form-actions" align="end">
|
<mat-card-actions class="adf-task-form-actions" align="end">
|
||||||
<mat-checkbox
|
<mat-checkbox
|
||||||
id="adf-form-open-next-task"
|
id="adf-form-open-next-task"
|
||||||
*ngIf="showNextTaskCheckbox && canCompleteTask()"
|
*ngIf="showNextTaskCheckbox && canCompleteTask() && nextTaskCheckboxForFormsActivated"
|
||||||
[checked]="isNextTaskCheckboxChecked"
|
[checked]="isNextTaskCheckboxChecked"
|
||||||
(change)="onNextTaskCheckboxCheckedChanged($event)"
|
(change)="onNextTaskCheckboxCheckedChanged($event)"
|
||||||
>{{ 'ADF_CLOUD_TASK_FORM.OPEN_NEXT_TASK.LABEL' | translate }}
|
>{{ 'ADF_CLOUD_TASK_FORM.OPEN_NEXT_TASK.LABEL' | translate }}
|
||||||
|
@ -480,6 +480,11 @@ describe('UserTaskCloudComponent', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('should allow controlling [open next task] checkbox visibility', () => {
|
it('should allow controlling [open next task] checkbox visibility', () => {
|
||||||
|
if (!component.nextTaskCheckboxForFormsActivated) {
|
||||||
|
expect(true).toBeTrue();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
taskDetails.formKey = 'form';
|
taskDetails.formKey = 'form';
|
||||||
component.getTaskType();
|
component.getTaskType();
|
||||||
component.taskId = 'taskId';
|
component.taskId = 'taskId';
|
||||||
@ -556,6 +561,11 @@ describe('UserTaskCloudComponent', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('should allow controlling [open next task] checkbox value', async () => {
|
it('should allow controlling [open next task] checkbox value', async () => {
|
||||||
|
if (!component.nextTaskCheckboxForFormsActivated) {
|
||||||
|
expect(true).toBeTrue();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
taskDetails.formKey = 'form';
|
taskDetails.formKey = 'form';
|
||||||
component.getTaskType();
|
component.getTaskType();
|
||||||
|
|
||||||
@ -584,6 +594,11 @@ describe('UserTaskCloudComponent', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('should call onNextTaskCheckboxCheckedChanged when the checkbox is checked', async () => {
|
it('should call onNextTaskCheckboxCheckedChanged when the checkbox is checked', async () => {
|
||||||
|
if (!component.nextTaskCheckboxForFormsActivated) {
|
||||||
|
expect(true).toBeTrue();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
taskDetails.formKey = 'form';
|
taskDetails.formKey = 'form';
|
||||||
component.getTaskType();
|
component.getTaskType();
|
||||||
|
|
||||||
|
@ -160,6 +160,12 @@ export class UserTaskCloudComponent implements OnInit, OnChanges {
|
|||||||
taskType: TaskTypesType;
|
taskType: TaskTypesType;
|
||||||
taskTypeEnum = TaskTypes;
|
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 taskCloudService: TaskCloudService = inject(TaskCloudService);
|
||||||
private readonly destroyRef = inject(DestroyRef);
|
private readonly destroyRef = inject(DestroyRef);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user