Lade Patente...
-} @else if (error) {
- Fehler beim Laden der Patente.
-} @else if (patents.length === 0) {
- Keine Patente gefunden.
-} @else {
-
-
-
- {{ filteredPatents.length }}
- Patente
-
-
- {{ getEpoCount() }}
- EPO
-
-
- {{ getUsptoCount() }}
- USPTO
-
-
-
- @if (showDetail && selectedPatent) {
-
- }
-
-
- @if (showDetail && selectedPatent) {
-
-
{{ selectedPatent.title ?? selectedPatent.patent_id }}
-
- @if (selectedPatent.abstract) {
-
-
Abstract
-
{{ selectedPatent.abstract }}
-
- }
-
-
-
Erfinder
-
- @for (inventor of selectedPatent.inventors; track inventor) {
- - {{ inventor }}
- }
-
-
-
- @if (selectedPatent.assignees.length > 0) {
-
-
Anmelder
-
- @for (assignee of selectedPatent.assignees; track assignee) {
- - {{ assignee }}
- }
-
-
- }
-
- @if (selectedPatent.ipc.length > 0) {
-
-
Klassifikation (IPC)
-
- @for (ipc of selectedPatent.ipc; track ipc) {
- - {{ ipc }}
- }
-
-
- }
-
- }
-
-
-
-
-
-
-
-
-
-
- | Patent |
- Quelle |
- Jahr |
-
-
-
- @for (patent of getPagedPatents(); track patent.patent_id) {
-
- | {{ patent.title ?? patent.patent_id }} |
-
-
- {{ patent.source }}
-
- |
- {{ patent.publication_year ?? '-' }} |
-
- }
-
-
-
- @if (hasPagination()) {
-
- }
-
-
- @if (selectedPatent) {
-
-
{{ selectedPatent.title ?? selectedPatent.patent_id }}
-
-
- Quelle
-
-
- {{ selectedPatent.source }}
-
-
-
-
- Patent-Nr.
- {{ selectedPatent.patent_id }}
-
-
- Datum
- {{ formatDate(selectedPatent.publication_date) }}
-
-
-
- } @else {
-
-
Klicke auf ein Patent für Details.
-
- }
-
-
-}
+@if (loading) {
+ Lade Patente...
+} @else if (error) {
+ Fehler beim Laden der Patente.
+} @else if (patents.length === 0) {
+ Keine Patente gefunden.
+} @else {
+
+
+
+ {{ filteredPatents.length }}
+ Patente
+
+
+ {{ getEpoCount() }}
+ EPO
+
+
+ {{ getUsptoCount() }}
+ USPTO
+
+
+
+ @if (showDetail && selectedPatent) {
+
+ }
+
+
+ @if (showDetail && selectedPatent) {
+
+
{{ selectedPatent.title ?? selectedPatent.patent_id }}
+
+ @if (selectedPatent.abstract) {
+
+
Abstract
+
{{ selectedPatent.abstract }}
+
+ }
+
+
+
Erfinder
+
+ @for (inventor of selectedPatent.inventors; track inventor) {
+ - {{ inventor }}
+ }
+
+
+
+ @if (hasAsignees(selectedPatent)) {
+
+
Anmelder
+
+ @for (assignee of selectedPatent.assignees; track assignee) {
+ - {{ assignee }}
+ }
+
+
+ }
+
+ @if (hasIpcs(selectedPatent)) {
+
+
Klassifikation (IPC)
+
+ @for (ipc of selectedPatent.ipc; track ipc) {
+ - {{ ipc }}
+ }
+
+
+ }
+
+ }
+
+
+
+
+
+
+
+
+
+
+ | Patent |
+ Quelle |
+ Jahr |
+
+
+
+ @for (patent of getPagedPatents(); track patent.patent_id) {
+
+ |
+ {{ patent.title ?? patent.patent_id }}
+ |
+
+
+ {{ patent.source }}
+
+ |
+ {{ patent.publication_year ?? '-' }} |
+
+ }
+
+
+
+ @if (hasPagination()) {
+
+ }
+
+
+ @if (selectedPatent) {
+
+
{{ selectedPatent.title ?? selectedPatent.patent_id }}
+
+
+ Quelle
+
+
+ {{ selectedPatent.source }}
+
+
+
+
+ Patent-Nr.
+ {{ selectedPatent.patent_id }}
+
+
+ Datum
+ {{
+ formatDate(selectedPatent.publication_date || '')
+ }}
+
+
+
+ } @else {
+
+
Klicke auf ein Patent für Details.
+
+ }
+
+
+}
diff --git a/webapp/src/app/modules/person-patents/person-patents.component.scss b/webapp/src/app/modules/person-patents/person-patents.component.scss
index df70826d..59079610 100644
--- a/webapp/src/app/modules/person-patents/person-patents.component.scss
+++ b/webapp/src/app/modules/person-patents/person-patents.component.scss
@@ -1,304 +1,306 @@
-.message {
- padding: 16px;
- color: #666;
-}
-
-.patents-container {
- padding: 16px;
- display: flex;
- flex-direction: column;
- gap: 16px;
-}
-
-.patents-summary {
- margin-bottom: 8px;
- display: flex;
- gap: 24px;
-
- .summary-line {
- margin: 0;
- font-size: 14px;
- color: #333;
- }
-
- .summary-label {
- color: #333;
- }
-
- .summary-value {
- font-weight: 600;
- color: #333;
- }
-}
-
-.sort-control {
- display: inline-flex;
- align-items: center;
- gap: 6px;
- width: fit-content;
- padding: 10px 14px;
- border-radius: 20px;
- background: #f2f2f2;
- color: #333;
- font-size: 14px;
-
- span {
- color: #555;
- }
-
- select {
- border: 0;
- background: transparent;
- color: #111827;
- font: inherit;
- cursor: pointer;
- outline: none;
- }
-}
-
-.patents-content {
- display: flex;
- gap: 24px;
- align-items: flex-start;
-}
-
-.patents-list {
- flex: 1;
-
- &.hidden {
- display: none;
- }
-
- .patents-list-toolbar {
- display: flex;
- align-items: center;
- justify-content: space-between;
- gap: 16px;
- margin-bottom: 18px;
- flex-wrap: wrap;
- }
-
- table {
- width: 100%;
- border-collapse: collapse;
-
- th {
- text-align: left;
- padding: 10px 12px;
- border-bottom: 2px solid #e0e0e0;
- font-weight: 600;
- color: #333;
- }
-
- tr {
- cursor: pointer;
-
- &:hover {
- background: #f5f5f5;
- }
-
- &.selected {
- background: #f0f0f0;
- }
- }
-
- td {
- padding: 10px 12px;
- border-bottom: 1px solid #f0f0f0;
- }
-
- .patent-title {
- color: #333;
- font-weight: 500;
- max-width: 400px;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- }
- }
-}
-
-.source-badge {
- display: inline-flex;
- align-items: center;
- padding: 3px 10px;
- border-radius: 999px;
- font-size: 0.75rem;
- font-weight: 700;
-
- &--epo {
- background: #effaf3;
- color: #24834f;
- border: 1px solid #bdebcf;
- }
-
- &--uspto {
- background: #f0f6ff;
- color: #0b63ce;
- border: 1px solid #bdd4ff;
- }
-}
-
-.patent-detail {
- width: 440px;
- border: 1px solid #e0e0e0;
- border-radius: 8px;
- padding: 20px;
- background: #fafafa;
-
- &.empty {
- display: flex;
- align-items: center;
- justify-content: center;
- color: #999;
- min-height: 200px;
- }
-
- h3 {
- margin: 0 0 16px 0;
- font-size: 16px;
- color: #333;
- line-height: 1.4;
- }
-}
-
-.detail-stats {
- display: grid;
- grid-template-columns: 1fr 1fr;
- gap: 10px;
-
- .stat {
- background: white;
- border: 1px solid #e0e0e0;
- border-radius: 8px;
- padding: 10px;
- text-align: center;
-
- .stat-label {
- display: block;
- font-size: 11px;
- color: #666;
- margin-bottom: 4px;
- text-transform: uppercase;
- letter-spacing: 0.03em;
- }
-
- .stat-value {
- display: block;
- font-size: 15px;
- font-weight: bold;
- color: #333;
- }
- }
-}
-
-.stat--clickable {
- cursor: pointer;
- transition: border-color 0.15s, background 0.15s;
-
- &:hover {
- border-color: #0b63ce;
- background: #f0f6ff;
- }
-}
-
-.patent-full-detail {
- flex: 1;
- border: 1px solid #e0e0e0;
- border-radius: 8px;
- padding: 20px;
- background: #fafafa;
-
- h3 {
- margin: 0 0 16px 0;
- font-size: 16px;
- color: #333;
- line-height: 1.4;
- }
-
- h4 {
- margin: 16px 0 8px 0;
- font-size: 14px;
- color: #555;
- font-weight: 600;
- }
-
- p {
- font-size: 13px;
- color: #444;
- line-height: 1.6;
- margin: 0;
- }
-}
-
-.back-btn {
- border: none;
- background: none;
- color: #333;
- cursor: pointer;
- font-size: 14px;
- font-weight: 400;
- padding: 0;
- align-self: flex-start; // NEU
-
- &:hover {
- text-decoration: underline;
- }
-}
-
-.detail-section {
- margin-top: 12px;
- padding-top: 12px;
- border-top: 1px solid #eee;
-}
-
-.tag-list {
- display: flex;
- flex-wrap: wrap;
- gap: 6px;
- margin: 0;
- padding: 0;
- list-style: none;
-
- &--compact .tag {
- font-size: 0.75rem;
- padding: 3px 8px;
- }
-}
-
-.tag {
- padding: 4px 10px;
- border-radius: 999px;
- background: #f0f6ff;
- border: 1px solid #dbeafe;
- color: #1e40af;
- font-size: 0.8rem;
- line-height: 1.3;
-}
-
-.pagination {
- display: flex;
- align-items: center;
- justify-content: space-between;
- gap: 8px;
- margin-top: 12px;
-
- button {
- padding: 4px 10px;
- border: 1px solid #d0d0d0;
- border-radius: 6px;
- background: white;
- cursor: pointer;
- font-size: 12px;
-
- &:disabled {
- opacity: 0.5;
- cursor: default;
- }
- }
-
- span {
- font-size: 12px;
- color: #666;
- }
-}
+.message {
+ padding: 16px;
+ color: #666;
+}
+
+.patents-container {
+ padding: 16px;
+ display: flex;
+ flex-direction: column;
+ gap: 16px;
+}
+
+.patents-summary {
+ margin-bottom: 8px;
+ display: flex;
+ gap: 24px;
+
+ .summary-line {
+ margin: 0;
+ font-size: 14px;
+ color: #333;
+ }
+
+ .summary-label {
+ color: #333;
+ }
+
+ .summary-value {
+ font-weight: 600;
+ color: #333;
+ }
+}
+
+.sort-control {
+ display: inline-flex;
+ align-items: center;
+ gap: 6px;
+ width: fit-content;
+ padding: 10px 14px;
+ border-radius: 20px;
+ background: #f2f2f2;
+ color: #333;
+ font-size: 14px;
+
+ span {
+ color: #555;
+ }
+
+ select {
+ border: 0;
+ background: transparent;
+ color: #111827;
+ font: inherit;
+ cursor: pointer;
+ outline: none;
+ }
+}
+
+.patents-content {
+ display: flex;
+ gap: 24px;
+ align-items: flex-start;
+}
+
+.patents-list {
+ flex: 1;
+
+ &.hidden {
+ display: none;
+ }
+
+ .patents-list-toolbar {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ gap: 16px;
+ margin-bottom: 18px;
+ flex-wrap: wrap;
+ }
+
+ table {
+ width: 100%;
+ border-collapse: collapse;
+
+ th {
+ text-align: left;
+ padding: 10px 12px;
+ border-bottom: 2px solid #e0e0e0;
+ font-weight: 600;
+ color: #333;
+ }
+
+ tr {
+ cursor: pointer;
+
+ &:hover {
+ background: #f5f5f5;
+ }
+
+ &.selected {
+ background: #f0f0f0;
+ }
+ }
+
+ td {
+ padding: 10px 12px;
+ border-bottom: 1px solid #f0f0f0;
+ }
+
+ .patent-title {
+ color: #333;
+ font-weight: 500;
+ max-width: 400px;
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ }
+ }
+}
+
+.source-badge {
+ display: inline-flex;
+ align-items: center;
+ padding: 3px 10px;
+ border-radius: 999px;
+ font-size: 0.75rem;
+ font-weight: 700;
+
+ &--epo {
+ background: #effaf3;
+ color: #24834f;
+ border: 1px solid #bdebcf;
+ }
+
+ &--uspto {
+ background: #f0f6ff;
+ color: #0b63ce;
+ border: 1px solid #bdd4ff;
+ }
+}
+
+.patent-detail {
+ width: 440px;
+ border: 1px solid #e0e0e0;
+ border-radius: 8px;
+ padding: 20px;
+ background: #fafafa;
+
+ &.empty {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ color: #999;
+ min-height: 200px;
+ }
+
+ h3 {
+ margin: 0 0 16px 0;
+ font-size: 16px;
+ color: #333;
+ line-height: 1.4;
+ }
+}
+
+.detail-stats {
+ display: grid;
+ grid-template-columns: 1fr 1fr;
+ gap: 10px;
+
+ .stat {
+ background: white;
+ border: 1px solid #e0e0e0;
+ border-radius: 8px;
+ padding: 10px;
+ text-align: center;
+
+ .stat-label {
+ display: block;
+ font-size: 11px;
+ color: #666;
+ margin-bottom: 4px;
+ text-transform: uppercase;
+ letter-spacing: 0.03em;
+ }
+
+ .stat-value {
+ display: block;
+ font-size: 15px;
+ font-weight: bold;
+ color: #333;
+ }
+ }
+}
+
+.stat--clickable {
+ cursor: pointer;
+ transition:
+ border-color 0.15s,
+ background 0.15s;
+
+ &:hover {
+ border-color: #0b63ce;
+ background: #f0f6ff;
+ }
+}
+
+.patent-full-detail {
+ flex: 1;
+ border: 1px solid #e0e0e0;
+ border-radius: 8px;
+ padding: 20px;
+ background: #fafafa;
+
+ h3 {
+ margin: 0 0 16px 0;
+ font-size: 16px;
+ color: #333;
+ line-height: 1.4;
+ }
+
+ h4 {
+ margin: 16px 0 8px 0;
+ font-size: 14px;
+ color: #555;
+ font-weight: 600;
+ }
+
+ p {
+ font-size: 13px;
+ color: #444;
+ line-height: 1.6;
+ margin: 0;
+ }
+}
+
+.back-btn {
+ border: none;
+ background: none;
+ color: #333;
+ cursor: pointer;
+ font-size: 14px;
+ font-weight: 400;
+ padding: 0;
+ align-self: flex-start; // NEU
+
+ &:hover {
+ text-decoration: underline;
+ }
+}
+
+.detail-section {
+ margin-top: 12px;
+ padding-top: 12px;
+ border-top: 1px solid #eee;
+}
+
+.tag-list {
+ display: flex;
+ flex-wrap: wrap;
+ gap: 6px;
+ margin: 0;
+ padding: 0;
+ list-style: none;
+
+ &--compact .tag {
+ font-size: 0.75rem;
+ padding: 3px 8px;
+ }
+}
+
+.tag {
+ padding: 4px 10px;
+ border-radius: 999px;
+ background: #f0f6ff;
+ border: 1px solid #dbeafe;
+ color: #1e40af;
+ font-size: 0.8rem;
+ line-height: 1.3;
+}
+
+.pagination {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ gap: 8px;
+ margin-top: 12px;
+
+ button {
+ padding: 4px 10px;
+ border: 1px solid #d0d0d0;
+ border-radius: 6px;
+ background: white;
+ cursor: pointer;
+ font-size: 12px;
+
+ &:disabled {
+ opacity: 0.5;
+ cursor: default;
+ }
+ }
+
+ span {
+ font-size: 12px;
+ color: #666;
+ }
+}
diff --git a/webapp/src/app/modules/person-patents/person-patents.component.ts b/webapp/src/app/modules/person-patents/person-patents.component.ts
index 4c71be01..f0c80153 100644
--- a/webapp/src/app/modules/person-patents/person-patents.component.ts
+++ b/webapp/src/app/modules/person-patents/person-patents.component.ts
@@ -1,161 +1,174 @@
-import { Component, OnInit, inject } from '@angular/core';
-import { CommonModule } from '@angular/common';
-import { ActivatedRoute, Router } from '@angular/router';
-import { PatentsService, PatentEntry } from '../../api/api/patents.service';
-
-type SortMode = 'date' | 'title';
-type SourceFilter = 'all' | 'EPO' | 'USPTO';
-
-@Component({
- selector: 'app-person-patents',
- imports: [CommonModule],
- templateUrl: './person-patents.component.html',
- styleUrl: './person-patents.component.scss',
-})
-export class PersonPatentsComponent implements OnInit {
- private route = inject(ActivatedRoute);
- private router = inject(Router);
- private patentsApi = inject(PatentsService);
-
- patents: PatentEntry[] = [];
- filteredPatents: PatentEntry[] = [];
- authorName: string | null = null;
- selectedPatent: PatentEntry | null = null;
- showDetail = false;
-
- loading = true;
- error = false;
-
- activeFilter: SourceFilter = 'all';
- sortMode: SortMode = 'date';
-
- selectedPage = 1;
- readonly pageSize = 10;
-
- ngOnInit(): void {
- this.route.parent?.paramMap.subscribe((params) => {
- const authorId = params.get('id') ?? '';
-
- const filterFromUrl = this.route.snapshot.queryParamMap.get('filter');
- const sortFromUrl = this.route.snapshot.queryParamMap.get('sortBy');
-
- if (this.isValidFilter(filterFromUrl)) {
- this.activeFilter = filterFromUrl;
- }
- if (this.isValidSortMode(sortFromUrl)) {
- this.sortMode = sortFromUrl;
- }
-
- if (authorId) {
- this.patentsApi.getPatentsByAuthor(authorId, 'body').subscribe({
- next: (result) => {
- this.patents = result.patents ?? [];
- this.authorName = result.author_name ?? null;
- this.applyFilter();
- this.loading = false;
- },
- error: () => {
- this.error = true;
- this.loading = false;
- },
- });
- }
- });
- }
-
- setFilter(filter: SourceFilter): void {
- this.activeFilter = filter;
- this.selectedPage = 1;
- this.selectedPatent = null;
- this.showDetail = false;
- this.applyFilter();
- this.updateQueryParams();
- }
-
- setSortMode(sortMode: SortMode): void {
- this.sortMode = sortMode;
- this.applyFilter();
- this.updateQueryParams();
- }
-
- selectPatent(patent: PatentEntry): void {
- this.selectedPatent = patent;
- this.showDetail = false;
- this.updateQueryParams();
- }
-
- openDetail(): void {
- this.showDetail = true;
- }
-
- private applyFilter(): void {
- let patents = this.patents;
-
- if (this.activeFilter !== 'all') {
- patents = patents.filter((p) => p.source === this.activeFilter);
- }
-
- this.filteredPatents = this.sortPatents(patents);
- }
-
- private sortPatents(patents: PatentEntry[]): PatentEntry[] {
- return [...patents].sort((a, b) => {
- if (this.sortMode === 'date') {
- return (b.publication_date ?? '').localeCompare(a.publication_date ?? '');
- }
- return (a.title ?? '').localeCompare(b.title ?? '', 'de', { sensitivity: 'base' });
- });
- }
-
- private updateQueryParams(): void {
- this.router.navigate([], {
- relativeTo: this.route,
- queryParams: {
- filter: this.activeFilter,
- sortBy: this.sortMode,
- },
- queryParamsHandling: 'merge',
- replaceUrl: true,
- });
- }
-
- private isValidFilter(value: string | null): value is SourceFilter {
- return value === 'all' || value === 'EPO' || value === 'USPTO';
- }
-
- private isValidSortMode(value: string | null): value is SortMode {
- return value === 'date' || value === 'title';
- }
-
- getPagedPatents(): PatentEntry[] {
- const start = (this.selectedPage - 1) * this.pageSize;
- return this.filteredPatents.slice(start, start + this.pageSize);
- }
-
- getPageCount(): number {
- return Math.max(1, Math.ceil(this.filteredPatents.length / this.pageSize));
- }
-
- hasPagination(): boolean {
- return this.getPageCount() > 1;
- }
-
- setPage(page: number): void {
- this.selectedPage = Math.min(Math.max(page, 1), this.getPageCount());
- this.updateQueryParams();
- }
-
- formatDate(date: string | null): string {
- if (!date) return '-';
- const d = date.replace(/(\d{4})(\d{2})(\d{2})/, '$1-$2-$3');
- return new Intl.DateTimeFormat('de-DE').format(new Date(d));
- }
-
- getEpoCount(): number {
- return this.patents.filter((p) => p.source === 'EPO').length;
- }
-
- getUsptoCount(): number {
- return this.patents.filter((p) => p.source === 'USPTO').length;
- }
-}
+import { Component, OnInit, inject } from '@angular/core';
+import { CommonModule } from '@angular/common';
+import { ActivatedRoute, Router } from '@angular/router';
+import { PatentsService } from '../../api/api/patents.service';
+import { PatentEntry } from '../../api';
+
+type SortMode = 'date' | 'title';
+type SourceFilter = 'all' | 'EPO' | 'USPTO';
+
+@Component({
+ selector: 'app-person-patents',
+ imports: [CommonModule],
+ templateUrl: './person-patents.component.html',
+ styleUrl: './person-patents.component.scss',
+})
+export class PersonPatentsComponent implements OnInit {
+ private route = inject(ActivatedRoute);
+ private router = inject(Router);
+ private patentsApi = inject(PatentsService);
+
+ patents: PatentEntry[] = [];
+ filteredPatents: PatentEntry[] = [];
+ authorName: string | null = null;
+ selectedPatent: PatentEntry | null = null;
+ showDetail = false;
+
+ loading = true;
+ error = false;
+
+ activeFilter: SourceFilter = 'all';
+ sortMode: SortMode = 'date';
+
+ selectedPage = 1;
+ readonly pageSize = 10;
+
+ hasAsignees(selectedPatent: PatentEntry | null): boolean {
+ return !!selectedPatent?.assignees && selectedPatent.assignees.length > 0;
+ }
+
+ hasIpcs(selectedPatent: PatentEntry | null): boolean {
+ return !!selectedPatent?.ipc && selectedPatent.ipc.length > 0;
+ }
+
+ ngOnInit(): void {
+ this.route.parent?.paramMap.subscribe((params) => {
+ const authorId = params.get('id') ?? '';
+
+ const filterFromUrl = this.route.snapshot.queryParamMap.get('filter');
+ const sortFromUrl = this.route.snapshot.queryParamMap.get('sortBy');
+
+ if (this.isValidFilter(filterFromUrl)) {
+ this.activeFilter = filterFromUrl;
+ }
+ if (this.isValidSortMode(sortFromUrl)) {
+ this.sortMode = sortFromUrl;
+ }
+
+ if (authorId) {
+ this.patentsApi.getPatentsByAuthor(authorId, 'body').subscribe({
+ next: (result) => {
+ this.patents = result.patents ?? [];
+ this.authorName = result.author_name ?? null;
+ this.applyFilter();
+ this.loading = false;
+ },
+ error: () => {
+ this.error = true;
+ this.loading = false;
+ },
+ });
+ }
+ });
+ }
+
+ setFilter(filter: SourceFilter): void {
+ this.activeFilter = filter;
+ this.selectedPage = 1;
+ this.selectedPatent = null;
+ this.showDetail = false;
+ this.applyFilter();
+ this.updateQueryParams();
+ }
+
+ setSortMode(sortMode: SortMode): void {
+ this.sortMode = sortMode;
+ this.applyFilter();
+ this.updateQueryParams();
+ }
+
+ selectPatent(patent: PatentEntry): void {
+ this.selectedPatent = patent;
+ this.showDetail = false;
+ this.updateQueryParams();
+ }
+
+ openDetail(): void {
+ this.showDetail = true;
+ }
+
+ private applyFilter(): void {
+ let patents = this.patents;
+
+ if (this.activeFilter !== 'all') {
+ patents = patents.filter((p) => p.source === this.activeFilter);
+ }
+
+ this.filteredPatents = this.sortPatents(patents);
+ }
+
+ private sortPatents(patents: PatentEntry[]): PatentEntry[] {
+ return [...patents].sort((a, b) => {
+ if (this.sortMode === 'date') {
+ return (b.publication_date ?? '').localeCompare(
+ a.publication_date ?? '',
+ );
+ }
+ return (a.title ?? '').localeCompare(b.title ?? '', 'de', {
+ sensitivity: 'base',
+ });
+ });
+ }
+
+ private updateQueryParams(): void {
+ this.router.navigate([], {
+ relativeTo: this.route,
+ queryParams: {
+ filter: this.activeFilter,
+ sortBy: this.sortMode,
+ },
+ queryParamsHandling: 'merge',
+ replaceUrl: true,
+ });
+ }
+
+ private isValidFilter(value: string | null): value is SourceFilter {
+ return value === 'all' || value === 'EPO' || value === 'USPTO';
+ }
+
+ private isValidSortMode(value: string | null): value is SortMode {
+ return value === 'date' || value === 'title';
+ }
+
+ getPagedPatents(): PatentEntry[] {
+ const start = (this.selectedPage - 1) * this.pageSize;
+ return this.filteredPatents.slice(start, start + this.pageSize);
+ }
+
+ getPageCount(): number {
+ return Math.max(1, Math.ceil(this.filteredPatents.length / this.pageSize));
+ }
+
+ hasPagination(): boolean {
+ return this.getPageCount() > 1;
+ }
+
+ setPage(page: number): void {
+ this.selectedPage = Math.min(Math.max(page, 1), this.getPageCount());
+ this.updateQueryParams();
+ }
+
+ formatDate(date: string | null): string {
+ if (!date) return '-';
+ const d = date.replace(/(\d{4})(\d{2})(\d{2})/, '$1-$2-$3');
+ return new Intl.DateTimeFormat('de-DE').format(new Date(d));
+ }
+
+ getEpoCount(): number {
+ return this.patents.filter((p) => p.source === 'EPO').length;
+ }
+
+ getUsptoCount(): number {
+ return this.patents.filter((p) => p.source === 'USPTO').length;
+ }
+}
diff --git a/webapp/src/app/modules/person-projects/bund-details/bund-details.component.html b/webapp/src/app/modules/person-projects/bund-details/bund-details.component.html
index b98a231d..9b0df147 100644
--- a/webapp/src/app/modules/person-projects/bund-details/bund-details.component.html
+++ b/webapp/src/app/modules/person-projects/bund-details/bund-details.component.html
@@ -52,9 +52,7 @@
@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-projects/person-projects.component.html b/webapp/src/app/modules/person-projects/person-projects.component.html
index 90e01edf..e33bdee6 100644
--- a/webapp/src/app/modules/person-projects/person-projects.component.html
+++ b/webapp/src/app/modules/person-projects/person-projects.component.html
@@ -28,6 +28,11 @@
[sortDirection]="urlSortDirection()"
(sortChange)="handleSortChange($event)" />
+
+
+
+
+
+ {{ element.startDate | date: 'dd.MM.yyyy' }}
+
+
+
+ {{ element.endDate | date: 'dd.MM.yyyy' }}
+
+
+
+ {{ element.ecMaxContribution | currency: 'EUR' : 'symbol' : '1.0-0' : 'de' }}
+
+
+
+
+ open_in_new
+
+
diff --git a/webapp/src/app/modules/person-projects/person-projects.component.ts b/webapp/src/app/modules/person-projects/person-projects.component.ts
index 6374de4f..9e208870 100644
--- a/webapp/src/app/modules/person-projects/person-projects.component.ts
+++ b/webapp/src/app/modules/person-projects/person-projects.component.ts
@@ -8,7 +8,12 @@ import {
TemplateRef,
viewChild,
} from '@angular/core';
-import { DfgProjectPage, DfgProjectSummary } from '../../api';
+import {
+ CordisEuProject,
+ CordisEuProjectPage,
+ DfgProjectPage,
+ DfgProjectSummary,
+} from '../../api';
import {
DataTableComponent,
GenericColumn,
@@ -24,6 +29,7 @@ import { ActivatedRoute, Router, RouterModule } from '@angular/router';
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
import { MatPaginatorModule, PageEvent } from '@angular/material/paginator';
import { Sort, SortDirection } from '@angular/material/sort';
+import { CurrencyPipe, DatePipe } from '@angular/common';
@Component({
selector: 'app-person-projects',
@@ -38,6 +44,8 @@ import { Sort, SortDirection } from '@angular/material/sort';
DebounceDirective,
MatPaginatorModule,
RouterModule,
+ DatePipe,
+ CurrencyPipe,
],
templateUrl: './person-projects.component.html',
styleUrl: './person-projects.component.scss',
@@ -57,6 +65,23 @@ export class PersonProjectsComponent implements OnInit {
'dfgProjectDetailRowTmp',
);
+ personCordisEuProjectPage = input.required
();
+ personCordisEuProjectColumns: GenericColumn[] = [];
+ personCordisEuProjectData: CordisEuProject[] = [];
+
+ euProjectsFundingStartTmp = viewChild.required>(
+ 'euProjectsFundingStartTmp',
+ );
+ euProjectsFundingEndTmp = viewChild.required>(
+ 'euProjectsFundingEndTmp',
+ );
+ euProjectsFundingAmountTmp = viewChild.required>(
+ 'euProjectsFundingAmountTmp',
+ );
+ euProjectsActionsTmp = viewChild.required>(
+ 'euProjectsActionsTmp',
+ );
+
urlSearchTerm = signal('');
urlSortKey = signal('');
urlSortDirection = signal('');
@@ -84,18 +109,24 @@ export class PersonProjectsComponent implements OnInit {
});
effect(() => {
- console.log(
- 'PersonProjectsComponent: dfgProjectPage changed',
- this.dfgProjectPage(),
- );
this.dfgProjectData = this.dfgProjectPage().elements || [];
});
+ effect(() => {
+ console.log(
+ 'Updating personCordisEuProjectData with',
+ this.personCordisEuProjectPage(),
+ );
+
+ this.personCordisEuProjectData =
+ this.personCordisEuProjectPage().elements || [];
+ });
+
effect(() => {
const searchTerm = this.urlSearchTerm();
if (searchTerm) {
this.router.navigate([], {
- queryParams: { search: searchTerm },
+ queryParams: { search: searchTerm, page: 0, size: this.pageSize() },
queryParamsHandling: 'merge',
});
}
@@ -131,6 +162,39 @@ export class PersonProjectsComponent implements OnInit {
cellTemplate: this.dfgProjectActionsTmp(),
},
];
+
+ this.personCordisEuProjectColumns = [
+ {
+ id: 'title',
+ header: 'Titel',
+ type: 'accessor',
+ accessorKey: 'title',
+ },
+ {
+ id: 'startDate',
+ header: 'Startdatum',
+ type: 'display',
+ cellTemplate: this.euProjectsFundingStartTmp(),
+ },
+ {
+ id: 'endDate',
+ header: 'Enddatum',
+ type: 'display',
+ cellTemplate: this.euProjectsFundingEndTmp(),
+ },
+ {
+ id: 'ecMaxContribution',
+ header: 'Förderbetrag (EU)',
+ type: 'display',
+ cellTemplate: this.euProjectsFundingAmountTmp(),
+ },
+ {
+ id: 'actions',
+ header: '',
+ type: 'display',
+ cellTemplate: this.euProjectsActionsTmp(),
+ },
+ ];
}
handleSearchTermChange(newTerm: string): void {
diff --git a/webapp/src/app/modules/person/person.component.ts b/webapp/src/app/modules/person/person.component.ts
index a74be3fe..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,7 @@ 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 },
];
diff --git a/webapp/src/app/modules/projects/projects.component.ts b/webapp/src/app/modules/projects/projects.component.ts
index 3e68025a..4fc6f46d 100644
--- a/webapp/src/app/modules/projects/projects.component.ts
+++ b/webapp/src/app/modules/projects/projects.component.ts
@@ -66,7 +66,7 @@ export class ProjectsComponent {
handleSearchTermChange(newTerm: string): void {
this.router.navigate([], {
- queryParams: { search: newTerm },
+ queryParams: { search: newTerm, page: 0, size: 10 },
queryParamsHandling: 'merge',
});
}
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 {