Remove “Outil de changement d'état d'un dossier”

This commit is contained in:
Paul Chavard 2018-11-06 18:44:10 +01:00
parent b9325147d1
commit 624b442cd7
5 changed files with 0 additions and 63 deletions

View file

@ -1,19 +0,0 @@
class Admin::ChangeDossierStateController < AdminController
def index
@dossier = Dossier.new
end
def change
@dossier = Dossier.find(params[:dossier][:id])
@dossier.update state: params[:next_state]
end
def check
@dossier = Dossier.find(params[:dossier][:id])
if @dossier.procedure.administrateur.email != current_administrateur.email
flash.alert = 'Dossier introuvable'
return redirect_to admin_change_dossier_state_path
end
end
end

View file

@ -1,16 +0,0 @@
.center
%h2 Outil de changement d'état d'un dossier
%h4.text-success
Changement effectué
= form_for @dossier, url: 'change_dossier_state', action: :put do |f|
Dossier ID :
= @dossier.id
%br
État :
= @dossier.decorate.display_state
%br
%br
= link_to 'Réaliser un autre dossier', 'change_dossier_state'

View file

@ -1,17 +0,0 @@
.center
%h2 Outil de changement d'état d'un dossier
= form_for @dossier, url: 'change_dossier_state', action: :put do |f|
Dossier ID :
= @dossier.id
= f.hidden_field :id
%br
État :
= @dossier.decorate.display_state
%br
État souhaité :
%select{ id: :next_state, name: :next_state }
- Dossier.states.each do |state|
%option{ value: state[0] }
= DossierDecorator.case_state_fr state[1]
= f.submit 'Valider'

View file

@ -1,7 +0,0 @@
.center
%h2 Outil de changement d'état d'un dossier
= form_for @dossier, url: 'change_dossier_state', action: :post do |f|
Dossier ID
= f.text_field :id
= f.submit 'Vérifier état'

View file

@ -173,10 +173,6 @@ Rails.application.routes.draw do
get 'procedures/path_list' => 'procedures#path_list'
get 'procedures/available' => 'procedures#check_availability'
get 'change_dossier_state' => 'change_dossier_state#index'
post 'change_dossier_state' => 'change_dossier_state#check'
patch 'change_dossier_state' => 'change_dossier_state#change'
resources :procedures do
collection do
get 'new_from_existing' => 'procedures#new_from_existing', as: :new_from_existing