Split opening days and exceptions

Created on 21 December 2023, about 1 year ago
Updated 10 January 2024, about 1 year ago

Problem/Motivation

Sometimes it would be interesting to split the formatting of opening days and exceptions for theming reasons or other.

Quick solution and can be discussed:

<h6>Openingsuren</h6>
<div class="office-hours office-hours office-hours-status--open">
  <div class="office-hours__item">
    <span class="office-hours__item-label" style="width: 12em;">maandag tot vrijdag <span> van </span></span><span class="office-hours__item-slots">6:00 tot 18:00</span><span><br></span>
  </div>
  <div class="office-hours__item">
    <span class="office-hours__item-label" style="width: 12em;">zaterdag <span> van </span></span><span class="office-hours__item-slots">8:00 tot 12:00</span><span><br></span>
  </div>
</div>
<div class="office-hours office-hours office-hours-status--open exceptions">
  <h6 class="exceptions__title">Sluitingsdagen</h6>
  <div class="office-hours__item">
    <span class="office-hours__item-label" style="width: 12em;">zaterdag 23 december</span><span><br></span>
  </div>
  <div class="office-hours__item">
    <span class="office-hours__item-label" style="width: 12em;">zondag 24 december</span><span><br></span>
  </div>
  <div class="office-hours__item">
    <span class="office-hours__item-label" style="width: 12em;">maandag 25 december</span><span><br></span>
  </div>
  <div class="office-hours__item">
    <span class="office-hours__item-label" style="width: 12em;">dinsdag 26 december</span><span><br></span>
  </div>
</div>

Steps to reproduce

-

Proposed resolution

Provide a setting on the formatter to allow to split the opening days and exceptions.

Remaining tasks

Discuss if this is a meaningful feature request and implement.

User interface changes

Extra setting on formatters to allow to chose to split opening days and exceptions.
The output will change.

API changes

-

Data model changes

Extra setting on the formatters.

Feature request
Status

Closed: works as designed

Version

1.12

Component

Code - formatter

Created by

🇧🇪Belgium tim-diels Belgium 🇧🇪

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @tim-diels
  • 🇧🇪Belgium tim-diels Belgium 🇧🇪
  • 🇧🇪Belgium tim-diels Belgium 🇧🇪
  • 🇳🇱Netherlands johnv

    Hi Tim,
    please what you want to change, compared with current dev version.

    Some ideas/questions:
    - you can already theme the headers separately.
    - your grouping of exceptions days is still an @todo on the list (only mentioned in-code, not in an issue)
    - I believe that the output you want is otherwise already possible. Although only with the Table widget, not the 'default'/'text' widget.
    - what would be your output if 24-dec were not a Sunday, but a normal working day, with earlier closing time then the regular 18:00 ?
    - please check Season Formatter: Each season week as individual table Needs review which outputs separate tables
    - I did think about a setting 'display normal weekdays'; this way, in a view or block, you can add separate formatters/tables with separate theming for weekday/season/exceptions., as an alternative to Season Formatter: Each season week as individual table Needs review

    I am happy to add new styl;ing classes if needed.

  • 🇧🇪Belgium tim-diels Belgium 🇧🇪

    I'm already using the current dev version as there ware fixes I saw we needed and I would not want to fall behind on the new features. I know some would argue you don't use dev versions in prod, but sometimes I need this as there are pieces of code needed and they are shattered across different commits.

    I was indeed maybe only looking at the default/text widget. Could be that other formatters are able to output what I needed.
    For the moment I was able to output what I needed by overwriting a function. Maybe if I have more time I can look into this deeper. Just wanted to put this on the radar and see what the possibilities are/were.

  • Status changed to Closed: works as designed about 1 year ago
  • 🇳🇱Netherlands johnv

    You request is already possible.
    I did add implement Support grouped days for Exception dates Fixed , related to your request.
    Please try dev version.

Production build 0.71.5 2024