diff --git a/webapp/src/app/modules/person-patents/person-patents.component.html b/webapp/src/app/modules/person-patents/person-patents.component.html index 03370197..559aa284 100644 --- a/webapp/src/app/modules/person-patents/person-patents.component.html +++ b/webapp/src/app/modules/person-patents/person-patents.component.html @@ -6,7 +6,6 @@

Keine Patente gefunden.

} @else {
-

{{ filteredPatents.length }} @@ -22,9 +21,58 @@

-
+ @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 }}
  • + } +
+
+ } +
+ } + +
} 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 9f511648..df70826d 100644 --- a/webapp/src/app/modules/person-patents/person-patents.component.scss +++ b/webapp/src/app/modules/person-patents/person-patents.component.scss @@ -31,40 +31,6 @@ } } -.filter-bar { - 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; - } - - button { - border: 0; - background: transparent; - color: #111827; - font: inherit; - cursor: pointer; - outline: none; - - &.active { - font-weight: 600; - color: #0b63ce; - } - - &:hover { - text-decoration: underline; - } - } -} - .sort-control { display: inline-flex; align-items: center; @@ -99,6 +65,10 @@ .patents-list { flex: 1; + &.hidden { + display: none; + } + .patents-list-toolbar { display: flex; align-items: center; @@ -190,27 +160,12 @@ 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; - } } .detail-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; - margin-bottom: 16px; .stat { background: white; @@ -237,6 +192,60 @@ } } +.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; 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 507f1e88..4c71be01 100644 --- a/webapp/src/app/modules/person-patents/person-patents.component.ts +++ b/webapp/src/app/modules/person-patents/person-patents.component.ts @@ -21,6 +21,7 @@ export class PersonPatentsComponent implements OnInit { filteredPatents: PatentEntry[] = []; authorName: string | null = null; selectedPatent: PatentEntry | null = null; + showDetail = false; loading = true; error = false; @@ -66,6 +67,7 @@ export class PersonPatentsComponent implements OnInit { this.activeFilter = filter; this.selectedPage = 1; this.selectedPatent = null; + this.showDetail = false; this.applyFilter(); this.updateQueryParams(); } @@ -78,9 +80,14 @@ export class PersonPatentsComponent implements OnInit { selectPatent(patent: PatentEntry): void { this.selectedPatent = patent; + this.showDetail = false; this.updateQueryParams(); } + openDetail(): void { + this.showDetail = true; + } + private applyFilter(): void { let patents = this.patents; @@ -94,13 +101,9 @@ export class PersonPatentsComponent implements OnInit { private sortPatents(patents: PatentEntry[]): PatentEntry[] { return [...patents].sort((a, b) => { if (this.sortMode === 'date') { - return (b.publication_date ?? '').localeCompare( - a.publication_date ?? '', - ); + return (b.publication_date ?? '').localeCompare(a.publication_date ?? ''); } - return (a.title ?? '').localeCompare(b.title ?? '', 'de', { - sensitivity: 'base', - }); + return (a.title ?? '').localeCompare(b.title ?? '', 'de', { sensitivity: 'base' }); }); }