From e7708b9ece2920e320c818cad21473b53406b413 Mon Sep 17 00:00:00 2001 From: antoine Date: Fri, 20 Aug 2021 07:33:55 +0200 Subject: [PATCH 01/15] Add new sports with temporary pictures --- fittrackee/database_utils.py | 20 ++++++++++++++++++ .../public/img/sports/alpine-skiing.png | Bin 0 -> 4406 bytes .../img/sports/cross-country-skiing.png | Bin 0 -> 4406 bytes .../img/sports/electric-mountain-biking.png | Bin 0 -> 4406 bytes fittrackee_client/public/img/sports/trail.png | Bin 0 -> 3104 bytes 5 files changed, 20 insertions(+) create mode 100644 fittrackee_client/public/img/sports/alpine-skiing.png create mode 100644 fittrackee_client/public/img/sports/cross-country-skiing.png create mode 100644 fittrackee_client/public/img/sports/electric-mountain-biking.png create mode 100644 fittrackee_client/public/img/sports/trail.png diff --git a/fittrackee/database_utils.py b/fittrackee/database_utils.py index 6cda5066..7570a26b 100644 --- a/fittrackee/database_utils.py +++ b/fittrackee/database_utils.py @@ -33,14 +33,34 @@ def init_database(app: Flask) -> None: sport.img = '/img/sports/mountain-biking.png' sport.is_default = True db.session.add(sport) + sport = Sport(label='Mountain Biking (Electric)') + sport.img = '/img/sports/electric-mountain-biking.png' + sport.is_default = True + db.session.add(sport) sport = Sport(label='Running') sport.img = '/img/sports/running.png' sport.is_default = True db.session.add(sport) + sport = Sport(label='Trail') + sport.img = '/img/sports/trail.png' + sport.is_default = True + db.session.add(sport) sport = Sport(label='Walking') sport.img = '/img/sports/walking.png' sport.is_default = True db.session.add(sport) + sport = Sport(label='Skiing (Alpine)') + sport.img = '/img/sports/alpine-skiing.png' + sport.is_default = True + db.session.add(sport) + sport = Sport(label='Skiing (Cross Country)') + sport.img = '/img/sports/cross-country-skiing.png' + sport.is_default = True + db.session.add(sport) + sport = Sport(label='Rowing') + sport.img = '/img/sports/rowing.png' + sport.is_default = True + db.session.add(sport) db.session.commit() _, db_app_config = init_config() update_app_config_from_database(app, db_app_config) diff --git a/fittrackee_client/public/img/sports/alpine-skiing.png b/fittrackee_client/public/img/sports/alpine-skiing.png new file mode 100644 index 0000000000000000000000000000000000000000..9b26acfc13e66f22270edd0a270966e76b5fbabd GIT binary patch literal 4406 zcmZ{oc{J2t_{TqkF?JJ%ERm#|kg;aVzJ(}5h%Cv@j5TA48BNKaENPJtvTvD$nn5V* z*vCG0ku5vnH{aiXzdwHWoaesJJ@@sT=bYz0_ug}F%xzNxb`}8^007u;8tR(U6#Jhs zG1B^Gb*B!RFt};m(gJ|WB-VdUVA}Y+v!VGd00_NA`76J}pSn*dt0;r|SzedR3%0HEAAb+s%oqpO)AfkG{> zNs)sB%#u&o&z?a!GX?+ABz06Np0BaC##CUntX&{Yl^GL`O;wM6`JGP^9rxrnR1%rv z7mgllTL7A>K*i!OqeVG8>3OZS6@_g6Xg)wxRkEwp?IsC_1SRAb6cmK%_Y?QFqw9)` zh-HWQb&2aoEL>b%SNYB?Hm|%TMrx)l-LMpMrR(qYhHmg`6Yp&uSaE7>b>4Sqxv%A% zN#P;A>z5TNm2zy8%=sq4a610Iq(T2tg7-#f@Fd%tDLo=Att3tNqcgxR&DbUJnW;pLc_hXHRD?g-!`f(2 zhK9N2(M?w@^bRWaPQ1Fpkon!?;J<=ok5c0CSlSojxxA7z?KuftN~jkf&U!^7y0+Rm zWUT*AhYehJlpbg}e&jaQXdrT0`>2r7PiQ1auGV>MqyGvbFD z)sSk4^Hn$$Pry_bS(R9STPA4yZ%z$)sHv>HiR-J}1-Y+9p$@@MPe_^#wYFxfMV7^V z6Mk0O;>bWSV)0WPd7LHO2S2t_104>Q^m+^>`&sFWn_Gb0Ur5D)4_!rWs``HIv~fC? zSz{@bkIe@z_n?%=6}I2*XL>LZSV|)?P1&jwuT2XkY9;c`ue_nlsB!@>ZP7nG&TOsy z-27eYbDl#$choQKxB!J2cl`b=hv1iqmlVNJ9zBq$`#n3W%;ozK3y5TnE$LR)`gl;s zC`5RP`D(PX?PFG*E96^j@BcmuS1^6I)6_TA)q*+o&$+^?HCXumD+4+lE5JT%Hm+tmrIv72l2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E~>O0nSdoF4xfhZg1Dr1ZWU&Q_oblOxrQ)e*g`bG&cYM literal 0 HcmV?d00001 diff --git a/fittrackee_client/public/img/sports/cross-country-skiing.png b/fittrackee_client/public/img/sports/cross-country-skiing.png new file mode 100644 index 0000000000000000000000000000000000000000..9b26acfc13e66f22270edd0a270966e76b5fbabd GIT binary patch literal 4406 zcmZ{oc{J2t_{TqkF?JJ%ERm#|kg;aVzJ(}5h%Cv@j5TA48BNKaENPJtvTvD$nn5V* z*vCG0ku5vnH{aiXzdwHWoaesJJ@@sT=bYz0_ug}F%xzNxb`}8^007u;8tR(U6#Jhs zG1B^Gb*B!RFt};m(gJ|WB-VdUVA}Y+v!VGd00_NA`76J}pSn*dt0;r|SzedR3%0HEAAb+s%oqpO)AfkG{> zNs)sB%#u&o&z?a!GX?+ABz06Np0BaC##CUntX&{Yl^GL`O;wM6`JGP^9rxrnR1%rv z7mgllTL7A>K*i!OqeVG8>3OZS6@_g6Xg)wxRkEwp?IsC_1SRAb6cmK%_Y?QFqw9)` zh-HWQb&2aoEL>b%SNYB?Hm|%TMrx)l-LMpMrR(qYhHmg`6Yp&uSaE7>b>4Sqxv%A% zN#P;A>z5TNm2zy8%=sq4a610Iq(T2tg7-#f@Fd%tDLo=Att3tNqcgxR&DbUJnW;pLc_hXHRD?g-!`f(2 zhK9N2(M?w@^bRWaPQ1Fpkon!?;J<=ok5c0CSlSojxxA7z?KuftN~jkf&U!^7y0+Rm zWUT*AhYehJlpbg}e&jaQXdrT0`>2r7PiQ1auGV>MqyGvbFD z)sSk4^Hn$$Pry_bS(R9STPA4yZ%z$)sHv>HiR-J}1-Y+9p$@@MPe_^#wYFxfMV7^V z6Mk0O;>bWSV)0WPd7LHO2S2t_104>Q^m+^>`&sFWn_Gb0Ur5D)4_!rWs``HIv~fC? zSz{@bkIe@z_n?%=6}I2*XL>LZSV|)?P1&jwuT2XkY9;c`ue_nlsB!@>ZP7nG&TOsy z-27eYbDl#$choQKxB!J2cl`b=hv1iqml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nmtHaU_F??T#y z1+iARuybRfaFi46H9oU&3Uql`{2_BI@Y4Pa!~^xL10OmCx~Mq&yU+xXMaU>gArz!! z6fI<~s~{9rfJD0n20Qt?0Kvh* h*E~>O0nSdoF4xfhZg1Dr1ZWU&Q_oblOxrQ)e*g`bG&cYM literal 0 HcmV?d00001 diff --git a/fittrackee_client/public/img/sports/electric-mountain-biking.png b/fittrackee_client/public/img/sports/electric-mountain-biking.png new file mode 100644 index 0000000000000000000000000000000000000000..9b26acfc13e66f22270edd0a270966e76b5fbabd GIT binary patch literal 4406 zcmZ{oc{J2t_{TqkF?JJ%ERm#|kg;aVzJ(}5h%Cv@j5TA48BNKaENPJtvTvD$nn5V* z*vCG0ku5vnH{aiXzdwHWoaesJJ@@sT=bYz0_ug}F%xzNxb`}8^007u;8tR(U6#Jhs zG1B^Gb*B!RFt};m(gJ|WB-VdUVA}Y+v!VGd00_NA`76J}pSn*dt0;r|SzedR3%0HEAAb+s%oqpO)AfkG{> zNs)sB%#u&o&z?a!GX?+ABz06Np0BaC##CUntX&{Yl^GL`O;wM6`JGP^9rxrnR1%rv z7mgllTL7A>K*i!OqeVG8>3OZS6@_g6Xg)wxRkEwp?IsC_1SRAb6cmK%_Y?QFqw9)` zh-HWQb&2aoEL>b%SNYB?Hm|%TMrx)l-LMpMrR(qYhHmg`6Yp&uSaE7>b>4Sqxv%A% zN#P;A>z5TNm2zy8%=sq4a610Iq(T2tg7-#f@Fd%tDLo=Att3tNqcgxR&DbUJnW;pLc_hXHRD?g-!`f(2 zhK9N2(M?w@^bRWaPQ1Fpkon!?;J<=ok5c0CSlSojxxA7z?KuftN~jkf&U!^7y0+Rm zWUT*AhYehJlpbg}e&jaQXdrT0`>2r7PiQ1auGV>MqyGvbFD z)sSk4^Hn$$Pry_bS(R9STPA4yZ%z$)sHv>HiR-J}1-Y+9p$@@MPe_^#wYFxfMV7^V z6Mk0O;>bWSV)0WPd7LHO2S2t_104>Q^m+^>`&sFWn_Gb0Ur5D)4_!r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OU51i^PeZ_yY+&YVk02_AJUrmhwKcBH9;kho#41DrEgq`=@F2z?Zq(p$N1;1Qm zuB;$9fJO~DkR|eVRKis(E#X_esfBWivOvr(01A{9R?OXqc@qVnmtHaU_F??T#y z1+iARuybRfaFi46H9oU&3Uql`{2_BI@Y4Pa!~^xL10OmCx~Mq&yU+xXMaU>gArz!! z6fI<~s~{9rfJD0n20Qt?0Kvh* h*E~>O0nSdoF4xfhZg1Dr1ZWU&Q_oblOxrQ)e*g`bG&cYM literal 0 HcmV?d00001 diff --git a/fittrackee_client/public/img/sports/trail.png b/fittrackee_client/public/img/sports/trail.png new file mode 100644 index 0000000000000000000000000000000000000000..fe4a2814f150dfd95d4d5f96b48026ebba2b4730 GIT binary patch literal 3104 zcmZ`*c|6qH-#_0mG-IsQ*mo&gWhvQ8*+m)*6_s)A%Ve7($qYsm(M917*$J5@S<2E( z($!{(Le>doTz17b0P{!CwNItJ9(Z5aiiep29~DFBDvV zEbl7cX%@Mua9**z*Db*oVLQfpzj6m@&ybU-vhFBnK~Kd~-ex}U^+F3K38Gv&Pz`k3 zvNbU$hkeD^S)5N3Mz>rusb1|6%DLBEW8ub9IyqnC#mko~i}^%WryD`|at%4U><9`R;Vw_U}4D z2xD9|vFuEX;8^#h9&&FE7%!j`9qm;qxl_~gt17v>#;=S$_?taAB5MqR-_GinT?Bg!VMhc{=3- z;)EX`jaowHzqZP)>anj4o_1BWps|hk(Y=WH%&{kR;Q5-CMgx|m+BCMV$r$h}AZB3c zywj(N{6Os0>C`X63yoDvc7rF>$_Eh3guI6LDhkY*hel6Y)-*I4Bv`sjb1ipMY_#!5 z#jI*Emo~l4Ym*b83i5W{yV|wh!j$NiKzW6W4S4>+=WB1M?lyqpi(&G#bw=u2cWK>v zxYW|!pjh$wG63I72&bm4D#77>>JnB8tDRiS{+xp}ea`SMmmo5R*@?5Vz998Bx)LlKbaCaaT)!%o3Lm?vgIHoRzu6arRUtIh4k_XqK7D|LrJV8FUr zkRn9ob|N-A3M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Hmr0tbi> zKC<$0($#F~#0a}ks9fTtvdbIy6cG=~YjdnAv3Jd!8}W1>_fPa=`{ZY+Ww)|4ksXAi z!Had>{l{~{Ip2Sjm)=8ge6szMz2k3w8f)vMY{rkk@7r;!tct`_Fh!BRF&r2Ffty8Bt{oRI`ro(%wz> zoA;s!K5n3Azu~qCUD%*poQ3MpitQpndnm=X|~cJMiyVjbwG6IeJjn0IzFceDs*H-VrSwJ!2gmTGElq|6@Q5^$GO5{{I{NHIya`8%Y0R sa0&GzMR`T|f~csdLxERXXR)~Hzy?g2Z%n8tpET3 literal 0 HcmV?d00001 From 660190d368cd54aa0c9c149126abc0891e4ce0df Mon Sep 17 00:00:00 2001 From: antoine Date: Fri, 20 Aug 2021 07:35:50 +0200 Subject: [PATCH 02/15] Add elevation in stats and dashboard and update translations --- fittrackee/workouts/stats.py | 21 +++++++++++++++++-- .../components/Common/Stats/StatsChart.jsx | 18 ++++++++++++++++ .../src/components/Dashboard/WorkoutCard.jsx | 18 ++++++++++++++++ .../src/components/Workouts/WorkoutsList.jsx | 14 +++++++++++++ fittrackee_client/src/locales/en/sports.json | 7 ++++++- .../src/locales/en/statistics.json | 2 ++ fittrackee_client/src/locales/fr/sports.json | 7 ++++++- .../src/locales/fr/statistics.json | 2 ++ .../src/locales/fr/workouts.json | 4 ++-- fittrackee_client/src/utils/stats.js | 14 +++++++++++++ fittrackee_client/src/utils/workouts.js | 18 +++++++++------- 11 files changed, 112 insertions(+), 13 deletions(-) diff --git a/fittrackee/workouts/stats.py b/fittrackee/workouts/stats.py index 80de9480..de9a97a5 100644 --- a/fittrackee/workouts/stats.py +++ b/fittrackee/workouts/stats.py @@ -67,6 +67,8 @@ def get_workouts( 'nb_workouts': 0, 'total_distance': 0.0, 'total_duration': 0, + 'total_ascent': 0.0, + 'total_descent': 0.0, } workouts_list_by_sport[sport_id]['nb_workouts'] += 1 workouts_list_by_sport[sport_id]['total_distance'] += float( @@ -75,6 +77,12 @@ def get_workouts( workouts_list_by_sport[sport_id][ 'total_duration' ] += convert_timedelta_to_integer(workout.moving) + workouts_list_by_sport[sport_id]['total_ascent'] += float( + workout.ascent + ) + workouts_list_by_sport[sport_id]['total_descent'] += float( + workout.descent + ) # filter_type == 'by_time' else: @@ -110,6 +118,8 @@ def get_workouts( 'nb_workouts': 0, 'total_distance': 0.0, 'total_duration': 0, + 'total_ascent': 0.0, + 'total_descent': 0.0, } workouts_list_by_time[time_period][sport_id][ 'nb_workouts' @@ -119,8 +129,15 @@ def get_workouts( ] += float(workout.distance) workouts_list_by_time[time_period][sport_id][ 'total_duration' - ] += convert_timedelta_to_integer(workout.moving) - + ] += convert_timedelta_to_integer(workout.moving) + if workout.ascent: + workouts_list_by_time[time_period][sport_id][ + 'total_ascent' + ] += float(workout.ascent / 1000) + if workout.descent: + workouts_list_by_time[time_period][sport_id][ + 'total_descent' + ] += float(workout.descent / 1000) return { 'status': 'success', 'data': { diff --git a/fittrackee_client/src/components/Common/Stats/StatsChart.jsx b/fittrackee_client/src/components/Common/Stats/StatsChart.jsx index ca3678f1..1862b0d5 100644 --- a/fittrackee_client/src/components/Common/Stats/StatsChart.jsx +++ b/fittrackee_client/src/components/Common/Stats/StatsChart.jsx @@ -53,6 +53,24 @@ export default class StatsCharts extends React.PureComponent { /> {t('statistics:duration')} + +