Browse Source

Add support for country codes to entity logo component

pull/7884/head
Thomas Kaul 1 month ago
parent
commit
9aeb22cb06
  1. 10
      libs/ui/src/lib/entity-logo/entity-logo.component.ts

10
libs/ui/src/lib/entity-logo/entity-logo.component.ts

@ -36,19 +36,19 @@ export class GfEntityLogoComponent implements OnChanges {
) {} ) {}
public ngOnChanges() { public ngOnChanges() {
this.emojiFlag = '';
this.hasError = false; this.hasError = false;
this.src = undefined;
this.emojiFlag = getEmojiFlag(this.countryCode); if (this.countryCode) {
this.emojiFlag = getEmojiFlag(this.countryCode);
if (this.dataSource && this.symbol) { } else if (this.dataSource && this.symbol) {
this.src = this.imageSourceService.getLogoUrlByAssetProfileIdentifier({ this.src = this.imageSourceService.getLogoUrlByAssetProfileIdentifier({
dataSource: this.dataSource, dataSource: this.dataSource,
symbol: this.symbol symbol: this.symbol
}); });
} else if (this.url) { } else if (this.url) {
this.src = this.imageSourceService.getLogoUrlByUrl(this.url); this.src = this.imageSourceService.getLogoUrlByUrl(this.url);
} else {
this.src = undefined;
} }
} }

Loading…
Cancel
Save