Add lead workflows, PDF signing, AR projects and photo gallery integration

This commit is contained in:
Dennis Nemec
2026-11-08 17:49:39 +01:00
parent a343bde741
commit 8d18873412
82 changed files with 6401 additions and 34 deletions

View File

@ -0,0 +1,69 @@
import SwiftUI
struct LeadOverviewStateView: View {
let error: LeadError?
let isLoading: Bool
let isSearching: Bool
let onRetry: () -> Void
let onReset: () -> Void
let onLogin: () -> Void
var body: some View {
VStack(spacing: 16) {
if isLoading {
ProgressView("Interessenten werden geladen …")
.padding(40)
} else if let error {
ContentUnavailableView {
Label("Interessenten nicht verfügbar", systemImage: "exclamationmark.icloud")
} description: {
Text(error.message)
} actions: {
if error == .unauthorized {
Button("Erneut anmelden", action: onLogin)
} else if error.allowsRetry {
Button("Erneut versuchen", action: onRetry)
}
if isSearching {
Button("Suche zurücksetzen", action: onReset)
}
}
} else {
ContentUnavailableView {
Label(isSearching ? "Keine Interessenten gefunden" : "Noch keine Interessenten",
systemImage: isSearching ? "magnifyingglass" : "person.2")
} description: {
Text(isSearching ? "Passe deine Suche oder den Filter an." : "Dir sind aktuell keine Interessenten zugeordnet.")
} actions: {
if isSearching { Button("Suche zurücksetzen", action: onReset) }
}
}
}
.frame(maxWidth: .infinity)
}
}
struct LeadErrorBanner: View {
let error: LeadError
let onRetry: () -> Void
let onLogin: () -> Void
var body: some View {
VStack(alignment: .leading, spacing: 10) {
Label {
Text(error.message)
} icon: {
Image(systemName: "exclamationmark.triangle")
}
if error == .unauthorized {
Button("Erneut anmelden", action: onLogin)
} else if error.allowsRetry {
Button("Übersicht aktualisieren", action: onRetry)
}
}
.font(.callout)
.frame(maxWidth: .infinity, alignment: .leading)
.padding()
.background(Color.orange.opacity(0.12), in: .rect(cornerRadius: 12))
}
}