Skip to content

Commit a5d0d3d

Browse files
134770: Added additional type any to Chips model usages
In the future this should be cleaned up by assigning a type to the item property in ChipsItem. But currently this prevents angular from building
1 parent 166f142 commit a5d0d3d

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/app/shared/form/builder/ds-dynamic-form-ui/models/relation-group/dynamic-relation-group.components.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -275,11 +275,11 @@ export class DsDynamicRelationGroupComponent extends DynamicFormControlComponent
275275
valueModel.forEach((valueObj) => {
276276
const returnObj = Object.keys(valueObj).map((fieldName) => {
277277
let return$: Observable<any>;
278-
if (isObject(valueObj[fieldName]) && valueObj[fieldName].hasAuthority() && isNotEmpty(valueObj[fieldName].authority)) {
278+
if (isObject(valueObj[fieldName]) && (valueObj[fieldName] as any).hasAuthority() && isNotEmpty((valueObj[fieldName] as any).authority)) {
279279
const fieldId = fieldName.replace(/\./g, '_');
280280
const model = this.formBuilderService.findById(fieldId, this.formModel);
281281
return$ = this.vocabularyService.findEntryDetailById(
282-
valueObj[fieldName].authority,
282+
(valueObj[fieldName] as any).authority,
283283
(model as any).vocabularyOptions.name,
284284
).pipe(
285285
getFirstSucceededRemoteDataPayload(),

src/app/shared/form/chips/chips.component.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,13 +117,13 @@ export class ChipsComponent implements OnChanges {
117117
if (!chipsItem.editMode && this.dragged === -1) {
118118
if (field) {
119119
if (isObject(chipsItem.item[field])) {
120-
textToDisplay.push(chipsItem.item[field].display);
121-
if (chipsItem.item[field].hasOtherInformation()) {
122-
Object.keys(chipsItem.item[field].otherInformation)
120+
textToDisplay.push((chipsItem.item[field] as any).display);
121+
if ((chipsItem.item[field] as any).hasOtherInformation()) {
122+
Object.keys((chipsItem.item[field] as any).otherInformation)
123123
.forEach((otherField) => {
124124
this.translate.get('form.other-information.' + otherField)
125125
.subscribe((label) => {
126-
textToDisplay.push(label + ': ' + chipsItem.item[field].otherInformation[otherField]);
126+
textToDisplay.push(label + ': ' + (chipsItem.item[field] as any).otherInformation[otherField]);
127127
});
128128
});
129129
}

0 commit comments

Comments
 (0)