This commit is contained in:
2025-07-15 19:08:28 -04:00
parent 48bbbbf692
commit 2d0e327334
7 changed files with 20 additions and 23 deletions

View File

@ -74,6 +74,7 @@ fileprivate struct SplitFormView: View {
ForEach(sortedAssignments) { item in
ListItem(
title: item.exercise?.name ?? Exercise.unnamed,
text: item.setup.isEmpty ? nil : item.setup,
subtitle: "\(item.sets) × \(item.reps) × \(item.weight) lbs"
)
.swipeActions {

View File

@ -7,6 +7,7 @@ final class SplitExerciseAssignment {
var sets: Int = 0
var reps: Int = 0
var weight: Int = 0
var setup: String = ""
@Relationship(deleteRule: .nullify)
var split: Split?
@ -14,11 +15,12 @@ final class SplitExerciseAssignment {
@Relationship(deleteRule: .nullify)
var exercise: Exercise?
init(order: Int, sets: Int, reps: Int, weight: Int, split: Split, exercise: Exercise) {
init(order: Int, sets: Int, reps: Int, weight: Int, setup: String = "", split: Split, exercise: Exercise) {
self.order = order
self.sets = sets
self.reps = reps
self.weight = weight
self.setup = setup
self.split = split
self.exercise = exercise
}