|
15 | 15 | <% end %> |
16 | 16 | <% else %> |
17 | 17 | <% c.with_value do %> |
18 | | - <% case champ.type_champ %> |
19 | | - <% when TypeDeChamp.type_champs.fetch(:carte) %> |
20 | | - <%= render partial: "shared/champs/carte/show", locals: { champ: champ } %> |
21 | | - <% when TypeDeChamp.type_champs.fetch(:dossier_link) %> |
22 | | - <%= render partial: "shared/champs/dossier_link/show", locals: { champ: champ } %> |
23 | | - <% when TypeDeChamp.type_champs.fetch(:drop_down_list) %> |
24 | | - <%= render partial: "shared/champs/drop_down_list/show", locals: { champ: champ } %> |
25 | | - <% when TypeDeChamp.type_champs.fetch(:multiple_drop_down_list) %> |
26 | | - <%= render partial: "shared/champs/multiple_drop_down_list/show", locals: { champ: champ } %> |
27 | | - <% when TypeDeChamp.type_champs.fetch(:piece_justificative) %> |
28 | | - <%= render partial: "shared/champs/piece_justificative/show", locals: { champ: champ, profile: @profile } %> |
29 | | - <% when TypeDeChamp.type_champs.fetch(:siret) %> |
30 | | - <% etablissement = champ.etablissement %> |
31 | | - <% if etablissement.present? %> |
32 | | - <% if etablissement.as_degraded_mode? %> |
33 | | - <%= render Dossiers::DegradedIdentiteEntrepriseComponent.new(etablissement:, profile: @profile) %> |
34 | | - <% elsif @profile == 'usager' %> |
35 | | - <%= render Dossiers::IdentiteEntrepriseForUsagerComponent.new(etablissement:) %> |
| 18 | + <div class="flex align-baseline wrap" style="column-gap: 0.5rem"> |
| 19 | + <% case champ.type_champ %> |
| 20 | + <% when TypeDeChamp.type_champs.fetch(:carte) %> |
| 21 | + <%= render partial: "shared/champs/carte/show", locals: { champ: champ } %> |
| 22 | + <% when TypeDeChamp.type_champs.fetch(:dossier_link) %> |
| 23 | + <%= render partial: "shared/champs/dossier_link/show", locals: { champ: champ } %> |
| 24 | + <% when TypeDeChamp.type_champs.fetch(:drop_down_list) %> |
| 25 | + <%= render partial: "shared/champs/drop_down_list/show", locals: { champ: champ } %> |
| 26 | + <% when TypeDeChamp.type_champs.fetch(:multiple_drop_down_list) %> |
| 27 | + <%= render partial: "shared/champs/multiple_drop_down_list/show", locals: { champ: champ } %> |
| 28 | + <% when TypeDeChamp.type_champs.fetch(:piece_justificative) %> |
| 29 | + <%= render partial: "shared/champs/piece_justificative/show", locals: { champ: champ, profile: @profile } %> |
| 30 | + <% when TypeDeChamp.type_champs.fetch(:siret) %> |
| 31 | + <% etablissement = champ.etablissement %> |
| 32 | + <% if etablissement.present? %> |
| 33 | + <% if etablissement.as_degraded_mode? %> |
| 34 | + <%= render Dossiers::DegradedIdentiteEntrepriseComponent.new(etablissement:, profile: @profile) %> |
| 35 | + <% elsif @profile == 'usager' %> |
| 36 | + <%= render Dossiers::IdentiteEntrepriseForUsagerComponent.new(etablissement:) %> |
| 37 | + <% else %> |
| 38 | + <%= render Dossiers::IdentiteEntrepriseComponent.new(champ:, avis: @avis) %> |
| 39 | + <% end %> |
| 40 | + <% end %> |
| 41 | + <% when TypeDeChamp.type_champs.fetch(:iban) %> |
| 42 | + <%= render partial: "shared/champs/iban/show", locals: { champ: champ } %> |
| 43 | + <% when TypeDeChamp.type_champs.fetch(:annuaire_education) %> |
| 44 | + <%= render Dossiers::AnnuaireEducationComponent.new(champ:) %> |
| 45 | + <% when TypeDeChamp.type_champs.fetch(:address) %> |
| 46 | + <%= render Dossiers::AddressComponent.new(champ:) %> |
| 47 | + <% when TypeDeChamp.type_champs.fetch(:communes) %> |
| 48 | + <%= render Dossiers::CommuneComponent.new(champ:) %> |
| 49 | + <% when TypeDeChamp.type_champs.fetch(:departements) %> |
| 50 | + <%= render Dossiers::DepartementComponent.new(champ:) %> |
| 51 | + <% when TypeDeChamp.type_champs.fetch(:regions) %> |
| 52 | + <%= render Dossiers::RegionComponent.new(champ:) %> |
| 53 | + <% when TypeDeChamp.type_champs.fetch(:rna) %> |
| 54 | + <%= render Dossiers::RNAComponent.new(champ:) %> |
| 55 | + <% when TypeDeChamp.type_champs.fetch(:rnf) %> |
| 56 | + <%= render Dossiers::RNFComponent.new(champ:) %> |
| 57 | + <% when TypeDeChamp.type_champs.fetch(:epci) %> |
| 58 | + <%= render Dossiers::EpciComponent.new(champ:) %> |
| 59 | + <% when TypeDeChamp.type_champs.fetch(:cojo) %> |
| 60 | + <%= render partial: "shared/champs/cojo/show", locals: { champ: champ, profile: @profile } %> |
| 61 | + <% when TypeDeChamp.type_champs.fetch(:date) %> |
| 62 | + <% if @profile != 'usager' && champ.prefilled_from_france_connect_information? %> |
| 63 | + <%= render Dossiers::DatePrefilledFromFranceConnectComponent.new(champ: champ) %> |
36 | 64 | <% else %> |
37 | | - <%= render Dossiers::IdentiteEntrepriseComponent.new(champ:, avis: @avis) %> |
| 65 | + <p class="copy-zone"><%= champ.to_s %></p> |
38 | 66 | <% end %> |
39 | | - <% end %> |
40 | | - <% when TypeDeChamp.type_champs.fetch(:iban) %> |
41 | | - <%= render partial: "shared/champs/iban/show", locals: { champ: champ } %> |
42 | | - <% when TypeDeChamp.type_champs.fetch(:annuaire_education) %> |
43 | | - <%= render Dossiers::AnnuaireEducationComponent.new(champ:) %> |
44 | | - <% when TypeDeChamp.type_champs.fetch(:address) %> |
45 | | - <%= render Dossiers::AddressComponent.new(champ:) %> |
46 | | - <% when TypeDeChamp.type_champs.fetch(:communes) %> |
47 | | - <%= render Dossiers::CommuneComponent.new(champ:) %> |
48 | | - <% when TypeDeChamp.type_champs.fetch(:departements) %> |
49 | | - <%= render Dossiers::DepartementComponent.new(champ:) %> |
50 | | - <% when TypeDeChamp.type_champs.fetch(:regions) %> |
51 | | - <%= render Dossiers::RegionComponent.new(champ:) %> |
52 | | - <% when TypeDeChamp.type_champs.fetch(:rna) %> |
53 | | - <%= render Dossiers::RNAComponent.new(champ:) %> |
54 | | - <% when TypeDeChamp.type_champs.fetch(:rnf) %> |
55 | | - <%= render Dossiers::RNFComponent.new(champ:) %> |
56 | | - <% when TypeDeChamp.type_champs.fetch(:epci) %> |
57 | | - <%= render Dossiers::EpciComponent.new(champ:) %> |
58 | | - <% when TypeDeChamp.type_champs.fetch(:cojo) %> |
59 | | - <%= render partial: "shared/champs/cojo/show", locals: { champ: champ, profile: @profile } %> |
60 | | - <% when TypeDeChamp.type_champs.fetch(:date) %> |
61 | | - <% if @profile != 'usager' && champ.prefilled_from_france_connect_information? %> |
62 | | - <%= render Dossiers::DatePrefilledFromFranceConnectComponent.new(champ: champ) %> |
63 | | - <% else %> |
| 67 | + <% when TypeDeChamp.type_champs.fetch(:datetime) %> |
64 | 68 | <p class="copy-zone"><%= champ.to_s %></p> |
| 69 | + <% when TypeDeChamp.type_champs.fetch(:number), TypeDeChamp.type_champs.fetch(:integer_number), TypeDeChamp.type_champs.fetch(:decimal_number) %> |
| 70 | + <p class="copy-zone"> |
| 71 | + <%= helpers.number_with_html_delimiter(champ.to_s) %> |
| 72 | + <span data-copy-message-placeholder></span> |
| 73 | + </p> |
| 74 | + <% when TypeDeChamp.type_champs.fetch(:referentiel) %> |
| 75 | + <%= render Dossiers::ReferentielComponent.new(champ:, profile: @profile) %> |
| 76 | + <% when TypeDeChamp.type_champs.fetch(:quotient_familial) %> |
| 77 | + <%= render Dossiers::QuotientFamilialComponent.new(champ:, profile: @profile) %> |
| 78 | + <% else %> |
| 79 | + <div class="copy-zone" data-to-copy="<%= champ.to_s.strip %>"> |
| 80 | + <%= helpers.format_text_value(champ.to_s.strip) %> |
| 81 | + </div> |
65 | 82 | <% end %> |
66 | | - <% when TypeDeChamp.type_champs.fetch(:datetime) %> |
67 | | - <p class="copy-zone"><%= champ.to_s %></p> |
68 | | - <% when TypeDeChamp.type_champs.fetch(:number), TypeDeChamp.type_champs.fetch(:integer_number), TypeDeChamp.type_champs.fetch(:decimal_number) %> |
69 | | - <p class="copy-zone"> |
70 | | - <%= helpers.number_with_html_delimiter(champ.to_s) %> |
71 | | - <span data-copy-message-placeholder></span> |
72 | | - </p> |
73 | | - <% when TypeDeChamp.type_champs.fetch(:referentiel) %> |
74 | | - <%= render Dossiers::ReferentielComponent.new(champ:, profile: @profile) %> |
75 | | - <% when TypeDeChamp.type_champs.fetch(:quotient_familial) %> |
76 | | - <%= render Dossiers::QuotientFamilialComponent.new(champ:, profile: @profile) %> |
77 | | - <% else %> |
78 | | - <div class="copy-zone" data-to-copy="<%= champ.to_s.strip %>"> |
79 | | - <%= helpers.format_text_value(champ.to_s.strip) %> |
80 | | - </div> |
81 | | - <% end %> |
| 83 | + |
| 84 | + <%= render Dossiers::ChampPrefilledBadgeComponent.new(champ:, profile: @profile) %> |
| 85 | + </div> |
82 | 86 | <% end %> |
83 | 87 | <% end %> |
84 | 88 | <% end %> |
|
0 commit comments