From edb8fd667349ac73586804c4e2465f1b28a1d450 Mon Sep 17 00:00:00 2001 From: Jens Luedicke Date: Thu, 3 Jul 2025 12:14:48 +0200 Subject: [PATCH] Enable Project categorization. --- templates/admin_projects.html | 523 ++++++++++++++++++- templates/analytics.html | 2 +- templates/create_project.html | 13 + templates/edit_project.html | 15 + templates/manage_project_tasks.html | 783 ++++++++++++++++++++++++++++ 5 files changed, 1328 insertions(+), 8 deletions(-) create mode 100644 templates/manage_project_tasks.html diff --git a/templates/admin_projects.html b/templates/admin_projects.html index 795b0e7..eecef2e 100644 --- a/templates/admin_projects.html +++ b/templates/admin_projects.html @@ -1,10 +1,46 @@ {% extends "layout.html" %} {% block content %} -
+

Project Management

- Create New Project +
+ Create New Project + +
+
+ + + {% if projects %} @@ -14,6 +50,7 @@ Code Name + Category Team Status Start Date @@ -28,6 +65,15 @@ {{ project.code }} {{ project.name }} + + {% if project.category %} + + {{ project.category.icon or '📁' }} {{ project.category.name }} + + {% else %} + No category + {% endif %} + {% if project.team %} {{ project.team.name }} @@ -46,7 +92,8 @@ {{ project.time_entries|length }} Edit - {% if g.user.role.name == 'ADMIN' and project.time_entries|length == 0 %} + Tasks + {% if g.user.role == Role.ADMIN and project.time_entries|length == 0 %}
@@ -68,14 +115,82 @@ + + +
+ + + {% endblock %} \ No newline at end of file diff --git a/templates/analytics.html b/templates/analytics.html index d56bbb7..e84f78c 100644 --- a/templates/analytics.html +++ b/templates/analytics.html @@ -7,7 +7,7 @@
- {% if g.user.team_id and g.user.role.value in ['Team Leader', 'Supervisor', 'Administrator'] %} + {% if g.user.team_id and g.user.role in [Role.TEAM_LEADER, Role.SUPERVISOR, Role.ADMIN] %} {% endif %} diff --git a/templates/create_project.html b/templates/create_project.html index 86d3657..3e1b6fc 100644 --- a/templates/create_project.html +++ b/templates/create_project.html @@ -40,6 +40,19 @@ {% endfor %}
+ +
+ + +
diff --git a/templates/edit_project.html b/templates/edit_project.html index 5162cd6..c81ac68 100644 --- a/templates/edit_project.html +++ b/templates/edit_project.html @@ -41,6 +41,21 @@
+
+ + +
+
+ +
+ + + + + + + + + + + +{% endblock %} \ No newline at end of file