Revert "use country-flag component in EU-Cordis organizations table"

This reverts commit 876fbb9980.
This commit is contained in:
2026-08-03 21:38:49 +02:00
parent 0afb6a9481
commit 40bb0feaf8
2 changed files with 22 additions and 6 deletions
@@ -33,11 +33,15 @@
{{ org.city }}
@if (org.country) {
<app-country-flag
<img
alt=""
class="country-flag"
[countryCode]="org.country"
[height]="10"
[bordered]="false" />
[src]="
'https://flagcdn.io/' +
getSvgByCountryCode(org.country) +
'.svg'
"
height="10" />
}
</span>
} @else {
@@ -19,7 +19,6 @@ import {
DataTableComponent,
GenericColumn,
} from '../../../../shared/ui/data-table/data-table.component';
import { CountryFlagComponent } from '../../../../shared/ui/country-flag/country-flag.component';
@Component({
selector: 'app-organizations-table',
@@ -30,7 +29,6 @@ import { CountryFlagComponent } from '../../../../shared/ui/country-flag/country
CurrencyPipe,
DataTableComponent,
MatPaginatorModule,
CountryFlagComponent,
],
templateUrl: './organizations-table.component.html',
styleUrl: './organizations-table.component.scss',
@@ -130,6 +128,20 @@ export class OrganizationsTableComponent {
this.pageSize.set(event.pageSize);
}
getSvgByCountryCode(code: string | undefined | null): string {
if (!code) {
return '';
}
const codeLower = code.toLowerCase();
if (codeLower === 'uk') {
return 'gb';
}
return codeLower;
}
getOrgsCount(): number {
return this.orgs?.length || 0;
}