Compare commits
No commits in common. "d78139a5b3fb6b2a2d535371166e18bd633cdd26" and "54429264576c89058356de6e2d5da83c319dfa73" have entirely different histories.
d78139a5b3
...
5442926457
|
@ -201,7 +201,7 @@ export {
|
||||||
syncSelectInputUntilChanged,
|
syncSelectInputUntilChanged,
|
||||||
getEl,
|
getEl,
|
||||||
conditionalElementHandler,
|
conditionalElementHandler,
|
||||||
disableElementsWhenValueNotEqual,
|
disableElementsWhenFalse,
|
||||||
disableElementsWhenTrue,
|
disableElementsWhenTrue,
|
||||||
getValueFromProperty,
|
getValueFromProperty,
|
||||||
};
|
};
|
||||||
|
|
|
@ -136,13 +136,7 @@
|
||||||
<tr>
|
<tr>
|
||||||
<td class="px-2 sm:px-4 md:px-6 md:py-2 font-mono">
|
<td class="px-2 sm:px-4 md:px-6 md:py-2 font-mono">
|
||||||
<a class="underline decoration-slate-500 sm:decoration-2"
|
<a class="underline decoration-slate-500 sm:decoration-2"
|
||||||
href="{% url 'edit_purchase' purchase.id %}">
|
href="{% url 'edit_purchase' purchase.id %}">{{ purchase.edition.name }}</a>
|
||||||
{% if purchase.type == 'dlc' %}
|
|
||||||
{{ purchase.name }} ({{ purchase.edition.name }} DLC)
|
|
||||||
{% else %}
|
|
||||||
{{ purchase.edition.name }}
|
|
||||||
{% endif %}
|
|
||||||
</a>
|
|
||||||
</td>
|
</td>
|
||||||
<td class="px-2 sm:px-4 md:px-6 md:py-2 font-mono">{{ purchase.date_finished | date:"d/m/Y" }}</td>
|
<td class="px-2 sm:px-4 md:px-6 md:py-2 font-mono">{{ purchase.date_finished | date:"d/m/Y" }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
@ -61,6 +61,7 @@
|
||||||
{% url 'start_game_session' game.id as add_session_link %}
|
{% url 'start_game_session' game.id as add_session_link %}
|
||||||
{% include 'components/button.html' with title="Start new session" text="New" link=add_session_link %}
|
{% include 'components/button.html' with title="Start new session" text="New" link=add_session_link %}
|
||||||
and Notes <span class="dark:text-slate-500">({{ sessions_with_notes_count }})</span>
|
and Notes <span class="dark:text-slate-500">({{ sessions_with_notes_count }})</span>
|
||||||
|
|
||||||
</h1>
|
</h1>
|
||||||
<ul>
|
<ul>
|
||||||
{% for session in sessions %}
|
{% for session in sessions %}
|
||||||
|
|
|
@ -2,7 +2,7 @@ from datetime import datetime, timedelta
|
||||||
from typing import Any, Callable
|
from typing import Any, Callable
|
||||||
|
|
||||||
from django.core.exceptions import ObjectDoesNotExist
|
from django.core.exceptions import ObjectDoesNotExist
|
||||||
from django.db.models import Count, F, Prefetch, Q, Sum
|
from django.db.models import Count, F, Prefetch, Sum
|
||||||
from django.db.models.functions import TruncDate
|
from django.db.models.functions import TruncDate
|
||||||
from django.http import (
|
from django.http import (
|
||||||
HttpRequest,
|
HttpRequest,
|
||||||
|
@ -344,8 +344,8 @@ def stats(request, year: int = 0):
|
||||||
this_year_purchases_unfinished = this_year_purchases_without_refunded.filter(
|
this_year_purchases_unfinished = this_year_purchases_without_refunded.filter(
|
||||||
date_finished__isnull=True
|
date_finished__isnull=True
|
||||||
).filter(
|
).filter(
|
||||||
Q(type=Purchase.GAME) | Q(type=Purchase.DLC)
|
type=Purchase.GAME
|
||||||
) # do not count battle passes etc.
|
) # do not count DLC etc.
|
||||||
|
|
||||||
this_year_purchases_unfinished_percent = int(
|
this_year_purchases_unfinished_percent = int(
|
||||||
safe_division(
|
safe_division(
|
||||||
|
|
Loading…
Reference in New Issue