mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
#1115 - Fix Visibility for readonly start form
This commit is contained in:
committed by
Mario Romano
parent
b7f6d7f466
commit
5625d94678
@@ -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);
|
||||
|
@@ -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) {
|
||||
|
Reference in New Issue
Block a user