Resource booking grid
This chapter ...
Table of contents
Drupal projects discussed in this chapter: Resource booking grid.
Introduction
The name space "rbg" is available.
Resource booking grid (RBG) is a fork of Room Reservations.
Installation
[TBA]
Setting up
Detailed (but outdated) instructions for configuring the module can be found at Drupal.org.
- Navigate to admin/config/content/room_reservations to set up policies, and date and hour format.
- Click on "Hours" tab to determine opening hours.
- Click on "Display text" tab to provide som texts.
The module defines three types of content. All appear when you visit Structure ยป Content types and Add content.
- Resource category: A category a resource can be assigned to (e.g. dormitory, exhibition hall, etc.).
- Resource: A resource that can be booked.
- Booking: A booking of a specific resource for a specific duration.
- * Booking type: A booking type (owner, friend w./owner, friend alone, blocked, etc.), .
- * Price event: A percentage that modifies the price for a specific duration.
Those marked with a * are not yet implemented.
Setting up RBG
- Navigate to date settings and select ISO dates.
- Give the authenticated user the following permissions: RBG booking: Create new content, Edit own content, Delete content.
Creating and using a bookable resource
Set up at least one category and one resource. This produces a grid (path includes date). Resources can now be booked by clicking in grid and selecting duration.
Note that comments are by default enabled (can be turned of in the GUI).
Calendar display
The default calender display is shown below:
The display has two sets of tabs, with a text and date field between them.
The top tab is:
- Calendar (OK)
- My reservations (produced by Views, should be on user's profile page
- Room descriptions (produced by Views, link to separate page, rather than tab?)
- Policies (Link to separate page, rather than tab?)
The second tab is:
- Room categories (in the screen dump allow only "Soverom").
The main problem with current display is that it requires a lot of screen area.
Flip display feature allows for a large number of rooms, but requires a short time frame (week?) and custom css to work right. Leave as is?
Schema
The only native table is _variables
. It defines:
- default_hours (not needed)
- calendar_text: top of calendar page
- reserve_instructions: below logo on cal page
- reserve_form_instructions: ???
- policies: own page (policies tab)
Everything else is in fields that are created on the fly (but are explictly deleted upon uninstall).
Manual tests
- Navigate to Structure/Content types. Verify that Booking, Resource and Resource category exists.
- Click on link: "Resource booking hrid". Verify calender view (or sensible error message).
- Verify: Create booking.
- Verify: Update booking.
- Verify: Delete single booking.
- Verify: Delete series booking.
To do
Pending:
- Tidy up uninstall (fields and variables).
- Create month view for single resource (for Margarita).
- Remove extended permissions.
- Stop it from not showing the past if user has 'Administer the room reservations system'.
- Change machine names of bundles and variables.
- Remove opening and closing times (open all day).
- Use -1 (not 0) to indicate no limit.
- Allow different booking types (owner, friend, blocking, etc.) and a colour scheme.
- Introduce a 'blocking' booking type to make resource inaccisble at certain times.
- Change bundle names.
- Introduce granularity: day,week, month.
- Make first day of week configurable.
- Change default vertical display from hours to days of the month.
- Use system date and time formats.
- Time picker relies on US-date format being selected (
y/m/d
). Fix to accept ISO date (Y-m-d
).
Done:
- Change placement of admin from "system" to "content" (inital commit).
- Remove commented out code.
- xRemove qtip dependency (also fixed undefined notices).
- Fix remaining field errors for reistall.
- Fix array overrun if no rooms exist.
- Make room description a single line.
- Change human readable names to resource.
- Remove unused admin functions.
- Fix node options.
- Remove graphic.
- Remove unused sms and mail functions.
- Move variables to global variables table.
- Fix default display texts.
Booking types and pricing model
Percentage of base price (e.g. Tolfa):
- Members, 75 (100 %) (base price), ddffdd
- Family 100 (133 %), aaffff
- Friends w. member 200 (267 %), cceeff
- Friends alone 300 (400 %), ffff60
- Friends, long term stay 150 (200 %), ffff60
- Seminary, 650 (867 %) per room, ffe0e0
- Blocked, 0 (0 %), 888888
Special rules:
- Children under 12 on room with adults do not pay.
- Person 3 and 4 on a room pay 50 (67 %)
Content types overview
* RGB booking type fields:
- Name
- By person (or room - boolean)
- Percentage of base price
- Children modifier 0 (0 %)
- Quantum modifier 50 (67 %)
- Quantum modifier limit (> 2)
- Colour
- Weight
RGB booking fields (without helper fields):
- Booking title
- FromTo
- Resource
- Private
- Slot [unused?]
- Booking type
- Bookingtype
- * Adults
- * Children
- * Computed price
- * Status (pending, confirmed)
RGB category fields:
- Category (name)
- Minimum advance booking
- Weight
* RGB price adjustment fields:
- Name
- Recurring (annually recurring adjustment)
- Campaign (time limited price adjustment campaign)
- Resource (or -1 for all resources)
- Percentage (price adjustment to apply)
Both recurring and campaign can be set, but they cannot overlap.
RGB resource fields:
- Resource name
- Description
- Capacity
- Category
- Default category
- Weight
Owner is either logged in user, or a special user "bookingmaster". Owner can change booking. Bookings has revisions enabled.
Pricing model
- Each resource has two base prices (own fields) for daily and hourly rental (-1 means NA).
- The booking type has a percentage modifier, so owner is 100 %, friends with owner is
Features
Margarita:
- When booking, email is sent to all members, and state is set to pending. If there are no conflict in X days, automatically set to conformed.
Final word
[TBA]
Last update: 2017-07-23.