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 @@
- 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.