Skip to content

Commit b85c76f

Browse files
authored
Merge pull request #461 from atmire/changes-to-relationship-type
Rename relationship type properties
2 parents 2789996 + 1008bd1 commit b85c76f

3 files changed

Lines changed: 8 additions & 8 deletions

File tree

src/app/+item-page/simple/item-types/shared/item-relationships-utils.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,10 @@ export const filterRelationsByTypeLabel = (label: string, thisId?: string) =>
6060
return relatedItems$.pipe(
6161
map((arr) => relsCurrentPage.filter((rel: Relationship, idx: number) =>
6262
hasValue(relTypesCurrentPage[idx]) && (
63-
(hasNoValue(thisId) && (relTypesCurrentPage[idx].leftLabel === label ||
64-
relTypesCurrentPage[idx].rightLabel === label)) ||
65-
(thisId === arr[idx][0].id && relTypesCurrentPage[idx].leftLabel === label) ||
66-
(thisId === arr[idx][1].id && relTypesCurrentPage[idx].rightLabel === label)
63+
(hasNoValue(thisId) && (relTypesCurrentPage[idx].leftwardType === label ||
64+
relTypesCurrentPage[idx].rightwardType === label)) ||
65+
(thisId === arr[idx][0].id && relTypesCurrentPage[idx].leftwardType === label) ||
66+
(thisId === arr[idx][1].id && relTypesCurrentPage[idx].rightwardType === label)
6767
)
6868
))
6969
);

src/app/core/cache/models/items/normalized-relationship-type.model.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export class NormalizedRelationshipType extends NormalizedObject<RelationshipTyp
2323
* The label that describes the Relation to the left of this RelationshipType
2424
*/
2525
@autoserialize
26-
leftLabel: string;
26+
leftwardType: string;
2727

2828
/**
2929
* The maximum amount of Relationships allowed to the left of this RelationshipType
@@ -41,7 +41,7 @@ export class NormalizedRelationshipType extends NormalizedObject<RelationshipTyp
4141
* The label that describes the Relation to the right of this RelationshipType
4242
*/
4343
@autoserialize
44-
rightLabel: string;
44+
rightwardType: string;
4545

4646
/**
4747
* The maximum amount of Relationships allowed to the right of this RelationshipType

src/app/core/shared/item-relationships/relationship-type.model.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export class RelationshipType implements CacheableObject {
3333
/**
3434
* The label that describes the Relation to the left of this RelationshipType
3535
*/
36-
leftLabel: string;
36+
leftwardType: string;
3737

3838
/**
3939
* The maximum amount of Relationships allowed to the left of this RelationshipType
@@ -48,7 +48,7 @@ export class RelationshipType implements CacheableObject {
4848
/**
4949
* The label that describes the Relation to the right of this RelationshipType
5050
*/
51-
rightLabel: string;
51+
rightwardType: string;
5252

5353
/**
5454
* The maximum amount of Relationships allowed to the right of this RelationshipType

0 commit comments

Comments
 (0)