Merge pull request #9529 from demarches-simplifiees/fix-contact-information

Fix contact information
This commit is contained in:
krichtof 2023-09-27 11:33:41 +00:00 committed by GitHub
commit 63ca98b5b6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 2 deletions

View file

@ -9,6 +9,10 @@ class ContactInformation < ApplicationRecord
validates :adresse, presence: { message: 'doit être renseignée' }, allow_nil: false
validates :groupe_instructeur, presence: { message: 'doit être renseigné' }, allow_nil: false
def pretty_nom
nom
end
def telephone_url
if telephone.present?
"tel:#{telephone.gsub(/[[:blank:]]/, '')}"

View file

@ -25,6 +25,10 @@ class Service < ApplicationRecord
validates :adresse, presence: { message: 'doit être renseignée' }, allow_nil: false
validates :administrateur, presence: { message: 'doit être renseigné' }, allow_nil: false
def pretty_nom
"#{nom}, #{organisme}"
end
def clone_and_assign_to_administrateur(administrateur)
service_cloned = self.dup
service_cloned.administrateur = administrateur

View file

@ -5,6 +5,7 @@
= succeed '.' do
= link_to t('.file_messagerie'), messagerie_dossier_url(dossier), target: '_blank', rel: 'noopener'
- service = dossier&.service || dossier.procedure.service
- if service.present?
%table{ width: "100%", border: "0", cellspacing: "0", cellpadding: "0", style: "cursor:auto;color:#55575d;font-family:Helvetica, Arial, sans-serif;font-size:11px;line-height:22px;text-align:left;" }
%tr
@ -13,7 +14,6 @@
%strong
= t('.procedure_management')
= service.nom
= service.organisme
= service.adresse
%td{ width: "50%", valign: "top" }
%p

View file

@ -7,7 +7,7 @@
- if service.present?
%h3.fr-footer__top-cat= I18n.t('users.procedure_footer.managed_by.header')
.fr-footer__top-link.fr-pb-2w
%span{ lang: :fr }= "#{service.nom}, #{service.organisme},"
%span{ lang: :fr }= service.pretty_nom
%div{ lang: :fr }
= render SimpleFormatComponent.new(service.adresse, class_names_map: {paragraph: 'fr-footer__content-desc'})
%h3.fr-footer__top-cat= I18n.t('users.procedure_footer.contact.header')