Fix build errors from dev merge: remove duplicate AllPatentsResponse, fix IpcClassification import, add null safety for optional arrays in patent-detail template
LocationBasedServices/smartguide/pipeline/pr-dev There was a failure building this commit

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-07-01 10:22:47 +02:00
co-authored by Claude Sonnet 4.6
parent 204e419fed
commit eba78a080e
5 changed files with 16 additions and 19 deletions
+2 -6
View File
@@ -15,13 +15,9 @@ import { PatentEntry } from '../model/patentEntry';
import { PatentsByAuthorResponse } from '../model/patentsByAuthorResponse';
import { PatentsByInstitutionResponse } from '../model/patentsByInstitutionResponse';
import { OrgPatentsResponse, OrgPatentMatchTypeFilter } from '../model/orgPatentsResponse';
import { AllPatentsResponse } from '../model/allPatentsResponse';
export interface AllPatentsResponse {
total: number;
page: number;
size: number;
patents: PatentEntry[];
}
export type { AllPatentsResponse };
type GetPatentsByAuthorOptions = {
httpHeaderAccept?: 'application/json';
@@ -184,7 +184,7 @@ export class InstitutionPatentsComponent implements OnInit {
return value === 'all' || value === 'institution' || value === 'name' || value === 'both';
}
formatDate(date: string | null): string {
formatDate(date: string | null | undefined): string {
return formatPatentDate(date);
}
@@ -60,17 +60,17 @@
<div class="metrics" aria-label="Patentkennzahlen">
<div>
<mat-icon>groups</mat-icon>
<strong>{{ patent.inventors.length }}</strong>
<strong>{{ patent.inventors?.length ?? 0 }}</strong>
<span>Erfinder</span>
</div>
<div>
<mat-icon>business</mat-icon>
<strong>{{ patent.assignees.length }}</strong>
<strong>{{ patent.assignees?.length ?? 0 }}</strong>
<span>Anmelder</span>
</div>
<div>
<mat-icon>category</mat-icon>
<strong>{{ patent.ipc.length + patent.cpc.length }}</strong>
<strong>{{ (patent.ipc?.length ?? 0) + (patent.cpc?.length ?? 0) }}</strong>
<span>Klassifikationen</span>
</div>
</div>
@@ -92,7 +92,7 @@
<div class="section-title">
<mat-icon>engineering</mat-icon>
<h2>Erfinder</h2>
<span>{{ patent.inventors.length }}</span>
<span>{{ patent.inventors?.length ?? 0 }}</span>
</div>
<div class="tags">
@for (inventor of patent.inventors; track inventor) {
@@ -103,12 +103,12 @@
</div>
</section>
@if (patent.assignees.length > 0) {
@if (patent.assignees?.length) {
<section class="card">
<div class="section-title">
<mat-icon>account_balance</mat-icon>
<h2>Anmelder</h2>
<span>{{ patent.assignees.length }}</span>
<span>{{ patent.assignees?.length ?? 0 }}</span>
</div>
<div class="compact-list">
@for (assignee of patent.assignees; track assignee) {
@@ -120,7 +120,7 @@
</section>
}
@if (patent.ipc_descriptions.length > 0) {
@if (patent.ipc_descriptions?.length) {
<section class="card classification-card-section classification-card-section--ipc">
<div class="section-title">
<mat-icon>label</mat-icon>
@@ -182,7 +182,7 @@
}
</div>
</section>
} @else if (patent.ipc.length > 0) {
} @else if (patent.ipc?.length) {
<section class="card">
<div class="section-title">
<mat-icon>label</mat-icon>
@@ -196,7 +196,7 @@
</section>
}
@if (patent.cpc_descriptions.length > 0) {
@if (patent.cpc_descriptions?.length) {
<section class="card classification-card-section classification-card-section--cpc">
<div class="section-title">
<mat-icon>label</mat-icon>
@@ -258,7 +258,7 @@
}
</div>
</section>
} @else if (patent.cpc.length > 0) {
} @else if (patent.cpc?.length) {
<section class="card">
<div class="section-title">
<mat-icon>label</mat-icon>
@@ -1,4 +1,5 @@
import { IpcClassification, PatentEntry } from '../../api/model/patentEntry';
import { PatentEntry } from '../../api/model/patentEntry';
import { IpcClassification } from '../../api/model/ipcClassification';
export type ClassificationSystem = 'IPC' | 'CPC';
@@ -88,7 +88,7 @@
}
</div>
@if (selectedPatent.match_badges?.length) {
@if (selectedPatent.match_badges.length) {
<div class="match-badges match-badges--detail">
@for (badge of selectedPatent.match_badges; track badge) {
<span class="match-badge match-badge--signal">{{ formatMatchBadgeLabel(badge) }}</span>