Add lead workflows, PDF signing, AR projects and photo gallery integration
This commit is contained in:
@ -1,23 +1,33 @@
|
||||
//
|
||||
// ContentView.swift
|
||||
// GasTankAR
|
||||
//
|
||||
// Created by Dennis Nemec on 19.08.26.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
import SwiftData
|
||||
|
||||
struct ContentView: View {
|
||||
// Composition root: the server stubs are replaced here when APIs are available.
|
||||
private let loginUseCase: any LoginUseCase = DefaultLoginUseCase(
|
||||
authenticationService: StubAuthenticationService()
|
||||
)
|
||||
@State private var leadService = StubLeadRemoteService(listDelay: .milliseconds(800))
|
||||
@State private var detailRepository = DefaultLeadDetailRepository(remoteService: StubLeadDetailRemoteService())
|
||||
@State private var session: LoginSession?
|
||||
|
||||
var body: some View {
|
||||
ProjectListView()
|
||||
.modelContainer(for: Project.self)
|
||||
if let session {
|
||||
NavigationStack {
|
||||
LeadOverviewView(
|
||||
session: session,
|
||||
repository: DefaultLeadRepository(remoteService: leadService),
|
||||
detailRepository: detailRepository
|
||||
) {
|
||||
self.session = nil
|
||||
}
|
||||
}
|
||||
} else {
|
||||
LoginView(loginUseCase: loginUseCase) {
|
||||
session = $0
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
#Preview {
|
||||
ProjectListView()
|
||||
.modelContainer(PreviewSupport.container)
|
||||
ContentView()
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user