iOS: Diagramm-Einstellungen der Web-Karten beim Spiegeln uebernehmen
Die gespiegelte Web-Uebersicht ignorierte bisher die Karten-Props der Diagramme. Jetzt werden uebernommen: - Ablauf-Ring: 'Ohne MHD einbeziehen' (mit_ohne_mhd) - Kategorien-Ring: 'Detailansicht' (alle einzeln statt 'Uebrige') (detail) - Kategorien-Ring: 'Kategorie-Tiefe' (tiefe -> /by-category?depth=N) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -103,7 +103,10 @@ struct MirrorOverview: View {
|
||||
ForEach(karten) { karte in
|
||||
Section {
|
||||
DashboardCardView(type: karte.type, productId: karte.props?.productId,
|
||||
stand: stand) { stand += 1 }
|
||||
stand: stand,
|
||||
detail: karte.props?.detail ?? false,
|
||||
tiefe: karte.props?.tiefe.flatMap { Int($0) },
|
||||
mitOhneMhd: karte.props?.mitOhneMhd ?? true) { stand += 1 }
|
||||
} header: {
|
||||
Text(CardCatalog.titel(karte.type))
|
||||
}
|
||||
@@ -174,6 +177,11 @@ struct DashboardCardView: View {
|
||||
let type: String
|
||||
let productId: Int?
|
||||
let stand: Int
|
||||
// Aus den Web-Karten-Einstellungen (props). Standardwerte = bisheriges Verhalten,
|
||||
// damit die lokale App-Übersicht unverändert bleibt.
|
||||
var detail: Bool = false
|
||||
var tiefe: Int? = nil
|
||||
var mitOhneMhd: Bool = true
|
||||
let onChange: () -> Void
|
||||
|
||||
var body: some View {
|
||||
@@ -198,7 +206,8 @@ struct DashboardCardView: View {
|
||||
ProductTimelineChart(productId: productId, stand: stand)
|
||||
case "expiry-donut", "category-donut", "category-bars",
|
||||
"stock-timeline", "activity-timeline":
|
||||
ChartCardView(type: type, stand: stand)
|
||||
ChartCardView(type: type, stand: stand,
|
||||
detail: detail, tiefe: tiefe, mitOhneMhd: mitOhneMhd)
|
||||
default:
|
||||
Text("Unbekannte Karte „\(type)“.")
|
||||
.font(.caption).foregroundStyle(.secondary)
|
||||
|
||||
Reference in New Issue
Block a user