[ADF-4795] The form is editable after completing the task in APS (#4979)

* [ADF-4795] Form should not be editable when a task is completed

* add unit test
This commit is contained in:
davidcanonieto
2019-08-07 15:08:57 +01:00
committed by Eugenio Romano
parent e8f179e84d
commit deca68e5b2
2 changed files with 20 additions and 1 deletions

View File

@@ -190,7 +190,7 @@ export class TaskHeaderComponent implements OnChanges, OnInit {
value: this.formName,
key: 'formName',
default: this.translationService.instant('ADF_TASK_LIST.PROPERTIES.FORM_NAME_DEFAULT'),
clickable: !!this.formName,
clickable: this.isFormClickable(),
icon: 'create'
}
)
@@ -311,6 +311,10 @@ export class TaskHeaderComponent implements OnChanges, OnInit {
return this.taskDetails && !!this.taskDetails.endDate;
}
isFormClickable(): boolean {
return !!this.formName && !this.isCompleted();
}
getTaskDuration(): string {
return this.taskDetails.duration ? `${this.taskDetails.duration} ms` : '';
}