Skip to content
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

Exceptions within periods aren't listed in exceptions template #16

Open
hughbris opened this issue Apr 7, 2020 · 0 comments
Open

Exceptions within periods aren't listed in exceptions template #16

hughbris opened this issue Apr 7, 2020 · 0 comments

Comments

@hughbris
Copy link
Owner

hughbris commented Apr 7, 2020

This has just come up. Reasonably obscure and there is a workaround. Business has limited operation hours for a period because of Covid-19 lockdown, and I need to include Good Friday and Easter Monday as exceptions within the period because they are non-operational days. The problem is that the exceptions display template does not recurse into the periods for exceptions.

Easily worked around by duplicating the period exceptions at the outer level, but not ideal.

Ideal:

    periods:
      - begin: "2020-03-26"
        end: "2020-04-23"
        description: Emergency operation hours
        name: "COVID-19 lockdown"
        regular:
          monday:
            - opens: "09:00"
              shuts: "16:00"

          # YADA YADA …

          friday:
            - opens: "09:00"
              shuts: "16:00"
        exceptions:
          '2020-04-10':
            hours: []
            comment: 'Good Friday'
          '2020-04-13':
            hours: []
            comment: 'Easter Monday'

Workaround:

    regular:
      # YADA YADA …
    exceptions:
      '2020-04-10': # has to be added redundantly
        hours: []
        comment: 'Good Friday'
      '2020-04-13': # has to be added redundantly
        hours: []
        comment: 'Easter Monday'
    periods:
      - begin: "2020-03-26"
        end: "2020-04-23"
        description: Emergency operation hours
        name: "COVID-19 lockdown"
        regular:
          # YADA YADA as above with duplication …
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant