diff --git a/backend/app/activities/activity/utils.py b/backend/app/activities/activity/utils.py
index df719e297..75089eb29 100644
--- a/backend/app/activities/activity/utils.py
+++ b/backend/app/activities/activity/utils.py
@@ -87,6 +87,7 @@ ACTIVITY_ID_TO_NAME = {
38: "Soccer",
39: "Padel",
40: "Treadmill",
+ 41: "Cardio training",
# Add other mappings as needed based on the full list in define_activity_type comments if required
# "AlpineSki",
# "BackcountrySki",
@@ -213,6 +214,7 @@ ACTIVITY_NAME_TO_ID.update(
"padelball": 39,
"paddelball": 39,
"treadmill": 40,
+ "cardio_training": 41,
}
)
diff --git a/backend/app/users/user_goals/schema.py b/backend/app/users/user_goals/schema.py
index 76faa5480..316534463 100644
--- a/backend/app/users/user_goals/schema.py
+++ b/backend/app/users/user_goals/schema.py
@@ -49,6 +49,7 @@ class ActivityType(IntEnum):
SWIM (3): Swimming activities.
WALK (4): Walking or hiking activities.
STRENGTH (5): Strength or resistance training sessions.
+ CARDIO (6): Cardiovascular training activities.
"""
RUN = 1
@@ -56,6 +57,7 @@ class ActivityType(IntEnum):
SWIM = 3
WALK = 4
STRENGTH = 5
+ CARDIO = 6
class GoalType(IntEnum):
diff --git a/backend/app/users/user_goals/utils.py b/backend/app/users/user_goals/utils.py
index 7f896b0df..bd83d4c7e 100644
--- a/backend/app/users/user_goals/utils.py
+++ b/backend/app/users/user_goals/utils.py
@@ -85,10 +85,11 @@ def calculate_goal_progress_by_activity_type(
user_goals_schema.ActivityType.BIKE: [4, 5, 6, 7, 27, 28, 29, 35, 36],
user_goals_schema.ActivityType.SWIM: [8, 9],
user_goals_schema.ActivityType.WALK: [11, 12],
+ user_goals_schema.ActivityType.CARDIO: [20, 41],
}
- DEFAULT_TYPES = (19, 20)
+ DEFAULT_TYPES = (10, 19)
- # Get activity types based on goal.activity_type, default to [10, 19, 20]
+ # Get activity types based on goal.activity_type, default to [10, 19]
activity_types = TYPE_MAP.get(goal.activity_type, DEFAULT_TYPES)
# Fetch all activities in a single query
diff --git a/backend/poetry.lock b/backend/poetry.lock
index d06fe7e7f..3da4d14cf 100644
--- a/backend/poetry.lock
+++ b/backend/poetry.lock
@@ -1671,6 +1671,24 @@ files = [
{file = "msgpack-1.1.2.tar.gz", hash = "sha256:3b60763c1373dd60f398488069bcdc703cd08a711477b5d480eecc9f9626f47e"},
]
+[[package]]
+name = "mysqlclient"
+version = "2.2.7"
+description = "Python interface to MySQL"
+optional = false
+python-versions = ">=3.8"
+groups = ["main"]
+files = [
+ {file = "mysqlclient-2.2.7-cp310-cp310-win_amd64.whl", hash = "sha256:2e3c11f7625029d7276ca506f8960a7fd3c5a0a0122c9e7404e6a8fe961b3d22"},
+ {file = "mysqlclient-2.2.7-cp311-cp311-win_amd64.whl", hash = "sha256:a22d99d26baf4af68ebef430e3131bb5a9b722b79a9fcfac6d9bbf8a88800687"},
+ {file = "mysqlclient-2.2.7-cp312-cp312-win_amd64.whl", hash = "sha256:4b4c0200890837fc64014cc938ef2273252ab544c1b12a6c1d674c23943f3f2e"},
+ {file = "mysqlclient-2.2.7-cp313-cp313-win_amd64.whl", hash = "sha256:201a6faa301011dd07bca6b651fe5aaa546d7c9a5426835a06c3172e1056a3c5"},
+ {file = "mysqlclient-2.2.7-cp39-cp39-win_amd64.whl", hash = "sha256:199dab53a224357dd0cb4d78ca0e54018f9cee9bf9ec68d72db50e0a23569076"},
+ {file = "mysqlclient-2.2.7-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:92af368ed9c9144737af569c86d3b6c74a012a6f6b792eb868384787b52bb585"},
+ {file = "mysqlclient-2.2.7-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:977e35244fe6ef44124e9a1c2d1554728a7b76695598e4b92b37dc2130503069"},
+ {file = "mysqlclient-2.2.7.tar.gz", hash = "sha256:24ae22b59416d5fcce7e99c9d37548350b4565baac82f95e149cac6ce4163845"},
+]
+
[[package]]
name = "numpy"
version = "2.3.4"
@@ -3724,4 +3742,4 @@ cffi = ["cffi (>=1.17,<2.0) ; platform_python_implementation != \"PyPy\" and pyt
[metadata]
lock-version = "2.1"
python-versions = "^3.13"
-content-hash = "e1b809d08161b2cc795d4ce36d4557d9646df6e56b12b8fddc580b8416ee1873"
+content-hash = "8f8b1235645ba5165102bddff066f582eb10dff7d12e2348ac3bdffec41c1643"
diff --git a/docs/developer-guide.md b/docs/developer-guide.md
index e7d25cd47..3f77c9aa2 100644
--- a/docs/developer-guide.md
+++ b/docs/developer-guide.md
@@ -281,6 +281,7 @@ The table bellow details the activity types supported by Endurain.
| Stand up paddling | 32 |
| Surf | 33 |
| Soccer | 38 |
+| Cardio training | 41 |
## Supported gear types
diff --git a/frontend/app/src/components/Activities/ActivitySummaryComponent.vue b/frontend/app/src/components/Activities/ActivitySummaryComponent.vue
index 03de46876..67353107a 100644
--- a/frontend/app/src/components/Activities/ActivitySummaryComponent.vue
+++ b/frontend/app/src/components/Activities/ActivitySummaryComponent.vue
@@ -195,6 +195,7 @@
activity.activity_type != 18 &&
activity.activity_type != 19 &&
activity.activity_type != 20 &&
+ activity.activity_type != 41 &&
activityTypeNotRacquet(activity)
"
>
@@ -237,6 +238,7 @@
activity.activity_type != 18 &&
activity.activity_type != 19 &&
activity.activity_type != 20 &&
+ activity.activity_type != 41 &&
activityTypeNotRacquet(activity)
"
>
@@ -265,6 +267,7 @@
activity.activity_type != 18 &&
activity.activity_type != 19 &&
activity.activity_type != 20 &&
+ activity.activity_type != 41 &&
activityTypeNotRacquet(activity)
"
>
diff --git a/frontend/app/src/components/Activities/ActivityWorkoutStepsComponent.vue b/frontend/app/src/components/Activities/ActivityWorkoutStepsComponent.vue
index dbb12cdee..c670b59f8 100644
--- a/frontend/app/src/components/Activities/ActivityWorkoutStepsComponent.vue
+++ b/frontend/app/src/components/Activities/ActivityWorkoutStepsComponent.vue
@@ -18,7 +18,8 @@
v-if="
(activity.activity_type === 10 ||
activity.activity_type === 19 ||
- activity.activity_type === 20) &&
+ activity.activity_type === 20 ||
+ activity.activity_type === 41) &&
activityActivityWorkoutSteps &&
activityActivityWorkoutSteps.length > 0
"
@@ -29,7 +30,8 @@
v-if="
(activity.activity_type === 10 ||
activity.activity_type === 19 ||
- activity.activity_type === 20) &&
+ activity.activity_type === 20 ||
+ activity.activity_type === 41) &&
activityActivityWorkoutSteps &&
activityActivityWorkoutSteps.length > 0
"
@@ -96,7 +98,8 @@
v-if="
(activity.activity_type === 10 ||
activity.activity_type === 19 ||
- activity.activity_type === 20) &&
+ activity.activity_type === 20 ||
+ activity.activity_type === 41) &&
activityActivityWorkoutSteps &&
activityActivityWorkoutSteps.length > 0
"
@@ -114,7 +117,8 @@
v-if="
(activity.activity_type === 10 ||
activity.activity_type === 19 ||
- activity.activity_type === 20) &&
+ activity.activity_type === 20 ||
+ activity.activity_type === 41) &&
activityActivityWorkoutSteps &&
activityActivityWorkoutSteps.length > 0
"
@@ -203,7 +207,8 @@
v-if="
(activity.activity_type === 10 ||
activity.activity_type === 19 ||
- activity.activity_type === 20) &&
+ activity.activity_type === 20 ||
+ activity.activity_type === 41) &&
activityActivitySets &&
activityActivitySets.length > 0
"
@@ -240,7 +245,8 @@
v-if="
(activity.activity_type === 10 ||
activity.activity_type === 19 ||
- activity.activity_type === 20) &&
+ activity.activity_type === 20 ||
+ activity.activity_type === 41) &&
activityActivitySets &&
activityActivitySets.length > 0
"
diff --git a/frontend/app/src/components/Activities/Modals/EditActivityModalComponent.vue b/frontend/app/src/components/Activities/Modals/EditActivityModalComponent.vue
index 311867d97..048b8d28a 100644
--- a/frontend/app/src/components/Activities/Modals/EditActivityModalComponent.vue
+++ b/frontend/app/src/components/Activities/Modals/EditActivityModalComponent.vue
@@ -136,6 +136,9 @@
+
+