chore(attestation): publish a v2 attestation

This commit is contained in:
Colin Darie 2024-05-28 17:47:05 +02:00
parent 4af6957237
commit 11d29f5574
No known key found for this signature in database
GPG key ID: 4FB865FDBCA4BCC4
8 changed files with 98 additions and 41 deletions

View file

@ -1,3 +1,6 @@
- if @attestation_template.previously_new_record? || @attestation_template.state_changed?
= turbo_stream.update "fixed_footer", render(partial: "fixed_footer", locals: { procedure: @procedure, attestation_template: @attestation_template })
= turbo_stream.show 'autosave-notice'
= turbo_stream.replace 'autosave-notice', render(partial: 'administrateurs/autosave_notice', locals: { success: !@attestation_template.changed? })
= turbo_stream.hide 'autosave-notice', delay: 15000
@ -10,7 +13,7 @@
= turbo_stream.update dom_id(@attestation_template, :signature_attachment) do
= render(Attachment::EditComponent.new(attached_file: @attestation_template.signature, direct_upload: false))
- body_id = dom_id(@attestation_template, "json-body-messages")
- body_id = "attestation-template-json-body-messages"
- if @attestation_template.errors.include?(:json_body)
= turbo_stream.update body_id do
= render partial: "shared/errors_list", locals: { object: @attestation_template, attribute: :json_body }