iOS: Menge-je-Lagerort-Sheet an den Abschnitt haengen (Flackern behoben)
Das Hinzufuegen/Umlagern/Entfernen-Sheet hing an der umschliessenden Group; bei manchen iOS-Versionen ging es dadurch kurz auf und sofort wieder zu. Jetzt am Abschnitt selbst (wie bei den Einzelstuecken), was stabil praesentiert. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -63,16 +63,8 @@ struct ObjectStockSection: View {
|
|||||||
.buttonStyle(.borderless)
|
.buttonStyle(.borderless)
|
||||||
.font(.callout)
|
.font(.callout)
|
||||||
}
|
}
|
||||||
|
// Sheet an den Abschnitt hängen (nicht an die Group) – sonst ging das
|
||||||
if let removals, !removals.stats.isEmpty {
|
// Fenster bei manchen iOS-Versionen kurz auf und sofort wieder zu.
|
||||||
Section("Bereits entnommen") {
|
|
||||||
ForEach(removals.stats) { s in
|
|
||||||
LabeledContent(RemovalReasons.label(s.reason),
|
|
||||||
value: "\(formatAmount(s.quantity)) (\(s.count)×)")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.sheet(item: $sheet) { welche in
|
.sheet(item: $sheet) { welche in
|
||||||
NavigationStack {
|
NavigationStack {
|
||||||
switch welche {
|
switch welche {
|
||||||
@@ -88,6 +80,16 @@ struct ObjectStockSection: View {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if let removals, !removals.stats.isEmpty {
|
||||||
|
Section("Bereits entnommen") {
|
||||||
|
ForEach(removals.stats) { s in
|
||||||
|
LabeledContent(RemovalReasons.label(s.reason),
|
||||||
|
value: "\(formatAmount(s.quantity)) (\(s.count)×)")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
.task(id: product.id) { await loadRemovals() }
|
.task(id: product.id) { await loadRemovals() }
|
||||||
.onChange(of: lots) { _ in Task { await loadRemovals() } }
|
.onChange(of: lots) { _ in Task { await loadRemovals() } }
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user