Merge pull request #3462 from Keirua/feat/3404-date-depot-instructeur
Ajout de la date de depot pour l'instructeur
This commit is contained in:
commit
d4efc0bb75
3 changed files with 16 additions and 0 deletions
|
@ -1,4 +1,8 @@
|
|||
.container
|
||||
- if dossier.en_construction_at.present?
|
||||
.card
|
||||
= render partial: "shared/dossiers/horodatage", locals: { dossier: dossier }
|
||||
|
||||
.tab-title Identité du demandeur
|
||||
.card
|
||||
= render partial: "shared/dossiers/user_infos", locals: { user: dossier.user }
|
||||
|
|
5
app/views/shared/dossiers/_horodatage.html.haml
Normal file
5
app/views/shared/dossiers/_horodatage.html.haml
Normal file
|
@ -0,0 +1,5 @@
|
|||
%table.table.vertical.dossier-champs
|
||||
%tbody
|
||||
%tr
|
||||
%th.libelle Déposé le :
|
||||
%td= l(dossier.en_construction_at, format: '%d %B %Y')
|
|
@ -16,6 +16,7 @@ describe 'new_user/dossiers/demande.html.haml', type: :view do
|
|||
end
|
||||
|
||||
it 'renders the dossier infos' do
|
||||
expect(rendered).to have_text('Déposé le')
|
||||
expect(rendered).to have_text('Identité')
|
||||
expect(rendered).to have_text('Demande')
|
||||
expect(rendered).to have_text('Pièces jointes')
|
||||
|
@ -29,4 +30,10 @@ describe 'new_user/dossiers/demande.html.haml', type: :view do
|
|||
let(:dossier) { create(:dossier, :en_instruction, :with_entreprise, procedure: procedure) }
|
||||
it { is_expected.not_to have_link('Modifier le dossier') }
|
||||
end
|
||||
|
||||
context 'when the dossier has no en_construction_at date' do
|
||||
let(:dossier) { create(:dossier, :with_entreprise, procedure: procedure) }
|
||||
|
||||
it { expect(rendered).not_to have_text('Déposé le') }
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue