refactor(procedure_admins): use component
This commit is contained in:
parent
924d2ae15d
commit
066c441b61
3 changed files with 5 additions and 4 deletions
|
@ -1,3 +1,4 @@
|
|||
- if @administrateur.present?
|
||||
= turbo_stream.append "administrateurs", partial: 'administrateur', locals: { procedure: @procedure, administrateur: @administrateur }
|
||||
= turbo_stream.update 'administrateurs',
|
||||
render(Procedure::ProcedureAdministrateurs::AdministrateurComponent.with_collection(@procedure.administrateurs.order('users.email'), procedure: @procedure))
|
||||
= turbo_stream.replace "new_administrateur", partial: 'add_admin_form', locals: { procedure: @procedure, disabled_as_super_admin: administrateur_as_manager? }
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
- if @administrateur.present?
|
||||
= turbo_stream.remove(@administrateur)
|
||||
= turbo_stream.update 'administrateurs',
|
||||
render(Procedure::ProcedureAdministrateurs::AdministrateurComponent.with_collection(@procedure.administrateurs.order('users.email'), procedure: @procedure))
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
%th= 'Enregistré le'
|
||||
%th= 'État'
|
||||
%tbody#administrateurs
|
||||
= render partial: 'administrateur', collection: @procedure.administrateurs.order('users.email'), locals: { procedure: @procedure }
|
||||
= render(Procedure::ProcedureAdministrateurs::AdministrateurComponent.with_collection(@procedure.administrateurs.order('users.email'), procedure: @procedure))
|
||||
%tfoot
|
||||
%tr
|
||||
%th{ colspan: 4 }
|
||||
|
|
Loading…
Reference in a new issue