Merge pull request #461 from atmire/changes-to-relationship-type

Rename relationship type properties
This commit is contained in:
benbosman
2019-10-02 18:23:04 +02:00
committed by GitHub
3 changed files with 8 additions and 8 deletions

View File

@@ -60,10 +60,10 @@ export const filterRelationsByTypeLabel = (label: string, thisId?: string) =>
return relatedItems$.pipe(
map((arr) => relsCurrentPage.filter((rel: Relationship, idx: number) =>
hasValue(relTypesCurrentPage[idx]) && (
(hasNoValue(thisId) && (relTypesCurrentPage[idx].leftLabel === label ||
relTypesCurrentPage[idx].rightLabel === label)) ||
(thisId === arr[idx][0].id && relTypesCurrentPage[idx].leftLabel === label) ||
(thisId === arr[idx][1].id && relTypesCurrentPage[idx].rightLabel === label)
(hasNoValue(thisId) && (relTypesCurrentPage[idx].leftwardType === label ||
relTypesCurrentPage[idx].rightwardType === label)) ||
(thisId === arr[idx][0].id && relTypesCurrentPage[idx].leftwardType === label) ||
(thisId === arr[idx][1].id && relTypesCurrentPage[idx].rightwardType === label)
)
))
);

View File

@@ -23,7 +23,7 @@ export class NormalizedRelationshipType extends NormalizedObject<RelationshipTyp
* The label that describes the Relation to the left of this RelationshipType
*/
@autoserialize
leftLabel: string;
leftwardType: string;
/**
* The maximum amount of Relationships allowed to the left of this RelationshipType
@@ -41,7 +41,7 @@ export class NormalizedRelationshipType extends NormalizedObject<RelationshipTyp
* The label that describes the Relation to the right of this RelationshipType
*/
@autoserialize
rightLabel: string;
rightwardType: string;
/**
* The maximum amount of Relationships allowed to the right of this RelationshipType

View File

@@ -33,7 +33,7 @@ export class RelationshipType implements CacheableObject {
/**
* The label that describes the Relation to the left of this RelationshipType
*/
leftLabel: string;
leftwardType: string;
/**
* The maximum amount of Relationships allowed to the left of this RelationshipType
@@ -48,7 +48,7 @@ export class RelationshipType implements CacheableObject {
/**
* The label that describes the Relation to the right of this RelationshipType
*/
rightLabel: string;
rightwardType: string;
/**
* The maximum amount of Relationships allowed to the right of this RelationshipType