PDF BOM export

This commit is contained in:
Stefan Lange-Hegermann
2025-11-07 11:18:03 +01:00
parent ced06f9eb6
commit b11d627fdb
209 changed files with 2242 additions and 20663 deletions

View File

@@ -159,8 +159,10 @@ struct SystemOverviewView: View {
goalHours: nil,
progressFraction: bomCompletionFraction,
hasValue: bomItemsCount > 0,
action: onShowBillOfMaterials
action: onShowBillOfMaterials,
accessibilityIdentifier: "system-bom-button"
)
}
.padding(.top, 4)
}
@@ -190,7 +192,8 @@ struct SystemOverviewView: View {
goalHours: Double?,
progressFraction: Double?,
hasValue: Bool,
action: (() -> Void)? = nil
action: (() -> Void)? = nil,
accessibilityIdentifier: String? = nil
) -> some View {
let content = VStack(alignment: .leading, spacing: 10) {
HStack(alignment: .center, spacing: 12) {
@@ -240,12 +243,28 @@ struct SystemOverviewView: View {
let paddedContent = content
.padding(.horizontal, 4)
.frame(maxWidth: .infinity, alignment: .leading)
.contentShape(Rectangle())
if let action {
Button(action: action) {
paddedContent
if let accessibilityIdentifier {
Button(action: action) {
paddedContent
}
.buttonStyle(.plain)
.accessibilityIdentifier(accessibilityIdentifier)
.accessibilityLabel(title)
.accessibilityAddTraits(.isButton)
.contentShape(Rectangle())
} else {
Button(action: action) {
paddedContent
}
.buttonStyle(.plain)
.accessibilityLabel(title)
.accessibilityAddTraits(.isButton)
.contentShape(Rectangle())
}
.buttonStyle(.plain)
} else {
paddedContent
}