Add Quantity #reparent action

This commit is contained in:
2025-01-14 15:02:38 +01:00
parent 4b453c1a82
commit 644d1f4b9a
5 changed files with 34 additions and 8 deletions

View File

@@ -0,0 +1,9 @@
<% @self_and_progenies.each do |q| %>
<%= turbo_stream.remove q %>
<% end %>
<% @previous_ancestors.union(@ancestors).map do |ancestor| %>
<%= turbo_stream.replace ancestor %>
<% end %>
<% @self_and_progenies.each do |q| %>
<%= @before.nil? ? turbo_stream.append(:quantities, q) : turbo_stream.before(@before, q) %>
<% end %>