Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added the last period force remove if user unmarked the first day of the last period #196

Merged
merged 8 commits into from
Dec 12, 2023

Conversation

imblowfish
Copy link
Collaborator

@imblowfish imblowfish commented Nov 23, 2023

Closed #166
Closed #171

In this PR I added possibility to save empty array of cycles. Also I removed isMarkedFutureDays because now we using ion-datetime built-in limitation instead of custom checks
Also I added the new test #195

@imblowfish imblowfish added this to the v2.3.6 milestone Nov 23, 2023
@imblowfish imblowfish self-assigned this Nov 23, 2023
@imblowfish
Copy link
Collaborator Author

@IraSoro please give me rights to modify peri-tests projects. I cannot add this test #195 in this project

Copy link
Owner

@IraSoro IraSoro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 bugs:

  1. When the user marks only the future day, not the last one is removed, but all the cycles.
  2. When you switch to the editing of the calendar, the calendar switches in the first month of history, and not the last

@imblowfish
Copy link
Collaborator Author

imblowfish commented Dec 10, 2023

@IraSoro I agree with the first bug. It was because I believed in the variable name lastPeriodDays and didn't check twice what it stores. It turned out that this variable stores all dates instead of the last period days. To fix that I renamed current getLastPeriodDays function to getPeriodDays and added the new lastPeriodDays function which returns what is promised in the name

About the second bug. I cannot reproduce what you described. As example, I generated 2 cycles
image
image
And we have forecast period here
image

Let's click on Edit and this is what we get
image
As expected, edit calendar will open the last cycle to edit

Let's click on Mark and we'll get
image

Let's click on Edit again
image
As you can see edit calendar shows December as expected

Copy link
Owner

@IraSoro IraSoro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything is fine. Just add the ability to edit future days.

@IraSoro IraSoro force-pushed the 171-fix-bug-when-unmark-today-in-period branch from e1fb634 to 77d7c01 Compare December 12, 2023 10:26
@IraSoro IraSoro self-assigned this Dec 12, 2023
@IraSoro
Copy link
Owner

IraSoro commented Dec 12, 2023

@imblowfish please check the last commit

@IraSoro IraSoro self-requested a review December 12, 2023 19:50
@imblowfish
Copy link
Collaborator Author

imblowfish commented Dec 12, 2023

@imblowfish please check the last commit

Everything is fine

@IraSoro IraSoro merged commit f1faf10 into master Dec 12, 2023
2 checks passed
@IraSoro IraSoro deleted the 171-fix-bug-when-unmark-today-in-period branch December 12, 2023 20:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Bug when marking periods You can't delete all cycles in the calendar
2 participants