Bestellschein-Tab, Favoriten je Benutzer (Scheine + Kabel), Kabelsuche, Loxone Link Kabel Cat.7
Build and Deploy / version (push) Successful in 1s
Build and Deploy / build (push) Successful in 14s
Build and Deploy / deploy (push) Successful in 1s

- Neuer Tab Bestellschein: gleiches Datenmodell/Funktionen wie Materialschein (Projekt.typ)
- Favoriten serverseitig pro Benutzer (Tabelle favoriten, /api/favoriten)
- Kabelauswahl mit Suchfeld + Favoriten (KabelSelect), Suche/Favoriten in der Referenztabelle
- Scheinsuche: mehrere Suchbegriffe, auch Notiz/Datum; Filter Favoriten

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Fidelis Huber
2026-10-09 20:04:52 +02:00
co-authored by Claude Sonnet 5.5
parent 9bd8ebeeb8
commit b6227eb4cf
20 changed files with 409 additions and 93 deletions
+22
View File
@@ -13,6 +13,12 @@ enum ProjektStatus {
Abgeschlossen
}
// Materialschein und Bestellschein teilen sich dieselbe Struktur (Kopfdaten + Positionen).
enum ScheinTyp {
Material
Bestell
}
model Projekt {
id String @id @default(cuid())
titel String
@@ -22,10 +28,12 @@ model Projekt {
monteur String?
notiz String?
status ProjektStatus @default(Aktiv)
typ ScheinTyp @default(Material)
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
material Material[]
@@index([typ])
@@map("projekte")
}
@@ -56,3 +64,17 @@ model User {
@@map("users")
}
// Favoriten je Benutzer (Microsoft-Konto per oid, lokales Konto per Benutzername).
// art = SCHEIN (refId = Projekt-ID) oder KABEL (refId = Kabelname aus der Kabelliste).
model Favorit {
id String @id @default(cuid())
userKey String
art String
refId String
createdAt DateTime @default(now())
@@unique([userKey, art, refId])
@@index([userKey])
@@map("favoriten")
}