Initial commit for first version of project

This commit is contained in:
Dennis Nemec
2026-09-02 20:54:36 +02:00
parent 3d9f1ab6bc
commit 992bb32025
56 changed files with 5139 additions and 31 deletions

View File

@ -0,0 +1,66 @@
//
// ProjectDetailView.swift
// GasTankAR
//
// Created by Dennis Nemec on 25.08.26.
//
import SwiftUI
import SwiftData
struct ProjectDetailView: View {
@Bindable var project: Project
var body: some View {
TabView {
detailsTab
.tabItem { Label("Details", systemImage: "info.circle") }
GalleryView(project: project)
.tabItem { Label("Galerie", systemImage: "photo.on.rectangle") }
DocuframeView(project: project)
.tabItem { Label("DOCUframe", systemImage: "arrow.up.doc.on.clipboard") }
}
.navigationTitle(project.customerName)
.navigationBarTitleDisplayMode(.inline)
}
private var detailsTab: some View {
List {
Section("Projektdaten") {
LabeledContent("Kunde", value: project.customerName)
LabeledContent("Lead-ID", value: project.leadID)
LabeledContent(
"Erstellt am",
value: project.creationDate.formatted(.dateTime.day().month().year())
)
}
Section("Tankauswahl") {
TankEditor(tank: $project.tank)
}
}
.safeAreaInset(edge: .bottom) {
NavigationLink {
ARExperienceView(project: project)
} label: {
Label("AR-Modus starten", systemImage: "arkit")
.font(.headline)
.frame(maxWidth: .infinity)
.frame(height: 50)
}
.buttonStyle(.borderedProminent)
.padding()
}
}
}
#Preview {
let sample = PreviewSupport.singleProjectContainer()
return NavigationStack {
ProjectDetailView(project: sample.project)
}
.modelContainer(sample.container)
}