From 8c7992c2c944f19fea374c30f2b6df600685458f Mon Sep 17 00:00:00 2001 From: Trey <73353716+TreyWW@users.noreply.github.com> Date: Sun, 13 Oct 2024 18:39:17 +0100 Subject: [PATCH] improved topbar and fixed mypy issues Signed-off-by: Trey <73353716+TreyWW@users.noreply.github.com> --- backend/apps.py | 6 ++++++ backend/core/models.py | 4 ++-- backend/events/__init__.py | 0 backend/onboarding/views/__init__.py | 0 frontend/templates/base/topbar/_topbar.html | 10 ++++++++++ 5 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 backend/events/__init__.py create mode 100644 backend/onboarding/views/__init__.py diff --git a/backend/apps.py b/backend/apps.py index b9b0f8795..7af63d87f 100644 --- a/backend/apps.py +++ b/backend/apps.py @@ -5,4 +5,10 @@ class BackendConfig(AppConfig): name = "backend" def ready(self): + from .finance import signals + from .core import signals + + # from .clients import signals + # from .storage import signals + # from .events import signals pass diff --git a/backend/core/models.py b/backend/core/models.py index 874b53cb6..cdd4a7f95 100644 --- a/backend/core/models.py +++ b/backend/core/models.py @@ -2,7 +2,7 @@ import itertools import typing -from datetime import datetime, date, timedelta +from datetime import datetime, timedelta from typing import Literal, Union from uuid import uuid4 @@ -94,7 +94,7 @@ def name(self): return self.first_name @property - def teams_apart_of(self) -> set[QuerySet[Organization]]: + def teams_apart_of(self): return set(itertools.chain(self.teams_joined.all(), self.teams_leader_of.all())) @property diff --git a/backend/events/__init__.py b/backend/events/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/backend/onboarding/views/__init__.py b/backend/onboarding/views/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/frontend/templates/base/topbar/_topbar.html b/frontend/templates/base/topbar/_topbar.html index 27930d742..c387696e6 100644 --- a/frontend/templates/base/topbar/_topbar.html +++ b/frontend/templates/base/topbar/_topbar.html @@ -15,6 +15,16 @@
+ {% include 'base/topbar/team_selector/selector.html' %}