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],
2022-09-09 13:08:24 +02:00
[@procedure.libelle.truncate_words(10), admin_procedure_path(@procedure)],
2022-08-17 13:53:07 +02:00
['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
2024-05-22 16:12:48 +02:00
.fr-container
.flex.justify-between.align-center.fr-mb-3w
= link_to "Liste de tous les services", admin_services_path(procedure_id: @procedure.id), class: "fr-link fr-icon-arrow-left-line fr-link--icon-left"
= link_to "+ Nouveau service", new_admin_service_path(procedure_id: @procedure.id), class: "fr-btn"
%h1.fr-h2
Modifier le service
2022-08-22 09:01:59 +02:00
- other_services = @service.procedures.reject {|procedure| procedure.id == @procedure.id }
- if other_services.count > 1
2024-05-22 16:12:48 +02:00
= render Dsfr::AlertComponent.new(state: :warning, title: "Modifier ce service impactera la ou les démarches qui sont rattachée/s", extra_class_names: 'fr-mb-3w') do |c|
2024-01-08 11:22:38 +01:00
- c.with_body do
2022-08-17 11:15:56 +02:00
%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
2018-04-19 18:12:48 +02:00
= render partial: 'form',
2024-10-14 22:25:08 +02:00
locals: { service: @service, procedure: @procedure }