style(institution-patents): align filter dropdowns, overview stat colors, and match-type badge with the design used across other patent/funding views
LocationBasedServices/smartguide/pipeline/head This commit looks good
LocationBasedServices/smartguide/pipeline/pr-dev Build queued...

This commit is contained in:
2026-07-24 16:39:54 +02:00
parent 7d695f8439
commit ae8d01b5ce
5 changed files with 98 additions and 71 deletions
@@ -22,36 +22,45 @@
<div class="patents-content">
<div class="patents-list">
<div class="patents-list-toolbar">
<label class="sort-control">
<span>Matching:</span>
<select
<mat-form-field
class="patents-toolbar-field"
subscriptSizing="dynamic">
<mat-icon matPrefix fontIcon="rule"></mat-icon>
<mat-select
[value]="activeMatchType"
(change)="setMatchType($any($event.target).value)">
<option value="all">Alle</option>
<option value="institution">Institution</option>
<option value="name">Name</option>
<option value="both">Beides</option>
</select>
</label>
<label class="sort-control">
<span>Filter nach Quelle:</span>
<select
(selectionChange)="setMatchType($event.value)">
<mat-select-trigger>Matching</mat-select-trigger>
<mat-option value="all">Alle</mat-option>
<mat-option value="institution">Institution</mat-option>
<mat-option value="name">Name</mat-option>
<mat-option value="both">Beides</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field
class="patents-toolbar-field"
subscriptSizing="dynamic">
<mat-icon matPrefix fontIcon="filter_alt"></mat-icon>
<mat-select
[value]="activeFilter"
(change)="setFilter($any($event.target).value)">
<option value="all">Alle</option>
<option value="EPO">EPO</option>
<option value="USPTO">USPTO</option>
</select>
</label>
<label class="sort-control">
<span>Sortieren nach:</span>
<select
(selectionChange)="setFilter($event.value)">
<mat-select-trigger>Filter nach Quelle</mat-select-trigger>
<mat-option value="all">Alle</mat-option>
<mat-option value="EPO">EPO</mat-option>
<mat-option value="USPTO">USPTO</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field
class="patents-toolbar-field"
subscriptSizing="dynamic">
<mat-icon matPrefix fontIcon="sort"></mat-icon>
<mat-select
[value]="sortMode"
(change)="setSortMode($any($event.target).value)">
<option value="date">Datum</option>
<option value="title">Titel</option>
</select>
</label>
(selectionChange)="setSortMode($event.value)">
<mat-select-trigger>Sortieren nach</mat-select-trigger>
<mat-option value="date">Datum</mat-option>
<mat-option value="title">Titel</mat-option>
</mat-select>
</mat-form-field>
</div>
<table>
@@ -164,9 +173,14 @@
</div>
<div class="stat">
<span class="stat-label">Match-Typ</span>
<span class="stat-value">{{
getMatchTypeLabel(selectedPatent)
}}</span>
<span class="stat-value">
<span
class="match-badge match-badge--{{
selectedPatent.match_type
}}">
{{ getMatchTypeLabel(selectedPatent) }}
</span>
</span>
</div>
@if (getPublicationStageLabel(selectedPatent); as stageLabel) {
<div class="stat">
@@ -227,21 +241,21 @@
}
</p>
<div class="overview-stats">
<div class="overview-stat">
<div class="overview-stat overview-stat--total">
<span class="overview-value">{{ totalPatents }}</span>
<span class="overview-label">Patente</span>
</div>
<div class="overview-stat">
<div class="overview-stat overview-stat--institution">
<span class="overview-value">{{
getInstitutionMatchCount()
}}</span>
<span class="overview-label">Institution</span>
</div>
<div class="overview-stat">
<div class="overview-stat overview-stat--name">
<span class="overview-value">{{ getNameMatchCount() }}</span>
<span class="overview-label">Name</span>
</div>
<div class="overview-stat">
<div class="overview-stat overview-stat--both">
<span class="overview-value">{{ getBothMatchCount() }}</span>
<span class="overview-label">Beides</span>
</div>
@@ -26,29 +26,9 @@
gap: 16px;
}
.sort-control {
display: inline-flex;
align-items: center;
gap: 6px;
.patents-toolbar-field {
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;
}
min-width: 180px;
}
.patents-content {
@@ -247,6 +227,34 @@
color: #888;
margin-top: 4px;
}
&--total {
.overview-value,
.overview-label {
color: #0b63ce;
}
}
&--institution {
.overview-value,
.overview-label {
color: #6d28d9;
}
}
&--name {
.overview-value,
.overview-label {
color: #c2410c;
}
}
&--both {
.overview-value,
.overview-label {
color: #047857;
}
}
}
.overview-hint {
@@ -1,6 +1,9 @@
import { Component, OnInit, inject } from '@angular/core';
import { CommonModule } from '@angular/common';
import { ActivatedRoute, Router, RouterLink } from '@angular/router';
import { MatFormFieldModule } from '@angular/material/form-field';
import { MatSelectModule } from '@angular/material/select';
import { MatIconModule } from '@angular/material/icon';
import { PatentsService } from '../../api/api/patents.service';
import { OrgPatentEntry } from '../../api/model/orgPatentEntry';
import {
@@ -15,7 +18,14 @@ type OrgPatentMatchTypeFilter = 'all' | 'institution' | 'name' | 'both';
@Component({
selector: 'app-institution-patents',
imports: [CommonModule, RouterLink, LoadingComponent],
imports: [
CommonModule,
RouterLink,
LoadingComponent,
MatFormFieldModule,
MatSelectModule,
MatIconModule,
],
templateUrl: './institution-patents.component.html',
styleUrl: './institution-patents.component.scss',
})
@@ -29,6 +29,11 @@
<div class="year-filter">
<div class="year-filter-top">
<span class="year-filter-label">Zeitraum</span>
<span class="year-filter-values">
{{ selectedStartYear }} bis {{ selectedEndYear }}
</span>
<button
type="button"
class="reset-range-button"
@@ -38,12 +43,6 @@
</button>
</div>
<div class="year-filter-values">
<span>{{ selectedStartYear }}</span>
<span>bis</span>
<span>{{ selectedEndYear }}</span>
</div>
<div
class="year-range-slider"
[style.--range-start]="rangeStartPercent"
@@ -33,7 +33,7 @@ h1 {
.year-filter {
width: min(285px, 100%);
padding: 8px 10px;
padding: 5px 10px;
border: 1px solid #dbe5f6;
border-radius: 10px;
background: #fbfdff;
@@ -70,20 +70,16 @@ h1 {
}
.year-filter-values {
display: flex;
align-items: center;
justify-content: center;
gap: 7px;
margin-bottom: 5px;
color: #40506f;
font-size: 12px;
font-weight: 600;
white-space: nowrap;
}
.year-filter-bounds {
display: flex;
justify-content: space-between;
margin-top: 1px;
margin-top: 0;
color: #7c88a3;
font-size: 10px;
}
@@ -94,7 +90,7 @@ h1 {
--accent: #0057ff;
position: relative;
height: 22px;
height: 16px;
}
.range-track {