feat: add relaxed arm circumference measurement and update related features
- Introduced `c_arm_relaxed` to the CircumferenceEntry model for tracking relaxed arm measurements. - Updated database schema to include `c_arm_relaxed` in the circumference_log table. - Implemented calculation for 28-day relaxed arm circumference change with `calculate_arm_relaxed_28d_delta`. - Enhanced placeholder resolver and registration to support new relaxed arm measurement. - Updated frontend components to accommodate the new measurement, including forms and CSV exports. - Improved documentation and guide data to reflect the addition of relaxed arm measurements.
This commit is contained in:
1 parent
0035d08149
commit
df0165bee3
16 files changed
+122
-33
No files matched your search
@@ -312,14 +312,38 @@ Datumsformat: YYYY-MM-DD
|
||||
cur.execute("SELECT id, date, weight, note, source, created FROM weight_log WHERE profile_id=%s ORDER BY date", (pid,))
|
||||
write_csv(zf, "weight.csv", [r2d(r) for r in cur.fetchall()], ['id','date','weight','note','source','created'])
|
||||
|
||||
cur.execute("SELECT id, date, c_waist, c_hip, c_chest, c_neck, c_arm, c_thigh, c_calf, notes, created FROM circumference_log WHERE profile_id=%s ORDER BY date", (pid,))
|
||||
cur.execute(
|
||||
"SELECT id, date, c_waist, c_hip, c_chest, c_neck, c_arm, c_arm_relaxed, c_thigh, c_calf, notes, created FROM circumference_log WHERE profile_id=%s ORDER BY date",
|
||||
(pid,),
|
||||
)
|
||||
rows = [r2d(r) for r in cur.fetchall()]
|
||||
for r in rows:
|
||||
r['waist'] = r.pop('c_waist', None); r['hip'] = r.pop('c_hip', None)
|
||||
r['chest'] = r.pop('c_chest', None); r['neck'] = r.pop('c_neck', None)
|
||||
r['upper_arm'] = r.pop('c_arm', None); r['thigh'] = r.pop('c_thigh', None)
|
||||
r['upper_arm_contracted'] = r.pop('c_arm', None)
|
||||
r['upper_arm_relaxed'] = r.pop('c_arm_relaxed', None)
|
||||
r['thigh'] = r.pop('c_thigh', None)
|
||||
r['calf'] = r.pop('c_calf', None); r['forearm'] = None; r['note'] = r.pop('notes', None)
|
||||
write_csv(zf, "circumferences.csv", rows, ['id','date','waist','hip','chest','neck','upper_arm','thigh','calf','forearm','note','created'])
|
||||
write_csv(
|
||||
zf,
|
||||
"circumferences.csv",
|
||||
rows,
|
||||
[
|
||||
'id',
|
||||
'date',
|
||||
'waist',
|
||||
'hip',
|
||||
'chest',
|
||||
'neck',
|
||||
'upper_arm_contracted',
|
||||
'upper_arm_relaxed',
|
||||
'thigh',
|
||||
'calf',
|
||||
'forearm',
|
||||
'note',
|
||||
'created',
|
||||
],
|
||||
)
|
||||
|
||||
cur.execute("SELECT id, date, sf_chest, sf_abdomen, sf_thigh, sf_triceps, sf_subscap, sf_suprailiac, sf_axilla, sf_method, body_fat_pct, notes, created FROM caliper_log WHERE profile_id=%s ORDER BY date", (pid,))
|
||||
rows = [r2d(r) for r in cur.fetchall()]
|
||||
|
||||
Reference in new issue
Block a user