This is a migrated thread and some comments may be shown as answers.

Resource availability

3 Answers 128 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Richard
Top achievements
Rank 1
Richard asked on 22 Oct 2008, 04:54 PM
Hi.

I'm looking to use the scheduler to check the availability of recources over multiple days. There can only be one 24 hour appointment for each resource between a set date span. Currently, the grid can group by resource in timelime view - which is great - but I would like to make sure each resource can only have one entry.

I will explain my situation to try and make myself a bit clearer. We have 20 rooms which can be hired out in 24 hour periods, and there can only be one occupant listed for that room. You can view a picture of what I'm trying to achieve here.

Can you please advise the best way to restrict the row to a single line height (so bookings cannot overlap for that resource) whilst still enabling insert into available slots?

Many thanks.

3 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 23 Oct 2008, 03:22 PM
Hi Richard,

Please, review the Limiting concurrent appointments - client-side example.The Appoitnment and TimeSlot client objects expose the get_resources() and get_resource() methods respectively which will allow you to extend the approach from the example to fit your needs.

Let us know if you need further help.

All the best,
Peter
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Richard
Top achievements
Rank 1
answered on 23 Oct 2008, 04:04 PM
Hi Peter. Thanks for your reply.

I have already looked at this demo, and think this code will help with the development.

However (in day view) you cannot add another appointment to a slot where there is already an appointment. In timeline view, where the resource is grouped, a new empty slot is shown under the existing appointment and a new one can be inserted. Can this empty appointment placeholder be hidden so that only one appointment can be in one slot?

The grid would then show resources down the left and dates across the top, and the only available slots would be where there is not already an appointment.

Can this be achieved?

Thanks.
0
Peter
Telerik team
answered on 24 Oct 2008, 02:45 PM
Hi Richard,

Hiding the space underneath the apopintment is not a safe solution, since a user can set the start and end date of an appointment in advanced mode or drag or resize an existing appointment. That is why you need to handle the client events of RadScheduler as shown in the example:

OnClientAppointmentMoveEnd="appointmentMoveEnd"
OnClientAppointmentMoving="appointmentMoving"
OnClientAppointmentResizing="appointmentResizing"
OnClientAppointmentInserting="appointmentInserting"

Note also that a resource association to an appoitntment is independent of RadScheduler's selected view. You don't have to be concerned about checking which is the currently selected view.

I hope this helps.


Kind regards,
Peter
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Scheduler
Asked by
Richard
Top achievements
Rank 1
Answers by
Peter
Telerik team
Richard
Top achievements
Rank 1
Share this question
or