commit
cddd61a44b
4 changed files with 20 additions and 17 deletions
|
@ -93,9 +93,9 @@ def render_single_champ(pdf, champ)
|
|||
end
|
||||
pdf.text "\n"
|
||||
when 'Champs::ExplicationChamp'
|
||||
format_in_2_lines(pdf, champ.libelle, champ.description)
|
||||
format_in_2_columns(pdf, champ.libelle, champ.description)
|
||||
when 'Champs::CarteChamp'
|
||||
format_in_2_lines(pdf, champ.libelle, champ.to_feature_collection.to_json)
|
||||
format_in_2_columns(pdf, champ.libelle, champ.to_feature_collection.to_json)
|
||||
when 'Champs::SiretChamp'
|
||||
pdf.font 'marianne', style: :bold, size: 9 do
|
||||
pdf.text champ.libelle
|
||||
|
@ -105,10 +105,10 @@ def render_single_champ(pdf, champ)
|
|||
pdf.text "\n"
|
||||
when 'Champs::NumberChamp'
|
||||
value = number_with_delimiter(champ.to_s)
|
||||
format_in_2_lines(pdf, champ.libelle, value)
|
||||
format_in_2_columns(pdf, champ.libelle, value)
|
||||
else
|
||||
value = champ.to_s.empty? ? 'Non communiqué' : champ.to_s
|
||||
format_in_2_lines(pdf, champ.libelle, value)
|
||||
format_in_2_columns(pdf, champ.libelle, value)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -181,7 +181,7 @@ prawn_document(page_size: "A4") do |pdf|
|
|||
pdf.text "Ce dossier est <b>#{dossier_display_state(@dossier, lower: true)}</b>.", inline_format: true
|
||||
pdf.text "\n"
|
||||
if @dossier.motivation.present?
|
||||
format_in_2_lines(pdf, "Motif de la décision", @dossier.motivation)
|
||||
format_in_2_columns(pdf, "Motif de la décision", @dossier.motivation)
|
||||
end
|
||||
add_title(pdf, 'Historique')
|
||||
add_etats_dossier(pdf, @dossier)
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
- if unspecified_attestation_champs.present?
|
||||
.warning
|
||||
Attention, les valeurs suivantes n'ont pas été renseignées mais sont nécessaires pour pouvoir envoyer une attestation valide :
|
||||
- unspecified_champs, unspecified_annotations_privees = unspecified_attestation_champs.partition(&:private)
|
||||
- unspecified_annotations_privees, unspecified_champs = unspecified_attestation_champs.partition(&:private)
|
||||
|
||||
- if unspecified_champs.present?
|
||||
%h4 Champs de la demande
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
namespace :after_party do
|
||||
desc 'Deployment task: backfill_experts_procedure_on_avis_2'
|
||||
task backfill_experts_procedure_on_avis_2: :environment do
|
||||
puts "Running deploy task 'backfill_experts_procedure_on_avis_2'"
|
||||
desc 'Deployment task: backfill_experts_procedure_id_on_avis_table'
|
||||
task backfill_experts_procedure_id_on_avis_table: :environment do
|
||||
puts "Running deploy task 'backfill_experts_procedure_id_on_avis_table'"
|
||||
|
||||
without_instructeur = Avis.where(experts_procedure_id: nil, answer: nil, instructeur_id: nil).where.not(email: nil)
|
||||
with_instructeur = Avis.where(experts_procedure_id: nil, answer: nil, email: nil).where.not(instructeur_id: nil)
|
||||
without_instructeur = Avis.where(experts_procedure_id: nil, instructeur_id: nil).where.not(email: nil)
|
||||
with_instructeur = Avis.where(experts_procedure_id: nil, email: nil).where.not(instructeur_id: nil)
|
||||
progress = ProgressReport.new(without_instructeur.count)
|
||||
progress2 = ProgressReport.new(with_instructeur.count)
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
describe 'instructeurs/dossiers/state_button_motivation.html.haml', type: :view do
|
||||
let(:dossier) { create(:dossier, :en_instruction) }
|
||||
|
||||
subject! do
|
||||
subject do
|
||||
render(
|
||||
'instructeurs/dossiers/state_button_motivation.html.haml',
|
||||
dossier: dossier,
|
||||
|
@ -14,12 +14,15 @@ describe 'instructeurs/dossiers/state_button_motivation.html.haml', type: :view
|
|||
)
|
||||
end
|
||||
|
||||
context 'with an attestation preview' do
|
||||
let(:dossier) { create :dossier, :accepte, :with_attestation }
|
||||
it { expect(rendered).to have_link(href: apercu_attestation_instructeur_dossier_path(dossier.procedure, dossier)) }
|
||||
context 'without attestation' do
|
||||
it { expect(subject).not_to have_link(href: apercu_attestation_instructeur_dossier_path(dossier.procedure, dossier)) }
|
||||
end
|
||||
|
||||
context 'without an attestation preview' do
|
||||
it { expect(rendered).not_to have_link(href: apercu_attestation_instructeur_dossier_path(dossier.procedure, dossier)) }
|
||||
context 'with an attestation' do
|
||||
let(:dossier) { create :dossier, :accepte, :with_attestation }
|
||||
|
||||
it 'includes a link to preview the attestation' do
|
||||
expect(subject).to have_link(href: apercu_attestation_instructeur_dossier_path(dossier.procedure, dossier))
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue