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
@@ -67,10 +67,10 @@ def upsert_circ(e: CircumferenceEntry, x_profile_id: Optional[str]=Header(defaul
|
||||
# INSERT new entry
|
||||
eid = str(uuid.uuid4())
|
||||
cur.execute("""INSERT INTO circumference_log
|
||||
(id,profile_id,date,c_neck,c_chest,c_waist,c_belly,c_hip,c_thigh,c_calf,c_arm,notes,photo_id,created)
|
||||
VALUES (%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,CURRENT_TIMESTAMP)""",
|
||||
(id,profile_id,date,c_neck,c_chest,c_waist,c_belly,c_hip,c_thigh,c_calf,c_arm,c_arm_relaxed,notes,photo_id,created)
|
||||
VALUES (%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,CURRENT_TIMESTAMP)""",
|
||||
(eid,pid,d['date'],d['c_neck'],d['c_chest'],d['c_waist'],d['c_belly'],
|
||||
d['c_hip'],d['c_thigh'],d['c_calf'],d['c_arm'],d['notes'],d['photo_id']))
|
||||
d['c_hip'],d['c_thigh'],d['c_calf'],d['c_arm'],d.get('c_arm_relaxed'),d['notes'],d['photo_id']))
|
||||
|
||||
# Phase 2: Increment usage counter (only for new entries)
|
||||
increment_feature_usage(pid, 'circumference_entries')
|
||||
|
||||
Reference in new issue
Block a user