diff --git a/lemarche/siaes/models.py b/lemarche/siaes/models.py index 5864bce3b..d6264f252 100644 --- a/lemarche/siaes/models.py +++ b/lemarche/siaes/models.py @@ -923,6 +923,12 @@ def ca_display(self): return f"{ca_formatted}€" return "non disponible" + @property + def etp_count_label_display(self): + if self.kind_is_esat_or_ea_or_eatt: + return "Travailleurs en situation de handicap" + return "Salariés en insertion" + @property def etp_count_display(self): if self.employees_insertion_count: @@ -998,8 +1004,8 @@ def source_display(self): return "l'ASP" @property - def kind_is_esat_or_ea(self): - return self.kind in [siae_constants.KIND_ESAT, siae_constants.KIND_EA] + def kind_is_esat_or_ea_or_eatt(self): + return self.kind in [siae_constants.KIND_ESAT, siae_constants.KIND_EA, siae_constants.KIND_EATT] @property def completion_percent(self): diff --git a/lemarche/siaes/tests.py b/lemarche/siaes/tests.py index 87a2099c0..0be8379a8 100644 --- a/lemarche/siaes/tests.py +++ b/lemarche/siaes/tests.py @@ -136,13 +136,14 @@ def test_is_missing_content_property(self): siae_full_2.save() # to update stats self.assertFalse(siae_full_2.is_missing_content) - def test_kind_is_esat_or_ea_property(self): + def test_kind_is_esat_or_ea_or_eatt_property(self): siae_esat = SiaeFactory(kind=siae_constants.KIND_ESAT) - self.assertTrue(siae_esat.kind_is_esat_or_ea) siae_ea = SiaeFactory(kind=siae_constants.KIND_EA) - self.assertTrue(siae_ea.kind_is_esat_or_ea) + siae_eatt = SiaeFactory(kind=siae_constants.KIND_EATT) siae_ei = SiaeFactory(kind=siae_constants.KIND_EI) - self.assertFalse(siae_ei.kind_is_esat_or_ea) + for siae in [siae_esat, siae_ea, siae_eatt]: + self.assertTrue(siae.kind_is_esat_or_ea_or_eatt) + self.assertFalse(siae_ei.kind_is_esat_or_ea_or_eatt) class SiaeModelSaveTest(TestCase): diff --git a/lemarche/templates/dashboard/siae_edit_info.html b/lemarche/templates/dashboard/siae_edit_info.html index 3df7e87ce..5b002fd1a 100644 --- a/lemarche/templates/dashboard/siae_edit_info.html +++ b/lemarche/templates/dashboard/siae_edit_info.html @@ -99,7 +99,7 @@
- {% get_verbose_name siae 'employees_insertion_count' %} + Nombre de {{ siae.etp_count_label_display | lower }} {% bootstrap_field form.employees_insertion_count show_label=False %}
@@ -111,7 +111,7 @@ Conseil

- Le nombre de salariés en insertion démontre à la fois votre capacité de production et l'impact social de votre structure. + Le nombre de {{ siae.etp_count_label_display | lower }} démontre à la fois votre capacité de production et l'impact social de votre structure.

diff --git a/lemarche/templates/siaes/_detail_partner_cta.html b/lemarche/templates/siaes/_detail_partner_cta.html index 7a407a3e7..9cabe0b92 100644 --- a/lemarche/templates/siaes/_detail_partner_cta.html +++ b/lemarche/templates/siaes/_detail_partner_cta.html @@ -5,7 +5,7 @@

Vous avez besoin d'être accompagné dans vos achats inclusifs par des partenaires reconnus ?

- {% if siae.kind_is_esat_or_ea %} + {% if siae.kind_is_esat_or_ea_or_eatt %} Découvrez-les maintenant diff --git a/lemarche/templates/siaes/_useful_infos_siae.html b/lemarche/templates/siaes/_useful_infos_siae.html index acaeac3d4..202aa6be8 100644 --- a/lemarche/templates/siaes/_useful_infos_siae.html +++ b/lemarche/templates/siaes/_useful_infos_siae.html @@ -47,9 +47,9 @@
- Salariés en insertion : + {{ siae.etp_count_label_display }} : {{ siae.etp_count_display|floatformat:0|default:"non disponible" }}
- \ No newline at end of file + diff --git a/lemarche/templates/siaes/_useful_infos_siae_v2.html b/lemarche/templates/siaes/_useful_infos_siae_v2.html index 8bfbfe6ce..98958eb43 100644 --- a/lemarche/templates/siaes/_useful_infos_siae_v2.html +++ b/lemarche/templates/siaes/_useful_infos_siae_v2.html @@ -1,4 +1,5 @@ {% load array_choices_display %} +
    @@ -30,7 +31,7 @@
  • - Salariés en insertion : + {{ siae.etp_count_label_display }} : {{ siae.etp_count_display|floatformat:0|default:"non disponible" }}
  • @@ -84,4 +85,4 @@
-
\ No newline at end of file +