diff --git a/lib/gym_live_web/live/workouts/edit_workout.ex b/lib/gym_live_web/live/workouts/edit_workout.ex index 2b0aef6..aa863c7 100644 --- a/lib/gym_live_web/live/workouts/edit_workout.ex +++ b/lib/gym_live_web/live/workouts/edit_workout.ex @@ -32,7 +32,7 @@ defmodule GymLiveWeb.Live.Workouts.EditWorkout do def render(assigns) do ~H""" -
+
<.modal id="cancel-modal">

Are you sure you want to abandon your workout? Your workout data will be lost. @@ -53,57 +53,78 @@ defmodule GymLiveWeb.Live.Workouts.EditWorkout do

-
+

<%= @workout.title %>

<%= Time.format_time(@seconds) %>

-
-
-
- <.sets_table :if={length(@workout.sets) > 0} workout={@workout} /> - <.set_form form={@form} /> -
- +
+
+
+
+

+ Add each exercise set as you complete them. Select an exercise, enter the weight and reps, then click "Add set". +

+
+ <.set_form form={@form} /> +
+ +
0} class="mt-6 bg-white shadow-sm rounded-lg mx-4"> + <.sets_table workout={@workout} />
+ +
+ + +
""" end def sets_table(assigns) do ~H""" -
- - +
+
+ - - - - + + + + - - - - - - + + + + +
ExerciseWeightRepsAction + Exercise + + Weight + + Reps + + Actions +
<%= Exercises.get_exercise_name(set.exercise) %><%= set.weight %><%= set.reps %> +
+ <%= Exercises.get_exercise_name(set.exercise) %> + <%= set.weight %><%= set.reps %> +
+ +