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

Is it possible to group resources with relational data?

0 Answers 36 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Jay
Top achievements
Rank 1
Veteran
Jay asked on 26 Aug 2020, 01:06 AM

Is it possible to group two or more resources together on data with relationship reference in scheduler?

Below is the sample code we are trying to implement, we wanted to check if we can map between two resources [Specialities, Practitioners].

In Practitioners data, it will have SpecialityID field which refer back to [Specialities](SpecialityID) field?

public group: any = {
    resources: ['Specialities', 'Practitioners'],
    orientation: 'horizontal'
};
 
public resources: any[] = [{
    name: 'Specialities',
    data: [
        { text: 'Phsiotheraoy', SpecialityID: 1, color: '#6eb3fa', type: 'Room' },
        { text: 'Massage Therapy', SpecialityID: 2, color: '#f58a8a', type: 'Room' },
        { text: 'Chiropractic', SpecialityID: 3, color: '#f58a8a', type: 'Room' }
    ],
    field: 'roomId',
    valueField: 'value',
    textField: 'text',
    colorField: 'color',
    multiple: false
}, {
  name: 'Practitioners',
    data: [
        { name: 'Angelo Williams', Personvalue: 1, color: '#008AFF', type: 'Person', img: this.firstContactImage, initials: 'AW', SpecialityID: 1 },
        { name: 'Desiree Watson', Personvalue: 2, color: '#E91E63', type: 'Person', img: this.secondContactImage, initials: 'DW', SpecialityID: 1 },
        { name: 'Aron Patrickson', Personvalue: 3, color: '#43A047', type: 'Person', img: null, initials: 'AP', SpecialityID: 2 },
        { name: 'Benjamin Chris', Personvalue: 4, color: '#B7342C', type: 'Person', img: null, initials: 'BC', SpecialityID: 3 },
    ],
    field: 'personID',
    valueField: 'Personvalue',
    textField: 'name',
    colorField: 'color',
    multiple: false
}];

 

Attached image is how this render, it will have each Specialities (3) on first grouping and each Practitioners (4) on the second grouping.

The question is, for example is it possible to only display [Angelo Williams, Desiree Watson] under [Phsiotheraoy], [Aron Patrickson] under [Massage Therapy] and [Benjamin Chris] under [Chiropractic]? 

So which mean is it possible to display Phsiotheraoy (2) Practitioners, Massage Therapy(1) Practitioner and Chiropractic(1) Practitioners, rather than each of them have all (4) Practitioners? 

 

Thanks 

No answers yet. Maybe you can help?

Tags
Scheduler
Asked by
Jay
Top achievements
Rank 1
Veteran
Share this question
or