adamspd / django-appointment

A Django app for managing appointment scheduling with ease and flexibility.
Apache License 2.0
150 stars 41 forks source link

booking a resource rather than a human #155

Closed deronnax closed 6 months ago

deronnax commented 6 months ago

Hello. I ran into django-appointment recently and I have started to play with it, it's very nice.

Feature Description

I would like to book a physical resource, not a human (it won't be a StaffMember, then)

The Ideal Solution

I have no idea. Ideally it would be a different object than StaffMember but I have the feeling it might be hard or even undoable

The Current Solution

Additional Context

Are you willing to help with the implementation?

Priority

How important is this feature to you?

I don't think I will be able to achieve what I want with the current system :)

adamspd commented 6 months ago

It may be doable. What kind of resources are we talking about ?

deronnax commented 6 months ago

An infrastructure used for sport: tennis court, football field, ping pong table. Actually, just that an appointment doesn't have to have a staff member attached to it could be a beginning.

adamspd commented 6 months ago

The proposed service would be the resource to be booked.

Maybe the staff member would become a nullable field? (A condition could be added in the HTML template to remove the field altogether if it's null). A new field in service saying that it's a resource to be booked, no need for a staff member, may be necessary.

This could be the solution, but the drawback is that you'd have to create as many services as resources to book.

deronnax commented 6 months ago

Hmmm, I am no django model expert, but what if there was an intermediate model, representing a general resource to book, and this resource could either be a human or something non-human (typically something physical)?

adamspd commented 6 months ago

My train of thought was: I want a service that is being offered by one or many people from which I have to choose.

To represent it visually:

Choose a service -> choose the date and time -> choose someone who's offering that service.

The way I see it (correct me if I'm wrong), that intermediate model would be the equivalent of the service model (or the equivalent of staff member) ?

What I understood from the need you explained is that it would be like a service (resource to be booked).

I want to book a tennis court (resource)
I choose a date and time
I choose the one I need if there is several tennis court object [court 1, court 2 etc...] (optional)
Done

Of course, that is my understanding and I may be wrong, but if you have a better idea, I'm all for it.

deronnax commented 6 months ago

As we saw it live with Adams, I will actually not need this anymore. Thank you again for your thorough explanations, though.