1
0
forked from ScoDoc/ScoDoc

VisualisationAssiduitesGroupe: supprime col. 'Présences justifiées'. Fix #787

This commit is contained in:
Emmanuel Viennet 2023-10-09 15:48:00 +02:00
parent f4a2a0f888
commit a81f8e9679

View File

@ -105,12 +105,13 @@ class RowAssi(tb.Row):
stats = self._get_etud_stats(etud) stats = self._get_etud_stats(etud)
for key, value in stats.items(): for key, value in stats.items():
self.add_cell(key, value[0], f"{value[1] - value[2]}", "assi_stats") self.add_cell(key, value[0], f"{value[1] - value[2]}", "assi_stats")
self.add_cell( if key != "present":
key + "_justi", self.add_cell(
value[0] + " Justifiées", key + "_justi",
f"{value[2]}", value[0] + " Justifiées",
"assi_stats", f"{value[2]}",
) "assi_stats",
)
compte_justificatifs = scass.filter_by_date( compte_justificatifs = scass.filter_by_date(
etud.justificatifs, Justificatif, self.dates[0], self.dates[1] etud.justificatifs, Justificatif, self.dates[0], self.dates[1]
@ -128,6 +129,7 @@ class RowAssi(tb.Row):
) )
def _get_etud_stats(self, etud: Identite) -> dict[str, list[str, float, float]]: def _get_etud_stats(self, etud: Identite) -> dict[str, list[str, float, float]]:
# XXX TODO @iziram commentaire sur la fonction et la var. retour
retour: dict[str, tuple[str, float, float]] = { retour: dict[str, tuple[str, float, float]] = {
"present": ["Présences", 0.0, 0.0], "present": ["Présences", 0.0, 0.0],
"retard": ["Retards", 0.0, 0.0], "retard": ["Retards", 0.0, 0.0],