iOS: getrennte Lebensmittel/Gegenstaende-Listen + anklickbarer Verlauf
Listen-Tab: zwei halbe Kacheln "Lebensmittel" und "Gegenstaende" (ProductListView mit fixedType, clientseitig ueber isObject gefiltert wie im Web); Neuanlage uebernimmt den Typ. Einzelstuecke bleiben unveraendert (reine Gegenstands-Welt). Verlauf und "Letzte Bewegungen" auf der Startseite: Tippen auf eine Bewegung oeffnet ueber den neuen Lader ProductByIdView das jeweilige Produkt. Der artikel-eigene Verlauf bleibt ohne Link. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -169,11 +169,19 @@ struct ListsTabView: View {
|
||||
var body: some View {
|
||||
NavigationStack {
|
||||
VStack(spacing: 16) {
|
||||
NavigationLink {
|
||||
ProductListView()
|
||||
} label: {
|
||||
ActionTile(title: "Produkte", subtitle: "Suchen, ansehen und bearbeiten",
|
||||
systemImage: "shippingbox")
|
||||
// Getrennte Produktlisten wie im Web: Lebensmittel und Gegenstände
|
||||
// nebeneinander als halbbreite Kacheln.
|
||||
HStack(spacing: 16) {
|
||||
NavigationLink {
|
||||
ProductListView(fixedType: "food")
|
||||
} label: {
|
||||
CompactTile(title: "Lebensmittel", systemImage: "fork.knife")
|
||||
}
|
||||
NavigationLink {
|
||||
ProductListView(fixedType: "object")
|
||||
} label: {
|
||||
CompactTile(title: "Gegenstände", systemImage: "shippingbox")
|
||||
}
|
||||
}
|
||||
NavigationLink {
|
||||
ItemListView()
|
||||
@@ -207,6 +215,29 @@ struct ListsTabView: View {
|
||||
}
|
||||
}
|
||||
|
||||
/// Kompakte, halbbreite Kachel (Symbol oben, Titel darunter) für zwei
|
||||
/// nebeneinanderstehende Einträge – z.B. Lebensmittel/Gegenstände.
|
||||
struct CompactTile: View {
|
||||
let title: String
|
||||
let systemImage: String
|
||||
|
||||
var body: some View {
|
||||
VStack(spacing: 8) {
|
||||
Image(systemName: systemImage)
|
||||
.font(.title2)
|
||||
.frame(width: 44, height: 44)
|
||||
.background(Color.accentColor.opacity(0.15))
|
||||
.clipShape(RoundedRectangle(cornerRadius: 10))
|
||||
Text(title).font(.headline)
|
||||
}
|
||||
.frame(maxWidth: .infinity)
|
||||
.padding()
|
||||
.background(Color(.secondarySystemBackground))
|
||||
.clipShape(RoundedRectangle(cornerRadius: 12))
|
||||
.foregroundStyle(.primary)
|
||||
}
|
||||
}
|
||||
|
||||
struct ActionTile: View {
|
||||
let title: String
|
||||
let subtitle: String
|
||||
|
||||
Reference in New Issue
Block a user