Added possibility to show additional information to search results returned by form fields which provide search

This commit is contained in:
Giuseppe Digilio
2018-11-28 11:12:31 +01:00
parent 4a353fce91
commit fcd997dba3
12 changed files with 212 additions and 65 deletions

View File

@@ -10,6 +10,7 @@ export class FormFieldMetadataValueObject {
place: number;
closed: boolean;
label: string;
otherInformation: any;
constructor(value: any = null,
language: any = null,
@@ -17,6 +18,7 @@ export class FormFieldMetadataValueObject {
display: string = null,
place: number = 0,
confidence: number = -1,
otherInformation: any = null,
metadata: string = null) {
this.value = isNotNull(value) ? ((typeof value === 'string') ? value.trim() : value) : null;
this.language = language;
@@ -34,6 +36,8 @@ export class FormFieldMetadataValueObject {
if (isNotEmpty(metadata)) {
this.metadata = metadata;
}
this.otherInformation = otherInformation;
}
hasAuthority(): boolean {
@@ -43,4 +47,8 @@ export class FormFieldMetadataValueObject {
hasValue(): boolean {
return isNotEmpty(this.value);
}
hasOtherInformation(): boolean {
return isNotEmpty(this.otherInformation);
}
}