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"`
|
||||
Description *string `db:"description" json:"description,omitempty"`
|
||||
Jurisdiction *string `db:"jurisdiction" json:"jurisdiction,omitempty"`
|
||||
Category *string `db:"category" json:"category,omitempty"`
|
||||
DefaultColor string `db:"default_color" json:"default_color"`
|
||||
SortOrder int `db:"sort_order" json:"sort_order"`
|
||||
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>
|
||||
{(() => {
|
||||
const grouped = new Map<string, ProceedingType[]>();
|
||||
for (const pt of proceedingTypes ?? []) {
|
||||
const key = pt.jurisdiction ?? "Sonstige";
|
||||
if (!grouped.has(key)) grouped.set(key, []);
|
||||
grouped.get(key)!.push(pt);
|
||||
}
|
||||
const labels: Record<string, string> = {
|
||||
UPC: "UPC-Verfahren",
|
||||
const types = proceedingTypes ?? [];
|
||||
const categoryLabels: Record<string, string> = {
|
||||
hauptverfahren: "Hauptverfahren",
|
||||
im_verfahren: "Verfahren im Verfahren",
|
||||
rechtsbehelf: "Rechtsbehelfe",
|
||||
};
|
||||
const jurisdictionLabels: Record<string, string> = {
|
||||
UPC: "UPC",
|
||||
DE: "Deutsche Patentverfahren",
|
||||
};
|
||||
return Array.from(grouped.entries()).map(([jurisdiction, types]) => (
|
||||
<optgroup key={jurisdiction} label={labels[jurisdiction] ?? jurisdiction}>
|
||||
{types.map((pt) => (
|
||||
// Group by jurisdiction + category
|
||||
const groups: { key: string; label: string; items: typeof types }[] = [];
|
||||
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}>
|
||||
{pt.name} ({pt.code})
|
||||
{pt.name}
|
||||
</option>
|
||||
))}
|
||||
</optgroup>
|
||||
|
||||
@@ -197,6 +197,7 @@ export interface ProceedingType {
|
||||
name: string;
|
||||
description?: string;
|
||||
jurisdiction?: string;
|
||||
category?: string;
|
||||
default_color: string;
|
||||
sort_order: number;
|
||||
is_active: boolean;
|
||||
|
||||
Reference in New Issue
Block a user