-
Notifications
You must be signed in to change notification settings - Fork 5
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
Sample solution for feature request in #47 #48
base: master
Are you sure you want to change the base?
Sample solution for feature request in #47 #48
Conversation
…in additionalDates field
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 could be useful. The utility of this has always been hampered by the difficulty this helps address.
The new dates could feed into self.repeatEvent
, populating addDates
with the values instead of using the repeater loop.
@boutell what do you think about adding this?
@@ -61,7 +61,7 @@ module.exports = { | |||
{ | |||
name: 'dateType', | |||
label: 'What type of event is this?', | |||
help: 'Select if the event is on a single day, consecutive days, or repeats.', | |||
help: 'Select if the event is on a single day, consecutive days, multi-day or repeats.', |
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.
Maybe "a single day, consecutive days, repeating, or non-consecutive multiple days."
As an aside, if taking this approach, then I'd like to include a toggle to suppress the creation of actual additional events if that would be acceptable? I am primarily looking at having the dates available for a labelling perspective, which we pump into custom pieces such as in the attached. Our primary goal is selling event attendance, for which we use a third party booking engine widget within the piece, which allows selection of specifically enabled dates, hence creating multiple Apostrophe events is sort of contra-indicated. |
Thanks for digging into this! I am certain it would cause confusion and upset for other developers if these additional dates (and times?) did not actually put the event fully "on the calendar," so to speak, for each of those dates/times. That includes things like making it very sure that they come up for those days in a database query for just that one day's events, etc. Because we've seen that confusion and regretted taking somewhat similar half-measures in this area in the past. I appreciate you have some unusual requirements that push in the other direction. But, this could be a concern for you as well. Consider what happens when Apostrophe thinks the event is in the past because the "additional dates" are not really part of the query. It will no longer show up as upcoming and available. |
I agree with Tom. An events system that doesn't create documents for each instance could be useful, but that's not the pattern established in this module. There would need to be significant additional logic to track whether all instances of the event were in the past. At that point it might be better to cannibalize this module to create a new one with different expectations. I do think that the multi-date array could be a useful addition assuming it otherwise uses the established pattern. Though then you'd probably want to clear that field after the new docs are created. It could be used again later to create additional new dates, otherwise you end up with a sort of umbrella event with many related events. Tricky. |
Sample solution to close #47
Adds multi-date dateType option and collects array of additional dates in additionalDates field when selected