51 lines
2.0 KiB
Swift
51 lines
2.0 KiB
Swift
import SwiftUI
|
|
|
|
struct BookmarkedLeadCardView: View {
|
|
let lead: Lead
|
|
let isBusy: Bool
|
|
let onOpen: () -> Void
|
|
let onBookmark: () -> Void
|
|
|
|
var body: some View {
|
|
ZStack(alignment: .topTrailing) {
|
|
Button(action: onOpen) {
|
|
VStack(alignment: .leading, spacing: 12) {
|
|
Text(lead.id)
|
|
.font(.caption)
|
|
.padding(.trailing, 36)
|
|
Text(lead.displayName)
|
|
.font(.headline)
|
|
.fixedSize(horizontal: false, vertical: true)
|
|
Text(lead.locality)
|
|
.font(.subheadline)
|
|
Label(lead.phoneNumber ?? " ", systemImage: "phone.fill")
|
|
.font(.subheadline)
|
|
.hidden()
|
|
.accessibilityHidden(true)
|
|
HStack(spacing: 12) {
|
|
LeadStatusView(offerCount: lead.offerCount,
|
|
unsignedContractCount: lead.unsignedContractCount,
|
|
highlighted: true)
|
|
.frame(maxWidth: .infinity, alignment: .leading)
|
|
Image(systemName: "chevron.forward")
|
|
.font(.caption.weight(.semibold))
|
|
.foregroundStyle(.white.opacity(0.65))
|
|
.accessibilityHidden(true)
|
|
}
|
|
}
|
|
.frame(maxWidth: .infinity, alignment: .leading)
|
|
.padding(18)
|
|
.foregroundStyle(.white)
|
|
.background(LeadOverviewStyle.blue, in: .rect(cornerRadius: 18))
|
|
.shadow(color: LeadOverviewStyle.blue.opacity(0.18), radius: 8, y: 4)
|
|
.contentShape(.rect)
|
|
}
|
|
.buttonStyle(.plain)
|
|
.accessibilityHint("Interessentendetails öffnen")
|
|
|
|
LeadBookmarkButton(isBookmarked: true, isBusy: isBusy, action: onBookmark)
|
|
.padding(6)
|
|
}
|
|
}
|
|
}
|