Draft: small fix for loading holidays correctly#8
Open
boekhorstb1 wants to merge 3 commits into
Open
Conversation
Author
midahp
reviewed
Jan 24, 2023
Comment on lines
+3857
to
+3858
| let check = this.getCalendarList(data.type).textContent.replace(/[^\w\s]/gi, ''); | ||
| if (check === data.driver){ |
There was a problem hiding this comment.
Does this work if you already have multiple holiday calendars?
ralflang
self-requested a review
January 24, 2023 08:58
midahp
reviewed
Jan 24, 2023
| let check = this.getCalendarList(data.type).textContent.replace(/[^\w\s]/gi, ''); | ||
| if (check === data.driver){ | ||
| let check = this.getCalendarList(data.type).textContent; | ||
| if (check.includes(data.driver)){ |
There was a problem hiding this comment.
I think this will still fail if a calendar named foobar exists and want to create a new calendar named foo right?
Maybe I am wrong. I did not test it.
Author
There was a problem hiding this comment.
yes true. Need to adapt for the fact that calendars have partly the same name, as in: Australia, AustraliaNWS and so on
Author
|
ok so I found a way to install this with composer, see this issue |
boekhorstb1
force-pushed
the
updating-holidays
branch
from
January 26, 2023 11:10
5094887 to
9d35a24
Compare
boekhorstb1
force-pushed
the
updating-holidays
branch
2 times, most recently
from
January 27, 2023 21:21
2690314 to
ed5a8cf
Compare
|
Why is it a problem if one has the same holiday calendar twice? |
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.
Problem:
One can add a holiday calendar, then untoggles. After this it is possible to add the same calendar again. One can repeat this process for an infinite untoggled identical holliday calendars.
Solution:
Adds a simple check.
Note: This does not solve the fact that holiday calendars have to be installed by pear, as mentioned in this issue.