JavaScript UI Libraries & Blazor Components Suite – Smart UI › Forums › General Discussions › Scheduler Resources
Tagged: assignment help
- This topic has 13 replies, 7 voices, and was last updated 4 months ago by Markov.
-
AuthorPosts
-
February 11, 2021 at 12:19 am #101474MilesGibsonMember
Has anyone used the Resources feature of the Scheduler? I am happy to see that it is possible to have multiple resources against a given calendar event, but the demos don’t cover this.
TIA,
MilesFebruary 11, 2021 at 8:42 am #101477HristoforMemberHi MilesGibson,
Here’s a demo that shows how to set two resources to each Scheduler event. Clicking on the radio buttons in the options area of the demo changes the order of the resources which determines the color of the events in the Scheduler. Resources are assigned to the events as key:value pairs, for example:priorityId: 2, employeeId: 2,
where the key represents the value of the resource and the value in the pair represents the id of the item from the resource dataSource property. Assigning resources to an event can also be done via the Window editor by double clicking on an event. You can read more about Scheduler Resources in the following dedicated topic.
Best Regards,
Christopher
Smart HTML Elements Team
https://www.htmlelements.comFebruary 11, 2021 at 3:48 pm #101483MilesGibsonMemberThanks for that! Does the scheduler work with a 1 event to 1 employee, or 1 event to many employee scenarios?
If I book an all-day event for the entire company of 500 people, I don’t want to have to create 500 events. Right now I have an Events table that relates to Event-Employees, that is where I am storing the employees that are assigned to that event. It looks like your scheduler accepts a List<Resource> of records, so I presume the former, but want to understand this better.
Thanks again,
MilesFebruary 12, 2021 at 8:10 am #101488HristoforMemberHi MilesGibson,
the Smart.Scheduler supports one resource item per event. That means that you can have any number of resources and an event can have any number of resources assigned but only one resource item per event. For example if you have a resource called employees itsdataSource
can contain a list of items where each item is a separate employee. You can assign one employee to an event since all employees are part of the same resource. However if you create the employees as separate resources instead you will be able to set multiple resources(employees) to an event, for example:dataSource = [ { label: 'Website Re-Design Plan', dateStart: new Date(year, month, date, 9, 30), dateEnd: new Date(year, month, date, 11, 30), andrew: 1, brian: 1, steven: 1 } ]; resources = [ { label: 'andrew', value: 'andrew', dataSource: [ { label: 'Andrew Olsen', id: 1 } ] }, { label: 'brian', value: 'brian', dataSource: [ { label: 'Brian Reed', id: 1 } ] }, { label: 'steven', value: 'steven', dataSource: [ { label: 'Steven Shields', id: 1 } ] } ];
Best Regards,
Christopher
Smart HTML Elements Team
https://www.htmlelements.comFebruary 12, 2021 at 5:35 pm #101493MilesGibsonMemberOk, thanks. I note in the DataSource example that the Resources all have the same Id. Is that just a typo? I will figure out how to create a view that itemizes the resources for each event the way you have done in your example. The list of resources can be pulled from the detail view, no problem.
Also: can I modify the appointment template?
FYI: The downloaded Visual Studio demo project is missing the Scheduler component from the main menu, plus the default view types don’t include Agenda, which I think is an important feature. It would be nice to see a demo component for Blazor in this project, but if I get one working, I will send it along.February 13, 2021 at 8:14 am #101494adminKeymasterHi MilesGibson,
1. The id here represents a property of the Event in the specific resource. It is not necessary to be unique id in this case.
2. No, it is not currently possible to modify the template for Scheduler Events.
3. The blazor-demos/pages folder contains the Scheduler Blazor page.
Best regards,
Peter Stoev
Smart UI Team
https://www.htmlelements.com/December 13, 2023 at 4:25 pm #109301Tessie SoratosParticipantThanks for the information!
June 12, 2024 at 4:40 pm #111019yasmani borowskiParticipantI agree with you, the information was helpful
July 30, 2024 at 8:39 pm #111201FullStackDevATLParticipantWe have implemented a scheduler in Angular (see versions below). The event has two properties that are used as resources (relationship manager ID and calendar entry type ID).
Everything works fine until you start “double” filtering. I am not able to pinpoint exactly when the problem occurs and replicate consistently.
Steps to reproduce:
1) Filter by employeeID
2) Filter by calendar entry type ID
3) Some back and fort with concurrent filtering.4) At a certain point, you will notice that the current state of the filtered calendar is lost. For example, filtering by calendar type ID does not take in account the fact that the calendar is already being filtered by a certain relationship manager ID.
Is this a known issue?
Dependencies:
smart-webcomponents-angular: “^18.0.2″
angular/core”: “^16.2.12″,
—————————————————————————————-
<div>
<div>console.log(this.scheduler.resources);</div>
<div>console.log(this.scheduler.dataSource);RESOURCES
[
{</div>
<div>”label”: “Relationship Manager”,
“value”: “relationshipManagerId“,
“dataSource”: [
{
“id”: “803a89ac”,
“label”: “Bob”,
“backgroundColor”: “black”
},
{
“id”: “3479d5743”,
“label”: “John”,
“backgroundColor”: “black”
},
{
“id”: “50f22103”,
“label”: “Yuri”,
“backgroundColor”: “black”
}
]
},
{
“label”: “Calendar Entry Type”,
“value”: “calendarEntryId“,
“dataSource”: [
{
“label”: “Custom Alert”,
“id”: “1”,
“backgroundColor”: “#3777bc”
},
{
“label”: “Notice 3”,
“id”: “3”,
“backgroundColor”: “#c59466”
},
{
“label”: “Notice 2”,
“id”: “2”,
“backgroundColor”: “#ff5966”
},
{
“label”: “Notice 4”,
“id”: “4”,
“backgroundColor”: “#a4be3a”
}]}]</div>
</div>
<div></div>
<div>Event Array (truncated)</div>
[{
“label”: “My label”,
“dateStart”: “2024-07-31T04:00:00.000Z”,
“dateEnd”: “2024-08-01T04:00:00.000Z”,
“allDay”: true,
“relationshipManagerId“: “803a89ac”,
“id”: 452,
“color”: “#012639”,
“backgroundColor”: “#ff5966”,
“calendarEntryId“: “2”,
“contractName”: “Sample”,
“relationshipManagerFullName”: “Bob Smith”,
“entryMessage”: “Contract End Date”
}- This reply was modified 4 months ago by FullStackDevATL.
- This reply was modified 4 months ago by FullStackDevATL.
- This reply was modified 4 months ago by FullStackDevATL.
- This reply was modified 4 months ago by FullStackDevATL.
July 31, 2024 at 10:45 am #111214MarkovKeymasterHi,
The provided information is insufficient for replicating an issue on our side. Could you share the full details of your experiment?
Regards,
MarkovSmart UI Team
https://www.htmlelements.com/July 31, 2024 at 11:32 am #111215FullStackDevATLParticipantcan I email the files to support@jqwidgets.com?
August 5, 2024 at 11:09 am #111231MarkovKeymasterAugust 5, 2024 at 1:40 pm #111240FullStackDevATLParticipantThank you Markov.
Before I send you the code, can you please confirm that the scheduler supports filtering by more than one resource at the same time?
In other words, if I filter the events by resource A, does a subsequent filtering by resource B go against the filtered events or against the initial unfiltered events?
August 5, 2024 at 3:10 pm #111241MarkovKeymasterHi,
You should be able to filter by more than one resource in the scheduler. The different filter values are displayed in the legend bar, if it is enabled.
Regards,
MarkovSmart UI Team
https://www.htmlelements.com/ -
AuthorPosts
- You must be logged in to reply to this topic.