-
Notifications
You must be signed in to change notification settings - Fork 8
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 editing cycle history #95
Conversation
src/modals/Menu.tsx
Outdated
slot="start" | ||
icon={createOutline} | ||
<> | ||
<EditModal |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a my opinion, but you don't need to create separated file with EditModal
component it you'll shorten the code and separate the logic between СalculationLogic
and the component
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this modal should be left in a separate file. It has a lot of calculations, large code and has its own design.
Even after moving logic calculations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We discussed offline that you'll better to move all calc logic in the CalculationLogic
file, making EditModal
short enough to leave it inside Menu.tsx
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes
src/modals/EditModal.tsx
Outdated
|
||
return ( | ||
date.getTime() < lastCycleFinish.getTime() || | ||
date.getTime() <= nowDate.getTime() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like this expression always will be true
because any date will be lesser than now date
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, because it is a condition for all calendar dates
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Understand, then could you please rename lastCycleFinish
? Because now this variable looks like last cycle until today, but you mean that this cycle the end of the next expected cycle, which is calculated for the calendar
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Renamed
Closed #87
I added an edit that is in the menu.
Editing is done by adding or deleting marked days in the calendar. You can edit only up to the possible finish day of the current cycle.
I also added a native back button for it. But it only goes to the
home tab
. But I think it will be enough for this version.Screenshots here: