Merge pull request #9030 from mfo/8164-additional-visible-content
ETQ usager, la page resumant ma demande est aux couleurs du DSFR
This commit is contained in:
commit
8282403c07
31 changed files with 501 additions and 359 deletions
|
@ -133,6 +133,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
// who known
|
||||
.highlighted {
|
||||
background: $orange-bg;
|
||||
|
|
|
@ -1,27 +1,25 @@
|
|||
@import "colors";
|
||||
@import "constants";
|
||||
|
||||
.demande {
|
||||
padding-top: 3 * $default-padding;
|
||||
padding-bottom: 3 * $default-padding;
|
||||
|
||||
h1 {
|
||||
margin-bottom: $default-padding;
|
||||
}
|
||||
|
||||
.intro {
|
||||
margin: $default-padding 0;
|
||||
}
|
||||
|
||||
b {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
hr {
|
||||
border: none;
|
||||
height: 1px;
|
||||
background-color: $grey;
|
||||
margin-top: 2 * $default-padding;
|
||||
margin-bottom: 2 * $default-padding;
|
||||
.container {
|
||||
@media (max-width: 48em) {
|
||||
.d-block-sm {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.champ-content {
|
||||
padding: 0 0 ,5rem;
|
||||
|
||||
p {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.top-bordered {
|
||||
border-top: 1px solid var(--border-default-grey);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -29,32 +29,32 @@
|
|||
counter-reset: h7;
|
||||
}
|
||||
|
||||
.header-section.fr-h2::before {
|
||||
.header-section.section-2::before {
|
||||
counter-increment: h2;
|
||||
content: counter(h2) ". ";
|
||||
}
|
||||
|
||||
.header-section.fr-h3::before {
|
||||
.header-section.section-3::before {
|
||||
counter-increment: h3;
|
||||
content: counter(h2) "." counter(h3) ". ";
|
||||
}
|
||||
|
||||
.header-section.fr-h4::before {
|
||||
.header-section.section-4::before {
|
||||
counter-increment: h4;
|
||||
content: counter(h2) "." counter(h3) "." counter(h4) ". ";
|
||||
}
|
||||
|
||||
.header-section.fr-h5::before {
|
||||
.header-section.section-5::before {
|
||||
counter-increment: h5;
|
||||
content: counter(h2) "." counter(h3) "." counter(h4) "." counter(h5) ". ";
|
||||
}
|
||||
|
||||
.header-section.fr-h6::before {
|
||||
.header-section.section-6::before {
|
||||
counter-increment: h6;
|
||||
content: counter(h2) "." counter(h3) "." counter(h4) "." counter(h5) "." counter(h6) ". ";
|
||||
}
|
||||
|
||||
.header-section.fr-h7::before {
|
||||
.header-section.section-7::before {
|
||||
counter-increment: h7;
|
||||
content: counter(h2) "." counter(h3) "." counter(h4) "." counter(h5) "." counter(h6) "." counter(h7) ". ";
|
||||
}
|
||||
|
|
21
app/components/dossiers/champ_row_show_component.rb
Normal file
21
app/components/dossiers/champ_row_show_component.rb
Normal file
|
@ -0,0 +1,21 @@
|
|||
class Dossiers::ChampRowShowComponent < ApplicationComponent
|
||||
include ChampHelper
|
||||
include DossierHelper
|
||||
include ApplicationHelper
|
||||
def initialize(champs:, demande_seen_at:, profile:, repetition:)
|
||||
@repetition = repetition
|
||||
@champs = champs
|
||||
@demande_seen_at = demande_seen_at
|
||||
@profile = profile
|
||||
end
|
||||
|
||||
def updated_after_deposer?(champ)
|
||||
return false if champ.dossier.depose_at.blank?
|
||||
champ.updated_at > champ.dossier.depose_at
|
||||
end
|
||||
|
||||
def number_with_html_delimiter(num)
|
||||
# we are using the span delimiter that doesn't insert spaces when copying and pasting the number
|
||||
number_with_delimiter(num, delimiter: tag.span(class: 'numbers-delimiter'))
|
||||
end
|
||||
end
|
|
@ -0,0 +1,3 @@
|
|||
---
|
||||
en:
|
||||
blank: "blank (optional)"
|
|
@ -0,0 +1,3 @@
|
|||
---
|
||||
fr:
|
||||
blank: "non saisi (facultatif)"
|
|
@ -0,0 +1,62 @@
|
|||
- @champs.each do |champ|
|
||||
.fr-px-4v.fr-my-2v
|
||||
- if champ.repetition?
|
||||
= champ.libelle
|
||||
- champ.rows.each do |row|
|
||||
= render Dossiers::ChampRowShowComponent.new(champs: row, demande_seen_at: @demande_seen_at, profile: @profile, repetition: true)
|
||||
|
||||
- else
|
||||
.flex.d-block-sm
|
||||
%p.flex-grow.fr-text-action-high--grey.fr-mb-0= "#{champ.libelle} :"
|
||||
%p.champ-updated-at.fr-mb-0.fr-text--sm
|
||||
- if updated_after_deposer?(champ)
|
||||
%span{ class: highlight_if_unseen_class(@demande_seen_at, champ.updated_at) }
|
||||
= t(:updated_at, scope: [:views, :shared, :dossiers, :form], datetime: try_format_datetime(champ.updated_at))
|
||||
- if champ.blank?
|
||||
.champ-content.fr-text-mention--grey{ class: [highlight_if_unseen_class(@demande_seen_at, champ.updated_at), champ.type_champ] }
|
||||
%p= t('.blank')
|
||||
- else
|
||||
.champ-content.fr-text-action-high--grey{ class: [highlight_if_unseen_class(@demande_seen_at, champ.updated_at), champ.type_champ] }
|
||||
- case champ.type_champ
|
||||
- when TypeDeChamp.type_champs.fetch(:carte)
|
||||
= render partial: "shared/champs/carte/show", locals: { champ: champ }
|
||||
- when TypeDeChamp.type_champs.fetch(:dossier_link)
|
||||
= render partial: "shared/champs/dossier_link/show", locals: { champ: champ }
|
||||
- when TypeDeChamp.type_champs.fetch(:multiple_drop_down_list)
|
||||
= render partial: "shared/champs/multiple_drop_down_list/show", locals: { champ: champ }
|
||||
- when TypeDeChamp.type_champs.fetch(:piece_justificative), TypeDeChamp.type_champs.fetch(:titre_identite)
|
||||
= render partial: "shared/champs/piece_justificative/show", locals: { champ: champ }
|
||||
- when TypeDeChamp.type_champs.fetch(:siret)
|
||||
= render partial: "shared/champs/siret/show", locals: { champ: champ, profile: @profile }
|
||||
- when TypeDeChamp.type_champs.fetch(:iban)
|
||||
= render partial: "shared/champs/iban/show", locals: { champ: champ }
|
||||
- when TypeDeChamp.type_champs.fetch(:textarea)
|
||||
= render partial: "shared/champs/textarea/show", locals: { champ: champ }
|
||||
- when TypeDeChamp.type_champs.fetch(:annuaire_education)
|
||||
= render partial: "shared/champs/annuaire_education/show", locals: { champ: champ }
|
||||
- when TypeDeChamp.type_champs.fetch(:cnaf)
|
||||
= render partial: "shared/champs/cnaf/show", locals: { champ: champ, profile: @profile }
|
||||
- when TypeDeChamp.type_champs.fetch(:dgfip)
|
||||
= render partial: "shared/champs/dgfip/show", locals: { champ: champ, profile: @profile }
|
||||
- when TypeDeChamp.type_champs.fetch(:pole_emploi)
|
||||
= render partial: "shared/champs/pole_emploi/show", locals: { champ: champ, profile: @profile }
|
||||
- when TypeDeChamp.type_champs.fetch(:mesri)
|
||||
= render partial: "shared/champs/mesri/show", locals: { champ: champ, profile: @profile }
|
||||
- when TypeDeChamp.type_champs.fetch(:address)
|
||||
= render partial: "shared/champs/address/show", locals: { champ: champ }
|
||||
- when TypeDeChamp.type_champs.fetch(:communes)
|
||||
= render partial: "shared/champs/communes/show", locals: { champ: champ }
|
||||
- when TypeDeChamp.type_champs.fetch(:regions)
|
||||
= render partial: "shared/champs/regions/show", locals: { champ: champ }
|
||||
- when TypeDeChamp.type_champs.fetch(:rna)
|
||||
= render partial: "shared/champs/rna/show", locals: { champ: champ, profile: @profile }
|
||||
- when TypeDeChamp.type_champs.fetch(:epci)
|
||||
= render partial: "shared/champs/epci/show", locals: { champ: champ }
|
||||
- when TypeDeChamp.type_champs.fetch(:date)
|
||||
%p= champ.to_s
|
||||
- when TypeDeChamp.type_champs.fetch(:datetime)
|
||||
%p= champ.to_s
|
||||
- when TypeDeChamp.type_champs.fetch(:number)
|
||||
%p= number_with_html_delimiter(champ.to_s)
|
||||
- else
|
||||
%p= format_text_value(champ.to_s.strip) unless champ.blank?
|
|
@ -1,21 +1,28 @@
|
|||
class EditableChamp::HeaderSectionComponent < ApplicationComponent
|
||||
def initialize(form: nil, champ:, seen_at: nil)
|
||||
def initialize(form: nil, champ:, seen_at: nil, html_class: {})
|
||||
@champ = champ
|
||||
@html_class = html_class
|
||||
end
|
||||
|
||||
def level
|
||||
@champ.level + 1 # skip one heading level
|
||||
end
|
||||
|
||||
def collapsible?
|
||||
@champ.level == 1
|
||||
end
|
||||
|
||||
def libelle
|
||||
@champ.libelle
|
||||
end
|
||||
|
||||
def header_section_classnames
|
||||
class_names(
|
||||
"fr-h#{level}": true,
|
||||
'header-section': @champ.dossier.auto_numbering_section_headers_for?(@champ),
|
||||
'hidden': !@champ.visible?
|
||||
{
|
||||
"section-#{level}": true,
|
||||
'header-section': @champ.dossier.auto_numbering_section_headers_for?(@champ),
|
||||
'hidden': !@champ.visible?
|
||||
}.merge(@html_class)
|
||||
)
|
||||
end
|
||||
|
||||
|
|
|
@ -3,9 +3,7 @@ class EditableChamp::SectionComponent < ApplicationComponent
|
|||
include TreeableConcern
|
||||
|
||||
def initialize(nodes: nil, champs: nil)
|
||||
if (nodes.nil?)
|
||||
nodes = to_tree(champs:)
|
||||
end
|
||||
nodes ||= to_tree(champs:)
|
||||
@nodes = to_fieldset(nodes:)
|
||||
end
|
||||
|
||||
|
|
49
app/components/viewable_champ/section_component.rb
Normal file
49
app/components/viewable_champ/section_component.rb
Normal file
|
@ -0,0 +1,49 @@
|
|||
class ViewableChamp::SectionComponent < ApplicationComponent
|
||||
include ApplicationHelper
|
||||
include TreeableConcern
|
||||
|
||||
def initialize(champs: nil, nodes: nil, demande_seen_at:, profile:)
|
||||
@demande_seen_at, @profile, @repetition = demande_seen_at, profile
|
||||
nodes ||= to_tree(champs:)
|
||||
@nodes = to_sections(nodes:)
|
||||
end
|
||||
|
||||
def section_id
|
||||
@section_id ||= header_section ? dom_id(header_section, :content) : SecureRandom.uuid
|
||||
end
|
||||
|
||||
def header_section
|
||||
if @nodes.first.is_a?(Champs::HeaderSectionChamp)
|
||||
@nodes.first
|
||||
end
|
||||
end
|
||||
|
||||
def champs
|
||||
tail.filter { _1.is_a?(Champ) && _1.visible? && !_1.exclude_from_view? }
|
||||
end
|
||||
|
||||
def sections
|
||||
tail.filter { !_1.is_a?(Champ) }
|
||||
end
|
||||
|
||||
def tail
|
||||
return @nodes if header_section.blank?
|
||||
_, *rest_of_champ = @nodes
|
||||
|
||||
rest_of_champ
|
||||
end
|
||||
|
||||
def tag_for_depth
|
||||
"h#{header_section.level + 1}" if header_section
|
||||
end
|
||||
|
||||
def first_level?
|
||||
header_section.level == 1
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def to_sections(nodes:)
|
||||
nodes.map { _1.is_a?(Array) ? ViewableChamp::SectionComponent.new(nodes: _1, demande_seen_at: @demande_seen_at, profile: @profile) : _1 }
|
||||
end
|
||||
end
|
|
@ -0,0 +1,3 @@
|
|||
---
|
||||
en:
|
||||
toggle_section: "Show/hide fields of « %{section} »"
|
|
@ -0,0 +1,3 @@
|
|||
---
|
||||
fr:
|
||||
toggle_section: "Afficher/Cacher les champs de la section « %{section} »"
|
|
@ -0,0 +1,14 @@
|
|||
= tag.div(class: "reset-#{tag_for_depth} fr-mt-4v", 'data-controller': 'expand') do
|
||||
- if header_section
|
||||
%div{ class: class_names(flex: true, "top-bordered" => header_section.level == 1) }
|
||||
= render EditableChamp::HeaderSectionComponent.new(champ: header_section, html_class: {' fr-m-0 fr-text--md fr-px-4v flex-grow' => true, "fr-text-action-high--blue-france" => header_section.level == 1, 'fr-py-3v' => header_section.level == 1, 'fr-pt-3v' => header_section.level == 1})
|
||||
- if ![champs, sections].map(&:empty?).all? && header_section.level == 1
|
||||
%button{ type: "button", aria: { controls: section_id, "expanded": "true", label: t('.toggle_section', section: header_section.libelle) }, href: section_id, 'data-action': 'click->expand#toggle', class: "fr-btn fr-btn--tertiary-no-outline" }
|
||||
%i.fr-icon-arrow-up-s-line{ 'aria-hidden': 'true', 'data-expand-target': 'icon' }
|
||||
|
||||
%div{ id: section_id, 'data-expand-target': 'content' }
|
||||
- if !champs.empty?
|
||||
= render Dossiers::ChampRowShowComponent.new(champs: champs, demande_seen_at: @demande_seen_at, profile: @profile, repetition: false)
|
||||
|
||||
- sections.each do |section|
|
||||
= render section
|
|
@ -8,8 +8,15 @@ export class ExpandController extends ApplicationController {
|
|||
declare readonly iconTarget: HTMLElement;
|
||||
|
||||
toggle(event: Event) {
|
||||
const target = event.currentTarget as HTMLButtonElement;
|
||||
|
||||
event.preventDefault();
|
||||
toggle(this.contentTarget);
|
||||
toggleExpandIcon(this.iconTarget);
|
||||
if (this.contentTarget.classList.contains('hidden')) {
|
||||
target.setAttribute('aria-expanded', 'false');
|
||||
} else {
|
||||
target.setAttribute('aria-expanded', 'true');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -37,14 +37,14 @@ suite('@utils', () => {
|
|||
|
||||
test('toggleExpandIcon', () => {
|
||||
const icon = document.createElement('icon');
|
||||
icon.classList.add('fr-icon-add-line');
|
||||
icon.classList.add('fr-icon-arrow-down-s-line');
|
||||
|
||||
toggleExpandIcon(icon);
|
||||
expect(icon.classList.contains('fr-icon-subtract-line')).toBeTruthy();
|
||||
expect(icon.classList.contains('fr-icon-add-line')).toBeFalsy();
|
||||
expect(icon.classList.contains('fr-icon-arrow-up-s-line')).toBeTruthy();
|
||||
expect(icon.classList.contains('fr-icon-arrow-down-s-line')).toBeFalsy();
|
||||
toggleExpandIcon(icon);
|
||||
expect(icon.classList.contains('fr-icon-add-line')).toBeTruthy();
|
||||
expect(icon.classList.contains('fr-icon-subtract-line')).toBeFalsy();
|
||||
expect(icon.classList.contains('fr-icon-arrow-down-s-line')).toBeTruthy();
|
||||
expect(icon.classList.contains('fr-icon-arrow-up-s-line')).toBeFalsy();
|
||||
});
|
||||
|
||||
test('isSelectElement', () => {
|
||||
|
|
|
@ -88,8 +88,8 @@ export function toggle(el: Element | null, force?: boolean) {
|
|||
}
|
||||
|
||||
export function toggleExpandIcon(icon: Element | null) {
|
||||
icon?.classList.toggle('fr-icon-add-line');
|
||||
icon?.classList?.toggle('fr-icon-subtract-line');
|
||||
icon?.classList.toggle('fr-icon-arrow-down-s-line');
|
||||
icon?.classList?.toggle('fr-icon-arrow-up-s-line');
|
||||
}
|
||||
|
||||
export function enable(
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
= format_text_value(champ.to_s)
|
||||
- if champ.to_s.present?
|
||||
%p= format_text_value(champ.to_s)
|
||||
- if champ.data.present?
|
||||
Code INSEE :
|
||||
= champ.data['city_code']
|
||||
%p
|
||||
Code INSEE :
|
||||
= champ.data['city_code']
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
= champ.to_s
|
||||
%p= champ.to_s
|
||||
- if champ.code?
|
||||
%p.text-sm
|
||||
%p.fr-text--sm
|
||||
Code INSEE :
|
||||
= champ.code
|
||||
- if champ.departement?
|
||||
%br
|
||||
Departement :
|
||||
= champ.departement_code_and_name
|
||||
- if champ.departement?
|
||||
%p.fr-text--sm
|
||||
Departement :
|
||||
= champ.departement_code_and_name
|
||||
|
|
|
@ -2,10 +2,10 @@
|
|||
- if dossier
|
||||
- path = dossier_linked_path(current_instructeur || current_user, dossier)
|
||||
- if path.present?
|
||||
= link_to("Dossier nº #{dossier.id}", path, target: '_blank', rel: 'noopener')
|
||||
%p= link_to("Dossier nº #{dossier.id}", path, target: '_blank', rel: 'noopener')
|
||||
- else
|
||||
Dossier nº #{dossier.id}
|
||||
%p Dossier nº #{dossier.id}
|
||||
%br
|
||||
= sanitize(dossier.text_summary)
|
||||
%p= sanitize(dossier.text_summary)
|
||||
- else
|
||||
Pas de dossier associé
|
||||
%p Pas de dossier associé
|
||||
|
|
|
@ -1,69 +0,0 @@
|
|||
- champs.reject(&:exclude_from_view?).filter(&:visible?).each do |c|
|
||||
- if c.type_champ == TypeDeChamp.type_champs.fetch(:repetition)
|
||||
%tr
|
||||
%td.libelle.repetition{ colspan: 3 }
|
||||
= "#{c.libelle} :"
|
||||
- c.rows.each do |champs|
|
||||
= render partial: "shared/dossiers/champ_row", locals: { champs: champs, demande_seen_at: demande_seen_at, profile: profile, repetition: true }
|
||||
%tr
|
||||
%td.libelle{ colspan: 4 }
|
||||
- else
|
||||
%tr
|
||||
- if c.type_champ == TypeDeChamp.type_champs.fetch(:header_section)
|
||||
%th.header-section{ colspan: 3, class: c.dossier.auto_numbering_section_headers_for?(c) ? "header-section-counter" : nil }= c.libelle
|
||||
- else
|
||||
%td.libelle{ class: repetition ? 'padded' : '' }
|
||||
= "#{c.libelle} :"
|
||||
%td.rich-text{ class: c.type_champ }
|
||||
%div{ class: highlight_if_unseen_class(demande_seen_at, c.updated_at) }
|
||||
- case c.type_champ
|
||||
- when TypeDeChamp.type_champs.fetch(:carte)
|
||||
= render partial: "shared/champs/carte/show", locals: { champ: c }
|
||||
- when TypeDeChamp.type_champs.fetch(:dossier_link)
|
||||
= render partial: "shared/champs/dossier_link/show", locals: { champ: c }
|
||||
- when TypeDeChamp.type_champs.fetch(:multiple_drop_down_list)
|
||||
= render partial: "shared/champs/multiple_drop_down_list/show", locals: { champ: c }
|
||||
- when TypeDeChamp.type_champs.fetch(:piece_justificative)
|
||||
= render partial: "shared/champs/piece_justificative/show", locals: { champ: c }
|
||||
- when TypeDeChamp.type_champs.fetch(:titre_identite)
|
||||
= render partial: "shared/champs/piece_justificative/show", locals: { champ: c }
|
||||
- when TypeDeChamp.type_champs.fetch(:siret)
|
||||
= render partial: "shared/champs/siret/show", locals: { champ: c, profile: profile }
|
||||
- when TypeDeChamp.type_champs.fetch(:iban)
|
||||
= render partial: "shared/champs/iban/show", locals: { champ: c }
|
||||
- when TypeDeChamp.type_champs.fetch(:textarea)
|
||||
= render partial: "shared/champs/textarea/show", locals: { champ: c }
|
||||
- when TypeDeChamp.type_champs.fetch(:annuaire_education)
|
||||
= render partial: "shared/champs/annuaire_education/show", locals: { champ: c }
|
||||
- when TypeDeChamp.type_champs.fetch(:cnaf)
|
||||
= render partial: "shared/champs/cnaf/show", locals: { champ: c, profile: profile }
|
||||
- when TypeDeChamp.type_champs.fetch(:dgfip)
|
||||
= render partial: "shared/champs/dgfip/show", locals: { champ: c, profile: profile }
|
||||
- when TypeDeChamp.type_champs.fetch(:pole_emploi)
|
||||
= render partial: "shared/champs/pole_emploi/show", locals: { champ: c, profile: profile }
|
||||
- when TypeDeChamp.type_champs.fetch(:mesri)
|
||||
= render partial: "shared/champs/mesri/show", locals: { champ: c, profile: profile }
|
||||
- when TypeDeChamp.type_champs.fetch(:address)
|
||||
= render partial: "shared/champs/address/show", locals: { champ: c }
|
||||
- when TypeDeChamp.type_champs.fetch(:communes)
|
||||
= render partial: "shared/champs/communes/show", locals: { champ: c }
|
||||
- when TypeDeChamp.type_champs.fetch(:regions)
|
||||
= render partial: "shared/champs/regions/show", locals: { champ: c }
|
||||
- when TypeDeChamp.type_champs.fetch(:rna)
|
||||
= render partial: "shared/champs/rna/show", locals: { champ: c, profile: profile }
|
||||
- when TypeDeChamp.type_champs.fetch(:epci)
|
||||
= render partial: "shared/champs/epci/show", locals: { champ: c }
|
||||
- when TypeDeChamp.type_champs.fetch(:date)
|
||||
= c.to_s
|
||||
- when TypeDeChamp.type_champs.fetch(:datetime)
|
||||
= c.to_s
|
||||
- when TypeDeChamp.type_champs.fetch(:number)
|
||||
= number_with_html_delimiter(c.to_s)
|
||||
- else
|
||||
= format_text_value(c.to_s) unless c.blank?
|
||||
|
||||
- if c.type_champ != TypeDeChamp.type_champs.fetch(:header_section)
|
||||
%td.updated-at
|
||||
%span{ class: highlight_if_unseen_class(demande_seen_at, c.updated_at) }
|
||||
modifié le
|
||||
= try_format_datetime(c.updated_at)
|
|
@ -1,10 +1,15 @@
|
|||
%table.table.vertical.dossier-champs.counter-start-header-section{ role: :presentation }
|
||||
%tbody
|
||||
- if dossier.show_groupe_instructeur_details?
|
||||
%td.libelle= dossier.procedure.routing_criteria_name
|
||||
%td{ class: highlight_if_unseen_class(demande_seen_at, dossier.groupe_instructeur_updated_at) }= dossier.groupe_instructeur.label
|
||||
%td.updated-at
|
||||
%span{ class: highlight_if_unseen_class(demande_seen_at, dossier.groupe_instructeur_updated_at) }
|
||||
modifié le
|
||||
= try_format_datetime(dossier.updated_at)
|
||||
= render partial: "shared/dossiers/champ_row", locals: { champs: champs, demande_seen_at: demande_seen_at, profile: profile, repetition: false }
|
||||
- if dossier.show_groupe_instructeur_details?
|
||||
.fr-my-4v.fr-px-4v
|
||||
.flex
|
||||
|
||||
%p.flex-grow.fr-text-action-high--grey.fr-mb-0= dossier.procedure.routing_criteria_name
|
||||
%p.champ-updated-at.fr-mb-0.fr-text--sm
|
||||
- if demande_seen_at&.<(dossier.groupe_instructeur_updated_at)
|
||||
%span{ class: highlight_if_unseen_class(demande_seen_at, dossier.groupe_instructeur_updated_at) }
|
||||
= t(:updated_at, scope: [:views, :shared, :dossiers, :form], datetime: try_format_datetime(dossier.updated_at))
|
||||
|
||||
.champ-content.fr-text-action-high--grey{ class: highlight_if_unseen_class(demande_seen_at, dossier.groupe_instructeur_updated_at) }
|
||||
%p= dossier.groupe_instructeur.label
|
||||
|
||||
|
||||
= render ViewableChamp::SectionComponent.new(champs: champs, demande_seen_at: demande_seen_at, profile: profile)
|
||||
|
|
|
@ -2,38 +2,42 @@
|
|||
- content_for(:notice_info) do
|
||||
= render partial: "shared/dossiers/france_connect_informations_notice", locals: { user_information: dossier.france_connect_information }
|
||||
|
||||
.container
|
||||
- if dossier.depose_at.present?
|
||||
.card
|
||||
= render partial: "shared/dossiers/infos_generales", locals: { dossier: dossier }
|
||||
.fr-container.counter-start-header-section
|
||||
.fr-grid-row
|
||||
.fr-col-12.fr-col-offset-lg-2.fr-col-lg-8
|
||||
%h2.fr-h6.fr-background-alt--grey.fr-mb-0
|
||||
.flex-grow.fr-py-3v.fr-px-4v= t('views.shared.dossiers.demande.en_construction')
|
||||
|
||||
.tab-title
|
||||
%h2.fr-h6= t('views.shared.dossiers.demande.requester_identity')
|
||||
- if dossier.depose_at.present?
|
||||
= render partial: "shared/dossiers/infos_generales", locals: { dossier: dossier }
|
||||
|
||||
- if dossier.identity_updated_at.present? && demande_seen_at&.<(dossier.identity_updated_at)
|
||||
%span.highlighted
|
||||
modifié le
|
||||
= try_format_datetime(dossier.identity_updated_at)
|
||||
.tab-title
|
||||
%h2.fr-h6.fr-background-alt--grey.fr-mb-0.flex
|
||||
.flex-grow.fr-py-3v.fr-px-4v= t('views.shared.dossiers.demande.requester_identity')
|
||||
- if dossier.etablissement.present? && profile == 'usager' && !dossier.read_only?
|
||||
= link_to t('views.shared.dossiers.demande.edit_siret'), siret_dossier_path(dossier), class: 'fr-py-3v fr-btn fr-btn--tertiary-no-outline'
|
||||
|
||||
.card
|
||||
= render partial: "shared/dossiers/user_infos", locals: { user_deleted: dossier.user_deleted?, email: dossier.user_email_for(:display) }
|
||||
- if dossier.individual.present? && profile == 'usager' && !dossier.read_only?
|
||||
= link_to t('views.shared.dossiers.demande.edit_identity'), identite_dossier_path(dossier), class: 'fr-py-3v fr-btn fr-btn--tertiary-no-outline'
|
||||
|
||||
- if dossier.etablissement.present?
|
||||
= render partial: "shared/dossiers/identite_entreprise", locals: { etablissement: dossier.etablissement, profile: profile }
|
||||
|
||||
- if profile == 'usager' && !dossier.read_only?
|
||||
.flex.row-reverse
|
||||
= link_to t('views.shared.dossiers.demande.edit_siret'), siret_dossier_path(dossier), class: 'button'
|
||||
- if dossier.identity_updated_at.present? && demande_seen_at&.<(dossier.identity_updated_at)
|
||||
%span.highlighted
|
||||
modifié le
|
||||
= try_format_datetime(dossier.identity_updated_at)
|
||||
|
||||
- if dossier.individual.present?
|
||||
= render partial: "shared/dossiers/identite_individual", locals: { individual: dossier.individual }
|
||||
.fr-my-4v.fr-px-4v
|
||||
= render partial: "shared/dossiers/user_infos", locals: { user_deleted: dossier.user_deleted?, email: dossier.user_email_for(:display) }
|
||||
|
||||
- if profile == 'usager' && !dossier.read_only?
|
||||
.flex.row-reverse
|
||||
= link_to t('views.shared.dossiers.demande.edit_identity'), identite_dossier_path(dossier), class: 'fr-btn fr-btn--tertiary'
|
||||
- if dossier.etablissement.present?
|
||||
= render partial: "shared/dossiers/identite_entreprise", locals: { etablissement: dossier.etablissement, profile: profile }
|
||||
|
||||
%h2.fr-h6= t('views.shared.dossiers.demande.form')
|
||||
- champs = dossier.champs_public
|
||||
- if champs.any? || dossier.procedure.routing_enabled?
|
||||
.card
|
||||
= render partial: "shared/dossiers/champs", locals: { champs: champs, dossier: dossier, demande_seen_at: demande_seen_at, profile: profile }
|
||||
- if dossier.individual.present?
|
||||
= render partial: "shared/dossiers/identite_individual", locals: { individual: dossier.individual }
|
||||
|
||||
%h2.fr-h6.fr-background-alt--grey.fr-mb-0.flex
|
||||
.flex-grow.fr-py-3v.fr-px-4v= t('views.shared.dossiers.demande.form')
|
||||
|
||||
- champs = dossier.champs_public
|
||||
- if champs.any? || dossier.procedure.routing_enabled?
|
||||
= render partial: "shared/dossiers/champs", locals: { champs: champs, dossier: dossier, demande_seen_at: demande_seen_at, profile: profile }
|
||||
|
|
|
@ -1,173 +1,193 @@
|
|||
- if etablissement.as_degraded_mode?
|
||||
%table.table.vertical.dossier-champs{ role: :presentation }
|
||||
%tbody
|
||||
%tr
|
||||
%td{ colspan: 2 }
|
||||
.fr-alert.fr-alert--warning.fr-alert--sm
|
||||
%p
|
||||
LʼINSEE est indisponible, les informations sur lʼentreprise arriveront dʼici quelques heures.
|
||||
- if profile == "instructeur"
|
||||
%br
|
||||
Il nʼest pas possible dʼaccepter ou de refuser un dossier sans cette étape.
|
||||
|
||||
|
||||
|
||||
%tr
|
||||
%td.libelle SIRET :
|
||||
%td= etablissement.siret
|
||||
.fr-alert.fr-alert--warning.fr-alert--sm
|
||||
%p
|
||||
LʼINSEE est indisponible, les informations sur lʼentreprise arriveront dʼici quelques heures.
|
||||
- if profile == "instructeur"
|
||||
%p
|
||||
Il nʼest pas possible dʼaccepter ou de refuser un dossier sans cette étape.
|
||||
.fr-my-2v
|
||||
%p.fr-text-action-high--grey.fr-mb-0 SIRET :
|
||||
.champ-content.fr-text-action-high--grey
|
||||
%p= etablissement.siret
|
||||
- else
|
||||
%table.table.vertical.dossier-champs{ role: :presentation }
|
||||
%tbody
|
||||
- if etablissement.diffusable_commercialement == false && profile != 'instructeur'
|
||||
%tr
|
||||
%td= t('warning_for_private_info', scope: 'views.shared.dossiers.identite_entreprise', siret: pretty_siret(etablissement.siret))
|
||||
- else
|
||||
%tr
|
||||
%td.libelle Dénomination :
|
||||
%td= raison_sociale_or_name(etablissement)
|
||||
%tr
|
||||
%td.libelle SIRET :
|
||||
%td #{pretty_siret(etablissement.siret)} #{ render Dsfr::CopyButtonComponent.new(text: etablissement.siret, title: "Copier le siret dans le presse-papier", success: "Le siret a été copié dans le presse-papier") }
|
||||
- if etablissement.diffusable_commercialement == false && profile != 'instructeur'
|
||||
.fr-my-2v
|
||||
.champ-content.fr-text-action-high--grey
|
||||
%p= t('warning_for_private_info', scope: 'views.shared.dossiers.identite_entreprise', siret: pretty_siret(etablissement.siret))
|
||||
- else
|
||||
.fr-my-2v
|
||||
%p.fr-text-action-high--grey.fr-mb-0 Dénomination :
|
||||
.champ-content.fr-text-action-high--grey
|
||||
%p= raison_sociale_or_name(etablissement)
|
||||
.fr-my-2v
|
||||
%p.fr-text-action-high--grey.fr-mb-0 SIRET :
|
||||
.champ-content.fr-text-action-high--grey
|
||||
%p #{pretty_siret(etablissement.siret)} #{ render Dsfr::CopyButtonComponent.new(text: etablissement.siret, title: "Copier le siret dans le presse-papier", success: "Le siret a été copié dans le presse-papier") }
|
||||
|
||||
|
||||
- unless local_assigns[:short_identity]
|
||||
- if etablissement.siret != etablissement.entreprise.siret_siege_social
|
||||
%tr
|
||||
%td.libelle SIRET du siège social:
|
||||
%td= etablissement.entreprise.siret_siege_social
|
||||
%tr
|
||||
%td.libelle Forme juridique :
|
||||
%td= sanitize(etablissement.entreprise.forme_juridique)
|
||||
%tr
|
||||
%td.libelle Libellé NAF :
|
||||
%td= etablissement.libelle_naf
|
||||
%tr
|
||||
%td.libelle Code NAF :
|
||||
%td= etablissement.naf
|
||||
%tr
|
||||
%td.libelle Date de création :
|
||||
%td
|
||||
= try_format_date(etablissement.entreprise.date_creation)
|
||||
- unless local_assigns[:short_identity]
|
||||
- if etablissement.siret != etablissement.entreprise.siret_siege_social
|
||||
.fr-my-2v
|
||||
%p.fr-text-action-high--grey.fr-mb-0 SIRET du siège social:
|
||||
.champ-content.fr-text-action-high--grey
|
||||
%p= etablissement.entreprise.siret_siege_social
|
||||
.fr-my-2v
|
||||
%p.fr-text-action-high--grey.fr-mb-0 Forme juridique :
|
||||
.champ-content.fr-text-action-high--grey
|
||||
%p= sanitize(etablissement.entreprise.forme_juridique)
|
||||
.fr-my-2v
|
||||
%p.fr-text-action-high--grey.fr-mb-0 Libellé NAF :
|
||||
.champ-content.fr-text-action-high--grey
|
||||
%p= etablissement.libelle_naf
|
||||
.fr-my-2v
|
||||
%p.fr-text-action-high--grey.fr-mb-0 Code NAF :
|
||||
.champ-content.fr-text-action-high--grey
|
||||
%p= etablissement.naf
|
||||
.fr-my-2v
|
||||
%p.fr-text-action-high--grey.fr-mb-0 Date de création :
|
||||
.champ-content.fr-text-action-high--grey
|
||||
%p
|
||||
= try_format_date(etablissement.entreprise.date_creation)
|
||||
|
||||
- if etablissement.entreprise_etat_administratif.present?
|
||||
%span.label= humanized_entreprise_etat_administratif(etablissement)
|
||||
- if etablissement.entreprise_etat_administratif.present?
|
||||
%span.label= humanized_entreprise_etat_administratif(etablissement)
|
||||
|
||||
- if profile == 'instructeur'
|
||||
.fr-my-2v
|
||||
%p.fr-text-action-high--grey.fr-mb-0
|
||||
Effectif mensuel
|
||||
= try_format_mois_effectif(etablissement)
|
||||
(URSSAF) :
|
||||
.champ-content.fr-text-action-high--grey
|
||||
%p= etablissement.entreprise_effectif_mensuel
|
||||
.fr-my-2v
|
||||
%p.fr-text-action-high--grey.fr-mb-0
|
||||
Effectif moyen annuel
|
||||
= etablissement.entreprise_effectif_annuel_annee
|
||||
(URSSAF) :
|
||||
.champ-content.fr-text-action-high--grey
|
||||
%p= etablissement.entreprise_effectif_annuel
|
||||
.fr-my-2v
|
||||
%p.fr-text-action-high--grey.fr-mb-0 Effectif de l'organisation (INSEE) :
|
||||
.champ-content.fr-text-action-high--grey
|
||||
%p
|
||||
= effectif(etablissement)
|
||||
.fr-my-2v
|
||||
%p.fr-text-action-high--grey.fr-mb-0 Numéro de TVA intracommunautaire :
|
||||
.champ-content.fr-text-action-high--grey
|
||||
%p= etablissement.entreprise.numero_tva_intracommunautaire
|
||||
.fr-my-2v
|
||||
%p.fr-text-action-high--grey.fr-mb-0 Adresse :
|
||||
.champ-content.fr-text-action-high--grey
|
||||
%p
|
||||
- etablissement.adresse.split("\n").each do |line|
|
||||
= line
|
||||
%br
|
||||
.fr-my-2v
|
||||
%p.fr-text-action-high--grey.fr-mb-0 Capital social :
|
||||
.champ-content.fr-text-action-high--grey
|
||||
%p= pretty_currency(etablissement.entreprise.capital_social)
|
||||
.fr-my-2v
|
||||
%p.fr-text-action-high--grey.fr-mb-0 Chiffre d’affaires :
|
||||
.champ-content.fr-text-action-high--grey
|
||||
%p
|
||||
- if profile == 'instructeur'
|
||||
%tr
|
||||
%td.libelle
|
||||
Effectif mensuel
|
||||
= try_format_mois_effectif(etablissement)
|
||||
(URSSAF) :
|
||||
%td= etablissement.entreprise_effectif_mensuel
|
||||
%tr
|
||||
%td.libelle
|
||||
Effectif moyen annuel
|
||||
= etablissement.entreprise_effectif_annuel_annee
|
||||
(URSSAF) :
|
||||
%td= etablissement.entreprise_effectif_annuel
|
||||
%tr
|
||||
%td.libelle Effectif de l'organisation (INSEE) :
|
||||
%td
|
||||
= effectif(etablissement)
|
||||
%tr
|
||||
%td.libelle Numéro de TVA intracommunautaire :
|
||||
%td= etablissement.entreprise.numero_tva_intracommunautaire
|
||||
%tr
|
||||
%td.libelle Adresse :
|
||||
%td
|
||||
- etablissement.adresse.split("\n").each do |line|
|
||||
= line
|
||||
%details
|
||||
- etablissement.exercices.each_with_index do |exercice, index|
|
||||
= "#{exercice.date_fin_exercice.year} : "
|
||||
= pretty_currency(exercice.ca)
|
||||
%br
|
||||
%tr
|
||||
%td.libelle Capital social :
|
||||
%td= pretty_currency(etablissement.entreprise.capital_social)
|
||||
%tr
|
||||
%td.libelle Chiffre d’affaires :
|
||||
%td
|
||||
- if profile == 'instructeur'
|
||||
%details
|
||||
- etablissement.exercices.each_with_index do |exercice, index|
|
||||
= "#{exercice.date_fin_exercice.year} : "
|
||||
= pretty_currency(exercice.ca)
|
||||
%br
|
||||
- elsif etablissement.exercices.present?
|
||||
= t('activemodel.models.exercices_summary', count: etablissement.exercices.count)
|
||||
- elsif etablissement.exercices.present?
|
||||
= t('activemodel.models.exercices_summary', count: etablissement.exercices.count)
|
||||
|
||||
|
||||
- if etablissement.entreprise_bilans_bdf.present?
|
||||
- if profile == 'instructeur'
|
||||
= render partial: 'shared/dossiers/identite_entreprise_bilan_detail',
|
||||
locals: { libelle: 'Résultat exercice', key: 'resultat_exercice', etablissement: etablissement }
|
||||
- if etablissement.entreprise_bilans_bdf.present?
|
||||
- if profile == 'instructeur'
|
||||
= render partial: 'shared/dossiers/identite_entreprise_bilan_detail',
|
||||
locals: { libelle: 'Résultat exercice', key: 'resultat_exercice', etablissement: etablissement }
|
||||
|
||||
= render partial: 'shared/dossiers/identite_entreprise_bilan_detail',
|
||||
locals: { libelle: "Excédent brut d’exploitation", key: 'excedent_brut_exploitation', etablissement: etablissement }
|
||||
= render partial: 'shared/dossiers/identite_entreprise_bilan_detail',
|
||||
locals: { libelle: "Excédent brut d’exploitation", key: 'excedent_brut_exploitation', etablissement: etablissement }
|
||||
|
||||
= render partial: 'shared/dossiers/identite_entreprise_bilan_detail',
|
||||
locals: { libelle: 'Fonds de roulement net global', key: 'fonds_roulement_net_global', etablissement: etablissement }
|
||||
= render partial: 'shared/dossiers/identite_entreprise_bilan_detail',
|
||||
locals: { libelle: 'Fonds de roulement net global', key: 'fonds_roulement_net_global', etablissement: etablissement }
|
||||
|
||||
= render partial: 'shared/dossiers/identite_entreprise_bilan_detail',
|
||||
locals: { libelle: 'Besoin en fonds de roulement', key: 'besoin_en_fonds_de_roulement', etablissement: etablissement }
|
||||
%tr
|
||||
%td.libelle
|
||||
Chiffres financiers clés (Banque de France)
|
||||
= "en #{pretty_currency_unit(etablissement.entreprise_bilans_bdf_monnaie)} :"
|
||||
= render partial: 'shared/dossiers/identite_entreprise_bilan_detail',
|
||||
locals: { libelle: 'Besoin en fonds de roulement', key: 'besoin_en_fonds_de_roulement', etablissement: etablissement }
|
||||
.fr-my-2v
|
||||
%p.fr-text-action-high--grey.fr-mb-0
|
||||
Chiffres financiers clés (Banque de France)
|
||||
= "en #{pretty_currency_unit(etablissement.entreprise_bilans_bdf_monnaie)} :"
|
||||
|
||||
- if controller.is_a?(Instructeurs::AvisController)
|
||||
%td
|
||||
Les consulter
|
||||
= link_to "au format csv", bilans_bdf_instructeur_avis_path(@avis, format: 'csv')
|
||||
,
|
||||
= link_to "au format xlsx", bilans_bdf_instructeur_avis_path(@avis, format: 'xlsx')
|
||||
ou
|
||||
= link_to "au format ods", bilans_bdf_instructeur_avis_path(@avis, format: 'ods')
|
||||
- else
|
||||
%td
|
||||
Les consulter
|
||||
= link_to "au format csv", bilans_bdf_instructeur_dossier_path(procedure_id: @dossier.procedure.id, dossier_id: @dossier.id, format: 'csv')
|
||||
,
|
||||
= link_to "au format xlsx", bilans_bdf_instructeur_dossier_path(procedure_id: @dossier.procedure.id, dossier_id: @dossier.id, format: 'xlsx')
|
||||
ou
|
||||
= link_to "au format ods", bilans_bdf_instructeur_dossier_path(procedure_id: @dossier.procedure.id, dossier_id: @dossier.id, format: 'ods')
|
||||
- if controller.is_a?(Instructeurs::AvisController)
|
||||
.champ-content.fr-text-action-high--grey
|
||||
%p
|
||||
Les consulter
|
||||
= link_to "au format csv", bilans_bdf_instructeur_avis_path(@avis, format: 'csv')
|
||||
,
|
||||
= link_to "au format xlsx", bilans_bdf_instructeur_avis_path(@avis, format: 'xlsx')
|
||||
ou
|
||||
= link_to "au format ods", bilans_bdf_instructeur_avis_path(@avis, format: 'ods')
|
||||
- else
|
||||
%tr
|
||||
%td.libelle
|
||||
Bilans Banque de France :
|
||||
%td Les 3 derniers bilans connus de votre entreprise par la Banque de France ont été joints à votre dossier.
|
||||
- if etablissement.entreprise_attestation_sociale.attached?
|
||||
%tr
|
||||
%td.libelle Attestation sociale :
|
||||
- if profile == 'instructeur'
|
||||
%td= link_to "Consulter l'attestation", url_for(etablissement.entreprise_attestation_sociale)
|
||||
- else
|
||||
%td Une attestation de vigilance délivrée par l'ACOSS a été jointe à votre dossier.
|
||||
.champ-content.fr-text-action-high--grey
|
||||
%p
|
||||
Les consulter
|
||||
= link_to "au format csv", bilans_bdf_instructeur_dossier_path(procedure_id: @dossier.procedure.id, dossier_id: @dossier.id, format: 'csv')
|
||||
,
|
||||
= link_to "au format xlsx", bilans_bdf_instructeur_dossier_path(procedure_id: @dossier.procedure.id, dossier_id: @dossier.id, format: 'xlsx')
|
||||
ou
|
||||
= link_to "au format ods", bilans_bdf_instructeur_dossier_path(procedure_id: @dossier.procedure.id, dossier_id: @dossier.id, format: 'ods')
|
||||
- else
|
||||
.fr-my-2v
|
||||
%p.fr-text-action-high--grey.fr-mb-0
|
||||
Bilans Banque de France :
|
||||
.champ-content.fr-text-action-high--grey
|
||||
%p Les 3 derniers bilans connus de votre entreprise par la Banque de France ont été joints à votre dossier.
|
||||
- if etablissement.entreprise_attestation_sociale.attached?
|
||||
.fr-my-2v
|
||||
%p.fr-text-action-high--grey.fr-mb-0 Attestation sociale :
|
||||
- if profile == 'instructeur'
|
||||
.champ-content.fr-text-action-high--grey
|
||||
%p= link_to "Consulter l'attestation", url_for(etablissement.entreprise_attestation_sociale)
|
||||
- else
|
||||
.champ-content.fr-text-action-high--grey
|
||||
%p Une attestation de vigilance délivrée par l'ACOSS a été jointe à votre dossier.
|
||||
|
||||
- if etablissement.entreprise_attestation_fiscale.attached?
|
||||
%tr
|
||||
%td.libelle Attestation fiscale :
|
||||
- if profile == 'instructeur'
|
||||
%td= link_to "Consulter l'attestation", url_for(etablissement.entreprise_attestation_fiscale)
|
||||
- else
|
||||
%td Une attestation fiscale délivrée par l'URSSAF a été jointe à votre dossier.
|
||||
- if etablissement.entreprise_attestation_fiscale.attached?
|
||||
.fr-my-2v
|
||||
%p.fr-text-action-high--grey.fr-mb-0 Attestation fiscale :
|
||||
- if profile == 'instructeur'
|
||||
.champ-content.fr-text-action-high--grey
|
||||
%p= link_to "Consulter l'attestation", url_for(etablissement.entreprise_attestation_fiscale)
|
||||
- else
|
||||
.champ-content.fr-text-action-high--grey
|
||||
%p Une attestation fiscale délivrée par l'URSSAF a été jointe à votre dossier.
|
||||
|
||||
- if etablissement.association?
|
||||
%tr
|
||||
%td.libelle Numéro RNA :
|
||||
%td= etablissement.association_rna
|
||||
%tr
|
||||
%td.libelle Titre :
|
||||
%td= etablissement.association_titre
|
||||
%tr
|
||||
%td.libelle Objet :
|
||||
%td= etablissement.association_objet
|
||||
%tr
|
||||
%td.libelle Date de création :
|
||||
%td= try_format_date(etablissement.association_date_creation)
|
||||
%tr
|
||||
%td.libelle Date de publication :
|
||||
%td= try_format_date(etablissement.association_date_publication)
|
||||
%tr
|
||||
%td.libelle Date de déclaration :
|
||||
%td= try_format_date(etablissement.association_date_declaration)
|
||||
- if etablissement.association?
|
||||
.fr-my-2v
|
||||
%p.fr-text-action-high--grey.fr-mb-0 Numéro RNA :
|
||||
.champ-content.fr-text-action-high--grey
|
||||
%p= etablissement.association_rna
|
||||
.fr-my-2v
|
||||
%p.fr-text-action-high--grey.fr-mb-0 Titre :
|
||||
.champ-content.fr-text-action-high--grey
|
||||
%p= etablissement.association_titre
|
||||
.fr-my-2v
|
||||
%p.fr-text-action-high--grey.fr-mb-0 Objet :
|
||||
.champ-content.fr-text-action-high--grey
|
||||
%p= etablissement.association_objet
|
||||
.fr-my-2v
|
||||
%p.fr-text-action-high--grey.fr-mb-0 Date de création :
|
||||
.champ-content.fr-text-action-high--grey
|
||||
%p= try_format_date(etablissement.association_date_creation)
|
||||
.fr-my-2v
|
||||
%p.fr-text-action-high--grey.fr-mb-0 Date de publication :
|
||||
.champ-content.fr-text-action-high--grey
|
||||
%p= try_format_date(etablissement.association_date_publication)
|
||||
.fr-my-2v
|
||||
%p.fr-text-action-high--grey.fr-mb-0 Date de déclaration :
|
||||
.champ-content.fr-text-action-high--grey
|
||||
%p= try_format_date(etablissement.association_date_declaration)
|
||||
|
||||
- unless local_assigns[:short_identity]
|
||||
%p
|
||||
|
|
|
@ -1,19 +1,18 @@
|
|||
%table.table.vertical.dossier-champs{ role: :presentation }
|
||||
%tbody
|
||||
%tr
|
||||
%td.libelle
|
||||
= t('views.users.dossiers.identite.civility')
|
||||
%td= individual.gender
|
||||
%tr
|
||||
%td.libelle
|
||||
= t('views.users.dossiers.identite.first_name')
|
||||
%td= individual.prenom
|
||||
%tr
|
||||
%td.libelle
|
||||
= t('views.users.dossiers.identite.last_name')
|
||||
%td= individual.nom
|
||||
- if individual.birthdate.present?
|
||||
%tr
|
||||
%td.libelle
|
||||
= t('views.users.dossiers.identite.birthdate')
|
||||
%td= try_format_date(individual.birthdate)
|
||||
|
||||
.fr-my-2v
|
||||
%p.fr-text-action-high--grey.fr-mb-0= t('views.users.dossiers.identite.civility')
|
||||
.champ-content.fr-text-action-high--grey
|
||||
%p= individual.gender
|
||||
.fr-my-2v
|
||||
%p.fr-text-action-high--grey.fr-mb-0= t('views.users.dossiers.identite.first_name')
|
||||
.champ-content.fr-text-action-high--grey
|
||||
%p= individual.prenom
|
||||
.fr-my-2v
|
||||
%p.fr-text-action-high--grey.fr-mb-0= t('views.users.dossiers.identite.last_name')
|
||||
.champ-content.fr-text-action-high--grey
|
||||
%p= individual.nom
|
||||
- if individual.birthdate.present?
|
||||
.fr-my-2v
|
||||
%p.fr-text-action-high--grey.fr-mb-0= t('views.users.dossiers.identite.birthdate')
|
||||
.champ-content.fr-text-action-high--grey
|
||||
%p= try_format_date(individual.birthdate)
|
||||
|
|
|
@ -1,26 +1,27 @@
|
|||
%table.table.vertical.dossier-champs{ role: :presentation }
|
||||
%tbody
|
||||
%tr
|
||||
%td.libelle Déposé le :
|
||||
%td= l(dossier.depose_at, format: '%d %B %Y')
|
||||
%div
|
||||
%p.fr-my-4v.fr-px-4v.fr-text-action-high--grey
|
||||
= l(dossier.depose_at, format: '%d %B %Y %H:%m')
|
||||
- if dossier.updated_at != dossier.depose_at
|
||||
= t(:updated_at, scope: [:views, :shared, :dossiers, :form], datetime: l(dossier.updated_at, format: :long))
|
||||
|
||||
|
||||
- if dossier.justificatif_motivation.attached?
|
||||
%tr
|
||||
%td.libelle Justificatif :
|
||||
%td
|
||||
.fr-my-4v.fr-px-4v
|
||||
%p.fr-text-action-high--grey.fr-mb-0 Justificatif :
|
||||
.champ-content.fr-text-action-high--grey
|
||||
.action
|
||||
= render Attachment::ShowComponent.new(attachment: dossier.justificatif_motivation.attachment)
|
||||
|
||||
- if dossier.motivation.present?
|
||||
%tr
|
||||
%td.libelle Motivation :
|
||||
%td
|
||||
.fr-my-4v.fr-px-4v
|
||||
%p.fr-text-action-high--grey.fr-mb-0 Motivation :
|
||||
.champ-content.fr-text-action-high--grey
|
||||
.action
|
||||
= dossier.motivation
|
||||
|
||||
- if dossier.attestation.present?
|
||||
%tr
|
||||
%td.libelle Attestation :
|
||||
%td
|
||||
.fr-my-4v.fr-px-4v
|
||||
%p.fr-text-action-high--grey.fr-mb-0 Attestation :
|
||||
.champ-content.fr-text-action-high--grey
|
||||
.action
|
||||
= link_to('Voir l’attestation', attestation_instructeur_dossier_path(dossier.procedure, dossier), target: '_blank', rel: 'noopener')
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
%table.table.vertical.dossier-champs{ role: :presentation }
|
||||
%tbody
|
||||
%tr
|
||||
%td.libelle Email :
|
||||
%td= user_deleted ? "#{email} (l’usager a supprimé son compte)" : email
|
||||
.fr-my-2v
|
||||
%p.fr-text-action-high--grey.fr-mb-0 Email :
|
||||
.champ-content.fr-text-action-high--grey
|
||||
%p= user_deleted ? "#{email} (l’usager a supprimé son compte)" : email
|
||||
|
|
|
@ -14,7 +14,10 @@
|
|||
|
||||
= render partial: 'shared/dossiers/demande', locals: { dossier: @dossier, demande_seen_at: nil, profile: 'usager' }
|
||||
|
||||
.container
|
||||
- if !@dossier.read_only?
|
||||
= link_to t('views.users.dossiers.demande.edit_dossier'), modifier_dossier_path(@dossier), class: 'fr-btn fr-btn-sm', 'title'=> "Modifier mon dossier tant qu'il n'est pas passé en instruction"
|
||||
.clearfix
|
||||
|
||||
.fr-container
|
||||
.fr-grid-row
|
||||
.fr-col-12.fr-col-offset-lg-2.fr-col-lg-8
|
||||
- if !@dossier.read_only?
|
||||
= link_to t('views.users.dossiers.demande.edit_dossier'), modifier_dossier_path(@dossier), class: 'fr-btn fr-btn-sm', 'title'=> "Modifier mon dossier tant qu'il n'est pas passé en instruction"
|
||||
.clearfix
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
= render partial: 'invites/dropdown', locals: { dossier: dossier, morphing: false }
|
||||
- if dossier.can_be_updated_by_user? && !current_page?(modifier_dossier_path(dossier))
|
||||
= link_to t('views.users.dossiers.show.header.edit_dossier'), modifier_dossier_path(dossier), class: 'fr-btn fr-btn-sm',
|
||||
title: { label: t('views.users.dossiers.show.header.edit_dossier_title') }
|
||||
title: t('views.users.dossiers.show.header.edit_dossier_title')
|
||||
= render(partial: 'users/dossiers/show/print_dossier', locals: { dossier: dossier })
|
||||
|
||||
%nav.tabs
|
||||
|
|
|
@ -330,6 +330,8 @@ en:
|
|||
hello: Dear Sir or Madam,
|
||||
best_regards: Best Regards,
|
||||
dossiers:
|
||||
form:
|
||||
updated_at: "updated at %{datetime}"
|
||||
edit:
|
||||
autosave: Your file is automatically saved after each modification. You can close the window at any time and pick up where you left off later.
|
||||
notice: "Download the notice of the procedure"
|
||||
|
|
|
@ -330,6 +330,8 @@ fr:
|
|||
hello: Bonjour,
|
||||
best_regards: Bonne journée,
|
||||
dossiers:
|
||||
form:
|
||||
updated_at: "modifié le %{datetime}"
|
||||
edit:
|
||||
autosave: Votre dossier est enregistré automatiquement après chaque modification. Vous pouvez à tout moment fermer la fenêtre et reprendre plus tard là où vous en étiez.
|
||||
notice: Télécharger le guide de la démarche
|
||||
|
@ -341,9 +343,10 @@ fr:
|
|||
write_message_placeholder: "Écrivez votre message ici"
|
||||
write_message_to_administration_placeholder: "Écrivez votre message à l’administration ici"
|
||||
demande:
|
||||
en_construction: "Date de dépôt du dossier"
|
||||
requester_identity: "Identité du demandeur"
|
||||
my_identity: "Mon identité"
|
||||
form: "Formulaire"
|
||||
form: "Sections du formulaire"
|
||||
edit_siret: "Modifier le SIRET"
|
||||
edit_identity: "Modifier l’identité"
|
||||
instructeurs:
|
||||
|
@ -690,6 +693,10 @@ fr:
|
|||
time:
|
||||
formats:
|
||||
default: "%d %B %Y %R"
|
||||
long: "%d %B %y %H:%m"
|
||||
datetime:
|
||||
formats:
|
||||
long: "%d %B %y %H:%m"
|
||||
pluralize:
|
||||
case:
|
||||
one: dossier
|
||||
|
|
|
@ -108,7 +108,7 @@ describe 'shared/dossiers/champs', type: :view do
|
|||
let(:champ) { create(:champ_dossier_link, dossier: dossier, value: nil) }
|
||||
let(:champs) { [champ] }
|
||||
|
||||
it { is_expected.to include("Pas de dossier associé") }
|
||||
it { is_expected.to include("non saisi (facultatif)") }
|
||||
end
|
||||
|
||||
context "with seen_at" do
|
||||
|
|
Loading…
Reference in a new issue