minor fixes for make the component work
This commit is contained in:
@@ -111,6 +111,7 @@ model/institutionInformation.ts
|
||||
model/institutionNetworkNode.ts
|
||||
model/institutionPage.ts
|
||||
model/institutionsListResponse.ts
|
||||
model/ipcClassification.ts
|
||||
model/item.ts
|
||||
model/itemCreate.ts
|
||||
model/itemPage.ts
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@if (selectedPatent.assignees.length > 0) {
|
||||
@if (selectedPatent.assignees && selectedPatent.assignees.length > 0) {
|
||||
<div class="detail-section">
|
||||
<h4>Anmelder</h4>
|
||||
<ul class="tag-list">
|
||||
@@ -64,7 +64,7 @@
|
||||
</div>
|
||||
}
|
||||
|
||||
@if (selectedPatent.ipc_descriptions.length > 0) {
|
||||
@if (selectedPatent.ipc_descriptions && selectedPatent.ipc_descriptions.length > 0) {
|
||||
<div class="detail-section classification-section classification-section--ipc">
|
||||
<h4>Klassifikation (IPC)</h4>
|
||||
<div class="classification-cards">
|
||||
@@ -110,7 +110,7 @@
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
} @else if (selectedPatent.ipc.length > 0) {
|
||||
} @else if (selectedPatent.ipc && selectedPatent.ipc.length > 0) {
|
||||
<div class="detail-section">
|
||||
<h4>Klassifikation (IPC)</h4>
|
||||
<ul class="tag-list tag-list--compact">
|
||||
@@ -121,7 +121,7 @@
|
||||
</div>
|
||||
}
|
||||
|
||||
@if (selectedPatent.cpc_descriptions.length > 0) {
|
||||
@if (selectedPatent.cpc_descriptions && selectedPatent.cpc_descriptions.length > 0) {
|
||||
<div class="detail-section classification-section classification-section--cpc">
|
||||
<h4>Klassifikation (CPC)</h4>
|
||||
<div class="classification-cards">
|
||||
@@ -167,16 +167,7 @@
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
} @else if (selectedPatent.cpc.length > 0) {
|
||||
<div class="detail-section">
|
||||
<h4>Klassifikation (CPC)</h4>
|
||||
<ul class="tag-list tag-list--compact">
|
||||
@for (cpc of selectedPatent.cpc; track cpc) {
|
||||
<li class="tag">{{ cpc }}</li>
|
||||
}
|
||||
</ul>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
|
||||
</div>
|
||||
}
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
import { Component, OnInit, inject } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { PatentsService, PatentEntry, IpcClassification } from '../../api/api/patents.service';
|
||||
|
||||
import { PatentsService } from '../../api/api/patents.service';
|
||||
import { PatentEntry } from '../../api';
|
||||
import { IpcClassification } from '../../api/model/ipcClassification';
|
||||
type SortMode = 'date' | 'title';
|
||||
type SourceFilter = 'all' | 'EPO' | 'USPTO';
|
||||
type ClassificationSystem = 'IPC' | 'CPC';
|
||||
@@ -171,7 +172,7 @@ export class PersonPatentsComponent implements OnInit {
|
||||
this.updateQueryParams();
|
||||
}
|
||||
|
||||
formatDate(date: string | null): string {
|
||||
formatDate(date: string | null | undefined): 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));
|
||||
@@ -374,10 +375,16 @@ export class PersonPatentsComponent implements OnInit {
|
||||
seen.add(normalized);
|
||||
rows.push({ label, value });
|
||||
};
|
||||
if (entry.section){
|
||||
addRow('Sektion', entry.section);
|
||||
}
|
||||
if (entry.class){
|
||||
addRow('Klasse', entry.class);
|
||||
}
|
||||
if (entry.subclass){
|
||||
addRow('Unterklasse', entry.subclass);
|
||||
}
|
||||
|
||||
addRow('Sektion', entry.section);
|
||||
addRow('Klasse', entry.class);
|
||||
addRow('Unterklasse', entry.subclass);
|
||||
|
||||
return rows;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user