#1115 - Fix Visibility for readonly start form

This commit is contained in:
Vito Albano
2016-11-25 15:33:23 +00:00
committed by Mario Romano
parent b7f6d7f466
commit 5625d94678
2 changed files with 7 additions and 7 deletions

View File

@@ -175,7 +175,6 @@ export class DisplayValueWidget extends WidgetComponent implements OnInit, After
} else {
this.value = this.field.value;
}
this.visibilityService.refreshEntityVisibility(this.field);
},
error => {
console.log(error);
@@ -197,7 +196,6 @@ export class DisplayValueWidget extends WidgetComponent implements OnInit, After
} else {
this.value = this.field.value;
}
this.visibilityService.refreshEntityVisibility(this.field);
},
error => {
console.log(error);

View File

@@ -128,10 +128,12 @@ export class WidgetVisibilityService {
let fieldFound = containerColumnModel.fields.find(field => this.isSearchedField(field, name));
if (fieldFound) {
fieldValue = this.getObjectValue(fieldFound);
if (!fieldValue && fieldFound.value && fieldFound.value.id) {
fieldValue = fieldFound.value.id;
} else {
fieldValue = fieldFound.value;
if (!fieldValue) {
if (fieldFound.value && fieldFound.value.id) {
fieldValue = fieldFound.value.id;
} else {
fieldValue = fieldFound.value;
}
}
}
});
@@ -156,7 +158,7 @@ export class WidgetVisibilityService {
private isSearchedField(field: FormFieldModel, fieldToFind: string) {
let forrmattedFieldName = this.removeLabel(field, fieldToFind);
return field.name === forrmattedFieldName;
return field.name.toUpperCase() === forrmattedFieldName.toUpperCase();
}
private removeLabel(field: FormFieldModel, fieldToFind) {