Refine funding detail view by showing position stats per active filter
LocationBasedServices/smartguide/pipeline/head This commit looks good

This commit is contained in:
2026-06-02 13:05:36 +02:00
parent 300a618cfd
commit b2996b07c6
2 changed files with 10 additions and 0 deletions
@@ -59,18 +59,24 @@
<h3>{{ selectedFunder.funder_name }}</h3>
<div class="position-stats">
@if (shouldShowPosition('first')) {
<div class="stat">
<span class="stat-label">Erstautor</span>
<span class="stat-value">{{ selectedFunder.author_position_count.first }}</span>
</div>
}
@if (shouldShowPosition('middle')) {
<div class="stat">
<span class="stat-label">Mitautor</span>
<span class="stat-value">{{ selectedFunder.author_position_count.middle }}</span>
</div>
}
@if (shouldShowPosition('last')) {
<div class="stat">
<span class="stat-label">Letztautor</span>
<span class="stat-value">{{ selectedFunder.author_position_count.last }}</span>
</div>
}
</div>
<h4>Publikationen</h4>
@@ -141,6 +141,10 @@ export class PersonFundingComponent implements OnInit {
return labels[position] ?? position;
}
shouldShowPosition(position: 'first' | 'middle' | 'last'): boolean {
return this.activeFilter === 'all' || this.activeFilter === position;
}
getUniquePublicationCount(): number {
const allIds = new Set<string>();
for (const funder of this.funders) {