meeting-room-booking-system / mrbs-code

MRBS application code
Other
108 stars 56 forks source link

Booking duration of 1 month #1787

Open jberanek opened 7 years ago

jberanek commented 7 years ago

Hi,

I have a request to allow bookings of 1 month (not less, not more). At this time I don't worry much whether the booking does start of the 1st working day of the month or not but I'll have to look at it at some point in time. For the time being I'm trying to enforce the duration.

I tried to set the duration and granularity to 43800 minutes but this fails with the "Invalid combination of first slot, last slot and resolution!" message.

May be the "hours" mode isn't appropriate but I must admit that I just don't get what the principle of "periods" is and how it works though, may be, it is the answer to my need.

Any help is most welcome. Thanks.

Reported by: treblig-fr

Original Ticket: mrbs/support-requests/1066

jberanek commented 7 years ago

Periods are designed for schools where there are a fixed number of periods per day, often with gaps between them. The schools don't care when in the day the periods occur (because they know that already). They just want to assign classrooms to teachers/subjects. I don't think periods are the answer here.

You mean that you want all bookings to last exactly one calendar month, no more, no less?

Original comment by: campbell-m

jberanek commented 7 years ago

Hi Campbell,

OK, I see what MRBS periods are now. Thanks.

Yes, all bookings (of all resources of one given area only) will last exactly one calendar month.

Original comment by: treblig-fr

jberanek commented 7 years ago

I think you'd have to

(1) modify edit_entry.php so that the End date and time fields are not displayed and then

(2) modify edit_entry_handler.php so that the End time is set to exactly one calendar month after the start time.

Original comment by: campbell-m

jberanek commented 7 years ago

Thanks Campbell. I'll have a look at that though I want to make sure I don't break the "normal" logic for all areas (only one area will have monthly booking resources).

Original comment by: treblig-fr