feat: add CSV import for Vitals (Omron + Apple Health)
- Import endpoints for Omron blood pressure CSV (German date format)
- Import endpoints for Apple Health vitals CSV
- Import UI tab in VitalsPage with drag & drop for both sources
- German month mapping for Omron date parsing ("13 März 2026")
- Upsert logic preserves manual entries (source != 'manual')
- Import result feedback (inserted/updated/skipped/errors)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
a55f11bc96
commit
548a5a481d
3 files changed
+501
-3
No files matched your search
@@ -264,4 +264,16 @@ export const api = {
|
||||
updateVitals: (id,d) => req(`/vitals/${id}`, jput(d)),
|
||||
deleteVitals: (id) => req(`/vitals/${id}`, {method:'DELETE'}),
|
||||
getVitalsStats: (days=30) => req(`/vitals/stats?days=${days}`),
|
||||
|
||||
// Vitals Import (v9d Phase 2d)
|
||||
importVitalsOmron: (file) => {
|
||||
const fd = new FormData()
|
||||
fd.append('file', file)
|
||||
return req('/vitals/import/omron', {method:'POST', body:fd})
|
||||
},
|
||||
importVitalsAppleHealth: (file) => {
|
||||
const fd = new FormData()
|
||||
fd.append('file', file)
|
||||
return req('/vitals/import/apple-health', {method:'POST', body:fd})
|
||||
},
|
||||
}
|
||||
Reference in new issue
Block a user