[AAE-7243] fix process services eslint warnings (#7498)

* fix process services eslint warnings

* fix constants

* revert type changes
This commit is contained in:
Denys Vuika
2022-02-17 13:07:13 +00:00
committed by GitHub
parent 1a6746ff3c
commit e017423c8c
91 changed files with 1863 additions and 1920 deletions

View File

@@ -52,6 +52,27 @@ export class ProcessInstanceHeaderComponent implements OnChanges {
}
}
getProcessStatus(): string {
if (this.processInstance) {
return this.isRunning() ? 'Running' : 'Completed';
}
return 'Unknown';
}
getStartedByFullName(): string {
let fullName = '';
if (this.processInstance && this.processInstance.startedBy) {
fullName += this.processInstance.startedBy.firstName || '';
fullName += fullName ? ' ' : '';
fullName += this.processInstance.startedBy.lastName || '';
}
return fullName;
}
isRunning(): boolean {
return this.processInstance && !this.processInstance.ended;
}
private initDefaultProperties(): any[] {
return [
new CardViewTextItemModel(
@@ -115,25 +136,4 @@ export class ProcessInstanceHeaderComponent implements OnChanges {
private isValidSelection(filteredProperties: string[], cardItem: CardViewBaseItemModel): boolean {
return filteredProperties ? filteredProperties.indexOf(cardItem.key) >= 0 : true;
}
getProcessStatus(): string {
if (this.processInstance) {
return this.isRunning() ? 'Running' : 'Completed';
}
return 'Unknown';
}
getStartedByFullName(): string {
let fullName = '';
if (this.processInstance && this.processInstance.startedBy) {
fullName += this.processInstance.startedBy.firstName || '';
fullName += fullName ? ' ' : '';
fullName += this.processInstance.startedBy.lastName || '';
}
return fullName;
}
isRunning(): boolean {
return this.processInstance && !this.processInstance.ended;
}
}