EmmaTellblom / Mensinator

MIT License
38 stars 11 forks source link

Prevent Multiple Ovulations in the Same Cycle #63

Open EmmaTellblom opened 2 months ago

EmmaTellblom commented 2 months ago

Title

Prevent Multiple Ovulations in the Same Cycle

Description

To ensure the accuracy of ovulation tracking, we need to implement a check to prevent users from entering multiple ovulation events within the same cycle. If an ovulation event is already recorded for a cycle, the app should notify the user and prevent the addition of a new ovulation event for that cycle.

Requirements

Steps to Implement

  1. Check Existing Ovulation: Before adding a new ovulation event, query the database to check if there is already an ovulation recorded for the same cycle.
  2. Display Notification: If an existing ovulation is found for the cycle, show a toast message with the text "Ovulation already exists for this cycle".
  3. Prevent Addition: Do not proceed with adding the new ovulation event if an existing ovulation is found for the cycle.
  4. User Instructions: Provide instructions to users indicating that they need to remove the existing ovulation from the calendar before adding a new one.

Acceptance Criteria

Additional Notes

Please provide feedback or additional suggestions on the implementation of this feature.

EmmaTellblom commented 2 months ago

Im moving this because it will be easier to keep track of this when we have implemented the new databasedesign where even ovulations have cycle_id.