-
Notifications
You must be signed in to change notification settings - Fork 63
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
fix(ui): duplicate schedule warning #295
fix(ui): duplicate schedule warning #295
Conversation
Hey Aditya, please see the task in the Bug Tracker project and let me know if this explains more about the issue and how it can be fixed. Not sure if that is what your method handles. |
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.
LGTM (still need review from Sam, Diego, or Elie) but the loophole seems to be fixed with this PR
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 good in general, but there's a big chunk of duplicate code that should be reduced (see other comments for more details)
This is the perfect PR for that! 😄 |
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 pretty good, couple of small changes requested to ensure code quality
code works on my machine 👍
src/views/components/common/DialogProvider/useEnforceScheduleLimit.tsx
Outdated
Show resolved
Hide resolved
src/views/components/common/DialogProvider/useEnforceScheduleLimit.tsx
Outdated
Show resolved
Hide resolved
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.
LGTM, awaiting re-review of UI from @IsaDavRod
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.
erm, looks giga chad to me
Issue: it is possible to bypass the schedule creation limit by selecting certain options.
Solution: I created a useEnforceScheduleLimit hook in the DialogProvider directory
These hook attempts to add/duplicate a schedule, but displays a warning dialog whenever the schedule limit is breached.
This hook is used in the CalendarSchedules, ScheduleListItem, and PopupMain components.
This change is