meeting-room-booking-system / mrbs-code

MRBS application code
Other
127 stars 63 forks source link

Hide "All Day" checkbox #3725

Open stueja opened 3 months ago

stueja commented 3 months ago

Describe the problem you're facing/question you have I am trying to switch from period-based booking to time-based booking. Users shall, if necessary, select a start time and an end time. In this scenario, the "all day" checkbox is not necessary. I read areadefaults.inc.php and systemdefaults.inc.php and could not wrap my head around a possibility to get rid of the checkbox. Is there a possibility which I have overlooked?

Also, setting the checkbox shows a strange behaviour. If the checkbox is activated, the times are garbled. Please see attached screenshots for settings and behaviour.

Browser details (please complete the following information):

Server details (please complete the following information):

Additional context Add any other context or screenshots about the feature request here. Settings:

Bildschirmfoto 2024-08-16 um 12 13 01

Checkbox unset:

Bildschirmfoto 2024-08-16 um 12 11 54

Checkbox activated:

Bildschirmfoto 2024-08-16 um 12 12 04
campbell-m commented 3 months ago

In this scenario, the "all day" checkbox is not necessary. I read areadefaults.inc.php and systemdefaults.inc.php and could not wrap my head around a possibility to get rid of the checkbox. Is there a possibility which I have overlooked?

No, I'm afraid there isn't a config setting, so you'd have to modify the MRBS code. Adding a config setting would be easy though, but I'd be interested to understand why you don't want the checkbox.

If the checkbox is activated, the times are garbled.

I couldn't see anything wrong in the screenshots. Can you explain some more?

stueja commented 3 months ago

No, I'm afraid there isn't a config setting, so you'd have to modify the MRBS code. Adding a config setting would be easy though, but I'd be interested to understand why you don't want the checkbox.

If I understood the settings right, then I set MRBS up to book 1 day now. In the screenshot from Aug 5, 9am to Aug 6, 9am. The user now only needs to

I couldn't see anything wrong in the screenshots. Can you explain some more?

With pleasure. The screenshot in which "All Day" ("Ganztägig" in the screenshot) is unchecked, the start time is 9:00am and the end time is 9:00am, showing "1 Day" (1 Tag) as duration which seems correct.

The second screenshot which has "All Day" checked, the start time changed to 8:00am, but the end time is 9:00pm (21:00) which is then not "all day" but "all day plus 13 hours".

I should have mentioned that I did not change the start time (to 8:00am) nor the end time (to 21:00) manually. MRBS did that once I checked the "all day" box.

campbell-m commented 3 months ago

Ah, I think there's a misunderstanding about what the All Day checkbook does. It's a quick way of selecting all day, every day. In your example you had set the start date to 5 Aug and the end date to 6 Aug. When you check the All Day checkbox then the booking is automatically adjusted to go from the start of the first slot on the start date to the end of the last slot on the end date.

campbell-m commented 3 months ago

Maybe the German translation is confusing? It's supposed to mean "all of one day", not "a 24 hour period, possibly spanning two days".

stueja commented 3 months ago

Ah, now I understand a little better what happened. The German translation is quite usual though, but I had to wrap my head around the first and last booking period (8-21). Thanks alot so far, I must think about my wish a little :)