Add 'all day' feature

Created on 21 November 2022, about 2 years ago
Updated 18 April 2023, over 1 year ago

Problem/Motivation

When using office hours, there is no easy way to say "all day" for either open or closed.

Proposed resolution

For regular days have a check box for all day, which means that open 24 hours, since you can already put the other hours for opened. For exception days, when all day is selected, have a selection for whether it is open or closed for that day.

Regular Days:

Exception Days:

or:

Display:

Settings:

Feature request
Status

Fixed

Version

1.7

Component

Code

Created by

🇨🇦Canada ebremner

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • Status changed to Needs review almost 2 years ago
  • Status changed to Needs work almost 2 years ago
  • 🇳🇱Netherlands johnv

    I committed the above patch, to have the code freed up to work on the 'seasonal' issues.
    Please check above comment #19, work work to be done.

  • 🇷🇸Serbia super_romeo Belgrade

    Many my user set "Around the clock" as 08.00 - 08.00 or 07.00 - 07.00 or kind of this.
    Maybe we could replace

    'all_day' => ($starthours === '0000' && $endhours === '0000'),
    

    with

    'all_day' => ($starthours === $endhours),
    

    ?

  • 🇨🇦Canada ebremner

    John,
    I have tested on the 8.x-1.x build and most of the things work. However, I did fine some issues:

    1.) If you choose all day, the times are automatically filled in for 0000 to 2359 and then if you try to uncheck all day, the times still stay and if you save, the all day gets checked. My suggestion is not to autofill the times if the all day is selected, just to know that if all day is selected in the "open" hours, that means open all day.

    2.) In the exception hours section, the all day could mean two things, either open all day or closed all day. This is why I had the option for either open or closed. The case is say that the business is open 24 hours on a Tuesday but one Tuesday they are closed, so that would be closed all day. I guess the point could be made for the case that if you select all day that means open all day no matter what, but how do you represent closed all day?

    3.) The JS I had to make times disabled when all day is selected seems to have disappeared.

    Would you like me to work on these issues?

  • 🇳🇱Netherlands johnv

    Hi Eric,

    Problem with both normal and exception days is indeed: when is all closed, and when is all Day open?
    So, the answer is, all_day open when times are from 0000 to 0000 (or 01:00 to 01:00) , and als cay closed is when both times are not set / NULL.

    Indeed, I did set the 0000-0000 in the widget itself. it could be moved to the Save moment. But then, the problem has moved to a later time, not solved.
    So, yes, to avoid accidentally setting the all_day, that action can be moved.
    Please see the other issues, that complains/states that 03:00-03:00 is also all_day. I am still doubting about that. perhaps people want 03:00-03:00 to be stated in the formatter as such, and only 'All day ' text whenthe checkbox is set.

    The JS just works fine for me: When you set the checkbox, the times are greyed out. I habe ot of the box Olivero and Claor themes, but they do seems to be 'off' some how. I did change from D9 to D10 and back, using GIT, perhaps this makes some settings inconsistent?
    The checkbox is not cleared when a 'remove' link is selected.

    Please refine whatever you feel like.
    I have updated my way of working with GIT, so I will not post fixes every day, now, but save them for later.
    At the moment am working on the season functionality.

    Groet, John

  • Status changed to Fixed over 1 year ago
  • 🇳🇱Netherlands johnv

    Hi Eric,
    I guess all open problems now have been addressed, or mentioned in another ticket.

  • 🇨🇦Canada ebremner

    Yes I would say so

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024