...
|
...
|
@@ -77,6 +77,12 @@ export class EntityAutocompleteComponent implements ControlValueAccessor, OnInit |
77
|
77
|
@Input()
|
78
|
78
|
excludeEntityIds: Array<string>;
|
79
|
79
|
|
|
80
|
+ @Input()
|
|
81
|
+ labelText: string;
|
|
82
|
+
|
|
83
|
+ @Input()
|
|
84
|
+ requiredText: string;
|
|
85
|
+
|
80
|
86
|
private requiredValue: boolean;
|
81
|
87
|
get required(): boolean {
|
82
|
88
|
return this.requiredValue;
|
...
|
...
|
@@ -89,21 +95,6 @@ export class EntityAutocompleteComponent implements ControlValueAccessor, OnInit |
89
|
95
|
@Input()
|
90
|
96
|
disabled: boolean;
|
91
|
97
|
|
92
|
|
- labelValue: string;
|
93
|
|
-
|
94
|
|
- @Input()
|
95
|
|
- set label(label: string) {
|
96
|
|
- this.labelValue = label;
|
97
|
|
- this.entityText = label;
|
98
|
|
- }
|
99
|
|
-
|
100
|
|
- requiredTextValue: string;
|
101
|
|
-
|
102
|
|
- @Input()
|
103
|
|
- set requiredText(requiredText: string) {
|
104
|
|
- this.requiredTextValue = requiredText;
|
105
|
|
- }
|
106
|
|
-
|
107
|
98
|
@ViewChild('entityInput', {static: true}) entityInput: ElementRef;
|
108
|
99
|
|
109
|
100
|
entityText: string;
|
...
|
...
|
@@ -227,13 +218,12 @@ export class EntityAutocompleteComponent implements ControlValueAccessor, OnInit |
227
|
218
|
break;
|
228
|
219
|
}
|
229
|
220
|
}
|
230
|
|
- if (this.labelValue) {
|
231
|
|
- this.entityText = this.labelValue;
|
|
221
|
+ if (this.labelText && this.labelText.length) {
|
|
222
|
+ this.entityText = this.labelText;
|
232
|
223
|
}
|
233
|
|
- if (this.requiredTextValue) {
|
234
|
|
- this.entityRequiredText = this.requiredTextValue;
|
|
224
|
+ if (this.requiredText && this.requiredText.length) {
|
|
225
|
+ this.entityRequiredText = this.requiredText;
|
235
|
226
|
}
|
236
|
|
-
|
237
|
227
|
const currentEntity = this.getCurrentEntity();
|
238
|
228
|
if (currentEntity) {
|
239
|
229
|
const currentEntityType = currentEntity.id.entityType;
|
...
|
...
|
|