2021-11-25 16:26:55 +01:00
|
|
|
= render partial: 'administrateurs/breadcrumbs',
|
2022-08-17 13:53:07 +02:00
|
|
|
locals: { steps: [['Démarches', admin_procedures_path],
|
|
|
|
[@procedure.libelle.truncate_words(4), admin_procedure_path(@procedure)],
|
|
|
|
['Choix du service', admin_services_path(procedure_id: @procedure.id)],
|
|
|
|
['Modifier le service']] }
|
2018-04-24 10:07:20 +02:00
|
|
|
|
2022-08-17 11:15:56 +02:00
|
|
|
|
2018-04-19 18:12:48 +02:00
|
|
|
.container
|
2022-08-22 09:01:59 +02:00
|
|
|
- other_services = @service.procedures.reject {|procedure| procedure.id == @procedure.id }
|
|
|
|
- if other_services.count > 1
|
2022-08-18 09:14:50 +02:00
|
|
|
= render Dsfr::AlertComponent.new(state: :warning, title: "Modifier ce service impactera la ou les démarches qui sont rattachée/s") do |c|
|
2022-08-17 11:15:56 +02:00
|
|
|
- c.body do
|
|
|
|
%ul
|
2022-08-22 09:01:59 +02:00
|
|
|
- other_services.each do |proc|
|
2022-08-17 11:15:56 +02:00
|
|
|
%li= "#{proc.libelle} (N° #{proc.id})"
|
|
|
|
%p.mt-3 Si vous souhaitez modifier uniquement les informations pour ce service, créez un nouveau service puis associez-le à la démarche
|
|
|
|
|
|
|
|
%p.mt-3
|
|
|
|
= link_to "+ Nouveau service", new_admin_service_path(procedure_id: @procedure.id), class: "fr-btn"
|
|
|
|
|
|
|
|
|
|
|
|
%h1.mt-2 Modifier le service
|
2018-04-19 18:12:48 +02:00
|
|
|
|
|
|
|
= render partial: 'form',
|
2018-04-24 10:07:20 +02:00
|
|
|
locals: { service: @service, procedure_id: @procedure.id }
|