diff --git a/.m/inbox_lastread b/.m/inbox_lastread new file mode 100644 index 0000000..23f19c3 --- /dev/null +++ b/.m/inbox_lastread @@ -0,0 +1 @@ +2026-03-30T17:23:53+02:00 \ No newline at end of file diff --git a/backend/.m/spawn.lock b/backend/.m/spawn.lock new file mode 100644 index 0000000..e69de29 diff --git a/backend/internal/models/deadline_rule.go b/backend/internal/models/deadline_rule.go index 9c62076..ec98cf7 100644 --- a/backend/internal/models/deadline_rule.go +++ b/backend/internal/models/deadline_rule.go @@ -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"` diff --git a/backend/server b/backend/server new file mode 100755 index 0000000..0c2e345 Binary files /dev/null and b/backend/server differ diff --git a/frontend/src/components/deadlines/DeadlineCalculator.tsx b/frontend/src/components/deadlines/DeadlineCalculator.tsx index c932f6f..c855ce3 100644 --- a/frontend/src/components/deadlines/DeadlineCalculator.tsx +++ b/frontend/src/components/deadlines/DeadlineCalculator.tsx @@ -86,21 +86,37 @@ export function DeadlineCalculator() { > {(() => { - const grouped = new Map(); - 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 = { - UPC: "UPC-Verfahren", + const types = proceedingTypes ?? []; + const categoryLabels: Record = { + hauptverfahren: "Hauptverfahren", + im_verfahren: "Verfahren im Verfahren", + rechtsbehelf: "Rechtsbehelfe", + }; + const jurisdictionLabels: Record = { + UPC: "UPC", DE: "Deutsche Patentverfahren", }; - return Array.from(grouped.entries()).map(([jurisdiction, types]) => ( - - {types.map((pt) => ( + // Group by jurisdiction + category + const groups: { key: string; label: string; items: typeof types }[] = []; + const seen = new Set(); + for (const pt of types) { + const j = pt.jurisdiction ?? "Sonstige"; + const c = (pt as Record).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) => ( + + {g.items.map((pt) => ( ))} diff --git a/frontend/src/lib/types.ts b/frontend/src/lib/types.ts index 18ebe67..72fcc65 100644 --- a/frontend/src/lib/types.ts +++ b/frontend/src/lib/types.ts @@ -197,6 +197,7 @@ export interface ProceedingType { name: string; description?: string; jurisdiction?: string; + category?: string; default_color: string; sort_order: number; is_active: boolean;