Make Procedure state consistent after switching types de champ order
Fixes an issue where, after clicking the "move champ up" button, the new form is rendered with an incoherent order.
This commit is contained in:
parent
9466442aff
commit
d77530c461
2 changed files with 17 additions and 10 deletions
|
@ -176,6 +176,7 @@ class Procedure < ApplicationRecord
|
|||
else
|
||||
list[index_of_first_element].update(order_place: index_of_first_element + 1)
|
||||
list[index_of_first_element + 1].update(order_place: index_of_first_element)
|
||||
reload
|
||||
|
||||
true
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue