[ACS-7429] cleanup APS1 task-list before refactorings (#9650)

This commit is contained in:
Denys Vuika
2024-05-07 14:51:56 -04:00
committed by GitHub
parent e749473a32
commit 20ee286902
42 changed files with 266 additions and 992 deletions

View File

@@ -58,7 +58,6 @@ export class TaskHeaderComponent implements OnChanges, OnInit {
unclaim: EventEmitter<any> = new EventEmitter<any>();
properties: any[] = [];
inEdit: boolean = false;
displayDateClearAction = false;
dateFormat: string;
dateLocale: string;
@@ -196,10 +195,20 @@ export class TaskHeaderComponent implements OnChanges, OnInit {
return this.taskDetails?.isCompleted() ? 'Completed' : 'Running';
}
/**
* Emit the claim event
*
* @param taskId the id of the task to claim
*/
onClaimTask(taskId: string) {
this.claim.emit(taskId);
}
/**
* Emit the unclaim event
*
* @param taskId the id of the task to unclaim
*/
onUnclaimTask(taskId: string) {
this.unclaim.emit(taskId);
}
@@ -213,15 +222,25 @@ export class TaskHeaderComponent implements OnChanges, OnInit {
return !!this.taskDetails?.endDate;
}
/**
* Check if the form is clickable
*
* @returns `true` if the form is clickable, otherwise `false`
*/
isFormClickable(): boolean {
return !!this.formName && !this.isCompleted();
}
/**
* Get the task duration
*
* @returns the task duration in milliseconds
*/
getTaskDuration(): string {
return this.taskDetails.duration ? `${this.taskDetails.duration} ms` : '';
}
private initDefaultProperties(parentInfoMap): any[] {
private initDefaultProperties(parentInfoMap: Map<string, string>): any[] {
return [
new CardViewTextItemModel({
label: 'ADF_TASK_LIST.PROPERTIES.ASSIGNEE',