mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +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 {
|
} else {
|
||||||
this.value = this.field.value;
|
this.value = this.field.value;
|
||||||
}
|
}
|
||||||
this.visibilityService.refreshEntityVisibility(this.field);
|
|
||||||
},
|
},
|
||||||
error => {
|
error => {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
@@ -197,7 +196,6 @@ export class DisplayValueWidget extends WidgetComponent implements OnInit, After
|
|||||||
} else {
|
} else {
|
||||||
this.value = this.field.value;
|
this.value = this.field.value;
|
||||||
}
|
}
|
||||||
this.visibilityService.refreshEntityVisibility(this.field);
|
|
||||||
},
|
},
|
||||||
error => {
|
error => {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
|
@@ -128,10 +128,12 @@ export class WidgetVisibilityService {
|
|||||||
let fieldFound = containerColumnModel.fields.find(field => this.isSearchedField(field, name));
|
let fieldFound = containerColumnModel.fields.find(field => this.isSearchedField(field, name));
|
||||||
if (fieldFound) {
|
if (fieldFound) {
|
||||||
fieldValue = this.getObjectValue(fieldFound);
|
fieldValue = this.getObjectValue(fieldFound);
|
||||||
if (!fieldValue && fieldFound.value && fieldFound.value.id) {
|
if (!fieldValue) {
|
||||||
fieldValue = fieldFound.value.id;
|
if (fieldFound.value && fieldFound.value.id) {
|
||||||
} else {
|
fieldValue = fieldFound.value.id;
|
||||||
fieldValue = fieldFound.value;
|
} else {
|
||||||
|
fieldValue = fieldFound.value;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -156,7 +158,7 @@ export class WidgetVisibilityService {
|
|||||||
|
|
||||||
private isSearchedField(field: FormFieldModel, fieldToFind: string) {
|
private isSearchedField(field: FormFieldModel, fieldToFind: string) {
|
||||||
let forrmattedFieldName = this.removeLabel(field, fieldToFind);
|
let forrmattedFieldName = this.removeLabel(field, fieldToFind);
|
||||||
return field.name === forrmattedFieldName;
|
return field.name.toUpperCase() === forrmattedFieldName.toUpperCase();
|
||||||
}
|
}
|
||||||
|
|
||||||
private removeLabel(field: FormFieldModel, fieldToFind) {
|
private removeLabel(field: FormFieldModel, fieldToFind) {
|
||||||
|
Reference in New Issue
Block a user