Skip to content

Commit

Permalink
fixed primary key displaying properly when mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
Bruce An authored and wooldridge committed Feb 1, 2019
1 parent 2c4111e commit 1351dfd
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ <h1>
<span class="prop-name">{{prop.name}}</span>
<span class="prop-type">{{prop.datatype}}</span>
<span class="entity-icons">
<span class="entity-icon" tooltip="Primary Key" container="body"><i class="fa fa-key fa-fw" [ngClass]="prop.name === entityPrimaryKey ? 'entity-icon-selected' : 'icon-hide'"></i></span>
<span class="entity-icon" tooltip="Primary Key" container="body"><i class="fa fa-key fa-fw" [ngClass]="isPrimaryKey(prop.name) ? 'entity-icon-selected' : 'icon-hide'"></i></span>
<span class="entity-icon" tooltip="Element Range Index" container="body"><i class="fa fa-bolt fa-fw" [ngClass]="hasElementRangeIndex(prop.name) ? 'entity-icon-selected' : 'icon-hide'"></i></span>
<span class="entity-icon" tooltip="Path Range Index" container="body"><i class="fa fa-code fa-fw" [ngClass]="hasRangeIndex(prop.name) ? 'entity-icon-selected' : 'icon-hide'"></i></span>
<span class="entity-icon" tooltip="Word Lexicon" container="body"><i class="fa fa-krw fa-fw" [ngClass]="hasWordLexicon(prop.name) ? 'entity-icon-selected' : 'icon-hide'"></i></span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -357,4 +357,13 @@ export class MapUiComponent implements OnChanges {
return _.includes(this.chosenEntity.definition.pii, name);
}

/**
* Is an entity property the primary key?
* @param name Name of property
* @returns {boolean}
*/
isPrimaryKey(name) {
return _.includes(this.chosenEntity.definition.primaryKey, name);
}

}

0 comments on commit 1351dfd

Please sign in to comment.