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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue