diff --git a/app/models/move.rb b/app/models/move.rb
index ac1ea21a9..b82889823 100644
--- a/app/models/move.rb
+++ b/app/models/move.rb
@@ -80,10 +80,12 @@ def executed?
executed_at?
end
- def previous_moves
- return nil unless step&.previous_step
+ def previous_step_moves
+ step&.previous_step&.moves
+ end
- step.previous_step.moves
+ def previous_moves
+ moves_project&.moves&.where(step: step.previous_steps)
end
def refresh_prev_data
diff --git a/app/views/moves/index.html.erb b/app/views/moves/index.html.erb
index 7f290e032..112c91275 100644
--- a/app/views/moves/index.html.erb
+++ b/app/views/moves/index.html.erb
@@ -31,18 +31,24 @@
<%= render List::DataTableComponent.new(decorate(@moves)) do |table| %>
<% table.with_column(Server.model_name.human) do |move| %>
<%= link_to move.moveable, server_path(move.moveable), data: { turbo_frame: :_top } %>
+
+ <%= render move.decorated.status_to_badge_component %>
+
+
<% unless @moves_project.archived? || move.executed? %>
+ <%= link_to "Modifier les connexions", "#",
+ class: "btn btn-outline-primary",
+ aria: { hidden: true } %>
<%= link_to t("action.execute"),
execute_moves_project_step_move_path(@moves_project_step, move),
title: t(".action.execute_move"),
@@ -148,13 +171,6 @@
- <% if @moves_project.unarchived? %>
- <%= link_to t(".edit_connections"),
- frame_moves_project_moves_project_step_path(@moves_project, @moves_project_step, frame),
- class: "btn btn-outline-primary text-nowrap",
- data: { turbo_frame: :_top } %>
- <% end %>
-
<%= link_to print_moves_project_moves_project_step_path(@moves_project, @moves_project_step, frame),
class: "btn btn-sm btn-outline-primary",
data: { turbo_frame: :_top },
diff --git a/app/views/moves_projects/show.html.erb b/app/views/moves_projects/show.html.erb
index 244e84098..19c3b71b3 100644
--- a/app/views/moves_projects/show.html.erb
+++ b/app/views/moves_projects/show.html.erb
@@ -90,24 +90,6 @@
<% end %>
<% end %>
-
- <% if @moves_project.steps.any? %>
- <%= turbo_frame_tag(
- dom_id(Move, :frames),
- loading: :lazy,
- src: moves_project_step_moves_path(@moves_project.steps.last),
- class: "pt-4",
- ) do %>
-
- <%= t("has_many_turbo_frame_component.loading") %>
-
-
- <% end %>
- <% else %>
-
- <%= render CardEmptyDataComponent.new %>
-
- <% end %>
|