chore(schema): add official layout to attestation templates
This commit is contained in:
parent
8ba78d1cfe
commit
1c3254755d
3 changed files with 6 additions and 2 deletions
|
@ -17,8 +17,6 @@ class AttestationTemplate < ApplicationRecord
|
||||||
|
|
||||||
DOSSIER_STATE = Dossier.states.fetch(:accepte)
|
DOSSIER_STATE = Dossier.states.fetch(:accepte)
|
||||||
|
|
||||||
attribute :official_layout, :boolean, default: true
|
|
||||||
|
|
||||||
def attestation_for(dossier)
|
def attestation_for(dossier)
|
||||||
attestation = Attestation.new(title: replace_tags(title, dossier, escape: false))
|
attestation = Attestation.new(title: replace_tags(title, dossier, escape: false))
|
||||||
attestation.pdf.attach(
|
attestation.pdf.attach(
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
class AddLayoutToAttestationTemplates < ActiveRecord::Migration[7.0]
|
||||||
|
def change
|
||||||
|
add_column :attestation_templates, :official_layout, :boolean, default: true, null: false
|
||||||
|
end
|
||||||
|
end
|
|
@ -152,6 +152,7 @@ ActiveRecord::Schema[7.0].define(version: 2024_01_26_071130) do
|
||||||
t.jsonb "json_body"
|
t.jsonb "json_body"
|
||||||
t.string "label_direction"
|
t.string "label_direction"
|
||||||
t.string "label_logo"
|
t.string "label_logo"
|
||||||
|
t.boolean "official_layout", default: true, null: false
|
||||||
t.integer "procedure_id"
|
t.integer "procedure_id"
|
||||||
t.text "title"
|
t.text "title"
|
||||||
t.datetime "updated_at", precision: nil, null: false
|
t.datetime "updated_at", precision: nil, null: false
|
||||||
|
|
Loading…
Reference in a new issue