Manager: remove repasser_en_instruction
This commit is contained in:
parent
b2c987ff0d
commit
c7e10fc43f
3 changed files with 0 additions and 14 deletions
|
@ -20,16 +20,6 @@ module Manager
|
|||
# Custom actions
|
||||
#
|
||||
|
||||
def change_state_to_instruction
|
||||
dossier = Dossier.find(params[:id])
|
||||
dossier.update(state: Dossier.states.fetch(:en_instruction), processed_at: nil, motivation: nil)
|
||||
dossier.attestation&.destroy
|
||||
logger.info("Le dossier #{dossier.id} est repassé en instruction par #{current_administration.email}")
|
||||
flash[:notice] = "Le dossier #{dossier.id} est repassé en instruction"
|
||||
DossierMailer.notify_revert_to_instruction(dossier).deliver_later
|
||||
redirect_to manager_dossier_path(dossier)
|
||||
end
|
||||
|
||||
def hide
|
||||
dossier = Dossier.find(params[:id])
|
||||
deleted_dossier = dossier.hide!(current_administration)
|
||||
|
|
|
@ -28,9 +28,6 @@ as well as a link to its edit page.
|
|||
</h1>
|
||||
|
||||
<div>
|
||||
<% if dossier.termine? %>
|
||||
<%= link_to 'Repasser en instruction', change_state_to_instruction_manager_dossier_path(dossier), method: :post, class: 'button', data: { confirm: "Repasser en instruction ?" } %>
|
||||
<% end %>
|
||||
<% if dossier.hidden_at.nil? %>
|
||||
<%= link_to 'Supprimer le dossier', hide_manager_dossier_path(dossier), method: :post, class: 'button', data: { confirm: "Confirmez vous la suppression du dossier ?" } %>
|
||||
<% end %>
|
||||
|
|
|
@ -15,7 +15,6 @@ Rails.application.routes.draw do
|
|||
end
|
||||
|
||||
resources :dossiers, only: [:index, :show] do
|
||||
post 'change_state_to_instruction', on: :member
|
||||
post 'hide', on: :member
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue