Roomify / bat_drupal

Booking and Availability Management Tools for Drupal 7 and Drupal 8
33 stars 7 forks source link

Questions about Availability of Units - Assigning Availability to Users #21

Closed derimagia closed 8 years ago

derimagia commented 8 years ago

Great module so far. I'll most likely be using this for a Project I've been working on so I'll be digging into it more.

I want to make sure I'm clear on a few things:

Functionality I need is the ability for users to set their own Availability. This will let the system only book appointments during certain times, and deny access otherwise.

So this was my plan:

1) Set up 2 types of events - Availability and Appointments 2) Link "Users" and "Units" so that each User who can be booked has a unit 3) Let the User's create "Availability" events 4) Only allow other users to create "Appointment" events when they have "Availability" events.

It seems a bit weird, is there a better way to do this? I'm thinking about forking some functionality for this, but I was curious if you guys had better insight.

Thanks

qcutter commented 8 years ago

Im not sure, and Im trying to wrap my head around the architypes myself, but this is my thoughts. First, I think you are trying to setup a member:role managed booking system, where members can set there availability for other member:roles to book on. In this case, I think you setup, and allow member:role1 to be able to create a unit (perhaps called Booking). Then that member can set when they are available (if they have more than 1 slots of availability (ie barber seats) then they create a unit for each bookable seat). Then the other members can book based on member:role1 availability.

If your talking about having a system where members can only book on other members available slots, if they themselves are available, then its a little more complicated, but may be able to done simply with a rule, that only allows a booking if the compared booking target state matches the current users booking state.

--- my 2 cents :)

simmonspaul commented 8 years ago

I have the same user case of needing members to be able to provide and manager their own availabilities.

I am looking forward to being able to properly evaluate this module.

In the meantime, I have found a way of achieving this scenario alternatively. The link is a good walk through of a reservation solution, I have provided a way of adding resource availability in the comments.

Hope this helps. Paul

derimagia commented 8 years ago

My solution so far was to create a "unit" for all users who need to book their time on user update. It's not the best solution, but it works for now.

What link are you talking about @simmonspaul

simmonspaul commented 8 years ago

sorry meant to paste it. http://www.bkosborne.com/blog/creating-resource-calendar-drupal-7

derimagia commented 8 years ago

Thanks for the link. It doesn't look like they have the ability to set availability. Also it looks like "Resource Conflict" doesn't work with entities, which is a shame since these really shouldn't be nodes...

There is a ticket open for it though: https://www.drupal.org/node/1913902

Good info though, let me know if you find anything else.

simmonspaul commented 8 years ago

No problem. In the comments of the link, I added the way that I was able to set availability for the resources. (Effectively I created a mirrored resource (with a known prefix) for each resource to capture availability reservations for the underlying resource with a complex rule to do the validation.) As I too want to reserve Users (indeed profile2s), the resources that I created (nodes) are titled with the name of my users, hence I can relate them (the nodes to users) in views and permissions via tokens as required. Happy hunting. Paul

istos commented 8 years ago

Probably makes more sense to move this discussion over to the module's page. Thanks :-)