Merge pull request #8345 from demarches-simplifiees/improvement/link_to_dossier_description

Add link to prefill description from procedure show
This commit is contained in:
Damien Le Thiec 2023-01-02 10:30:56 +01:00 committed by GitHub
commit a54b5fa55c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View file

@ -28,6 +28,11 @@
%span.icon.reply
Envoyer une copie
- if @procedure.publiee? || @procedure.brouillon?
= link_to preremplir_path(@procedure.path), target: "_blank", rel: :noopener, class: 'button' do
%span.icon.edit
Préremplir via lien ou API
- if !@procedure.publiee? && !@procedure.close? && !@procedure.depubliee?
= link_to 'Publier', admin_procedure_publication_path(@procedure), class: 'button primary', id: 'publish-procedure-link', data: { disable_with: "Publication..." }
@ -75,4 +80,3 @@
= render Procedure::Card::APIParticulierComponent.new(procedure: @procedure)
= render Procedure::Card::MonAvisComponent.new(procedure: @procedure)
= render Procedure::Card::DossierSubmittedMessageComponent.new(procedure: @procedure)

View file

@ -191,7 +191,7 @@ Rails.application.routes.draw do
post "webhooks/helpscout_support_dev", to: "webhook#helpscout_support_dev"
match "webhooks/helpscout", to: lambda { |_| [204, {}, nil] }, via: :head
get '/preremplir/:path', to: 'prefill_descriptions#edit'
get '/preremplir/:path', to: 'prefill_descriptions#edit', as: :preremplir
resources :procedures, only: [], param: :path do
member do
resource :prefill_description, only: :update