mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-17 07:42:23 +00:00
feat(cycle): single-day read endpoint, symptom severity, and a richer log-day sheet
Add `GET /api/cycle/day-logs?date=YYYY-MM-DD` returning the full day-log DTO (or null) for one tz-anchored day so the web log-day sheet pre-fills instead of opening blank — a blank re-log no longer nulls untouched or HealthKit-sourced fields. Delete resolves the row id from the same read. Persist an optional 1-4 Likert severity per symptom link (migration 0133_v1150_cycle_symptom_severity), carried through the shared symptom-link writer and surfaced in the day-log DTO. Sheet now captures the previously missing fields — spotting between periods, pregnancy/progesterone home-test results, contraceptive kind — plus per-symptom severity chips, a one-tap end-period boundary, and a Delete action. The wheel ring marker sits at the 12-o'clock origin again (drop the double rotation), the cycle view goes two-column on desktop, and the empty ring carries a first-period call to action. New copy is localized across all six locales; the prediction and fertility surfaces keep their disclaimers. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
824dcbb01a
commit
4b10bdc5da
23 files changed
+846
-143
No files matched your search
@@ -62,6 +62,7 @@ import {
|
||||
cycleTrackingGoalEnum,
|
||||
cycleDayLogInputSchema,
|
||||
cycleDayLogPatchSchema,
|
||||
cycleDayLogQuerySchema,
|
||||
cycleBulkSchema,
|
||||
cyclePeriodSchema,
|
||||
cyclePrefsSchema,
|
||||
@@ -2441,6 +2442,28 @@ const cycleDisabledResponse = {
|
||||
|
||||
export const openApiPaths: NonNullable<ZodOpenApiObject["paths"]> = {
|
||||
"/api/cycle/day-logs": {
|
||||
get: {
|
||||
tags: ["Cycle"],
|
||||
summary: "Read a single day's cycle day-log (v1.15.0)",
|
||||
description:
|
||||
"Returns the full `CycleDayLogDTO` for the tz-anchored `date`, or `null` when nothing is logged that day. Lets a client pre-fill an edit sheet. Gated; owner-scoped; soft-deleted rows excluded.",
|
||||
requestParams: { query: cycleDayLogQuerySchema },
|
||||
responses: {
|
||||
"200": {
|
||||
description: "The day-log for that date, or null.",
|
||||
content: {
|
||||
"application/json": {
|
||||
schema: dataEnvelope(
|
||||
cycleDayLogDto.nullable(),
|
||||
"CycleDayLogReadEnvelope",
|
||||
),
|
||||
},
|
||||
},
|
||||
},
|
||||
...cycleDisabledResponse,
|
||||
...stdResponses,
|
||||
},
|
||||
},
|
||||
post: {
|
||||
tags: ["Cycle"],
|
||||
summary: "Capture a single cycle day-log (v1.15.0)",
|
||||
|
||||
Reference in new issue
Block a user