Skip to content

Commit

Permalink
feat: display different types of attribute uniqueness even in attribu…
Browse files Browse the repository at this point in the history
…te flags
  • Loading branch information
lukashornych committed Dec 17, 2023
1 parent 1d16d02 commit 6ad21be
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/services/lab.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,10 +148,14 @@ export class LabService {
if (entityAttribute && (schema as EntityAttributeSchema).representative) {
flags.push('representative')
}
if (globalAttribute && (schema as GlobalAttributeSchema).globalUniquenessType != GlobalAttributeUniquenessType.NotUnique) {
if (globalAttribute && (schema as GlobalAttributeSchema).globalUniquenessType === GlobalAttributeUniquenessType.UniqueWithinCatalog) {
flags.push('globally unique')
} else if (schema.uniquenessType != AttributeUniquenessType.NotUnique) {
} else if (globalAttribute && (schema as GlobalAttributeSchema).globalUniquenessType === GlobalAttributeUniquenessType.UniqueWithinCatalogLocale) {
flags.push('globally unique per locale')
} else if (schema.uniquenessType === AttributeUniquenessType.UniqueWithinCollection) {
flags.push('unique')
} else if (schema.uniquenessType === AttributeUniquenessType.UniqueWithinCollectionLocale) {
flags.push('unique per locale')
}
if ((globalAttribute && (schema as GlobalAttributeSchema).globalUniquenessType != GlobalAttributeUniquenessType.NotUnique) ||
schema.uniquenessType != AttributeUniquenessType.NotUnique ||
Expand Down

0 comments on commit 6ad21be

Please sign in to comment.