TSDK-417 Adding Event Reminders to Event Object#399
Merged
mrashed-dev merged 5 commits intomainfrom Oct 14, 2022
Merged
Conversation
Codecov Report
@@ Coverage Diff @@
## main #399 +/- ##
==========================================
+ Coverage 91.42% 91.51% +0.08%
==========================================
Files 60 61 +1
Lines 2554 2568 +14
Branches 460 462 +2
==========================================
+ Hits 2335 2350 +15
+ Misses 218 217 -1
Partials 1 1
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Removing one validation Removing one validation and fixing prettier Added some tests Revert "Added some tests" This reverts commit 596d496. Reverted a commit and used prettier Adding test and coverage for Event reminders Added test coverage
|
Thank you kraju3 for raising the PR. |
mrashed-dev
reviewed
Oct 14, 2022
| if ( | ||
| this.id && | ||
| ((this.reminders && | ||
| (this.reminders.reminderMethod || this.reminders.reminderMinutes)) || |
Contributor
There was a problem hiding this comment.
Why do we throw an error if the event has a reminders object set? In this case the user can never update an event that was created with a reminder as ID will be set and this.reminders will be set.
mrashed-dev
reviewed
Oct 14, 2022
Co-authored-by: Mostafa Rashed <17770919+mrashed-dev@users.noreply.github.com>
mrashed-dev
reviewed
Oct 14, 2022
Co-authored-by: Mostafa Rashed <17770919+mrashed-dev@users.noreply.github.com>
mrashed-dev
approved these changes
Oct 14, 2022
Contributor
mrashed-dev
left a comment
There was a problem hiding this comment.
Looks good to me! Will add additional test coverage.
mrashed-dev
approved these changes
Oct 14, 2022
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adding Event Reminder method to the Event object. Just creating a PR to see if I am on the right track here. I can see that our Object Schema from our API and the response we get back differ. There is some duplication that needed to be done to get this working. However, in this.validate() I am adding some validations to make sure the request passes through.
Questions And Concerns
So I am making sure no reminders are set on PUT calls using the id field
I still need to add some tests to test out read and write for this property
Also when you get the response back we get a reminders object :( So Mapping is different, so I had to duplicate some value with how our fromJson and toJson behave. But the weird thing is reminder_minutes is a string in the post request but it is an integer in the response
License
I confirm that this contribution is made under the terms of the MIT license and that I have the authority necessary to make this contribution on behalf of its copyright owner.