diff --git a/apps/dashboard/apps.py b/apps/dashboard/apps.py index 7216329..9591f3a 100644 --- a/apps/dashboard/apps.py +++ b/apps/dashboard/apps.py @@ -1,4 +1,4 @@ -"""Dashboard application configuration.""" +"""Application configuration for the dashboard app.""" from __future__ import annotations @@ -6,7 +6,8 @@ class DashboardConfig(AppConfig): - """Configure the dashboard application.""" + """Configure the StudyBuddy dashboard app.""" default_auto_field = "django.db.models.BigAutoField" name = "apps.dashboard" + label = "dashboard" diff --git a/apps/dashboard/urls.py b/apps/dashboard/urls.py index 18b3a85..c00082b 100644 --- a/apps/dashboard/urls.py +++ b/apps/dashboard/urls.py @@ -1,4 +1,4 @@ -"""Dashboard URL routes.""" +"""URL routes for the authenticated dashboard.""" from __future__ import annotations diff --git a/apps/dashboard/views.py b/apps/dashboard/views.py index 5853003..24a6ccc 100644 --- a/apps/dashboard/views.py +++ b/apps/dashboard/views.py @@ -1,12 +1,21 @@ -"""Dashboard views.""" +"""Views for authenticated StudyBuddy dashboard pages.""" from __future__ import annotations from django.contrib.auth.decorators import login_required +from django.http import HttpRequest, HttpResponse from django.shortcuts import render @login_required -def index(request): - """Render the authenticated dashboard shell.""" - return render(request, "dashboard/index.html") +def index(request: HttpRequest) -> HttpResponse: + """Render the authenticated StudyBuddy dashboard shell.""" + roles = request.user.studybuddy_roles.order_by("display_name") + + return render( + request, + "dashboard/index.html", + { + "roles": roles, + }, + ) diff --git a/static/css/theme.css b/static/css/theme.css index 5d7b2fd..7d5e6fd 100644 --- a/static/css/theme.css +++ b/static/css/theme.css @@ -247,6 +247,17 @@ p { padding-left: var(--space-xl); } +.message-stack { + display: grid; + gap: var(--space-sm); + padding-top: var(--space-lg); +} + +.message-stack .alert { + margin: 0; + border-radius: var(--radius-md); +} + .hero { padding: var(--space-xxl) 0 var(--space-xxxl); text-align: center; diff --git a/templates/base.html b/templates/base.html index 3011ea3..d35644d 100644 --- a/templates/base.html +++ b/templates/base.html @@ -1,15 +1,13 @@ {% load static %} - - - + + - - + + {% block title %}StudyBuddy{% endblock %} - - +
@@ -47,6 +45,18 @@
+ {% if messages %} +
+
+ {% for message in messages %} + + {% endfor %} +
+
+ {% endif %} + {% block content %}{% endblock %}
@@ -96,5 +106,6 @@
+ diff --git a/templates/dashboard/index.html b/templates/dashboard/index.html index 3129180..20cb598 100644 --- a/templates/dashboard/index.html +++ b/templates/dashboard/index.html @@ -7,12 +7,15 @@
@@ -36,6 +39,40 @@

Dashboard

+
+
+
+ 01 +

No study sessions yet

+

+ Your dashboard is ready. Once the core study workflow is added, + this page will show recent sessions, notes, study totals, and + AI/NLP insight summaries. +

+
+ +
+ 02 +

Account access

+ {% if roles %} +
+ {% for role in roles %} + {{ role.display_name }} + {% endfor %} +
+ {% else %} +

+ No product roles have been assigned yet. Role-aware access is + available for future product surfaces. +

+ {% endif %} + +
+
+
+
@@ -82,27 +119,6 @@

Dashboard

- -
-
-
- 01 -

Build your first study plan

-

Add a subject, target study time, and the first session you want to complete.

- -
-
- 02 -

Review account settings

-

Confirm your StudyBuddy profile before personal planning preferences are added.

- -
-
-
{% endblock %}