mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
tslint arrow-parens rule (#4003)
This commit is contained in:
@@ -132,7 +132,7 @@ export class ProcessFiltersComponent implements OnInit, OnChanges {
|
||||
*/
|
||||
getFiltersByAppName(appName: string) {
|
||||
this.appsProcessService.getDeployedApplicationsByName(appName).subscribe(
|
||||
application => {
|
||||
(application) => {
|
||||
this.getFiltersByAppId(application.id);
|
||||
this.selectProcessFilter(this.filterParam);
|
||||
},
|
||||
|
@@ -71,9 +71,9 @@ export class ProcessInstanceTasksComponent implements OnInit, OnChanges {
|
||||
constructor(private activitiProcess: ProcessService,
|
||||
private logService: LogService,
|
||||
private dialog: MatDialog) {
|
||||
this.task$ = new Observable<TaskDetailsModel>(observer => this.taskObserver = observer)
|
||||
this.task$ = new Observable<TaskDetailsModel>((observer) => this.taskObserver = observer)
|
||||
.pipe(share());
|
||||
this.completedTask$ = new Observable<TaskDetailsModel>(observer => this.completedTaskObserver = observer)
|
||||
this.completedTask$ = new Observable<TaskDetailsModel>((observer) => this.completedTaskObserver = observer)
|
||||
.pipe(share());
|
||||
}
|
||||
|
||||
|
@@ -232,7 +232,7 @@ describe('ProcessInstanceListComponent', () => {
|
||||
});
|
||||
let rowEvent = new DataRowEvent(row, null);
|
||||
|
||||
component.rowClick.subscribe(taskId => {
|
||||
component.rowClick.subscribe((taskId) => {
|
||||
expect(taskId).toEqual('999');
|
||||
expect(component.getCurrentId()).toEqual('999');
|
||||
done();
|
||||
|
@@ -224,7 +224,7 @@ export class ProcessInstanceListComponent extends DataTableSchema implements On
|
||||
totalItems: response.total
|
||||
});
|
||||
},
|
||||
error => {
|
||||
(error) => {
|
||||
this.error.emit(error);
|
||||
this.isLoading = false;
|
||||
});
|
||||
@@ -286,7 +286,7 @@ export class ProcessInstanceListComponent extends DataTableSchema implements On
|
||||
* @param instances
|
||||
*/
|
||||
private optimizeProcessDetails(instances: any[]): any[] {
|
||||
instances = instances.map(instance => {
|
||||
instances = instances.map((instance) => {
|
||||
instance.name = this.getProcessNameOrDescription(instance, 'medium');
|
||||
if (instance.started) {
|
||||
instance.started = moment(instance.started).format(this.FORMAT_DATE);
|
||||
|
@@ -115,10 +115,10 @@ export class StartProcessInstanceComponent implements OnChanges, OnInit {
|
||||
|
||||
this.loadStartProcess();
|
||||
|
||||
this.processNameInput.valueChanges.subscribe(name => this.name = name);
|
||||
this.processNameInput.valueChanges.subscribe((name) => this.name = name);
|
||||
this.filteredProcesses = this.processDefinitionInput.valueChanges
|
||||
.pipe(
|
||||
map(value => this._filter(value))
|
||||
map((value) => this._filter(value))
|
||||
);
|
||||
}
|
||||
|
||||
@@ -137,7 +137,7 @@ export class StartProcessInstanceComponent implements OnChanges, OnInit {
|
||||
private _filter(value: string): ProcessDefinitionRepresentation[] {
|
||||
if (value !== null && value !== undefined) {
|
||||
const filterValue = value.toLowerCase();
|
||||
let filteredProcess = this.processDefinitions.filter(option => option.name.toLowerCase().includes(filterValue));
|
||||
let filteredProcess = this.processDefinitions.filter((option) => option.name.toLowerCase().includes(filterValue));
|
||||
|
||||
if (this.processFilterSelector) {
|
||||
this.selectedProcessDef = this.getSelectedProcess(filterValue);
|
||||
@@ -147,7 +147,7 @@ export class StartProcessInstanceComponent implements OnChanges, OnInit {
|
||||
}
|
||||
|
||||
getSelectedProcess(selectedProcess) {
|
||||
let processSelected = this.processDefinitions.find(process => process.name.toLowerCase() === selectedProcess);
|
||||
let processSelected = this.processDefinitions.find((process) => process.name.toLowerCase() === selectedProcess);
|
||||
|
||||
if (!processSelected) {
|
||||
processSelected = new ProcessDefinitionRepresentation();
|
||||
|
@@ -45,7 +45,7 @@ export class ProcessFilterService {
|
||||
});
|
||||
return filters;
|
||||
}),
|
||||
catchError(err => this.handleProcessError(err))
|
||||
catchError((err) => this.handleProcessError(err))
|
||||
);
|
||||
}
|
||||
|
||||
@@ -59,9 +59,9 @@ export class ProcessFilterService {
|
||||
return from(this.callApiProcessFilters(appId))
|
||||
.pipe(
|
||||
map((response: any) => {
|
||||
return response.data.find(filter => filter.id === filterId);
|
||||
return response.data.find((filter) => filter.id === filterId);
|
||||
}),
|
||||
catchError(err => this.handleProcessError(err))
|
||||
catchError((err) => this.handleProcessError(err))
|
||||
);
|
||||
}
|
||||
|
||||
@@ -75,9 +75,9 @@ export class ProcessFilterService {
|
||||
return from(this.callApiProcessFilters(appId))
|
||||
.pipe(
|
||||
map((response: any) => {
|
||||
return response.data.find(filter => filter.name === filterName);
|
||||
return response.data.find((filter) => filter.name === filterName);
|
||||
}),
|
||||
catchError(err => this.handleProcessError(err))
|
||||
catchError((err) => this.handleProcessError(err))
|
||||
);
|
||||
}
|
||||
|
||||
@@ -96,7 +96,7 @@ export class ProcessFilterService {
|
||||
let allFilter = this.getAllFilterInstance(appId);
|
||||
let allObservable = this.addProcessFilter(allFilter);
|
||||
|
||||
return new Observable(observer => {
|
||||
return new Observable((observer) => {
|
||||
forkJoin(
|
||||
runningObservable,
|
||||
completedObservable,
|
||||
@@ -181,7 +181,7 @@ export class ProcessFilterService {
|
||||
map((response: FilterProcessRepresentationModel) => {
|
||||
return response;
|
||||
}),
|
||||
catchError(err => this.handleProcessError(err))
|
||||
catchError((err) => this.handleProcessError(err))
|
||||
);
|
||||
}
|
||||
|
||||
|
@@ -47,14 +47,14 @@ export class ProcessService {
|
||||
.pipe(
|
||||
map((res: any) => {
|
||||
if (processDefinitionKey) {
|
||||
const filtered = res.data.filter(process => process.processDefinitionKey === processDefinitionKey);
|
||||
const filtered = res.data.filter((process) => process.processDefinitionKey === processDefinitionKey);
|
||||
res.data = filtered;
|
||||
return res;
|
||||
} else {
|
||||
return res;
|
||||
}
|
||||
}),
|
||||
catchError(err => this.handleProcessError(err))
|
||||
catchError((err) => this.handleProcessError(err))
|
||||
);
|
||||
}
|
||||
|
||||
@@ -73,7 +73,7 @@ export class ProcessService {
|
||||
fetchProcessAuditPdfById(processId: string): Observable<Blob> {
|
||||
return from<Blob>(this.alfrescoApiService.getInstance().activiti.processApi.getProcessAuditPdf(processId))
|
||||
.pipe(
|
||||
catchError(err => this.handleProcessError(err))
|
||||
catchError((err) => this.handleProcessError(err))
|
||||
);
|
||||
}
|
||||
|
||||
@@ -85,7 +85,7 @@ export class ProcessService {
|
||||
fetchProcessAuditJsonById(processId: string): Observable<any> {
|
||||
return from(this.alfrescoApiService.getInstance().activiti.processApi.getProcessAuditJson(processId))
|
||||
.pipe(
|
||||
catchError(err => this.handleProcessError(err))
|
||||
catchError((err) => this.handleProcessError(err))
|
||||
);
|
||||
}
|
||||
|
||||
@@ -97,7 +97,7 @@ export class ProcessService {
|
||||
getProcess(processInstanceId: string): Observable<ProcessInstance> {
|
||||
return from(this.alfrescoApiService.getInstance().activiti.processApi.getProcessInstance(processInstanceId))
|
||||
.pipe(
|
||||
catchError(err => this.handleProcessError(err))
|
||||
catchError((err) => this.handleProcessError(err))
|
||||
);
|
||||
}
|
||||
|
||||
@@ -117,11 +117,11 @@ export class ProcessService {
|
||||
return from(this.alfrescoApiService.getInstance().activiti.taskApi.listTasks(taskOpts))
|
||||
.pipe(
|
||||
map(this.extractData),
|
||||
map(tasks => tasks.map((task: any) => {
|
||||
map((tasks) => tasks.map((task: any) => {
|
||||
task.created = moment(task.created, 'YYYY-MM-DD').format();
|
||||
return task;
|
||||
})),
|
||||
catchError(err => this.handleProcessError(err))
|
||||
catchError((err) => this.handleProcessError(err))
|
||||
);
|
||||
}
|
||||
|
||||
@@ -142,8 +142,8 @@ export class ProcessService {
|
||||
)
|
||||
.pipe(
|
||||
map(this.extractData),
|
||||
map(processDefs => processDefs.map((pd) => new ProcessDefinitionRepresentation(pd))),
|
||||
catchError(err => this.handleProcessError(err))
|
||||
map((processDefs) => processDefs.map((pd) => new ProcessDefinitionRepresentation(pd))),
|
||||
catchError((err) => this.handleProcessError(err))
|
||||
);
|
||||
}
|
||||
|
||||
@@ -175,7 +175,7 @@ export class ProcessService {
|
||||
)
|
||||
.pipe(
|
||||
map((pd) => new ProcessInstance(pd)),
|
||||
catchError(err => this.handleProcessError(err))
|
||||
catchError((err) => this.handleProcessError(err))
|
||||
);
|
||||
}
|
||||
|
||||
@@ -189,7 +189,7 @@ export class ProcessService {
|
||||
this.alfrescoApiService.getInstance().activiti.processApi.deleteProcessInstance(processInstanceId)
|
||||
)
|
||||
.pipe(
|
||||
catchError(err => this.handleProcessError(err))
|
||||
catchError((err) => this.handleProcessError(err))
|
||||
);
|
||||
}
|
||||
|
||||
@@ -204,7 +204,7 @@ export class ProcessService {
|
||||
)
|
||||
.pipe(
|
||||
map((processVars: any[]) => processVars.map((pd) => new ProcessInstanceVariable(pd))),
|
||||
catchError(err => this.handleProcessError(err))
|
||||
catchError((err) => this.handleProcessError(err))
|
||||
);
|
||||
}
|
||||
|
||||
@@ -219,7 +219,7 @@ export class ProcessService {
|
||||
this.alfrescoApiService.getInstance().activiti.processInstanceVariablesApi.createOrUpdateProcessInstanceVariables(processInstanceId, variables)
|
||||
)
|
||||
.pipe(
|
||||
catchError(err => this.handleProcessError(err))
|
||||
catchError((err) => this.handleProcessError(err))
|
||||
);
|
||||
}
|
||||
|
||||
@@ -234,7 +234,7 @@ export class ProcessService {
|
||||
this.alfrescoApiService.getInstance().activiti.processInstanceVariablesApi.deleteProcessInstanceVariable(processInstanceId, variableName)
|
||||
)
|
||||
.pipe(
|
||||
catchError(err => this.handleProcessError(err))
|
||||
catchError((err) => this.handleProcessError(err))
|
||||
);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user