Add lead workflows, PDF signing, AR projects and photo gallery integration
This commit is contained in:
57
GasTankAR/Views/Leads/Detail/LeadContactSection.swift
Normal file
57
GasTankAR/Views/Leads/Detail/LeadContactSection.swift
Normal file
@ -0,0 +1,57 @@
|
||||
import SwiftUI
|
||||
|
||||
struct LeadContactSection: View {
|
||||
let detail: LeadDetail
|
||||
|
||||
var body: some View {
|
||||
VStack(alignment: .leading, spacing: 8) {
|
||||
LeadSectionHeading(title: "KONTAKT")
|
||||
VStack(spacing: 0) {
|
||||
LeadContactRow(title: "Ansprechpartner", value: detail.contactDescription,
|
||||
icon: "person.fill", color: .gray)
|
||||
Divider().padding(.leading, 56)
|
||||
LeadContactRow(title: "Telefon", value: detail.lead.phoneNumber,
|
||||
icon: "phone.fill", color: .green)
|
||||
Divider().padding(.leading, 56)
|
||||
LeadContactRow(title: "Mobil", value: detail.mobile,
|
||||
icon: "iphone", color: .green)
|
||||
Divider().padding(.leading, 56)
|
||||
LeadContactRow(title: "E-Mail", value: detail.email,
|
||||
icon: "envelope.fill", color: .blue)
|
||||
Divider().padding(.leading, 56)
|
||||
LeadContactRow(title: "Anschrift",
|
||||
value: [detail.lead.address.street, detail.lead.locality].compactMap { $0 }.joined(separator: "\n"),
|
||||
icon: "mappin", color: .red)
|
||||
}
|
||||
.background(LeadDetailStyle.card, in: .rect(cornerRadius: 12))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private struct LeadContactRow: View {
|
||||
let title: LocalizedStringKey
|
||||
let value: String?
|
||||
let icon: String
|
||||
let color: Color
|
||||
@ScaledMetric(relativeTo: .body) private var iconSize: CGFloat = 30
|
||||
|
||||
var body: some View {
|
||||
HStack(spacing: 12) {
|
||||
Image(systemName: icon)
|
||||
.font(.body.weight(.semibold))
|
||||
.foregroundStyle(.white)
|
||||
.frame(width: iconSize, height: iconSize)
|
||||
.background(color, in: .rect(cornerRadius: 7))
|
||||
.accessibilityHidden(true)
|
||||
VStack(alignment: .leading, spacing: 3) {
|
||||
Text(title).font(.caption).foregroundStyle(.secondary)
|
||||
Text(value ?? "Nicht hinterlegt")
|
||||
.font(.body)
|
||||
.foregroundStyle(value == nil ? .secondary : .primary)
|
||||
.textSelection(.enabled)
|
||||
}
|
||||
Spacer(minLength: 0)
|
||||
}
|
||||
.padding(.horizontal, 16).padding(.vertical, 11)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user