Lade Patente...
+} @else if (error) {
+ Fehler beim Laden der Patente.
+} @else if (patents.length === 0) {
+ Keine Patente gefunden.
+} @else {
+
@for (institution of getInstitutions(); track institution) {
-
+
apartment
{{ institution }}
@@ -203,7 +205,7 @@
Fördersende
{{ getFundingStatus(dfgProject.funding_end_date) }}
- @if (dfgProject.subproject_of ) {
+ @if (dfgProject.subproject_of) {
Teilprojekt von
{{ dfgProject.subproject_of }}
diff --git a/webapp/src/app/modules/person-projects/dfg-details/dfg-details.component.scss b/webapp/src/app/modules/person-projects/dfg-details/dfg-details.component.scss
index 4b2b0a8b..08fbf9e7 100644
--- a/webapp/src/app/modules/person-projects/dfg-details/dfg-details.component.scss
+++ b/webapp/src/app/modules/person-projects/dfg-details/dfg-details.component.scss
@@ -282,7 +282,7 @@ h1 {
}
.person-item:hover {
- cursor:pointer;
+ cursor: pointer;
background: #f8fafc;
border-color: #b8c5d6;
}
@@ -302,14 +302,14 @@ h1 {
}
.person-name {
- cursor:pointer;
+ cursor: pointer;
font-size: 13px;
font-weight: 500;
color: var(--sg-text);
}
.institution-grid {
- cursor:pointer;
+ cursor: pointer;
display: grid;
grid-template-columns: 1fr;
gap: 8px;
@@ -464,4 +464,4 @@ h1 {
width: 100%;
justify-content: center;
}
-}
\ No newline at end of file
+}
diff --git a/webapp/src/app/modules/person-projects/dfg-details/dfg-details.component.ts b/webapp/src/app/modules/person-projects/dfg-details/dfg-details.component.ts
index 95e6d644..ab8ca4ea 100644
--- a/webapp/src/app/modules/person-projects/dfg-details/dfg-details.component.ts
+++ b/webapp/src/app/modules/person-projects/dfg-details/dfg-details.component.ts
@@ -16,7 +16,7 @@ export class DfgDetailsComponent implements OnInit {
private route = inject(ActivatedRoute);
dfgProject: DfgProjectDetails | undefined;
- constructor (private router:Router){}
+ constructor(private router: Router) {}
ngOnInit(): void {
this.route.data.subscribe(({ dfgSingleProject }) => {
@@ -46,15 +46,15 @@ export class DfgDetailsComponent implements OnInit {
searchForPersonName(personName: string): void {
this.router.navigate(['/persons'], {
queryParams: {
- query: personName
- }
+ query: personName,
+ },
});
}
- searchForInstitutionName(institutionName: string): void {
+ searchForInstitutionName(institutionName: string): void {
this.router.navigate(['/institutions'], {
queryParams: {
- search: institutionName
- }
+ search: institutionName,
+ },
});
}
/**
diff --git a/webapp/src/app/modules/person/person.component.ts b/webapp/src/app/modules/person/person.component.ts
index a6dceea6..c0b8df24 100644
--- a/webapp/src/app/modules/person/person.component.ts
+++ b/webapp/src/app/modules/person/person.component.ts
@@ -119,15 +119,20 @@ export class PersonComponent {
() => this.person()?.affiliations?.[0] ?? null,
);
readonly lastAffiliation = computed(() => {
- let lastAffiliation: number | undefined = 0;
- if (this.person()?.affiliations?.length != undefined) {
- lastAffiliation = this.person()?.affiliations?.length;
+ const affiliations = this.person()?.affiliations ?? [];
+ let newestAffiliation = affiliations[0] ?? null;
+ let newestYear = -1;
+
+ for (const affiliation of affiliations) {
+ for (const jahr of affiliation.years ?? []) {
+ if (jahr > newestYear) {
+ newestYear = jahr;
+ newestAffiliation = affiliation;
+ }
+ }
}
- return (
- (lastAffiliation
- ? this.person()?.affiliations?.[lastAffiliation - 1]
- : this.person()?.affiliations?.[0]) ?? null
- );
+
+ return newestAffiliation;
});
readonly institution = computed(
() =>
@@ -186,6 +191,8 @@ export class PersonComponent {
{ label: 'Netzwerk', path: 'network', disabled: false },
{ label: 'Unternehmen', path: 'company-connections', disabled: false },
{ label: 'Förderungen', path: 'funding', disabled: false },
+ { label: 'Nachrichten', path: 'news', disabled: false },
+ { label: 'Patente', path: 'patents', disabled: false },
];
onInterestingTagClick(selection: { id: string; name: string }): void {
diff --git a/webapp/src/app/modules/university-ranking/services/uni-ranking-service.ts b/webapp/src/app/modules/university-ranking/services/uni-ranking-service.ts
index f1508357..ece71b78 100644
--- a/webapp/src/app/modules/university-ranking/services/uni-ranking-service.ts
+++ b/webapp/src/app/modules/university-ranking/services/uni-ranking-service.ts
@@ -2,10 +2,13 @@
import { inject, Injectable } from '@angular/core';
import { Observable } from 'rxjs';
import { InstitutionsService, RankingResponse } from '../../../api';
-export type ResearchTopic = 'Artificial Intelligence' | 'Quantum Computing' | 'Renewable Energy' | 'Biotechnology';
+export type ResearchTopic =
+ | 'Artificial Intelligence'
+ | 'Quantum Computing'
+ | 'Renewable Energy'
+ | 'Biotechnology';
export type DashboardMetric = 'publications' | 'citations';
-
@Injectable({ providedIn: 'root' })
export class UniversityRankingService {
private apiService = inject(InstitutionsService);
@@ -14,7 +17,13 @@ export class UniversityRankingService {
* Fetches ranking and timeseries data directly from the backend.
* Calculations for growth and trends are now handled server-side.
*/
- getRankingData(topic: ResearchTopic, metric: DashboardMetric): Observable {
- return this.apiService.getRankingsApiInseServiceUniversityRankingsGet(topic, metric);
+ getRankingData(
+ topic: ResearchTopic,
+ metric: DashboardMetric,
+ ): Observable {
+ return this.apiService.getRankingsApiInseServiceUniversityRankingsGet(
+ topic,
+ metric,
+ );
}
}
diff --git a/webapp/src/app/modules/university-ranking/uni-line-chart/uni-line-chart.component.html b/webapp/src/app/modules/university-ranking/uni-line-chart/uni-line-chart.component.html
index 5694b596..41931384 100644
--- a/webapp/src/app/modules/university-ranking/uni-line-chart/uni-line-chart.component.html
+++ b/webapp/src/app/modules/university-ranking/uni-line-chart/uni-line-chart.component.html
@@ -2,5 +2,4 @@
echarts
[options]="chartOption"
[merge]="mergeOption"
- class="chart-container">
-
\ No newline at end of file
+ class="chart-container">
diff --git a/webapp/src/app/modules/university-ranking/uni-line-chart/uni-line-chart.component.scss b/webapp/src/app/modules/university-ranking/uni-line-chart/uni-line-chart.component.scss
index a4a1e7f5..f51d8c68 100644
--- a/webapp/src/app/modules/university-ranking/uni-line-chart/uni-line-chart.component.scss
+++ b/webapp/src/app/modules/university-ranking/uni-line-chart/uni-line-chart.component.scss
@@ -1 +1,4 @@
-.chart-container { height: 500px; width: 100%; }
\ No newline at end of file
+.chart-container {
+ height: 500px;
+ width: 100%;
+}
diff --git a/webapp/src/app/modules/university-ranking/uni-line-chart/uni-line-chart.component.ts b/webapp/src/app/modules/university-ranking/uni-line-chart/uni-line-chart.component.ts
index 5cbc4702..799ad08f 100644
--- a/webapp/src/app/modules/university-ranking/uni-line-chart/uni-line-chart.component.ts
+++ b/webapp/src/app/modules/university-ranking/uni-line-chart/uni-line-chart.component.ts
@@ -1,9 +1,13 @@
// src/app/modules/university-ranking/components/line-chart/university-line-chart.component.ts
import { Component, Input, OnChanges, SimpleChanges } from '@angular/core';
import { EChartsOption } from 'echarts';
-import { NgxEchartsDirective} from 'ngx-echarts';
+import { NgxEchartsDirective } from 'ngx-echarts';
import { UniversityTopicData, YearlyData } from '../../../api';
-export type ResearchTopic = 'Artificial Intelligence' | 'Quantum Computing' | 'Renewable Energy' | 'Biotechnology';
+export type ResearchTopic =
+ | 'Artificial Intelligence'
+ | 'Quantum Computing'
+ | 'Renewable Energy'
+ | 'Biotechnology';
export type DashboardMetric = 'publications' | 'citations';
@Component({
@@ -12,21 +16,24 @@ export type DashboardMetric = 'publications' | 'citations';
styleUrl: './uni-line-chart.component.scss',
imports: [NgxEchartsDirective],
standalone: true,
-
})
export class UniversityLineChartComponent implements OnChanges {
@Input() data: UniversityTopicData[] = [];
@Input() metric: DashboardMetric = 'publications';
chartOption: EChartsOption = {
- title: { text: 'Research Output Over Time', left: 'center', textStyle: { fontWeight: 'lighter' } },
+ title: {
+ text: 'Research Output Over Time',
+ left: 'center',
+ textStyle: { fontWeight: 'lighter' },
+ },
tooltip: { trigger: 'axis', axisPointer: { type: 'shadow' } },
legend: { bottom: 0 },
grid: { left: '3%', right: '4%', bottom: '15%', containLabel: true },
xAxis: { type: 'category', boundaryGap: false, data: [] },
yAxis: { type: 'value', name: 'Volume' },
dataZoom: [{ type: 'slider', show: true, bottom: 40 }],
- series: []
+ series: [],
};
mergeOption: EChartsOption = {};
@@ -34,24 +41,24 @@ export class UniversityLineChartComponent implements OnChanges {
ngOnChanges(changes: SimpleChanges): void {
if (this.data.length > 0) {
this.updateChart();
- console.log("CHANGES!")
+ console.log('CHANGES!');
}
}
private updateChart() {
- const years = this.data[0].yearly_data.map(d => d.year);
- const series = this.data.map(uni => ({
+ const years = this.data[0].yearly_data.map((d) => d.year);
+ const series = this.data.map((uni) => ({
name: uni.university,
type: 'line',
smooth: true,
emphasis: { focus: 'series' },
animationDuration: 2000,
- data: uni.yearly_data.map(d => d[this.metric])
+ data: uni.yearly_data.map((d) => d[this.metric]),
}));
this.mergeOption = {
xAxis: { data: years.map(String) },
- series: series as any
+ series: series as any,
};
}
}
diff --git a/webapp/src/app/modules/university-ranking/uni-ranking-table/uni-ranking-table.component.html b/webapp/src/app/modules/university-ranking/uni-ranking-table/uni-ranking-table.component.html
index 09367497..99da5bcb 100644
--- a/webapp/src/app/modules/university-ranking/uni-ranking-table/uni-ranking-table.component.html
+++ b/webapp/src/app/modules/university-ranking/uni-ranking-table/uni-ranking-table.component.html
@@ -2,7 +2,7 @@
Loading rankings...
- } @else{
+ } @else {