Files
H-S-Diary/app
whitlocktech cd276ed44c Refine period tracking logic and UI feedback in DayDetailScreen.
- Update `DayDetailUiState` to include `hasActiveCycle` and `cycleStartDate` to better track ongoing cycles.
- Replace `periodActive` check with `hasActiveCycle` for displaying the "Period day" badge and toggle icons.
- Improve validation for the "Period ended" action:
    - Enable the chip only if a cycle is active and the current date is after the cycle's start date.
- Update `DayDetailViewModel` to accurately calculate `periodDayNumber` and cycle status by fetching records from the repository.
- Ensure period state is correctly reset or initialized when toggling period start/end.

Signed-off-by: whitlocktech <whitlocktech@gmail.com>
2026-05-22 17:52:18 -05:00
..