Refine funding detail view by showing position stats per active filter
LocationBasedServices/smartguide/pipeline/head This commit looks good
LocationBasedServices/smartguide/pipeline/head This commit looks good
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user