We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Display the induvidual view in grouuping

Hi Team,

1) I have done grouping based on employee ID of my appointments so all the listed employeees are visible. Now when I select an employee from the dropdown only his view should be shwn.

Can you plesase help me on this.



2) Also I have followed workedDays and workHours of each employee,My scenario is for each employee, based on day the working hours differs, I could not find this scenario , can you help me how to achieve this.


Regards,
Amrutha

5 Replies

KK Karthigeyan Krishnamurthi Syncfusion Team August 26, 2019 11:05 AM UTC

Hi Amrutha, 
 
Syncfusion greetings. 
 
Please confirm that your requirement is to load specific view for specific resource to proceed further. For example, Employee1 resource should have only Day view where as Employee2 can have Week and Month views. 
  
Currently there is no option and we consider your requirement as feature which can be tracked from the below link. It will be implemented in any one of our release. 
 
Regards, 
Karthi 



AM amrutha replied to Karthigeyan Krishnamurthi August 26, 2019 08:17 PM UTC

Hi Amrutha, 
 
Syncfusion greetings. 
 
Please confirm that your requirement is to load specific view for specific resource to proceed further. For example, Employee1 resource should have only Day view where as Employee2 can have Week and Month views. 
  
Currently there is no option and we consider your requirement as feature which can be tracked from the below link. It will be implemented in any one of our release. 
 
Regards, 
Karthi 


Hi Karthi,

For Item1,  I have designed the plunker of my requirement. 

Below is the link: https://stackblitz.com/edit/angular-stwnme

In the examples, the scheduler is binded by grouping of "AirlineId" which contains all airlines. Now  I have a option of checking which airlines to be shown in the top.

When the user selects the airways1 and airways2, I need only those 2 airways to be displayed in the scheduler in all views, and on uncheck all should be displayed.
This is the snapshot of my requirement.




I tried with below code.but it failed

 airlineSpecificFn() {
    this.fileteredAirlines= [];
     if (this.a.value.length === 0) {
      this.scheduleObj.resources[0].dataSource = this.resourceDataSource;
     }
     this.a.value.forEach((x) => {
      if (x === x) {
       this.fileteredAirlines.push(x);
      }
    });
  
    this.scheduleObj.resources[0].dataSource = this.fileteredAirlines;
}

It works for few, but the header misses on changing the other options.




KK Karthigeyan Krishnamurthi Syncfusion Team August 27, 2019 10:37 AM UTC

Hi Amrutha, 
 
Thanks for the update. 
 
If we render all resource on unchecking all the check box means next time clicking the check box will not show difference as we have rendered all resources before it. We have prepared the below sample to render empty Scheduler while unchecking all the check box. 
 
onChange(args: ChangeEventArgs): void { 
    let value: number = parseInt((<Element>args.event.target).getAttribute('value'), 10); 
    let resourceData: Object[] = 
      this.calendarCollections.filter((calendar: { [key: string]: Object }) => calendar.AirlineId === value); 
    if (args.checked) { 
      if (this.scheduleObj.group.resources.length === 0) { 
        this.scheduleObj.group.resources = ['Airlines']; 
        debugger 
        this.scheduleObj.addResource(resourceData[0], 'Airlines', 0); 
      } else 
        this.scheduleObj.addResource(resourceData[0], 'Airlines', value - 1); 
    } else { 
      var resourceColl = this.scheduleObj.resourceCollection[0].dataSource as { [key: string]: Object }[]; 
      if (resourceColl.length === 1) { 
        this.scheduleObj.group.resources = []; 
        this.scheduleObj.resourceCollection[0].dataSource = []; 
      } 
      else 
        this.scheduleObj.removeResource(value, 'Airlines'); 
    } 
  } 
 
Regards, 
Karthi 



AM amrutha August 27, 2019 05:53 PM UTC

Hi Karthi, 

Thanks for the solution provided.  It meets my requirement. 

But I need the negation of it,

Requirement Scenario: 

Intially when all are uncheked all 3 must be coming, And onclicked the corressponding items should popup. Is there any other way of doing?


In Plunker : If all are unchecked ,  all 3 Airlines must be coming in a single view. The grouping feature is missing all.

Regards,
Amrutha


VD Vinitha Devi Murugan Syncfusion Team August 28, 2019 01:06 PM UTC

Hi Amrutha 
  
Syncfusion greetings. 
 
We had prepared the sample based on your requirement, which can be viewed from below link: 
 
 
Kindly check the sample and revert us, if you need any further assistance on this. 
 
Regards, 
M.Vinitah devi 


Loader.
Live Chat Icon For mobile
Up arrow icon