aboutsummaryrefslogtreecommitdiffstats
path: root/client/views.py
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--client/views.py13
1 files changed, 12 insertions, 1 deletions
diff --git a/client/views.py b/client/views.py
index dfb5dbf..5160927 100644
--- a/client/views.py
+++ b/client/views.py
@@ -95,7 +95,18 @@ def index(request):
for uc in ucs:
documents = Document.objects.filter(
Q(usercode=uc) & ~Q(status='archive')).select_related("personal_data", "medical_data", "document_type", "user")
- docs.append([uc, documents])
+ color_mapping = {
+ "diga": "#ffeb3b",
+ "muta": "#03a9f4",
+ "reparto": "#795548",
+ "posto": "#f44336",
+ "clan": "#4caf50"
+ }
+ if uc.branca == None:
+ color = "black"
+ else:
+ color = color_mapping[uc.branca.name]
+ docs.append([uc, documents, color])
# show only docs of the user and non archived
vac_file = ["/server/media/", "/vac_certificate/doc"]