feat: 15 UPC proceeding types in 3 groups + category field
Added 10 new UPC types: DNI, EPO, AMD, CCI, EVP, DAM, COS, REH, DEF, RST. Grouped as: Hauptverfahren / Verfahren im Verfahren / Rechtsbehelfe. Frontend dropdown shows sub-groups within jurisdiction. German names throughout.
This commit is contained in:
1
.m/inbox_lastread
Normal file
1
.m/inbox_lastread
Normal file
@@ -0,0 +1 @@
|
|||||||
|
2026-03-30T17:23:53+02:00
|
||||||
0
backend/.m/spawn.lock
Normal file
0
backend/.m/spawn.lock
Normal file
@@ -39,6 +39,7 @@ type ProceedingType struct {
|
|||||||
Name string `db:"name" json:"name"`
|
Name string `db:"name" json:"name"`
|
||||||
Description *string `db:"description" json:"description,omitempty"`
|
Description *string `db:"description" json:"description,omitempty"`
|
||||||
Jurisdiction *string `db:"jurisdiction" json:"jurisdiction,omitempty"`
|
Jurisdiction *string `db:"jurisdiction" json:"jurisdiction,omitempty"`
|
||||||
|
Category *string `db:"category" json:"category,omitempty"`
|
||||||
DefaultColor string `db:"default_color" json:"default_color"`
|
DefaultColor string `db:"default_color" json:"default_color"`
|
||||||
SortOrder int `db:"sort_order" json:"sort_order"`
|
SortOrder int `db:"sort_order" json:"sort_order"`
|
||||||
IsActive bool `db:"is_active" json:"is_active"`
|
IsActive bool `db:"is_active" json:"is_active"`
|
||||||
|
|||||||
BIN
backend/server
Executable file
BIN
backend/server
Executable file
Binary file not shown.
@@ -86,21 +86,37 @@ export function DeadlineCalculator() {
|
|||||||
>
|
>
|
||||||
<option value="">Bitte wählen...</option>
|
<option value="">Bitte wählen...</option>
|
||||||
{(() => {
|
{(() => {
|
||||||
const grouped = new Map<string, ProceedingType[]>();
|
const types = proceedingTypes ?? [];
|
||||||
for (const pt of proceedingTypes ?? []) {
|
const categoryLabels: Record<string, string> = {
|
||||||
const key = pt.jurisdiction ?? "Sonstige";
|
hauptverfahren: "Hauptverfahren",
|
||||||
if (!grouped.has(key)) grouped.set(key, []);
|
im_verfahren: "Verfahren im Verfahren",
|
||||||
grouped.get(key)!.push(pt);
|
rechtsbehelf: "Rechtsbehelfe",
|
||||||
}
|
};
|
||||||
const labels: Record<string, string> = {
|
const jurisdictionLabels: Record<string, string> = {
|
||||||
UPC: "UPC-Verfahren",
|
UPC: "UPC",
|
||||||
DE: "Deutsche Patentverfahren",
|
DE: "Deutsche Patentverfahren",
|
||||||
};
|
};
|
||||||
return Array.from(grouped.entries()).map(([jurisdiction, types]) => (
|
// Group by jurisdiction + category
|
||||||
<optgroup key={jurisdiction} label={labels[jurisdiction] ?? jurisdiction}>
|
const groups: { key: string; label: string; items: typeof types }[] = [];
|
||||||
{types.map((pt) => (
|
const seen = new Set<string>();
|
||||||
|
for (const pt of types) {
|
||||||
|
const j = pt.jurisdiction ?? "Sonstige";
|
||||||
|
const c = (pt as Record<string, unknown>).category as string ?? "hauptverfahren";
|
||||||
|
const key = `${j}::${c}`;
|
||||||
|
if (!seen.has(key)) {
|
||||||
|
seen.add(key);
|
||||||
|
const jLabel = jurisdictionLabels[j] ?? j;
|
||||||
|
const cLabel = categoryLabels[c] ?? c;
|
||||||
|
const label = j === "DE" ? jLabel : `${jLabel} — ${cLabel}`;
|
||||||
|
groups.push({ key, label, items: [] });
|
||||||
|
}
|
||||||
|
groups.find((g) => g.key === key)!.items.push(pt);
|
||||||
|
}
|
||||||
|
return groups.map((g) => (
|
||||||
|
<optgroup key={g.key} label={g.label}>
|
||||||
|
{g.items.map((pt) => (
|
||||||
<option key={pt.id} value={pt.code}>
|
<option key={pt.id} value={pt.code}>
|
||||||
{pt.name} ({pt.code})
|
{pt.name}
|
||||||
</option>
|
</option>
|
||||||
))}
|
))}
|
||||||
</optgroup>
|
</optgroup>
|
||||||
|
|||||||
@@ -197,6 +197,7 @@ export interface ProceedingType {
|
|||||||
name: string;
|
name: string;
|
||||||
description?: string;
|
description?: string;
|
||||||
jurisdiction?: string;
|
jurisdiction?: string;
|
||||||
|
category?: string;
|
||||||
default_color: string;
|
default_color: string;
|
||||||
sort_order: number;
|
sort_order: number;
|
||||||
is_active: boolean;
|
is_active: boolean;
|
||||||
|
|||||||
Reference in New Issue
Block a user