Add lead workflows, PDF signing, AR projects and photo gallery integration
This commit is contained in:
35
GasTankAR/Views/Leads/Overview/LeadSearchField.swift
Normal file
35
GasTankAR/Views/Leads/Overview/LeadSearchField.swift
Normal file
@ -0,0 +1,35 @@
|
||||
import SwiftUI
|
||||
|
||||
struct LeadSearchField: View {
|
||||
@Binding var text: String
|
||||
var isFocused: FocusState<Bool>.Binding
|
||||
let onClear: () -> Void
|
||||
|
||||
var body: some View {
|
||||
HStack(spacing: 12) {
|
||||
Image(systemName: "magnifyingglass")
|
||||
.accessibilityHidden(true)
|
||||
TextField("Firma, Person, Ort oder LeadID", text: $text)
|
||||
.textInputAutocapitalization(.never)
|
||||
.autocorrectionDisabled()
|
||||
.submitLabel(.search)
|
||||
.focused(isFocused)
|
||||
.onSubmit { isFocused.wrappedValue = false }
|
||||
.accessibilityLabel("Interessenten suchen")
|
||||
if !text.isEmpty {
|
||||
Button(action: onClear) {
|
||||
Image(systemName: "xmark.circle.fill")
|
||||
.frame(width: 44, height: 44)
|
||||
.contentShape(.rect)
|
||||
}
|
||||
.buttonStyle(.plain)
|
||||
.accessibilityLabel("Suche löschen")
|
||||
.padding(.vertical, -10)
|
||||
}
|
||||
}
|
||||
.font(.title3)
|
||||
.foregroundStyle(.secondary)
|
||||
.padding(18)
|
||||
.background(Color.primary.opacity(0.06), in: .rect(cornerRadius: 15))
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user