1
0
mirror of https://gitlab.crans.org/bde/nk20 synced 2024-12-27 09:52:22 +00:00

couleurs finalist pour le pot vieux

This commit is contained in:
root 2023-01-29 21:18:13 +01:00
parent 06fa096405
commit 770c748bd9
2 changed files with 8 additions and 8 deletions

View File

@ -78,7 +78,7 @@ def get_row_class(record):
elif record.note.balance < 0: elif record.note.balance < 0:
c += " table-danger" c += " table-danger"
#MODE VIEUXCON=ON #MODE VIEUXCON=ON
if (datetime.datetime.utcnow().timestamp() - record.note.create_at.timestamp()) > 3600*24*365*3: if (datetime.datetime.utcnow().timestamp() - record.note.created_at.timestamp()) > 3600*24*365*3:
c += " font-weight-bold" c += " font-weight-bold"
return c return c

View File

@ -223,13 +223,13 @@ class ActivityEntryView(LoginRequiredMixin, TemplateView):
# Keep only users that have a note # Keep only users that have a note
note_qs = note_qs.filter(note__noteuser__isnull=False) note_qs = note_qs.filter(note__noteuser__isnull=False)
if activity.activity_type.name != "Pot Vieux": # if activity.activity_type.name != "Pot Vieux":
# Keep only members # # Keep only members
note_qs = note_qs.filter( # note_qs = note_qs.filter(
note__noteuser__user__memberships__club=activity.attendees_club, # note__noteuser__user__memberships__club=activity.attendees_club,
note__noteuser__user__memberships__date_start__lte=timezone.now(), # note__noteuser__user__memberships__date_start__lte=timezone.now(),
note__noteuser__user__memberships__date_end__gte=timezone.now(), # note__noteuser__user__memberships__date_end__gte=timezone.now(),
) # )
# Filter with permission backend # Filter with permission backend
note_qs = note_qs.filter(PermissionBackend.filter_queryset(self.request, Alias, "view")) note_qs = note_qs.filter(PermissionBackend.filter_queryset(self.request, Alias, "view"))