From 364a2f5ef1cb44872c041cf8842a9fa50ff14906 Mon Sep 17 00:00:00 2001 From: Alexander Bocken Date: Wed, 7 Feb 2024 14:59:30 +0100 Subject: [PATCH] Add Weights and Calisthenics Sport --- .../versions/37_4229a42eff8b_add_weights.py | 35 +++++++++++++++++++ .../38_965bdd65109f_add_calisthenics.py | 34 ++++++++++++++++++ .../Common/Images/SportImage/Calisthenics.vue | 21 +++++++++++ .../Common/Images/SportImage/Weights.vue | 21 +++++++++++ .../Common/Images/SportImage/index.vue | 4 +++ fittrackee_client/src/locales/de/sports.json | 6 ++++ fittrackee_client/src/locales/en/sports.json | 6 ++++ fittrackee_client/src/utils/sports.ts | 2 ++ 8 files changed, 129 insertions(+) create mode 100644 fittrackee/migrations/versions/37_4229a42eff8b_add_weights.py create mode 100644 fittrackee/migrations/versions/38_965bdd65109f_add_calisthenics.py create mode 100644 fittrackee_client/src/components/Common/Images/SportImage/Calisthenics.vue create mode 100644 fittrackee_client/src/components/Common/Images/SportImage/Weights.vue diff --git a/fittrackee/migrations/versions/37_4229a42eff8b_add_weights.py b/fittrackee/migrations/versions/37_4229a42eff8b_add_weights.py new file mode 100644 index 00000000..6cbc4ad6 --- /dev/null +++ b/fittrackee/migrations/versions/37_4229a42eff8b_add_weights.py @@ -0,0 +1,35 @@ +"""add weights sport + +Revision ID: 4229a42eff8b +Revises: 4d51a4ca8001 +Create Date: 2024-02-06 21:50:41.072336 + +""" +from alembic import op +import sqlalchemy as sa + + +# revision identifiers, used by Alembic. +revision = '4229a42eff8b' +down_revision = '4d51a4ca8001' +branch_labels = None +depends_on = None + + + +def upgrade(): + op.execute( + """ + INSERT INTO sports (label, is_active, stopped_speed_threshold) + VALUES ('Weights', True, 0.1) + """ + ) + + +def downgrade(): + op.execute( + """ + DELETE FROM sports + WHERE label = 'Weights'; + """ + ) diff --git a/fittrackee/migrations/versions/38_965bdd65109f_add_calisthenics.py b/fittrackee/migrations/versions/38_965bdd65109f_add_calisthenics.py new file mode 100644 index 00000000..41145e20 --- /dev/null +++ b/fittrackee/migrations/versions/38_965bdd65109f_add_calisthenics.py @@ -0,0 +1,34 @@ +"""add calisthenics sport + +Revision ID: 965bdd65109f +Revises: 4229a42eff8b +Create Date: 2024-02-06 21:51:15.000016 + +""" +from alembic import op +import sqlalchemy as sa + + +# revision identifiers, used by Alembic. +revision = '965bdd65109f' +down_revision = '4229a42eff8b' +branch_labels = None +depends_on = None + + +def upgrade(): + op.execute( + """ + INSERT INTO sports (label, is_active, stopped_speed_threshold) + VALUES ('Calisthenics', True, 0.1) + """ + ) + + +def downgrade(): + op.execute( + """ + DELETE FROM sports + WHERE label = 'Calisthenics'; + """ + ) diff --git a/fittrackee_client/src/components/Common/Images/SportImage/Calisthenics.vue b/fittrackee_client/src/components/Common/Images/SportImage/Calisthenics.vue new file mode 100644 index 00000000..3dde8435 --- /dev/null +++ b/fittrackee_client/src/components/Common/Images/SportImage/Calisthenics.vue @@ -0,0 +1,21 @@ + + + diff --git a/fittrackee_client/src/components/Common/Images/SportImage/Weights.vue b/fittrackee_client/src/components/Common/Images/SportImage/Weights.vue new file mode 100644 index 00000000..ea53c0f1 --- /dev/null +++ b/fittrackee_client/src/components/Common/Images/SportImage/Weights.vue @@ -0,0 +1,21 @@ + + + diff --git a/fittrackee_client/src/components/Common/Images/SportImage/index.vue b/fittrackee_client/src/components/Common/Images/SportImage/index.vue index d807896f..0626bf7d 100644 --- a/fittrackee_client/src/components/Common/Images/SportImage/index.vue +++ b/fittrackee_client/src/components/Common/Images/SportImage/index.vue @@ -23,12 +23,15 @@ + +