Add lead workflows, PDF signing, AR projects and photo gallery integration
This commit is contained in:
51
GasTankAR/Views/Leads/Overview/LeadResultsSection.swift
Normal file
51
GasTankAR/Views/Leads/Overview/LeadResultsSection.swift
Normal file
@ -0,0 +1,51 @@
|
||||
import SwiftUI
|
||||
|
||||
struct LeadResultsSection: View {
|
||||
let leads: [Lead]
|
||||
let columns: [GridItem]
|
||||
@Binding var selection: LeadOverviewSelection
|
||||
let cardMotion: Namespace.ID
|
||||
let isBusy: Bool
|
||||
let onOpen: (Lead) -> Void
|
||||
let onBookmark: (Lead) -> Void
|
||||
|
||||
var body: some View {
|
||||
VStack(alignment: .leading, spacing: 14) {
|
||||
ViewThatFits(in: .horizontal) {
|
||||
HStack {
|
||||
heading
|
||||
Spacer(minLength: 20)
|
||||
picker.frame(width: 300)
|
||||
}
|
||||
VStack(alignment: .leading, spacing: 12) {
|
||||
heading
|
||||
picker
|
||||
}
|
||||
}
|
||||
LeadCardGrid(columnCount: columns.count) {
|
||||
ForEach(leads) { lead in
|
||||
LeadCardView(lead: lead, isBusy: isBusy,
|
||||
onOpen: { onOpen(lead) }, onBookmark: { onBookmark(lead) })
|
||||
.matchedGeometryEffect(id: lead.isBookmarked ? "regular-\(lead.id)" : "flight-\(lead.id)",
|
||||
in: cardMotion)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private var heading: some View {
|
||||
HStack(alignment: .firstTextBaseline, spacing: 8) {
|
||||
Text("Alle Interessenten").font(.title2.bold())
|
||||
Text(leads.count, format: .number).foregroundStyle(.secondary)
|
||||
}
|
||||
}
|
||||
|
||||
private var picker: some View {
|
||||
Picker("Sortierung und Filter", selection: $selection) {
|
||||
ForEach(LeadOverviewSelection.allCases) { option in
|
||||
Text(option.title).tag(option)
|
||||
}
|
||||
}
|
||||
.pickerStyle(.segmented)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user