From 4caa923e8a969adf224690a1a5458d01a3dad851 Mon Sep 17 00:00:00 2001 From: Raphael Odini Date: Sun, 26 Feb 2023 23:10:31 +0100 Subject: [PATCH] Display time-saving in member time_logs --- .../views/member/_partial/time_logs.html.twig | 15 +++++++++++++-- src/AppBundle/Entity/Membership.php | 2 +- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/app/Resources/views/member/_partial/time_logs.html.twig b/app/Resources/views/member/_partial/time_logs.html.twig index aec4b4fbd..f12dde14c 100644 --- a/app/Resources/views/member/_partial/time_logs.html.twig +++ b/app/Resources/views/member/_partial/time_logs.html.twig @@ -1,14 +1,25 @@ - + + {% if use_time_log_saving %} + + {% endif %} + {% if use_time_log_saving %} + + {% endif %}
TOTAL + TOTAL + {% if use_time_log_saving %} + TEMPS + {% endif %} + TOTAL CYCLE EN COURSTOTAL EPARGNE
{{ member.shiftTimeCount | duration_from_minutes }} {{ member.shiftTimeCount(membership_service.endOfCycle(member)) | duration_from_minutes }}{{ member.savingTimeCount | duration_from_minutes }}
@@ -48,7 +59,7 @@ {% for timeLog in member.timeLogs %} - + {{ timeLog.createdAt | date("d/m/Y") }} {{ timeLog.createdBy }} {{ timeLog.time | duration_from_minutes }} diff --git a/src/AppBundle/Entity/Membership.php b/src/AppBundle/Entity/Membership.php index 240df2def..9e040e29f 100644 --- a/src/AppBundle/Entity/Membership.php +++ b/src/AppBundle/Entity/Membership.php @@ -110,7 +110,7 @@ class Membership /** * @ORM\OneToMany(targetEntity="TimeLog", mappedBy="membership", cascade={"persist", "remove"}) - * @OrderBy({"createdAt" = "DESC"}) + * @OrderBy({"createdAt" = "DESC", "type" = "DESC"}) */ private $timeLogs;