Merge pull request #5668 from betagouv/fix-services-link

fixe le choix du service lorsque la démarche en a déjà un d'affecté
This commit is contained in:
LeSim 2020-10-06 15:09:49 +02:00 committed by GitHub
commit 3ab87af675
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -76,8 +76,10 @@
- else
Choix du service administratif
.card-admin-action
- if @procedure.service_id.blank? && current_administrateur.services.present?
= link_to 'Modifier', admin_services_path(procedure_id: @procedure.id), class: 'button'
- if @procedure.service.present?
= link_to 'Modifier', edit_admin_service_path(@procedure.service), class: 'button'
- elsif current_administrateur.services.present?
= link_to 'Choisir', admin_services_path(procedure_id: @procedure.id), class: 'button'
- else
= link_to 'Remplir', new_admin_service_path(procedure_id: @procedure.id), class: 'button'