feat: enhance dashboard and exercises list with new filtering and UI components
Deploy Development / deploy (push) Successful in 34s
Test Suite / pytest-backend (push) Successful in 6s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 6s
Test Suite / playwright-tests (push) Successful in 23s
Deploy Development / deploy (push) Successful in 34s
Test Suite / pytest-backend (push) Successful in 6s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 6s
Test Suite / playwright-tests (push) Successful in 23s
- Added a new filter option in the list_exercises function to allow users to view exercises created by the current profile. - Introduced new CSS styles for the dashboard, including KPI tiles and training previews, improving layout and user experience. - Updated the Dashboard component to fetch and display statistics related to user-created exercises, enhancing visibility of personal metrics. - Enhanced the ExercisesListPage to support filtering based on user-specific exercise creation, improving data relevance for users.
This commit is contained in:
1 parent
3210796139
commit
3bf0af001a
4 files changed
+481
-131
No files matched your search
@@ -1009,6 +1009,10 @@ def list_exercises(
|
||||
default=False,
|
||||
description="Archivierte einbeziehen; Standard false (außer Statusfilter enthält archived)",
|
||||
),
|
||||
created_by_me: bool = Query(
|
||||
default=False,
|
||||
description="Nur Übungen, die vom aktuellen Profil angelegt wurden (created_by = Profil)",
|
||||
),
|
||||
tenant: TenantContext = Depends(get_tenant_context),
|
||||
):
|
||||
"""
|
||||
@@ -1036,6 +1040,10 @@ def list_exercises(
|
||||
where.append(vis_sql)
|
||||
params.extend(vis_params)
|
||||
|
||||
if created_by_me:
|
||||
where.append("e.created_by = %s")
|
||||
params.append(profile_id)
|
||||
|
||||
vis_list = _merge_str_any(visibility_any, visibility)
|
||||
if vis_list:
|
||||
ph = ",".join(["%s"] * len(vis_list))
|
||||
|
||||
Reference in new issue
Block a user