make and expert notifiable (controller and routes)
This commit is contained in:
parent
7b4ec486ec
commit
9492b09f85
2 changed files with 14 additions and 2 deletions
|
@ -1,6 +1,6 @@
|
|||
module NewAdministrateur
|
||||
class ProceduresController < AdministrateurController
|
||||
before_action :retrieve_procedure, only: [:champs, :annotations, :edit, :monavis, :update_monavis, :jeton, :update_jeton, :publication, :publish, :transfert, :allow_expert_review, :invited_expert_list]
|
||||
before_action :retrieve_procedure, only: [:champs, :annotations, :edit, :monavis, :update_monavis, :jeton, :update_jeton, :publication, :publish, :transfert, :allow_expert_review, :invited_expert_list, :update_allow_decision_access]
|
||||
before_action :procedure_locked?, only: [:champs, :annotations]
|
||||
|
||||
ITEMS_PER_PAGE = 25
|
||||
|
@ -189,6 +189,13 @@ module NewAdministrateur
|
|||
@experts_procedure = @procedure.experts_procedures.sort_by { |expert_procedure| expert_procedure.expert.email }
|
||||
end
|
||||
|
||||
def update_allow_decision_access
|
||||
@procedure
|
||||
.experts_procedures
|
||||
.find(params[:expert_procedure])
|
||||
.update!(allow_decision_access_params)
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def apercu_tab
|
||||
|
@ -215,5 +222,9 @@ module NewAdministrateur
|
|||
def publish_params
|
||||
params.permit(:path, :lien_site_web)
|
||||
end
|
||||
|
||||
def allow_decision_access_params
|
||||
params.require(:experts_procedure).permit(:allow_decision_access)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -379,13 +379,14 @@ Rails.application.routes.draw do
|
|||
get 'jeton'
|
||||
patch 'update_jeton'
|
||||
put :allow_expert_review
|
||||
get 'invited_expert_list'
|
||||
end
|
||||
|
||||
get 'publication' => 'procedures#publication', as: :publication
|
||||
put 'publish' => 'procedures#publish', as: :publish
|
||||
get 'transfert' => 'procedures#transfert', as: :transfert
|
||||
post 'transfer' => 'procedures#transfer', as: :transfer
|
||||
get 'invited_expert_list'
|
||||
put 'update_allow_decision_access' => 'procedures#update_allow_decision_access', as: :update_allow_decision_access
|
||||
|
||||
resources :mail_templates, only: [:edit, :update]
|
||||
|
||||
|
|
Loading…
Reference in a new issue