mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 18:14:17 +00:00
[TLC-254] Add getTypeBindRelations helper method to bind service
This commit is contained in:
@@ -11,7 +11,7 @@ import {
|
|||||||
DynamicFormControlMatcher,
|
DynamicFormControlMatcher,
|
||||||
DynamicFormControlModel,
|
DynamicFormControlModel,
|
||||||
DynamicFormControlRelation,
|
DynamicFormControlRelation,
|
||||||
DynamicFormRelationService,
|
DynamicFormRelationService, MATCH_VISIBLE,
|
||||||
OR_OPERATOR
|
OR_OPERATOR
|
||||||
} from '@ng-dynamic-forms/core';
|
} from '@ng-dynamic-forms/core';
|
||||||
|
|
||||||
@@ -217,4 +217,20 @@ export class DsDynamicTypeBindRelationService {
|
|||||||
|
|
||||||
return subscriptions;
|
return subscriptions;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public getTypeBindRelations(configuredTypeBindValues: string[]): DynamicFormControlRelation[] {
|
||||||
|
const bindValues = [];
|
||||||
|
configuredTypeBindValues.forEach((value) => {
|
||||||
|
bindValues.push({
|
||||||
|
id: 'dc.type',
|
||||||
|
value: value
|
||||||
|
});
|
||||||
|
});
|
||||||
|
return [{
|
||||||
|
match: MATCH_VISIBLE,
|
||||||
|
operator: OR_OPERATOR,
|
||||||
|
when: bindValues
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user