diff --git a/src/api/finance/urls.py b/src/api/finance/urls.py index fc2e4f0..d5d5dd5 100644 --- a/src/api/finance/urls.py +++ b/src/api/finance/urls.py @@ -1,15 +1,14 @@ from django.urls import path + from . import views urlpatterns = [ path("", views.finance_dashboard, name="finance_dashboard"), - # Invoices path("invoices/", views.invoice_list, name="invoice_list"), path("invoices/create/", views.invoice_create, name="invoice_create"), path("invoices//edit/", views.invoice_edit, name="invoice_edit"), path("invoices//delete/", views.invoice_delete, name="invoice_delete"), - # Expenses path("expenses/", views.expense_list, name="expense_list"), path("expenses/create/", views.expense_create, name="expense_create"), diff --git a/templates/productivity/dashboard.html b/templates/productivity/dashboard.html new file mode 100644 index 0000000..0f68e51 --- /dev/null +++ b/templates/productivity/dashboard.html @@ -0,0 +1,115 @@ +{% extends "shared/base.html" %} +{% load static %} + +{% block content %} +{% include "shared/navbar.html" %} + +
+
+
+

Productivity Dashboard

+ +
+ + +
+
+
Recent Notes
+
{{ recent_notes|length }}
+
Last {{ recent_notes|length }} notes
+
+ +
+
Recent Time Entries
+
{{ recent_time_entries|length }}
+
Tracked sessions
+
+ +
+
Tracked Hours (Recent)
+
{{ total_tracked_hours|floatformat:2 }}
+
From recent entries
+
+
+ +
+ +
+
+

Recent Notes

+ View All +
+
+ {% for note in recent_notes %} +
+
+
+

{{ note.title }}

+

+ {{ note.created_at|date:"M d, Y H:i" }} +

+
+ Edit +
+

+ {{ note.content }} +

+
+ {% empty %} +

No notes yet.

+ {% endfor %} +
+
+ + +
+
+

Recent Time Entries

+ View All +
+
+ + + + + + + + + + + + {% for entry in recent_time_entries %} + + + + + + + + {% empty %} + + + + {% endfor %} + +
DescriptionProjectTaskStartDuration
{{ entry.description }} + {% if entry.project %}{{ entry.project.name }}{% else %}-{% endif %} + + {% if entry.task %}{{ entry.task.title }}{% else %}-{% endif %} + + {{ entry.start_time|date:"M d, Y H:i" }} + + {% if entry.duration %}{{ entry.duration }}{% else %}-{% endif %} +
No time entries yet.
+
+
+
+
+
+{% endblock %} + + diff --git a/templates/productivity/note_form.html b/templates/productivity/note_form.html new file mode 100644 index 0000000..0234978 --- /dev/null +++ b/templates/productivity/note_form.html @@ -0,0 +1,47 @@ +{% extends "shared/base.html" %} +{% load static %} + +{% block content %} +{% include "shared/navbar.html" %} + +
+
+
+

+ {% if note %}Edit Note{% else %}New Note{% endif %} +

+
+ +
+
+ {% csrf_token %} + +
+ + +
+ +
+ + +
+ +
+ Cancel + +
+
+
+
+
+{% endblock %} + + diff --git a/templates/productivity/note_list.html b/templates/productivity/note_list.html new file mode 100644 index 0000000..e8a3e89 --- /dev/null +++ b/templates/productivity/note_list.html @@ -0,0 +1,51 @@ +{% extends "shared/base.html" %} +{% load static %} + +{% block content %} +{% include "shared/navbar.html" %} + +
+
+
+

Notes

+ New Note +
+ +
+ {% if notes %} +
+ {% for note in notes %} +
+
+
+

{{ note.title }}

+

{{ note.content }}

+
+
+ + {{ note.updated_at|date:"M d, Y H:i" }} + +
+ Edit +
+ {% csrf_token %} + +
+
+
+
+
+ {% endfor %} +
+ {% else %} +

No notes yet. Create your first note!

+ {% endif %} +
+
+
+{% endblock %} + + diff --git a/templates/productivity/timeentry_form.html b/templates/productivity/timeentry_form.html new file mode 100644 index 0000000..e6e1fec --- /dev/null +++ b/templates/productivity/timeentry_form.html @@ -0,0 +1,87 @@ +{% extends "shared/base.html" %} +{% load static %} + +{% block content %} +{% include "shared/navbar.html" %} + +
+
+
+

+ {% if time_entry %}Edit Time Entry{% else %}Log Time{% endif %} +

+
+ +
+
+ {% csrf_token %} + +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+
+ + +
+ +
+ + +
+
+ +
+ Cancel + +
+
+
+
+
+{% endblock %} + + diff --git a/templates/productivity/timeentry_list.html b/templates/productivity/timeentry_list.html new file mode 100644 index 0000000..5f0a2ac --- /dev/null +++ b/templates/productivity/timeentry_list.html @@ -0,0 +1,73 @@ +{% extends "shared/base.html" %} +{% load static %} + +{% block content %} +{% include "shared/navbar.html" %} + +
+
+
+

Time Entries

+ Log Time +
+ +
+
+ + + + + + + + + + + + + + {% for entry in time_entries %} + + + + + + + + + + {% empty %} + + + + {% endfor %} + +
DescriptionProjectTaskStartEndDurationActions
{{ entry.description }} + {% if entry.project %}{{ entry.project.name }}{% else %}-{% endif %} + + {% if entry.task %}{{ entry.task.title }}{% else %}-{% endif %} + + {{ entry.start_time|date:"M d, Y H:i" }} + + {% if entry.end_time %}{{ entry.end_time|date:"M d, Y H:i" }}{% else %}In Progress{% endif %} + + {% if entry.duration %}{{ entry.duration }}{% else %}-{% endif %} + +
+ Edit +
+ {% csrf_token %} + +
+
+
No time entries yet.
+
+
+
+
+{% endblock %} + +