[no issue number] fix unsubscribing in documentlist (#2740)

* fix unsubscribing in documentlist

* fix tslint errors
This commit is contained in:
Eugenio Romano
2017-11-27 17:51:18 +00:00
committed by GitHub
parent 6843a6adfd
commit 9b7e018f93
32 changed files with 180 additions and 148 deletions

View File

@@ -58,11 +58,11 @@ export class InMemoryFormService extends FormService {
this.logService.log(`getRestFieldValues: ${taskId} => ${field}`);
return new Observable<FormFieldOption[]>(observer => {
let field = this.data.rest.fields.find(
const currentField = this.data.rest.fields.find(
f => f.taskId === taskId && f.fieldId === field
);
if ( field ) {
let values: FormFieldOption[] = field.values || [];
if ( currentField ) {
const values: FormFieldOption[] = currentField.values || [];
this.logService.log(values);
observer.next(values);
}
@@ -71,7 +71,7 @@ export class InMemoryFormService extends FormService {
parseForm(json: any, data?: FormValues, readOnly: boolean = false): FormModel {
if (json) {
let form = new FormModel(json, data, readOnly, this);
const form = new FormModel(json, data, readOnly, this);
if (!json.fields) {
form.outcomes = [
new FormOutcomeModel(form, {
@@ -93,10 +93,10 @@ export class InMemoryFormService extends FormService {
this.logService.log(`getRestFieldValuesByProcessId: ${processDefinitionId} => ${fieldId}`);
return new Observable<FormFieldOption[]>(observer => {
let field = this.data.rest.fields.find(
const field = this.data.rest.fields.find(
f => f.processId === processDefinitionId && f.fieldId === fieldId
);
let values: FormFieldOption[] = field.values || [];
const values: FormFieldOption[] = field.values || [];
this.logService.log(values);
observer.next(values);
});